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:
+ #
- readOnly - indicates that the read-write server is intended not
+ # to participate in query operations
- all - indicates that the
+ # read-write server can participate in query
+ # operations
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:
+ # - readOnly - indicates that the read-write server is intended not
+ # to participate in query operations
- all - indicates that the
+ # read-write server can participate in query
+ # operations
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