From 2f26da7763774f8439fe652da282ade088c2cf99 Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Mon, 17 Sep 2018 16:20:13 +0000 Subject: [PATCH 1/2] Generated from 080d60a60e65dbe37c8cf60da7e033aa86cf4a2a updating readme to include sdk for all languages --- .../generated/azure_mgmt_databox.rb | 92 ++ .../data_box_management_client.rb | 137 ++ .../generated/azure_mgmt_databox/jobs.rb | 1300 +++++++++++++++++ .../models/access_protocol.rb | 16 + .../models/account_credential_details.rb | 77 + .../azure_mgmt_databox/models/address_type.rb | 17 + .../models/address_validation_output.rb | 66 + .../models/address_validation_status.rb | 17 + .../models/appliance_network_configuration.rb | 56 + .../models/arm_base_object.rb | 67 + .../models/available_sku_request.rb | 69 + .../models/available_skus_result.rb | 95 ++ .../models/cancellation_reason.rb | 44 + .../models/contact_details.rb | 111 ++ .../models/copy_log_details.rb | 47 + .../models/copy_progress.rb | 79 + .../azure_mgmt_databox/models/copy_status.rb | 20 + .../data_box_account_copy_log_details.rb | 70 + .../models/data_box_disk_copy_log_details.rb | 81 + .../models/data_box_disk_copy_progress.rb | 82 ++ .../models/data_box_disk_job_details.rb | 247 ++++ .../models/data_box_disk_job_secrets.rb | 90 ++ ...data_box_heavy_account_copy_log_details.rb | 77 + .../models/data_box_heavy_job_details.rb | 197 +++ .../models/data_box_heavy_job_secrets.rb | 68 + .../models/data_box_heavy_secret.rb | 108 ++ .../models/data_box_job_details.rb | 197 +++ .../models/data_box_secret.rb | 108 ++ .../models/databox_job_secrets.rb | 67 + .../models/destination_account_details.rb | 44 + .../destination_to_service_location_map.rb | 56 + .../azure_mgmt_databox/models/disk_secret.rb | 57 + .../azure_mgmt_databox/models/error.rb | 58 + .../azure_mgmt_databox/models/job_details.rb | 217 +++ .../models/job_error_details.rb | 78 + .../azure_mgmt_databox/models/job_resource.rb | 195 +++ .../models/job_resource_list.rb | 94 ++ .../models/job_resource_update_parameter.rb | 82 ++ .../azure_mgmt_databox/models/job_secrets.rb | 47 + .../azure_mgmt_databox/models/job_stages.rb | 116 ++ .../models/notification_preference.rb | 57 + .../models/notification_stage_name.rb | 20 + .../azure_mgmt_databox/models/operation.rb | 81 + .../models/operation_display.rb | 75 + .../models/operation_list.rb | 95 ++ .../models/package_shipping_details.rb | 67 + .../azure_mgmt_databox/models/preferences.rb | 51 + .../azure_mgmt_databox/models/resource.rb | 78 + .../models/share_credential_details.rb | 100 ++ .../models/share_destination_format_type.rb | 19 + .../models/shipment_pick_up_request.rb | 66 + .../models/shipment_pick_up_response.rb | 57 + .../models/shipping_address.rb | 136 ++ .../azure_mgmt_databox/models/sku.rb | 66 + .../azure_mgmt_databox/models/sku_capacity.rb | 56 + .../azure_mgmt_databox/models/sku_cost.rb | 56 + .../models/sku_disabled_reason.rb | 19 + .../models/sku_information.rb | 161 ++ .../azure_mgmt_databox/models/sku_name.rb | 17 + .../azure_mgmt_databox/models/stage_name.rb | 27 + .../azure_mgmt_databox/models/stage_status.rb | 21 + .../models/unencrypted_credentials.rb | 59 + .../models/unencrypted_credentials_list.rb | 63 + .../models/update_job_details.rb | 56 + .../models/validate_address.rb | 58 + .../azure_mgmt_databox/module_definition.rb | 9 + .../azure_mgmt_databox/operations.rb | 212 +++ .../generated/azure_mgmt_databox/service.rb | 348 +++++ .../generated/azure_mgmt_databox/version.rb | 8 + 69 files changed, 6884 insertions(+) create mode 100644 management/azure_mgmt_databox/lib/2018-01-01/generated/azure_mgmt_databox.rb create mode 100644 management/azure_mgmt_databox/lib/2018-01-01/generated/azure_mgmt_databox/data_box_management_client.rb create mode 100644 management/azure_mgmt_databox/lib/2018-01-01/generated/azure_mgmt_databox/jobs.rb create mode 100644 management/azure_mgmt_databox/lib/2018-01-01/generated/azure_mgmt_databox/models/access_protocol.rb create mode 100644 management/azure_mgmt_databox/lib/2018-01-01/generated/azure_mgmt_databox/models/account_credential_details.rb create mode 100644 management/azure_mgmt_databox/lib/2018-01-01/generated/azure_mgmt_databox/models/address_type.rb create mode 100644 management/azure_mgmt_databox/lib/2018-01-01/generated/azure_mgmt_databox/models/address_validation_output.rb create mode 100644 management/azure_mgmt_databox/lib/2018-01-01/generated/azure_mgmt_databox/models/address_validation_status.rb create mode 100644 management/azure_mgmt_databox/lib/2018-01-01/generated/azure_mgmt_databox/models/appliance_network_configuration.rb create mode 100644 management/azure_mgmt_databox/lib/2018-01-01/generated/azure_mgmt_databox/models/arm_base_object.rb create mode 100644 management/azure_mgmt_databox/lib/2018-01-01/generated/azure_mgmt_databox/models/available_sku_request.rb create mode 100644 management/azure_mgmt_databox/lib/2018-01-01/generated/azure_mgmt_databox/models/available_skus_result.rb create mode 100644 management/azure_mgmt_databox/lib/2018-01-01/generated/azure_mgmt_databox/models/cancellation_reason.rb create mode 100644 management/azure_mgmt_databox/lib/2018-01-01/generated/azure_mgmt_databox/models/contact_details.rb create mode 100644 management/azure_mgmt_databox/lib/2018-01-01/generated/azure_mgmt_databox/models/copy_log_details.rb create mode 100644 management/azure_mgmt_databox/lib/2018-01-01/generated/azure_mgmt_databox/models/copy_progress.rb create mode 100644 management/azure_mgmt_databox/lib/2018-01-01/generated/azure_mgmt_databox/models/copy_status.rb create mode 100644 management/azure_mgmt_databox/lib/2018-01-01/generated/azure_mgmt_databox/models/data_box_account_copy_log_details.rb create mode 100644 management/azure_mgmt_databox/lib/2018-01-01/generated/azure_mgmt_databox/models/data_box_disk_copy_log_details.rb create mode 100644 management/azure_mgmt_databox/lib/2018-01-01/generated/azure_mgmt_databox/models/data_box_disk_copy_progress.rb create mode 100644 management/azure_mgmt_databox/lib/2018-01-01/generated/azure_mgmt_databox/models/data_box_disk_job_details.rb create mode 100644 management/azure_mgmt_databox/lib/2018-01-01/generated/azure_mgmt_databox/models/data_box_disk_job_secrets.rb create mode 100644 management/azure_mgmt_databox/lib/2018-01-01/generated/azure_mgmt_databox/models/data_box_heavy_account_copy_log_details.rb create mode 100644 management/azure_mgmt_databox/lib/2018-01-01/generated/azure_mgmt_databox/models/data_box_heavy_job_details.rb create mode 100644 management/azure_mgmt_databox/lib/2018-01-01/generated/azure_mgmt_databox/models/data_box_heavy_job_secrets.rb create mode 100644 management/azure_mgmt_databox/lib/2018-01-01/generated/azure_mgmt_databox/models/data_box_heavy_secret.rb create mode 100644 management/azure_mgmt_databox/lib/2018-01-01/generated/azure_mgmt_databox/models/data_box_job_details.rb create mode 100644 management/azure_mgmt_databox/lib/2018-01-01/generated/azure_mgmt_databox/models/data_box_secret.rb create mode 100644 management/azure_mgmt_databox/lib/2018-01-01/generated/azure_mgmt_databox/models/databox_job_secrets.rb create mode 100644 management/azure_mgmt_databox/lib/2018-01-01/generated/azure_mgmt_databox/models/destination_account_details.rb create mode 100644 management/azure_mgmt_databox/lib/2018-01-01/generated/azure_mgmt_databox/models/destination_to_service_location_map.rb create mode 100644 management/azure_mgmt_databox/lib/2018-01-01/generated/azure_mgmt_databox/models/disk_secret.rb create mode 100644 management/azure_mgmt_databox/lib/2018-01-01/generated/azure_mgmt_databox/models/error.rb create mode 100644 management/azure_mgmt_databox/lib/2018-01-01/generated/azure_mgmt_databox/models/job_details.rb create mode 100644 management/azure_mgmt_databox/lib/2018-01-01/generated/azure_mgmt_databox/models/job_error_details.rb create mode 100644 management/azure_mgmt_databox/lib/2018-01-01/generated/azure_mgmt_databox/models/job_resource.rb create mode 100644 management/azure_mgmt_databox/lib/2018-01-01/generated/azure_mgmt_databox/models/job_resource_list.rb create mode 100644 management/azure_mgmt_databox/lib/2018-01-01/generated/azure_mgmt_databox/models/job_resource_update_parameter.rb create mode 100644 management/azure_mgmt_databox/lib/2018-01-01/generated/azure_mgmt_databox/models/job_secrets.rb create mode 100644 management/azure_mgmt_databox/lib/2018-01-01/generated/azure_mgmt_databox/models/job_stages.rb create mode 100644 management/azure_mgmt_databox/lib/2018-01-01/generated/azure_mgmt_databox/models/notification_preference.rb create mode 100644 management/azure_mgmt_databox/lib/2018-01-01/generated/azure_mgmt_databox/models/notification_stage_name.rb create mode 100644 management/azure_mgmt_databox/lib/2018-01-01/generated/azure_mgmt_databox/models/operation.rb create mode 100644 management/azure_mgmt_databox/lib/2018-01-01/generated/azure_mgmt_databox/models/operation_display.rb create mode 100644 management/azure_mgmt_databox/lib/2018-01-01/generated/azure_mgmt_databox/models/operation_list.rb create mode 100644 management/azure_mgmt_databox/lib/2018-01-01/generated/azure_mgmt_databox/models/package_shipping_details.rb create mode 100644 management/azure_mgmt_databox/lib/2018-01-01/generated/azure_mgmt_databox/models/preferences.rb create mode 100644 management/azure_mgmt_databox/lib/2018-01-01/generated/azure_mgmt_databox/models/resource.rb create mode 100644 management/azure_mgmt_databox/lib/2018-01-01/generated/azure_mgmt_databox/models/share_credential_details.rb create mode 100644 management/azure_mgmt_databox/lib/2018-01-01/generated/azure_mgmt_databox/models/share_destination_format_type.rb create mode 100644 management/azure_mgmt_databox/lib/2018-01-01/generated/azure_mgmt_databox/models/shipment_pick_up_request.rb create mode 100644 management/azure_mgmt_databox/lib/2018-01-01/generated/azure_mgmt_databox/models/shipment_pick_up_response.rb create mode 100644 management/azure_mgmt_databox/lib/2018-01-01/generated/azure_mgmt_databox/models/shipping_address.rb create mode 100644 management/azure_mgmt_databox/lib/2018-01-01/generated/azure_mgmt_databox/models/sku.rb create mode 100644 management/azure_mgmt_databox/lib/2018-01-01/generated/azure_mgmt_databox/models/sku_capacity.rb create mode 100644 management/azure_mgmt_databox/lib/2018-01-01/generated/azure_mgmt_databox/models/sku_cost.rb create mode 100644 management/azure_mgmt_databox/lib/2018-01-01/generated/azure_mgmt_databox/models/sku_disabled_reason.rb create mode 100644 management/azure_mgmt_databox/lib/2018-01-01/generated/azure_mgmt_databox/models/sku_information.rb create mode 100644 management/azure_mgmt_databox/lib/2018-01-01/generated/azure_mgmt_databox/models/sku_name.rb create mode 100644 management/azure_mgmt_databox/lib/2018-01-01/generated/azure_mgmt_databox/models/stage_name.rb create mode 100644 management/azure_mgmt_databox/lib/2018-01-01/generated/azure_mgmt_databox/models/stage_status.rb create mode 100644 management/azure_mgmt_databox/lib/2018-01-01/generated/azure_mgmt_databox/models/unencrypted_credentials.rb create mode 100644 management/azure_mgmt_databox/lib/2018-01-01/generated/azure_mgmt_databox/models/unencrypted_credentials_list.rb create mode 100644 management/azure_mgmt_databox/lib/2018-01-01/generated/azure_mgmt_databox/models/update_job_details.rb create mode 100644 management/azure_mgmt_databox/lib/2018-01-01/generated/azure_mgmt_databox/models/validate_address.rb create mode 100644 management/azure_mgmt_databox/lib/2018-01-01/generated/azure_mgmt_databox/module_definition.rb create mode 100644 management/azure_mgmt_databox/lib/2018-01-01/generated/azure_mgmt_databox/operations.rb create mode 100644 management/azure_mgmt_databox/lib/2018-01-01/generated/azure_mgmt_databox/service.rb create mode 100644 management/azure_mgmt_databox/lib/2018-01-01/generated/azure_mgmt_databox/version.rb diff --git a/management/azure_mgmt_databox/lib/2018-01-01/generated/azure_mgmt_databox.rb b/management/azure_mgmt_databox/lib/2018-01-01/generated/azure_mgmt_databox.rb new file mode 100644 index 0000000000..7a41d1e562 --- /dev/null +++ b/management/azure_mgmt_databox/lib/2018-01-01/generated/azure_mgmt_databox.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. + +require 'uri' +require 'cgi' +require 'date' +require 'json' +require 'base64' +require 'erb' +require 'securerandom' +require 'time' +require 'timeliness' +require 'faraday' +require 'faraday-cookie_jar' +require 'concurrent' +require 'ms_rest' +require '2018-01-01/generated/azure_mgmt_databox/module_definition' +require 'ms_rest_azure' + +module Azure::Compute::Mgmt::V2018_01_01 + autoload :Operations, '2018-01-01/generated/azure_mgmt_databox/operations.rb' + autoload :Jobs, '2018-01-01/generated/azure_mgmt_databox/jobs.rb' + autoload :Service, '2018-01-01/generated/azure_mgmt_databox/service.rb' + autoload :DataBoxManagementClient, '2018-01-01/generated/azure_mgmt_databox/data_box_management_client.rb' + + module Models + autoload :DataBoxHeavySecret, '2018-01-01/generated/azure_mgmt_databox/models/data_box_heavy_secret.rb' + autoload :ShareCredentialDetails, '2018-01-01/generated/azure_mgmt_databox/models/share_credential_details.rb' + autoload :ShipmentPickUpRequest, '2018-01-01/generated/azure_mgmt_databox/models/shipment_pick_up_request.rb' + autoload :ShippingAddress, '2018-01-01/generated/azure_mgmt_databox/models/shipping_address.rb' + autoload :ShipmentPickUpResponse, '2018-01-01/generated/azure_mgmt_databox/models/shipment_pick_up_response.rb' + autoload :ApplianceNetworkConfiguration, '2018-01-01/generated/azure_mgmt_databox/models/appliance_network_configuration.rb' + autoload :AccountCredentialDetails, '2018-01-01/generated/azure_mgmt_databox/models/account_credential_details.rb' + autoload :AvailableSkuRequest, '2018-01-01/generated/azure_mgmt_databox/models/available_sku_request.rb' + autoload :DestinationToServiceLocationMap, '2018-01-01/generated/azure_mgmt_databox/models/destination_to_service_location_map.rb' + autoload :ValidateAddress, '2018-01-01/generated/azure_mgmt_databox/models/validate_address.rb' + autoload :SkuCost, '2018-01-01/generated/azure_mgmt_databox/models/sku_cost.rb' + autoload :DataBoxSecret, '2018-01-01/generated/azure_mgmt_databox/models/data_box_secret.rb' + autoload :AvailableSkusResult, '2018-01-01/generated/azure_mgmt_databox/models/available_skus_result.rb' + autoload :UnencryptedCredentialsList, '2018-01-01/generated/azure_mgmt_databox/models/unencrypted_credentials_list.rb' + autoload :NotificationPreference, '2018-01-01/generated/azure_mgmt_databox/models/notification_preference.rb' + autoload :DestinationAccountDetails, '2018-01-01/generated/azure_mgmt_databox/models/destination_account_details.rb' + autoload :CopyLogDetails, '2018-01-01/generated/azure_mgmt_databox/models/copy_log_details.rb' + autoload :Error, '2018-01-01/generated/azure_mgmt_databox/models/error.rb' + autoload :ContactDetails, '2018-01-01/generated/azure_mgmt_databox/models/contact_details.rb' + autoload :CopyProgress, '2018-01-01/generated/azure_mgmt_databox/models/copy_progress.rb' + autoload :DataBoxDiskCopyProgress, '2018-01-01/generated/azure_mgmt_databox/models/data_box_disk_copy_progress.rb' + autoload :OperationDisplay, '2018-01-01/generated/azure_mgmt_databox/models/operation_display.rb' + autoload :DiskSecret, '2018-01-01/generated/azure_mgmt_databox/models/disk_secret.rb' + autoload :JobErrorDetails, '2018-01-01/generated/azure_mgmt_databox/models/job_error_details.rb' + autoload :AddressValidationOutput, '2018-01-01/generated/azure_mgmt_databox/models/address_validation_output.rb' + autoload :JobStages, '2018-01-01/generated/azure_mgmt_databox/models/job_stages.rb' + autoload :Sku, '2018-01-01/generated/azure_mgmt_databox/models/sku.rb' + autoload :PackageShippingDetails, '2018-01-01/generated/azure_mgmt_databox/models/package_shipping_details.rb' + autoload :SkuInformation, '2018-01-01/generated/azure_mgmt_databox/models/sku_information.rb' + autoload :Preferences, '2018-01-01/generated/azure_mgmt_databox/models/preferences.rb' + autoload :Resource, '2018-01-01/generated/azure_mgmt_databox/models/resource.rb' + autoload :JobDetails, '2018-01-01/generated/azure_mgmt_databox/models/job_details.rb' + autoload :Operation, '2018-01-01/generated/azure_mgmt_databox/models/operation.rb' + autoload :UnencryptedCredentials, '2018-01-01/generated/azure_mgmt_databox/models/unencrypted_credentials.rb' + autoload :SkuCapacity, '2018-01-01/generated/azure_mgmt_databox/models/sku_capacity.rb' + autoload :JobResourceList, '2018-01-01/generated/azure_mgmt_databox/models/job_resource_list.rb' + autoload :OperationList, '2018-01-01/generated/azure_mgmt_databox/models/operation_list.rb' + autoload :UpdateJobDetails, '2018-01-01/generated/azure_mgmt_databox/models/update_job_details.rb' + autoload :CancellationReason, '2018-01-01/generated/azure_mgmt_databox/models/cancellation_reason.rb' + autoload :JobResourceUpdateParameter, '2018-01-01/generated/azure_mgmt_databox/models/job_resource_update_parameter.rb' + autoload :ArmBaseObject, '2018-01-01/generated/azure_mgmt_databox/models/arm_base_object.rb' + autoload :JobSecrets, '2018-01-01/generated/azure_mgmt_databox/models/job_secrets.rb' + autoload :DataBoxAccountCopyLogDetails, '2018-01-01/generated/azure_mgmt_databox/models/data_box_account_copy_log_details.rb' + autoload :DataBoxDiskCopyLogDetails, '2018-01-01/generated/azure_mgmt_databox/models/data_box_disk_copy_log_details.rb' + autoload :DataBoxDiskJobDetails, '2018-01-01/generated/azure_mgmt_databox/models/data_box_disk_job_details.rb' + autoload :DataBoxDiskJobSecrets, '2018-01-01/generated/azure_mgmt_databox/models/data_box_disk_job_secrets.rb' + autoload :DataBoxHeavyAccountCopyLogDetails, '2018-01-01/generated/azure_mgmt_databox/models/data_box_heavy_account_copy_log_details.rb' + autoload :DataBoxHeavyJobDetails, '2018-01-01/generated/azure_mgmt_databox/models/data_box_heavy_job_details.rb' + autoload :DataBoxHeavyJobSecrets, '2018-01-01/generated/azure_mgmt_databox/models/data_box_heavy_job_secrets.rb' + autoload :DataBoxJobDetails, '2018-01-01/generated/azure_mgmt_databox/models/data_box_job_details.rb' + autoload :DataboxJobSecrets, '2018-01-01/generated/azure_mgmt_databox/models/databox_job_secrets.rb' + autoload :JobResource, '2018-01-01/generated/azure_mgmt_databox/models/job_resource.rb' + autoload :ShareDestinationFormatType, '2018-01-01/generated/azure_mgmt_databox/models/share_destination_format_type.rb' + autoload :AccessProtocol, '2018-01-01/generated/azure_mgmt_databox/models/access_protocol.rb' + autoload :AddressValidationStatus, '2018-01-01/generated/azure_mgmt_databox/models/address_validation_status.rb' + autoload :AddressType, '2018-01-01/generated/azure_mgmt_databox/models/address_type.rb' + autoload :SkuName, '2018-01-01/generated/azure_mgmt_databox/models/sku_name.rb' + autoload :SkuDisabledReason, '2018-01-01/generated/azure_mgmt_databox/models/sku_disabled_reason.rb' + autoload :NotificationStageName, '2018-01-01/generated/azure_mgmt_databox/models/notification_stage_name.rb' + autoload :CopyStatus, '2018-01-01/generated/azure_mgmt_databox/models/copy_status.rb' + autoload :StageName, '2018-01-01/generated/azure_mgmt_databox/models/stage_name.rb' + autoload :StageStatus, '2018-01-01/generated/azure_mgmt_databox/models/stage_status.rb' + end +end diff --git a/management/azure_mgmt_databox/lib/2018-01-01/generated/azure_mgmt_databox/data_box_management_client.rb b/management/azure_mgmt_databox/lib/2018-01-01/generated/azure_mgmt_databox/data_box_management_client.rb new file mode 100644 index 0000000000..0998af2019 --- /dev/null +++ b/management/azure_mgmt_databox/lib/2018-01-01/generated/azure_mgmt_databox/data_box_management_client.rb @@ -0,0 +1,137 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::Compute::Mgmt::V2018_01_01 + # + # A service client - single point of access to the REST API. + # + class DataBoxManagementClient < MsRestAzure::AzureServiceClient + include MsRestAzure + include MsRestAzure::Serialization + + # @return [String] the base URI of the service. + attr_accessor :base_url + + # @return Credentials needed for the client to connect to Azure. + attr_reader :credentials + + # @return [String] The API Version + attr_reader :api_version + + # @return [String] The Subscription Id + attr_accessor :subscription_id + + # @return [String] Gets or sets the preferred language for the response. + attr_accessor :accept_language + + # @return [Integer] Gets or sets the retry timeout in seconds for Long + # Running Operations. Default value is 30. + attr_accessor :long_running_operation_retry_timeout + + # @return [Boolean] When set to true a unique x-ms-client-request-id value + # is generated and included in each request. Default is true. + attr_accessor :generate_client_request_id + + # @return [Operations] operations + attr_reader :operations + + # @return [Jobs] jobs + attr_reader :jobs + + # @return [Service] service + attr_reader :service + + # + # Creates initializes a new instance of the DataBoxManagementClient class. + # @param credentials [MsRest::ServiceClientCredentials] credentials to authorize HTTP requests made by the service client. + # @param base_url [String] the base URI of the service. + # @param options [Array] filters to be applied to the HTTP requests. + # + def initialize(credentials = nil, base_url = nil, options = nil) + super(credentials, options) + @base_url = base_url || 'https://management.azure.com' + + fail ArgumentError, 'invalid type of credentials input parameter' unless credentials.is_a?(MsRest::ServiceClientCredentials) unless credentials.nil? + @credentials = credentials + + @operations = Operations.new(self) + @jobs = Jobs.new(self) + @service = Service.new(self) + @api_version = '2018-01-01' + @accept_language = 'en-US' + @long_running_operation_retry_timeout = 30 + @generate_client_request_id = true + add_telemetry + end + + # + # Makes a request and returns the body of the response. + # @param method [Symbol] with any of the following values :get, :put, :post, :patch, :delete. + # @param path [String] the path, relative to {base_url}. + # @param options [Hash{String=>String}] specifying any request options like :body. + # @return [Hash{String=>String}] containing the body of the response. + # Example: + # + # request_content = "{'location':'westus','tags':{'tag1':'val1','tag2':'val2'}}" + # path = "/path" + # options = { + # body: request_content, + # query_params: {'api-version' => '2016-02-01'} + # } + # result = @client.make_request(:put, path, options) + # + def make_request(method, path, options = {}) + result = make_request_with_http_info(method, path, options) + result.body unless result.nil? + end + + # + # Makes a request and returns the operation response. + # @param method [Symbol] with any of the following values :get, :put, :post, :patch, :delete. + # @param path [String] the path, relative to {base_url}. + # @param options [Hash{String=>String}] specifying any request options like :body. + # @return [MsRestAzure::AzureOperationResponse] Operation response containing the request, response and status. + # + def make_request_with_http_info(method, path, options = {}) + result = make_request_async(method, path, options).value! + result.body = result.response.body.to_s.empty? ? nil : JSON.load(result.response.body) + result + end + + # + # Makes a request asynchronously. + # @param method [Symbol] with any of the following values :get, :put, :post, :patch, :delete. + # @param path [String] the path, relative to {base_url}. + # @param options [Hash{String=>String}] specifying any request options like :body. + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def make_request_async(method, path, options = {}) + fail ArgumentError, 'method is nil' if method.nil? + fail ArgumentError, 'path is nil' if path.nil? + + request_url = options[:base_url] || @base_url + + request_headers = @request_headers + request_headers.merge!({'accept-language' => @accept_language}) unless @accept_language.nil? + options.merge!({headers: request_headers.merge(options[:headers] || {})}) + options.merge!({credentials: @credentials}) unless @credentials.nil? + + super(request_url, method, path, options) + end + + + private + # + # Adds telemetry information. + # + def add_telemetry + sdk_information = 'azure_mgmt_databox' + if defined? Azure::Compute::Mgmt::V2018_01_01::VERSION + sdk_information = "#{sdk_information}/#{Azure::Compute::Mgmt::V2018_01_01::VERSION}" + end + add_user_agent_information(sdk_information) + end + end +end diff --git a/management/azure_mgmt_databox/lib/2018-01-01/generated/azure_mgmt_databox/jobs.rb b/management/azure_mgmt_databox/lib/2018-01-01/generated/azure_mgmt_databox/jobs.rb new file mode 100644 index 0000000000..0e880fc1b6 --- /dev/null +++ b/management/azure_mgmt_databox/lib/2018-01-01/generated/azure_mgmt_databox/jobs.rb @@ -0,0 +1,1300 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::Compute::Mgmt::V2018_01_01 + # + # Jobs + # + class Jobs + include MsRestAzure + + # + # Creates and initializes a new instance of the Jobs class. + # @param client service class for accessing basic functionality. + # + def initialize(client) + @client = client + end + + # @return [DataBoxManagementClient] reference to the DataBoxManagementClient + attr_reader :client + + # + # Lists all the jobs available under the subscription. + # + # @param skip_token [String] $skipToken is supported on Get list of jobs, which + # provides the next page in the list of jobs. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Array] operation results. + # + def list(skip_token = nil, custom_headers = nil) + first_page = list_as_lazy(skip_token, custom_headers) + first_page.get_all_items + end + + # + # Lists all the jobs available under the subscription. + # + # @param skip_token [String] $skipToken is supported on Get list of jobs, which + # provides the next page in the list of jobs. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def list_with_http_info(skip_token = nil, custom_headers = nil) + list_async(skip_token, custom_headers).value! + end + + # + # Lists all the jobs available under the subscription. + # + # @param skip_token [String] $skipToken is supported on Get list of jobs, which + # provides the next page in the list of jobs. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def list_async(skip_token = nil, 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.DataBox/jobs' + + 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,'$skipToken' => skip_token}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::Compute::Mgmt::V2018_01_01::Models::JobResourceList.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 jobs available under the given resource group. + # + # @param resource_group_name [String] The Resource Group Name + # @param skip_token [String] $skipToken is supported on Get list of jobs, which + # provides the next page in the list of jobs. + # @param 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, skip_token = nil, custom_headers = nil) + first_page = list_by_resource_group_as_lazy(resource_group_name, skip_token, custom_headers) + first_page.get_all_items + end + + # + # Lists all the jobs available under the given resource group. + # + # @param resource_group_name [String] The Resource Group Name + # @param skip_token [String] $skipToken is supported on Get list of jobs, which + # provides the next page in the list of jobs. + # @param custom_headers [Hash{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, skip_token = nil, custom_headers = nil) + list_by_resource_group_async(resource_group_name, skip_token, custom_headers).value! + end + + # + # Lists all the jobs available under the given resource group. + # + # @param resource_group_name [String] The Resource Group Name + # @param skip_token [String] $skipToken is supported on Get list of jobs, which + # provides the next page in the list of jobs. + # @param [Hash{String => String}] A hash 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, skip_token = nil, custom_headers = nil) + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/jobs' + + 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,'$skipToken' => skip_token}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::Compute::Mgmt::V2018_01_01::Models::JobResourceList.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Gets information about the specified job. + # + # @param resource_group_name [String] The Resource Group Name + # @param job_name [String] The name of the job Resource within the specified + # resource group. job names must be between 3 and 24 characters in length and + # use any alphanumeric and underscore only + # @param expand [String] $expand is supported on details parameter for job, + # which provides details on the job stages. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [JobResource] operation results. + # + def get(resource_group_name, job_name, expand = nil, custom_headers = nil) + response = get_async(resource_group_name, job_name, expand, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets information about the specified job. + # + # @param resource_group_name [String] The Resource Group Name + # @param job_name [String] The name of the job Resource within the specified + # resource group. job names must be between 3 and 24 characters in length and + # use any alphanumeric and underscore only + # @param expand [String] $expand is supported on details parameter for job, + # which provides details on the job stages. + # @param custom_headers [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, job_name, expand = nil, custom_headers = nil) + get_async(resource_group_name, job_name, expand, custom_headers).value! + end + + # + # Gets information about the specified job. + # + # @param resource_group_name [String] The Resource Group Name + # @param job_name [String] The name of the job Resource within the specified + # resource group. job names must be between 3 and 24 characters in length and + # use any alphanumeric and underscore only + # @param expand [String] $expand is supported on details parameter for job, + # which provides details on the job stages. + # @param [Hash{String => String}] A 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, job_name, expand = nil, custom_headers = nil) + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'job_name is nil' if job_name.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/jobs/{jobName}' + + 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,'jobName' => job_name}, + query_params: {'api-version' => @client.api_version,'$expand' => expand}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::Compute::Mgmt::V2018_01_01::Models::JobResource.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Creates a new job with the specified parameters. Existing job cannot be + # updated with this API and should instead be updated with the Update job API. + # + # @param resource_group_name [String] The Resource Group Name + # @param job_name [String] The name of the job Resource within the specified + # resource group. job names must be between 3 and 24 characters in length and + # use any alphanumeric and underscore only + # @param job_resource [JobResource] Job details from request body. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [JobResource] operation results. + # + def create(resource_group_name, job_name, job_resource, custom_headers = nil) + response = create_async(resource_group_name, job_name, job_resource, custom_headers).value! + response.body unless response.nil? + end + + # + # @param resource_group_name [String] The Resource Group Name + # @param job_name [String] The name of the job Resource within the specified + # resource group. job names must be between 3 and 24 characters in length and + # use any alphanumeric and underscore only + # @param job_resource [JobResource] Job details from request body. + # @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, job_name, job_resource, custom_headers = nil) + # Send request + promise = begin_create_async(resource_group_name, job_name, job_resource, custom_headers) + + promise = promise.then do |response| + # Defining deserialization method. + deserialize_method = lambda do |parsed_response| + result_mapper = Azure::Compute::Mgmt::V2018_01_01::Models::JobResource.mapper() + parsed_response = @client.deserialize(result_mapper, parsed_response) + end + + # Waiting for response. + @client.get_long_running_operation_result(response, deserialize_method) + end + + promise + end + + # + # Deletes a job. + # + # @param resource_group_name [String] The Resource Group Name + # @param job_name [String] The name of the job Resource within the specified + # resource group. job names must be between 3 and 24 characters in length and + # use any alphanumeric and underscore only + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + def delete(resource_group_name, job_name, custom_headers = nil) + response = delete_async(resource_group_name, job_name, custom_headers).value! + nil + end + + # + # @param resource_group_name [String] The Resource Group Name + # @param job_name [String] The name of the job Resource within the specified + # resource group. job names must be between 3 and 24 characters in length and + # use any alphanumeric and underscore only + # @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, job_name, custom_headers = nil) + # Send request + promise = begin_delete_async(resource_group_name, job_name, custom_headers) + + promise = promise.then do |response| + # Defining deserialization method. + deserialize_method = lambda do |parsed_response| + end + + # Waiting for response. + @client.get_long_running_operation_result(response, deserialize_method) + end + + promise + end + + # + # Updates the properties of an existing job. + # + # @param resource_group_name [String] The Resource Group Name + # @param job_name [String] The name of the job Resource within the specified + # resource group. job names must be between 3 and 24 characters in length and + # use any alphanumeric and underscore only + # @param job_resource_update_parameter [JobResourceUpdateParameter] Job update + # parameters from request body. + # @param if_match [String] Defines the If-Match condition. The patch will be + # performed only if the ETag of the job on the server matches this value. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [JobResource] operation results. + # + def update(resource_group_name, job_name, job_resource_update_parameter, if_match = nil, custom_headers = nil) + response = update_async(resource_group_name, job_name, job_resource_update_parameter, if_match, custom_headers).value! + response.body unless response.nil? + end + + # + # @param resource_group_name [String] The Resource Group Name + # @param job_name [String] The name of the job Resource within the specified + # resource group. job names must be between 3 and 24 characters in length and + # use any alphanumeric and underscore only + # @param job_resource_update_parameter [JobResourceUpdateParameter] Job update + # parameters from request body. + # @param if_match [String] Defines the If-Match condition. The patch will be + # performed only if the ETag of the job on the server matches this value. + # @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, job_name, job_resource_update_parameter, if_match = nil, custom_headers = nil) + # Send request + promise = begin_update_async(resource_group_name, job_name, job_resource_update_parameter, if_match, custom_headers) + + promise = promise.then do |response| + # Defining deserialization method. + deserialize_method = lambda do |parsed_response| + result_mapper = Azure::Compute::Mgmt::V2018_01_01::Models::JobResource.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 + + # + # Book shipment pick up. + # + # @param resource_group_name [String] The Resource Group Name + # @param job_name [String] The name of the job Resource within the specified + # resource group. job names must be between 3 and 24 characters in length and + # use any alphanumeric and underscore only + # @param shipment_pick_up_request [ShipmentPickUpRequest] Details of shipment + # pick up request. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [ShipmentPickUpResponse] operation results. + # + def book_shipment_pick_up(resource_group_name, job_name, shipment_pick_up_request, custom_headers = nil) + response = book_shipment_pick_up_async(resource_group_name, job_name, shipment_pick_up_request, custom_headers).value! + response.body unless response.nil? + end + + # + # Book shipment pick up. + # + # @param resource_group_name [String] The Resource Group Name + # @param job_name [String] The name of the job Resource within the specified + # resource group. job names must be between 3 and 24 characters in length and + # use any alphanumeric and underscore only + # @param shipment_pick_up_request [ShipmentPickUpRequest] Details of shipment + # pick up 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 book_shipment_pick_up_with_http_info(resource_group_name, job_name, shipment_pick_up_request, custom_headers = nil) + book_shipment_pick_up_async(resource_group_name, job_name, shipment_pick_up_request, custom_headers).value! + end + + # + # Book shipment pick up. + # + # @param resource_group_name [String] The Resource Group Name + # @param job_name [String] The name of the job Resource within the specified + # resource group. job names must be between 3 and 24 characters in length and + # use any alphanumeric and underscore only + # @param shipment_pick_up_request [ShipmentPickUpRequest] Details of shipment + # pick up 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 book_shipment_pick_up_async(resource_group_name, job_name, shipment_pick_up_request, custom_headers = nil) + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'job_name is nil' if job_name.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, 'shipment_pick_up_request is nil' if shipment_pick_up_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::Compute::Mgmt::V2018_01_01::Models::ShipmentPickUpRequest.mapper() + request_content = @client.serialize(request_mapper, shipment_pick_up_request) + request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil + + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/jobs/{jobName}/bookShipmentPickUp' + + 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,'jobName' => job_name}, + query_params: {'api-version' => @client.api_version}, + body: request_content, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:post, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::Compute::Mgmt::V2018_01_01::Models::ShipmentPickUpResponse.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # CancelJob. + # + # @param resource_group_name [String] The Resource Group Name + # @param job_name [String] The name of the job Resource within the specified + # resource group. job names must be between 3 and 24 characters in length and + # use any alphanumeric and underscore only + # @param cancellation_reason [CancellationReason] Reason for cancellation. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # + def cancel(resource_group_name, job_name, cancellation_reason, custom_headers = nil) + response = cancel_async(resource_group_name, job_name, cancellation_reason, custom_headers).value! + nil + end + + # + # CancelJob. + # + # @param resource_group_name [String] The Resource Group Name + # @param job_name [String] The name of the job Resource within the specified + # resource group. job names must be between 3 and 24 characters in length and + # use any alphanumeric and underscore only + # @param cancellation_reason [CancellationReason] Reason for cancellation. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def cancel_with_http_info(resource_group_name, job_name, cancellation_reason, custom_headers = nil) + cancel_async(resource_group_name, job_name, cancellation_reason, custom_headers).value! + end + + # + # CancelJob. + # + # @param resource_group_name [String] The Resource Group Name + # @param job_name [String] The name of the job Resource within the specified + # resource group. job names must be between 3 and 24 characters in length and + # use any alphanumeric and underscore only + # @param cancellation_reason [CancellationReason] Reason for cancellation. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def cancel_async(resource_group_name, job_name, cancellation_reason, custom_headers = nil) + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'job_name is nil' if job_name.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, 'cancellation_reason is nil' if cancellation_reason.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Serialize Request + request_mapper = Azure::Compute::Mgmt::V2018_01_01::Models::CancellationReason.mapper() + request_content = @client.serialize(request_mapper, cancellation_reason) + request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil + + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/jobs/{jobName}/cancel' + + 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,'jobName' => job_name}, + query_params: {'api-version' => @client.api_version}, + body: request_content, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:post, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 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 + + # + # This method gets the unencrypted secrets related to the job. + # + # @param resource_group_name [String] The Resource Group Name + # @param job_name [String] The name of the job Resource within the specified + # resource group. job names must be between 3 and 24 characters in length and + # use any alphanumeric and underscore only + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [UnencryptedCredentialsList] operation results. + # + def list_credentials(resource_group_name, job_name, custom_headers = nil) + response = list_credentials_async(resource_group_name, job_name, custom_headers).value! + response.body unless response.nil? + end + + # + # This method gets the unencrypted secrets related to the job. + # + # @param resource_group_name [String] The Resource Group Name + # @param job_name [String] The name of the job Resource within the specified + # resource group. job names must be between 3 and 24 characters in length and + # use any alphanumeric and underscore only + # @param custom_headers [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, job_name, custom_headers = nil) + list_credentials_async(resource_group_name, job_name, custom_headers).value! + end + + # + # This method gets the unencrypted secrets related to the job. + # + # @param resource_group_name [String] The Resource Group Name + # @param job_name [String] The name of the job Resource within the specified + # resource group. job names must be between 3 and 24 characters in length and + # use any alphanumeric and underscore only + # @param [Hash{String => String}] A 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, job_name, custom_headers = nil) + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'job_name is nil' if job_name.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/jobs/{jobName}/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,'jobName' => job_name}, + query_params: {'api-version' => @client.api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:post, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::Compute::Mgmt::V2018_01_01::Models::UnencryptedCredentialsList.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Creates a new job with the specified parameters. Existing job cannot be + # updated with this API and should instead be updated with the Update job API. + # + # @param resource_group_name [String] The Resource Group Name + # @param job_name [String] The name of the job Resource within the specified + # resource group. job names must be between 3 and 24 characters in length and + # use any alphanumeric and underscore only + # @param job_resource [JobResource] Job details from request body. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [JobResource] operation results. + # + def begin_create(resource_group_name, job_name, job_resource, custom_headers = nil) + response = begin_create_async(resource_group_name, job_name, job_resource, custom_headers).value! + response.body unless response.nil? + end + + # + # Creates a new job with the specified parameters. Existing job cannot be + # updated with this API and should instead be updated with the Update job API. + # + # @param resource_group_name [String] The Resource Group Name + # @param job_name [String] The name of the job Resource within the specified + # resource group. job names must be between 3 and 24 characters in length and + # use any alphanumeric and underscore only + # @param job_resource [JobResource] Job details from request body. + # @param custom_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, job_name, job_resource, custom_headers = nil) + begin_create_async(resource_group_name, job_name, job_resource, custom_headers).value! + end + + # + # Creates a new job with the specified parameters. Existing job cannot be + # updated with this API and should instead be updated with the Update job API. + # + # @param resource_group_name [String] The Resource Group Name + # @param job_name [String] The name of the job Resource within the specified + # resource group. job names must be between 3 and 24 characters in length and + # use any alphanumeric and underscore only + # @param job_resource [JobResource] Job details from request body. + # @param [Hash{String => String}] 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, job_name, job_resource, custom_headers = nil) + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'job_name is nil' if job_name.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, 'job_resource is nil' if job_resource.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Serialize Request + request_mapper = Azure::Compute::Mgmt::V2018_01_01::Models::JobResource.mapper() + request_content = @client.serialize(request_mapper, job_resource) + request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil + + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/jobs/{jobName}' + + 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,'jobName' => job_name}, + query_params: {'api-version' => @client.api_version}, + body: request_content, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(: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::Compute::Mgmt::V2018_01_01::Models::JobResource.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Deletes a job. + # + # @param resource_group_name [String] The Resource Group Name + # @param job_name [String] The name of the job Resource within the specified + # resource group. job names must be between 3 and 24 characters in length and + # use any alphanumeric and underscore only + # @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, job_name, custom_headers = nil) + response = begin_delete_async(resource_group_name, job_name, custom_headers).value! + nil + end + + # + # Deletes a job. + # + # @param resource_group_name [String] The Resource Group Name + # @param job_name [String] The name of the job Resource within the specified + # resource group. job names must be between 3 and 24 characters in length and + # use any alphanumeric and underscore only + # @param custom_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, job_name, custom_headers = nil) + begin_delete_async(resource_group_name, job_name, custom_headers).value! + end + + # + # Deletes a job. + # + # @param resource_group_name [String] The Resource Group Name + # @param job_name [String] The name of the job Resource within the specified + # resource group. job names must be between 3 and 24 characters in length and + # use any alphanumeric and underscore only + # @param [Hash{String => String}] 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, job_name, custom_headers = nil) + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'job_name is nil' if job_name.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/jobs/{jobName}' + + 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,'jobName' => job_name}, + query_params: {'api-version' => @client.api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:delete, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 202 || status_code == 204 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + + result + end + + promise.execute + end + + # + # Updates the properties of an existing job. + # + # @param resource_group_name [String] The Resource Group Name + # @param job_name [String] The name of the job Resource within the specified + # resource group. job names must be between 3 and 24 characters in length and + # use any alphanumeric and underscore only + # @param job_resource_update_parameter [JobResourceUpdateParameter] Job update + # parameters from request body. + # @param if_match [String] Defines the If-Match condition. The patch will be + # performed only if the ETag of the job on the server matches this value. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [JobResource] operation results. + # + def begin_update(resource_group_name, job_name, job_resource_update_parameter, if_match = nil, custom_headers = nil) + response = begin_update_async(resource_group_name, job_name, job_resource_update_parameter, if_match, custom_headers).value! + response.body unless response.nil? + end + + # + # Updates the properties of an existing job. + # + # @param resource_group_name [String] The Resource Group Name + # @param job_name [String] The name of the job Resource within the specified + # resource group. job names must be between 3 and 24 characters in length and + # use any alphanumeric and underscore only + # @param job_resource_update_parameter [JobResourceUpdateParameter] Job update + # parameters from request body. + # @param if_match [String] Defines the If-Match condition. The patch will be + # performed only if the ETag of the job on the server matches this value. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def begin_update_with_http_info(resource_group_name, job_name, job_resource_update_parameter, if_match = nil, custom_headers = nil) + begin_update_async(resource_group_name, job_name, job_resource_update_parameter, if_match, custom_headers).value! + end + + # + # Updates the properties of an existing job. + # + # @param resource_group_name [String] The Resource Group Name + # @param job_name [String] The name of the job Resource within the specified + # resource group. job names must be between 3 and 24 characters in length and + # use any alphanumeric and underscore only + # @param job_resource_update_parameter [JobResourceUpdateParameter] Job update + # parameters from request body. + # @param if_match [String] Defines the If-Match condition. The patch will be + # performed only if the ETag of the job on the server matches this value. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def begin_update_async(resource_group_name, job_name, job_resource_update_parameter, if_match = nil, custom_headers = nil) + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'job_name is nil' if job_name.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, 'job_resource_update_parameter is nil' if job_resource_update_parameter.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['If-Match'] = if_match unless if_match.nil? + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Serialize Request + request_mapper = Azure::Compute::Mgmt::V2018_01_01::Models::JobResourceUpdateParameter.mapper() + request_content = @client.serialize(request_mapper, job_resource_update_parameter) + request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil + + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/jobs/{jobName}' + + 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,'jobName' => job_name}, + query_params: {'api-version' => @client.api_version}, + body: request_content, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:patch, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 || status_code == 202 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::Compute::Mgmt::V2018_01_01::Models::JobResource.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 jobs available under the subscription. + # + # @param next_page_link [String] The NextLink from the previous successful call + # to List operation. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [JobResourceList] 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 jobs available under the subscription. + # + # @param next_page_link [String] The NextLink from the previous successful call + # to List operation. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def list_next_with_http_info(next_page_link, custom_headers = nil) + list_next_async(next_page_link, custom_headers).value! + end + + # + # Lists all the jobs available under the subscription. + # + # @param next_page_link [String] The NextLink from the previous successful call + # to List operation. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def list_next_async(next_page_link, custom_headers = nil) + fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = '{nextLink}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'nextLink' => next_page_link}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::Compute::Mgmt::V2018_01_01::Models::JobResourceList.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 jobs available under the 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 [JobResourceList] 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 jobs available under the 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 + + # + # Lists all the jobs available under the 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 MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::Compute::Mgmt::V2018_01_01::Models::JobResourceList.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue 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 jobs available under the subscription. + # + # @param skip_token [String] $skipToken is supported on Get list of jobs, which + # provides the next page in the list of jobs. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [JobResourceList] which provide lazy access to pages of the response. + # + def list_as_lazy(skip_token = nil, custom_headers = nil) + response = list_async(skip_token, custom_headers).value! + unless response.nil? + page = response.body + page.next_method = Proc.new do |next_page_link| + list_next_async(next_page_link, custom_headers) + end + page + end + end + + # + # Lists all the jobs available under the given resource group. + # + # @param resource_group_name [String] The Resource Group Name + # @param skip_token [String] $skipToken is supported on Get list of jobs, which + # provides the next page in the list of jobs. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [JobResourceList] which provide lazy access to pages of the response. + # + def list_by_resource_group_as_lazy(resource_group_name, skip_token = nil, custom_headers = nil) + response = list_by_resource_group_async(resource_group_name, skip_token, 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_databox/lib/2018-01-01/generated/azure_mgmt_databox/models/access_protocol.rb b/management/azure_mgmt_databox/lib/2018-01-01/generated/azure_mgmt_databox/models/access_protocol.rb new file mode 100644 index 0000000000..9062414a53 --- /dev/null +++ b/management/azure_mgmt_databox/lib/2018-01-01/generated/azure_mgmt_databox/models/access_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::Compute::Mgmt::V2018_01_01 + module Models + # + # Defines values for AccessProtocol + # + module AccessProtocol + SMB = "SMB" + NFS = "NFS" + end + end +end diff --git a/management/azure_mgmt_databox/lib/2018-01-01/generated/azure_mgmt_databox/models/account_credential_details.rb b/management/azure_mgmt_databox/lib/2018-01-01/generated/azure_mgmt_databox/models/account_credential_details.rb new file mode 100644 index 0000000000..87ce966344 --- /dev/null +++ b/management/azure_mgmt_databox/lib/2018-01-01/generated/azure_mgmt_databox/models/account_credential_details.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::Compute::Mgmt::V2018_01_01 + module Models + # + # Credential details of the account. + # + class AccountCredentialDetails + + include MsRestAzure + + # @return [String] Name of the account. + attr_accessor :account_name + + # @return [String] Connection string of the account endpoint to use the + # account as a storage endpoint on the device. + attr_accessor :account_connection_string + + # @return [Array] Per share level unencrypted + # access credentials. + attr_accessor :share_credential_details + + + # + # Mapper for AccountCredentialDetails class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'AccountCredentialDetails', + type: { + name: 'Composite', + class_name: 'AccountCredentialDetails', + model_properties: { + account_name: { + required: false, + read_only: true, + serialized_name: 'accountName', + type: { + name: 'String' + } + }, + account_connection_string: { + required: false, + read_only: true, + serialized_name: 'accountConnectionString', + type: { + name: 'String' + } + }, + share_credential_details: { + required: false, + read_only: true, + serialized_name: 'shareCredentialDetails', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'ShareCredentialDetailsElementType', + type: { + name: 'Composite', + class_name: 'ShareCredentialDetails' + } + } + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_databox/lib/2018-01-01/generated/azure_mgmt_databox/models/address_type.rb b/management/azure_mgmt_databox/lib/2018-01-01/generated/azure_mgmt_databox/models/address_type.rb new file mode 100644 index 0000000000..d8248b573a --- /dev/null +++ b/management/azure_mgmt_databox/lib/2018-01-01/generated/azure_mgmt_databox/models/address_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::Compute::Mgmt::V2018_01_01 + module Models + # + # Defines values for AddressType + # + module AddressType + None = "None" + Residential = "Residential" + Commercial = "Commercial" + end + end +end diff --git a/management/azure_mgmt_databox/lib/2018-01-01/generated/azure_mgmt_databox/models/address_validation_output.rb b/management/azure_mgmt_databox/lib/2018-01-01/generated/azure_mgmt_databox/models/address_validation_output.rb new file mode 100644 index 0000000000..0cb658af8d --- /dev/null +++ b/management/azure_mgmt_databox/lib/2018-01-01/generated/azure_mgmt_databox/models/address_validation_output.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::Compute::Mgmt::V2018_01_01 + module Models + # + # Output of the address validation api. + # + class AddressValidationOutput + + include MsRestAzure + + # @return [AddressValidationStatus] The address validation status. + # Possible values include: 'Valid', 'Invalid', 'Ambiguous' + attr_accessor :validation_status + + # @return [Array] List of alternate addresses. + attr_accessor :alternate_addresses + + + # + # Mapper for AddressValidationOutput class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'AddressValidationOutput', + type: { + name: 'Composite', + class_name: 'AddressValidationOutput', + model_properties: { + validation_status: { + required: false, + read_only: true, + serialized_name: 'properties.validationStatus', + type: { + name: 'Enum', + module: 'AddressValidationStatus' + } + }, + alternate_addresses: { + required: false, + read_only: true, + serialized_name: 'properties.alternateAddresses', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'ShippingAddressElementType', + type: { + name: 'Composite', + class_name: 'ShippingAddress' + } + } + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_databox/lib/2018-01-01/generated/azure_mgmt_databox/models/address_validation_status.rb b/management/azure_mgmt_databox/lib/2018-01-01/generated/azure_mgmt_databox/models/address_validation_status.rb new file mode 100644 index 0000000000..bb6f2b3965 --- /dev/null +++ b/management/azure_mgmt_databox/lib/2018-01-01/generated/azure_mgmt_databox/models/address_validation_status.rb @@ -0,0 +1,17 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::Compute::Mgmt::V2018_01_01 + module Models + # + # Defines values for AddressValidationStatus + # + module AddressValidationStatus + Valid = "Valid" + Invalid = "Invalid" + Ambiguous = "Ambiguous" + end + end +end diff --git a/management/azure_mgmt_databox/lib/2018-01-01/generated/azure_mgmt_databox/models/appliance_network_configuration.rb b/management/azure_mgmt_databox/lib/2018-01-01/generated/azure_mgmt_databox/models/appliance_network_configuration.rb new file mode 100644 index 0000000000..9eac23863b --- /dev/null +++ b/management/azure_mgmt_databox/lib/2018-01-01/generated/azure_mgmt_databox/models/appliance_network_configuration.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::Compute::Mgmt::V2018_01_01 + module Models + # + # The Network Adapter configuration of a DataBox. + # + class ApplianceNetworkConfiguration + + include MsRestAzure + + # @return [String] Name of the network. + attr_accessor :name + + # @return [String] Mac Address. + attr_accessor :mac_address + + + # + # Mapper for ApplianceNetworkConfiguration class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'ApplianceNetworkConfiguration', + type: { + name: 'Composite', + class_name: 'ApplianceNetworkConfiguration', + model_properties: { + name: { + required: false, + read_only: true, + serialized_name: 'name', + type: { + name: 'String' + } + }, + mac_address: { + required: false, + read_only: true, + serialized_name: 'macAddress', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_databox/lib/2018-01-01/generated/azure_mgmt_databox/models/arm_base_object.rb b/management/azure_mgmt_databox/lib/2018-01-01/generated/azure_mgmt_databox/models/arm_base_object.rb new file mode 100644 index 0000000000..8e4821054c --- /dev/null +++ b/management/azure_mgmt_databox/lib/2018-01-01/generated/azure_mgmt_databox/models/arm_base_object.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::Compute::Mgmt::V2018_01_01 + module Models + # + # Base class for all objects under resource. + # + class ArmBaseObject + + include MsRestAzure + + # @return [String] Name of the object. + attr_accessor :name + + # @return [String] Id of the object. + attr_accessor :id + + # @return [String] Type of the object. + attr_accessor :type + + + # + # Mapper for ArmBaseObject class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'ArmBaseObject', + type: { + name: 'Composite', + class_name: 'ArmBaseObject', + model_properties: { + name: { + required: false, + read_only: true, + serialized_name: 'name', + type: { + name: 'String' + } + }, + id: { + required: false, + read_only: true, + serialized_name: 'id', + type: { + name: 'String' + } + }, + type: { + required: false, + read_only: true, + serialized_name: 'type', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_databox/lib/2018-01-01/generated/azure_mgmt_databox/models/available_sku_request.rb b/management/azure_mgmt_databox/lib/2018-01-01/generated/azure_mgmt_databox/models/available_sku_request.rb new file mode 100644 index 0000000000..18bce0f60b --- /dev/null +++ b/management/azure_mgmt_databox/lib/2018-01-01/generated/azure_mgmt_databox/models/available_sku_request.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::Compute::Mgmt::V2018_01_01 + module Models + # + # The filters for showing the available skus. + # + class AvailableSkuRequest + + include MsRestAzure + + # @return [String] Type of the transfer. Default value: 'ImportToAzure' . + attr_accessor :transfer_type + + # @return [String] ISO country code. Country for hardware shipment. For + # codes check: + # https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements + attr_accessor :country + + # @return [String] Location for data transfer. For locations check: + # https://management.azure.com/subscriptions/SUBSCRIPTIONID/locations?api-version=2018-01-01 + attr_accessor :location + + + # + # Mapper for AvailableSkuRequest class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'AvailableSkuRequest', + type: { + name: 'Composite', + class_name: 'AvailableSkuRequest', + model_properties: { + transfer_type: { + required: true, + is_constant: true, + serialized_name: 'transferType', + default_value: 'ImportToAzure', + type: { + name: 'String' + } + }, + country: { + required: true, + serialized_name: 'country', + type: { + name: 'String' + } + }, + location: { + required: true, + serialized_name: 'location', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_databox/lib/2018-01-01/generated/azure_mgmt_databox/models/available_skus_result.rb b/management/azure_mgmt_databox/lib/2018-01-01/generated/azure_mgmt_databox/models/available_skus_result.rb new file mode 100644 index 0000000000..2dca3f5460 --- /dev/null +++ b/management/azure_mgmt_databox/lib/2018-01-01/generated/azure_mgmt_databox/models/available_skus_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::Compute::Mgmt::V2018_01_01 + module Models + # + # The available skus operation response. + # + class AvailableSkusResult + + include MsRestAzure + + include MsRest::JSONable + # @return [Array] List of available skus. + attr_accessor :value + + # @return [String] Link for the next set of skus. + 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 [AvailableSkusResult] 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 AvailableSkusResult class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'AvailableSkusResult', + type: { + name: 'Composite', + class_name: 'AvailableSkusResult', + model_properties: { + value: { + required: false, + read_only: true, + serialized_name: 'value', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'SkuInformationElementType', + type: { + name: 'Composite', + class_name: 'SkuInformation' + } + } + } + }, + next_link: { + required: false, + serialized_name: 'nextLink', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_databox/lib/2018-01-01/generated/azure_mgmt_databox/models/cancellation_reason.rb b/management/azure_mgmt_databox/lib/2018-01-01/generated/azure_mgmt_databox/models/cancellation_reason.rb new file mode 100644 index 0000000000..52d1d45c0e --- /dev/null +++ b/management/azure_mgmt_databox/lib/2018-01-01/generated/azure_mgmt_databox/models/cancellation_reason.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::Compute::Mgmt::V2018_01_01 + module Models + # + # Reason for cancellation. + # + class CancellationReason + + include MsRestAzure + + # @return [String] Reason for cancellation. + attr_accessor :reason + + + # + # Mapper for CancellationReason class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'CancellationReason', + type: { + name: 'Composite', + class_name: 'CancellationReason', + model_properties: { + reason: { + required: true, + serialized_name: 'reason', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_databox/lib/2018-01-01/generated/azure_mgmt_databox/models/contact_details.rb b/management/azure_mgmt_databox/lib/2018-01-01/generated/azure_mgmt_databox/models/contact_details.rb new file mode 100644 index 0000000000..0f84180f48 --- /dev/null +++ b/management/azure_mgmt_databox/lib/2018-01-01/generated/azure_mgmt_databox/models/contact_details.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::Compute::Mgmt::V2018_01_01 + module Models + # + # Contact Details. + # + class ContactDetails + + include MsRestAzure + + # @return [String] Contact name of the person. + attr_accessor :contact_name + + # @return [String] Phone number of the contact person. + attr_accessor :phone + + # @return [String] Phone extension number of the contact person. + attr_accessor :phone_extension + + # @return [String] Mobile number of the contact person. + attr_accessor :mobile + + # @return [Array] List of Email-ids to be notified about job + # progress. + attr_accessor :email_list + + # @return [Array] Notification preference for a + # job stage. + attr_accessor :notification_preference + + + # + # Mapper for ContactDetails class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'ContactDetails', + type: { + name: 'Composite', + class_name: 'ContactDetails', + model_properties: { + contact_name: { + required: true, + serialized_name: 'contactName', + type: { + name: 'String' + } + }, + phone: { + required: true, + serialized_name: 'phone', + type: { + name: 'String' + } + }, + phone_extension: { + required: false, + serialized_name: 'phoneExtension', + type: { + name: 'String' + } + }, + mobile: { + required: false, + serialized_name: 'mobile', + type: { + name: 'String' + } + }, + email_list: { + required: true, + serialized_name: 'emailList', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } + }, + notification_preference: { + required: false, + serialized_name: 'notificationPreference', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'NotificationPreferenceElementType', + type: { + name: 'Composite', + class_name: 'NotificationPreference' + } + } + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_databox/lib/2018-01-01/generated/azure_mgmt_databox/models/copy_log_details.rb b/management/azure_mgmt_databox/lib/2018-01-01/generated/azure_mgmt_databox/models/copy_log_details.rb new file mode 100644 index 0000000000..0fe707f71c --- /dev/null +++ b/management/azure_mgmt_databox/lib/2018-01-01/generated/azure_mgmt_databox/models/copy_log_details.rb @@ -0,0 +1,47 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::Compute::Mgmt::V2018_01_01 + module Models + # + # Details for log generated during copy. + # + class CopyLogDetails + + include MsRestAzure + + @@discriminatorMap = Hash.new + @@discriminatorMap["DataBox"] = "DataBoxAccountCopyLogDetails" + @@discriminatorMap["DataBoxDisk"] = "DataBoxDiskCopyLogDetails" + @@discriminatorMap["DataBoxHeavy"] = "DataBoxHeavyAccountCopyLogDetails" + + def initialize + @copyLogDetailsType = "CopyLogDetails" + end + + attr_accessor :copyLogDetailsType + + + # + # Mapper for CopyLogDetails class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'CopyLogDetails', + type: { + name: 'Composite', + polymorphic_discriminator: 'copyLogDetailsType', + uber_parent: 'CopyLogDetails', + class_name: 'CopyLogDetails', + model_properties: { + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_databox/lib/2018-01-01/generated/azure_mgmt_databox/models/copy_progress.rb b/management/azure_mgmt_databox/lib/2018-01-01/generated/azure_mgmt_databox/models/copy_progress.rb new file mode 100644 index 0000000000..a79751d7fc --- /dev/null +++ b/management/azure_mgmt_databox/lib/2018-01-01/generated/azure_mgmt_databox/models/copy_progress.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::Compute::Mgmt::V2018_01_01 + module Models + # + # Copy progress. + # + class CopyProgress + + include MsRestAzure + + # @return [String] Name of the storage account where the data needs to be + # uploaded. + attr_accessor :storage_account_name + + # @return [String] Id of the account where the data needs to be uploaded. + attr_accessor :account_id + + # @return [Integer] Amount of data uploaded by the job as of now. + attr_accessor :bytes_sent_to_cloud + + # @return [Integer] Total amount of data to be processed by the job. + attr_accessor :total_bytes_to_process + + + # + # Mapper for CopyProgress class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'CopyProgress', + type: { + name: 'Composite', + class_name: 'CopyProgress', + model_properties: { + storage_account_name: { + required: false, + read_only: true, + serialized_name: 'storageAccountName', + type: { + name: 'String' + } + }, + account_id: { + required: false, + read_only: true, + serialized_name: 'accountId', + type: { + name: 'String' + } + }, + bytes_sent_to_cloud: { + required: false, + read_only: true, + serialized_name: 'bytesSentToCloud', + type: { + name: 'Number' + } + }, + total_bytes_to_process: { + required: false, + read_only: true, + serialized_name: 'totalBytesToProcess', + type: { + name: 'Number' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_databox/lib/2018-01-01/generated/azure_mgmt_databox/models/copy_status.rb b/management/azure_mgmt_databox/lib/2018-01-01/generated/azure_mgmt_databox/models/copy_status.rb new file mode 100644 index 0000000000..a9cb8ce77d --- /dev/null +++ b/management/azure_mgmt_databox/lib/2018-01-01/generated/azure_mgmt_databox/models/copy_status.rb @@ -0,0 +1,20 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::Compute::Mgmt::V2018_01_01 + module Models + # + # Defines values for CopyStatus + # + module CopyStatus + NotStarted = "NotStarted" + InProgress = "InProgress" + Completed = "Completed" + CompletedWithErrors = "CompletedWithErrors" + Failed = "Failed" + NotReturned = "NotReturned" + end + end +end diff --git a/management/azure_mgmt_databox/lib/2018-01-01/generated/azure_mgmt_databox/models/data_box_account_copy_log_details.rb b/management/azure_mgmt_databox/lib/2018-01-01/generated/azure_mgmt_databox/models/data_box_account_copy_log_details.rb new file mode 100644 index 0000000000..708c9a3d82 --- /dev/null +++ b/management/azure_mgmt_databox/lib/2018-01-01/generated/azure_mgmt_databox/models/data_box_account_copy_log_details.rb @@ -0,0 +1,70 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::Compute::Mgmt::V2018_01_01 + module Models + # + # Copy log details for a storage account of a DataBox job + # + class DataBoxAccountCopyLogDetails < CopyLogDetails + + include MsRestAzure + + + def initialize + @copyLogDetailsType = "DataBox" + end + + attr_accessor :copyLogDetailsType + + # @return [String] Destination account name. + attr_accessor :account_name + + # @return [String] Link for copy logs. + attr_accessor :copy_log_link + + + # + # Mapper for DataBoxAccountCopyLogDetails class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'DataBox', + type: { + name: 'Composite', + class_name: 'DataBoxAccountCopyLogDetails', + model_properties: { + copyLogDetailsType: { + required: true, + serialized_name: 'copyLogDetailsType', + type: { + name: 'String' + } + }, + account_name: { + required: false, + read_only: true, + serialized_name: 'accountName', + type: { + name: 'String' + } + }, + copy_log_link: { + required: false, + read_only: true, + serialized_name: 'copyLogLink', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_databox/lib/2018-01-01/generated/azure_mgmt_databox/models/data_box_disk_copy_log_details.rb b/management/azure_mgmt_databox/lib/2018-01-01/generated/azure_mgmt_databox/models/data_box_disk_copy_log_details.rb new file mode 100644 index 0000000000..6631f278fd --- /dev/null +++ b/management/azure_mgmt_databox/lib/2018-01-01/generated/azure_mgmt_databox/models/data_box_disk_copy_log_details.rb @@ -0,0 +1,81 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::Compute::Mgmt::V2018_01_01 + module Models + # + # Copy Log Details for a disk + # + class DataBoxDiskCopyLogDetails < CopyLogDetails + + include MsRestAzure + + + def initialize + @copyLogDetailsType = "DataBoxDisk" + end + + attr_accessor :copyLogDetailsType + + # @return [String] Disk Serial Number. + attr_accessor :disk_serial_number + + # @return [String] Link for copy error logs. + attr_accessor :error_log_link + + # @return [String] Link for copy verbose logs. + attr_accessor :verbose_log_link + + + # + # Mapper for DataBoxDiskCopyLogDetails class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'DataBoxDisk', + type: { + name: 'Composite', + class_name: 'DataBoxDiskCopyLogDetails', + model_properties: { + copyLogDetailsType: { + required: true, + serialized_name: 'copyLogDetailsType', + type: { + name: 'String' + } + }, + disk_serial_number: { + required: false, + read_only: true, + serialized_name: 'diskSerialNumber', + type: { + name: 'String' + } + }, + error_log_link: { + required: false, + read_only: true, + serialized_name: 'errorLogLink', + type: { + name: 'String' + } + }, + verbose_log_link: { + required: false, + read_only: true, + serialized_name: 'verboseLogLink', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_databox/lib/2018-01-01/generated/azure_mgmt_databox/models/data_box_disk_copy_progress.rb b/management/azure_mgmt_databox/lib/2018-01-01/generated/azure_mgmt_databox/models/data_box_disk_copy_progress.rb new file mode 100644 index 0000000000..2e469a302f --- /dev/null +++ b/management/azure_mgmt_databox/lib/2018-01-01/generated/azure_mgmt_databox/models/data_box_disk_copy_progress.rb @@ -0,0 +1,82 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::Compute::Mgmt::V2018_01_01 + module Models + # + # DataBox Disk Copy Progress + # + class DataBoxDiskCopyProgress + + include MsRestAzure + + # @return [String] The serial number of the disk + attr_accessor :serial_number + + # @return [Integer] Bytes copied during the copy of disk. + attr_accessor :bytes_copied + + # @return [Integer] Indicates the percentage completed for the copy of + # the disk. + attr_accessor :percent_complete + + # @return [CopyStatus] The Status of the copy. Possible values include: + # 'NotStarted', 'InProgress', 'Completed', 'CompletedWithErrors', + # 'Failed', 'NotReturned' + attr_accessor :status + + + # + # Mapper for DataBoxDiskCopyProgress class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'DataBoxDiskCopyProgress', + type: { + name: 'Composite', + class_name: 'DataBoxDiskCopyProgress', + model_properties: { + serial_number: { + required: false, + read_only: true, + serialized_name: 'serialNumber', + type: { + name: 'String' + } + }, + bytes_copied: { + required: false, + read_only: true, + serialized_name: 'bytesCopied', + type: { + name: 'Number' + } + }, + percent_complete: { + required: false, + read_only: true, + serialized_name: 'percentComplete', + type: { + name: 'Number' + } + }, + status: { + required: false, + read_only: true, + serialized_name: 'status', + type: { + name: 'Enum', + module: 'CopyStatus' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_databox/lib/2018-01-01/generated/azure_mgmt_databox/models/data_box_disk_job_details.rb b/management/azure_mgmt_databox/lib/2018-01-01/generated/azure_mgmt_databox/models/data_box_disk_job_details.rb new file mode 100644 index 0000000000..92ce8e8d5c --- /dev/null +++ b/management/azure_mgmt_databox/lib/2018-01-01/generated/azure_mgmt_databox/models/data_box_disk_job_details.rb @@ -0,0 +1,247 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::Compute::Mgmt::V2018_01_01 + module Models + # + # DataBox Disk Job Details. + # + class DataBoxDiskJobDetails < JobDetails + + include MsRestAzure + + + def initialize + @jobDetailsType = "DataBoxDisk" + end + + attr_accessor :jobDetailsType + + # @return [Hash{String => Integer}] User preference on what size disks + # are needed for the job. The map is from the disk size in TB to the + # count. Eg. {2,5} means 5 disks of 2 TB size. Key is string but will be + # checked against an int. + attr_accessor :preferred_disks + + # @return [Array] Copy progress per disk. + attr_accessor :copy_progress + + # @return [Hash{String => Integer}] Contains the map of disk serial + # number to the disk size being used for the job. Is returned only after + # the disks are shipped to the customer. + attr_accessor :disks_and_size_details + + # @return [String] User entered passkey for DataBox Disk job. + attr_accessor :passkey + + + # + # Mapper for DataBoxDiskJobDetails class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'DataBoxDisk', + type: { + name: 'Composite', + class_name: 'DataBoxDiskJobDetails', + model_properties: { + expected_data_size_in_tera_bytes: { + required: false, + serialized_name: 'expectedDataSizeInTeraBytes', + type: { + name: 'Number' + } + }, + job_stages: { + required: false, + read_only: true, + serialized_name: 'jobStages', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'JobStagesElementType', + type: { + name: 'Composite', + class_name: 'JobStages' + } + } + } + }, + contact_details: { + required: true, + serialized_name: 'contactDetails', + type: { + name: 'Composite', + class_name: 'ContactDetails' + } + }, + shipping_address: { + required: true, + serialized_name: 'shippingAddress', + type: { + name: 'Composite', + class_name: 'ShippingAddress' + } + }, + delivery_package: { + required: false, + read_only: true, + serialized_name: 'deliveryPackage', + type: { + name: 'Composite', + class_name: 'PackageShippingDetails' + } + }, + return_package: { + required: false, + read_only: true, + serialized_name: 'returnPackage', + type: { + name: 'Composite', + class_name: 'PackageShippingDetails' + } + }, + destination_account_details: { + required: true, + serialized_name: 'destinationAccountDetails', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'DestinationAccountDetailsElementType', + type: { + name: 'Composite', + class_name: 'DestinationAccountDetails' + } + } + } + }, + error_details: { + required: false, + read_only: true, + serialized_name: 'errorDetails', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'JobErrorDetailsElementType', + type: { + name: 'Composite', + class_name: 'JobErrorDetails' + } + } + } + }, + preferences: { + required: false, + serialized_name: 'preferences', + type: { + name: 'Composite', + class_name: 'Preferences' + } + }, + copy_log_details: { + required: false, + read_only: true, + serialized_name: 'copyLogDetails', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'CopyLogDetailsElementType', + type: { + name: 'Composite', + polymorphic_discriminator: 'copyLogDetailsType', + uber_parent: 'CopyLogDetails', + class_name: 'CopyLogDetails' + } + } + } + }, + reverse_shipment_label_sas_key: { + required: false, + read_only: true, + serialized_name: 'reverseShipmentLabelSasKey', + type: { + name: 'String' + } + }, + chain_of_custody_sas_key: { + required: false, + read_only: true, + serialized_name: 'chainOfCustodySasKey', + type: { + name: 'String' + } + }, + jobDetailsType: { + required: true, + serialized_name: 'jobDetailsType', + type: { + name: 'String' + } + }, + preferred_disks: { + required: false, + serialized_name: 'preferredDisks', + type: { + name: 'Dictionary', + value: { + required: false, + serialized_name: 'NumberElementType', + type: { + name: 'Number' + } + } + } + }, + copy_progress: { + required: false, + read_only: true, + serialized_name: 'copyProgress', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'DataBoxDiskCopyProgressElementType', + type: { + name: 'Composite', + class_name: 'DataBoxDiskCopyProgress' + } + } + } + }, + disks_and_size_details: { + required: false, + read_only: true, + serialized_name: 'disksAndSizeDetails', + type: { + name: 'Dictionary', + value: { + required: false, + serialized_name: 'NumberElementType', + type: { + name: 'Number' + } + } + } + }, + passkey: { + required: false, + serialized_name: 'passkey', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_databox/lib/2018-01-01/generated/azure_mgmt_databox/models/data_box_disk_job_secrets.rb b/management/azure_mgmt_databox/lib/2018-01-01/generated/azure_mgmt_databox/models/data_box_disk_job_secrets.rb new file mode 100644 index 0000000000..0c8c5a867c --- /dev/null +++ b/management/azure_mgmt_databox/lib/2018-01-01/generated/azure_mgmt_databox/models/data_box_disk_job_secrets.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::Compute::Mgmt::V2018_01_01 + module Models + # + # The secrets related to disk job. + # + class DataBoxDiskJobSecrets < JobSecrets + + include MsRestAzure + + + def initialize + @jobSecretsType = "DataBoxDisk" + end + + attr_accessor :jobSecretsType + + # @return [Array] Contains the list of secrets object for + # that device. + attr_accessor :disk_secrets + + # @return [String] PassKey for the disk Job. + attr_accessor :pass_key + + # @return [Boolean] Whether passkey was provided by user. + attr_accessor :is_passkey_user_defined + + + # + # Mapper for DataBoxDiskJobSecrets class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'DataBoxDisk', + type: { + name: 'Composite', + class_name: 'DataBoxDiskJobSecrets', + model_properties: { + jobSecretsType: { + required: true, + serialized_name: 'jobSecretsType', + type: { + name: 'String' + } + }, + disk_secrets: { + required: false, + read_only: true, + serialized_name: 'diskSecrets', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'DiskSecretElementType', + type: { + name: 'Composite', + class_name: 'DiskSecret' + } + } + } + }, + pass_key: { + required: false, + read_only: true, + serialized_name: 'passKey', + type: { + name: 'String' + } + }, + is_passkey_user_defined: { + required: false, + read_only: true, + serialized_name: 'isPasskeyUserDefined', + type: { + name: 'Boolean' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_databox/lib/2018-01-01/generated/azure_mgmt_databox/models/data_box_heavy_account_copy_log_details.rb b/management/azure_mgmt_databox/lib/2018-01-01/generated/azure_mgmt_databox/models/data_box_heavy_account_copy_log_details.rb new file mode 100644 index 0000000000..e4190127c1 --- /dev/null +++ b/management/azure_mgmt_databox/lib/2018-01-01/generated/azure_mgmt_databox/models/data_box_heavy_account_copy_log_details.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::Compute::Mgmt::V2018_01_01 + module Models + # + # Copy log details for a storage account for Databox heavy + # + class DataBoxHeavyAccountCopyLogDetails < CopyLogDetails + + include MsRestAzure + + + def initialize + @copyLogDetailsType = "DataBoxHeavy" + end + + attr_accessor :copyLogDetailsType + + # @return [String] Destination account name. + attr_accessor :account_name + + # @return [Array] Link for copy logs. + attr_accessor :copy_log_link + + + # + # Mapper for DataBoxHeavyAccountCopyLogDetails class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'DataBoxHeavy', + type: { + name: 'Composite', + class_name: 'DataBoxHeavyAccountCopyLogDetails', + model_properties: { + copyLogDetailsType: { + required: true, + serialized_name: 'copyLogDetailsType', + type: { + name: 'String' + } + }, + account_name: { + required: false, + read_only: true, + serialized_name: 'accountName', + type: { + name: 'String' + } + }, + copy_log_link: { + required: false, + read_only: true, + serialized_name: 'copyLogLink', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_databox/lib/2018-01-01/generated/azure_mgmt_databox/models/data_box_heavy_job_details.rb b/management/azure_mgmt_databox/lib/2018-01-01/generated/azure_mgmt_databox/models/data_box_heavy_job_details.rb new file mode 100644 index 0000000000..4669d6c524 --- /dev/null +++ b/management/azure_mgmt_databox/lib/2018-01-01/generated/azure_mgmt_databox/models/data_box_heavy_job_details.rb @@ -0,0 +1,197 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::Compute::Mgmt::V2018_01_01 + module Models + # + # Databox Heavy Device Job Details + # + class DataBoxHeavyJobDetails < JobDetails + + include MsRestAzure + + + def initialize + @jobDetailsType = "DataBoxHeavy" + end + + attr_accessor :jobDetailsType + + # @return [Array] Copy progress per account. + attr_accessor :copy_progress + + + # + # Mapper for DataBoxHeavyJobDetails class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'DataBoxHeavy', + type: { + name: 'Composite', + class_name: 'DataBoxHeavyJobDetails', + model_properties: { + expected_data_size_in_tera_bytes: { + required: false, + serialized_name: 'expectedDataSizeInTeraBytes', + type: { + name: 'Number' + } + }, + job_stages: { + required: false, + read_only: true, + serialized_name: 'jobStages', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'JobStagesElementType', + type: { + name: 'Composite', + class_name: 'JobStages' + } + } + } + }, + contact_details: { + required: true, + serialized_name: 'contactDetails', + type: { + name: 'Composite', + class_name: 'ContactDetails' + } + }, + shipping_address: { + required: true, + serialized_name: 'shippingAddress', + type: { + name: 'Composite', + class_name: 'ShippingAddress' + } + }, + delivery_package: { + required: false, + read_only: true, + serialized_name: 'deliveryPackage', + type: { + name: 'Composite', + class_name: 'PackageShippingDetails' + } + }, + return_package: { + required: false, + read_only: true, + serialized_name: 'returnPackage', + type: { + name: 'Composite', + class_name: 'PackageShippingDetails' + } + }, + destination_account_details: { + required: true, + serialized_name: 'destinationAccountDetails', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'DestinationAccountDetailsElementType', + type: { + name: 'Composite', + class_name: 'DestinationAccountDetails' + } + } + } + }, + error_details: { + required: false, + read_only: true, + serialized_name: 'errorDetails', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'JobErrorDetailsElementType', + type: { + name: 'Composite', + class_name: 'JobErrorDetails' + } + } + } + }, + preferences: { + required: false, + serialized_name: 'preferences', + type: { + name: 'Composite', + class_name: 'Preferences' + } + }, + copy_log_details: { + required: false, + read_only: true, + serialized_name: 'copyLogDetails', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'CopyLogDetailsElementType', + type: { + name: 'Composite', + polymorphic_discriminator: 'copyLogDetailsType', + uber_parent: 'CopyLogDetails', + class_name: 'CopyLogDetails' + } + } + } + }, + reverse_shipment_label_sas_key: { + required: false, + read_only: true, + serialized_name: 'reverseShipmentLabelSasKey', + type: { + name: 'String' + } + }, + chain_of_custody_sas_key: { + required: false, + read_only: true, + serialized_name: 'chainOfCustodySasKey', + type: { + name: 'String' + } + }, + jobDetailsType: { + required: true, + serialized_name: 'jobDetailsType', + type: { + name: 'String' + } + }, + copy_progress: { + required: false, + read_only: true, + serialized_name: 'copyProgress', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'CopyProgressElementType', + type: { + name: 'Composite', + class_name: 'CopyProgress' + } + } + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_databox/lib/2018-01-01/generated/azure_mgmt_databox/models/data_box_heavy_job_secrets.rb b/management/azure_mgmt_databox/lib/2018-01-01/generated/azure_mgmt_databox/models/data_box_heavy_job_secrets.rb new file mode 100644 index 0000000000..4a8aa46636 --- /dev/null +++ b/management/azure_mgmt_databox/lib/2018-01-01/generated/azure_mgmt_databox/models/data_box_heavy_job_secrets.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::Compute::Mgmt::V2018_01_01 + module Models + # + # The secrets related to a databox heavy job. + # + class DataBoxHeavyJobSecrets < JobSecrets + + include MsRestAzure + + + def initialize + @jobSecretsType = "DataBoxHeavy" + end + + attr_accessor :jobSecretsType + + # @return [Array] Contains the list of secret objects + # for a databox heavy job. + attr_accessor :cabinet_pod_secrets + + + # + # Mapper for DataBoxHeavyJobSecrets class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'DataBoxHeavy', + type: { + name: 'Composite', + class_name: 'DataBoxHeavyJobSecrets', + model_properties: { + jobSecretsType: { + required: true, + serialized_name: 'jobSecretsType', + type: { + name: 'String' + } + }, + cabinet_pod_secrets: { + required: false, + read_only: true, + serialized_name: 'cabinetPodSecrets', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'DataBoxHeavySecretElementType', + type: { + name: 'Composite', + class_name: 'DataBoxHeavySecret' + } + } + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_databox/lib/2018-01-01/generated/azure_mgmt_databox/models/data_box_heavy_secret.rb b/management/azure_mgmt_databox/lib/2018-01-01/generated/azure_mgmt_databox/models/data_box_heavy_secret.rb new file mode 100644 index 0000000000..8dd3490a19 --- /dev/null +++ b/management/azure_mgmt_databox/lib/2018-01-01/generated/azure_mgmt_databox/models/data_box_heavy_secret.rb @@ -0,0 +1,108 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::Compute::Mgmt::V2018_01_01 + module Models + # + # The secrets related to a databox heavy. + # + class DataBoxHeavySecret + + include MsRestAzure + + # @return [String] Serial number of the assigned device. + attr_accessor :device_serial_number + + # @return [String] Password for out of the box experience on device. + attr_accessor :device_password + + # @return [Array] Network configuration of + # the appliance. + attr_accessor :network_configurations + + # @return [String] The base 64 encoded public key to authenticate with + # the device + attr_accessor :encoded_validation_cert_pub_key + + # @return [Array] Per account level access + # credentials. + attr_accessor :account_credential_details + + + # + # Mapper for DataBoxHeavySecret class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'DataBoxHeavySecret', + type: { + name: 'Composite', + class_name: 'DataBoxHeavySecret', + model_properties: { + device_serial_number: { + required: false, + read_only: true, + serialized_name: 'deviceSerialNumber', + type: { + name: 'String' + } + }, + device_password: { + required: false, + read_only: true, + serialized_name: 'devicePassword', + type: { + name: 'String' + } + }, + network_configurations: { + required: false, + read_only: true, + serialized_name: 'networkConfigurations', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'ApplianceNetworkConfigurationElementType', + type: { + name: 'Composite', + class_name: 'ApplianceNetworkConfiguration' + } + } + } + }, + encoded_validation_cert_pub_key: { + required: false, + read_only: true, + serialized_name: 'encodedValidationCertPubKey', + type: { + name: 'String' + } + }, + account_credential_details: { + required: false, + read_only: true, + serialized_name: 'accountCredentialDetails', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'AccountCredentialDetailsElementType', + type: { + name: 'Composite', + class_name: 'AccountCredentialDetails' + } + } + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_databox/lib/2018-01-01/generated/azure_mgmt_databox/models/data_box_job_details.rb b/management/azure_mgmt_databox/lib/2018-01-01/generated/azure_mgmt_databox/models/data_box_job_details.rb new file mode 100644 index 0000000000..a935760684 --- /dev/null +++ b/management/azure_mgmt_databox/lib/2018-01-01/generated/azure_mgmt_databox/models/data_box_job_details.rb @@ -0,0 +1,197 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::Compute::Mgmt::V2018_01_01 + module Models + # + # Databox Job Details + # + class DataBoxJobDetails < JobDetails + + include MsRestAzure + + + def initialize + @jobDetailsType = "DataBox" + end + + attr_accessor :jobDetailsType + + # @return [Array] Copy progress per storage account. + attr_accessor :copy_progress + + + # + # Mapper for DataBoxJobDetails class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'DataBox', + type: { + name: 'Composite', + class_name: 'DataBoxJobDetails', + model_properties: { + expected_data_size_in_tera_bytes: { + required: false, + serialized_name: 'expectedDataSizeInTeraBytes', + type: { + name: 'Number' + } + }, + job_stages: { + required: false, + read_only: true, + serialized_name: 'jobStages', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'JobStagesElementType', + type: { + name: 'Composite', + class_name: 'JobStages' + } + } + } + }, + contact_details: { + required: true, + serialized_name: 'contactDetails', + type: { + name: 'Composite', + class_name: 'ContactDetails' + } + }, + shipping_address: { + required: true, + serialized_name: 'shippingAddress', + type: { + name: 'Composite', + class_name: 'ShippingAddress' + } + }, + delivery_package: { + required: false, + read_only: true, + serialized_name: 'deliveryPackage', + type: { + name: 'Composite', + class_name: 'PackageShippingDetails' + } + }, + return_package: { + required: false, + read_only: true, + serialized_name: 'returnPackage', + type: { + name: 'Composite', + class_name: 'PackageShippingDetails' + } + }, + destination_account_details: { + required: true, + serialized_name: 'destinationAccountDetails', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'DestinationAccountDetailsElementType', + type: { + name: 'Composite', + class_name: 'DestinationAccountDetails' + } + } + } + }, + error_details: { + required: false, + read_only: true, + serialized_name: 'errorDetails', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'JobErrorDetailsElementType', + type: { + name: 'Composite', + class_name: 'JobErrorDetails' + } + } + } + }, + preferences: { + required: false, + serialized_name: 'preferences', + type: { + name: 'Composite', + class_name: 'Preferences' + } + }, + copy_log_details: { + required: false, + read_only: true, + serialized_name: 'copyLogDetails', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'CopyLogDetailsElementType', + type: { + name: 'Composite', + polymorphic_discriminator: 'copyLogDetailsType', + uber_parent: 'CopyLogDetails', + class_name: 'CopyLogDetails' + } + } + } + }, + reverse_shipment_label_sas_key: { + required: false, + read_only: true, + serialized_name: 'reverseShipmentLabelSasKey', + type: { + name: 'String' + } + }, + chain_of_custody_sas_key: { + required: false, + read_only: true, + serialized_name: 'chainOfCustodySasKey', + type: { + name: 'String' + } + }, + jobDetailsType: { + required: true, + serialized_name: 'jobDetailsType', + type: { + name: 'String' + } + }, + copy_progress: { + required: false, + read_only: true, + serialized_name: 'copyProgress', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'CopyProgressElementType', + type: { + name: 'Composite', + class_name: 'CopyProgress' + } + } + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_databox/lib/2018-01-01/generated/azure_mgmt_databox/models/data_box_secret.rb b/management/azure_mgmt_databox/lib/2018-01-01/generated/azure_mgmt_databox/models/data_box_secret.rb new file mode 100644 index 0000000000..6ccbb7a278 --- /dev/null +++ b/management/azure_mgmt_databox/lib/2018-01-01/generated/azure_mgmt_databox/models/data_box_secret.rb @@ -0,0 +1,108 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::Compute::Mgmt::V2018_01_01 + module Models + # + # The secrets related to a DataBox. + # + class DataBoxSecret + + include MsRestAzure + + # @return [String] Serial number of the assigned device. + attr_accessor :device_serial_number + + # @return [String] Password for out of the box experience on device. + attr_accessor :device_password + + # @return [Array] Network configuration of + # the appliance. + attr_accessor :network_configurations + + # @return [String] The base 64 encoded public key to authenticate with + # the device + attr_accessor :encoded_validation_cert_pub_key + + # @return [Array] Per account level access + # credentials. + attr_accessor :account_credential_details + + + # + # Mapper for DataBoxSecret class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'DataBoxSecret', + type: { + name: 'Composite', + class_name: 'DataBoxSecret', + model_properties: { + device_serial_number: { + required: false, + read_only: true, + serialized_name: 'deviceSerialNumber', + type: { + name: 'String' + } + }, + device_password: { + required: false, + read_only: true, + serialized_name: 'devicePassword', + type: { + name: 'String' + } + }, + network_configurations: { + required: false, + read_only: true, + serialized_name: 'networkConfigurations', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'ApplianceNetworkConfigurationElementType', + type: { + name: 'Composite', + class_name: 'ApplianceNetworkConfiguration' + } + } + } + }, + encoded_validation_cert_pub_key: { + required: false, + read_only: true, + serialized_name: 'encodedValidationCertPubKey', + type: { + name: 'String' + } + }, + account_credential_details: { + required: false, + read_only: true, + serialized_name: 'accountCredentialDetails', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'AccountCredentialDetailsElementType', + type: { + name: 'Composite', + class_name: 'AccountCredentialDetails' + } + } + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_databox/lib/2018-01-01/generated/azure_mgmt_databox/models/databox_job_secrets.rb b/management/azure_mgmt_databox/lib/2018-01-01/generated/azure_mgmt_databox/models/databox_job_secrets.rb new file mode 100644 index 0000000000..d00638e25c --- /dev/null +++ b/management/azure_mgmt_databox/lib/2018-01-01/generated/azure_mgmt_databox/models/databox_job_secrets.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::Compute::Mgmt::V2018_01_01 + module Models + # + # The secrets related to a databox job. + # + class DataboxJobSecrets < JobSecrets + + include MsRestAzure + + + def initialize + @jobSecretsType = "DataBox" + end + + attr_accessor :jobSecretsType + + # @return [Array] Contains the list of secret objects for + # a job. + attr_accessor :pod_secrets + + + # + # Mapper for DataboxJobSecrets class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'DataBox', + type: { + name: 'Composite', + class_name: 'DataboxJobSecrets', + model_properties: { + jobSecretsType: { + required: true, + serialized_name: 'jobSecretsType', + type: { + name: 'String' + } + }, + pod_secrets: { + required: false, + serialized_name: 'podSecrets', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'DataBoxSecretElementType', + type: { + name: 'Composite', + class_name: 'DataBoxSecret' + } + } + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_databox/lib/2018-01-01/generated/azure_mgmt_databox/models/destination_account_details.rb b/management/azure_mgmt_databox/lib/2018-01-01/generated/azure_mgmt_databox/models/destination_account_details.rb new file mode 100644 index 0000000000..9db6742547 --- /dev/null +++ b/management/azure_mgmt_databox/lib/2018-01-01/generated/azure_mgmt_databox/models/destination_account_details.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::Compute::Mgmt::V2018_01_01 + module Models + # + # Details for the destination account. + # + class DestinationAccountDetails + + include MsRestAzure + + # @return [String] Destination storage account id. + attr_accessor :account_id + + + # + # Mapper for DestinationAccountDetails class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'DestinationAccountDetails', + type: { + name: 'Composite', + class_name: 'DestinationAccountDetails', + model_properties: { + account_id: { + required: true, + serialized_name: 'accountId', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_databox/lib/2018-01-01/generated/azure_mgmt_databox/models/destination_to_service_location_map.rb b/management/azure_mgmt_databox/lib/2018-01-01/generated/azure_mgmt_databox/models/destination_to_service_location_map.rb new file mode 100644 index 0000000000..f2be248d97 --- /dev/null +++ b/management/azure_mgmt_databox/lib/2018-01-01/generated/azure_mgmt_databox/models/destination_to_service_location_map.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::Compute::Mgmt::V2018_01_01 + module Models + # + # Map of destination location to service location + # + class DestinationToServiceLocationMap + + include MsRestAzure + + # @return [String] Location of the destination. + attr_accessor :destination_location + + # @return [String] Location of the service. + attr_accessor :service_location + + + # + # Mapper for DestinationToServiceLocationMap class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'DestinationToServiceLocationMap', + type: { + name: 'Composite', + class_name: 'DestinationToServiceLocationMap', + model_properties: { + destination_location: { + required: false, + read_only: true, + serialized_name: 'destinationLocation', + type: { + name: 'String' + } + }, + service_location: { + required: false, + read_only: true, + serialized_name: 'serviceLocation', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_databox/lib/2018-01-01/generated/azure_mgmt_databox/models/disk_secret.rb b/management/azure_mgmt_databox/lib/2018-01-01/generated/azure_mgmt_databox/models/disk_secret.rb new file mode 100644 index 0000000000..3c98d1dd4a --- /dev/null +++ b/management/azure_mgmt_databox/lib/2018-01-01/generated/azure_mgmt_databox/models/disk_secret.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::Compute::Mgmt::V2018_01_01 + module Models + # + # Contains all the secrets of a Disk. + # + class DiskSecret + + include MsRestAzure + + # @return [String] Serial number of the assigned disk. + attr_accessor :disk_serial_number + + # @return [String] Bit Locker key of the disk which can be used to unlock + # the disk to copy data. + attr_accessor :bit_locker_key + + + # + # Mapper for DiskSecret class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'DiskSecret', + type: { + name: 'Composite', + class_name: 'DiskSecret', + model_properties: { + disk_serial_number: { + required: false, + read_only: true, + serialized_name: 'diskSerialNumber', + type: { + name: 'String' + } + }, + bit_locker_key: { + required: false, + read_only: true, + serialized_name: 'bitLockerKey', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_databox/lib/2018-01-01/generated/azure_mgmt_databox/models/error.rb b/management/azure_mgmt_databox/lib/2018-01-01/generated/azure_mgmt_databox/models/error.rb new file mode 100644 index 0000000000..e47853a18a --- /dev/null +++ b/management/azure_mgmt_databox/lib/2018-01-01/generated/azure_mgmt_databox/models/error.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::Compute::Mgmt::V2018_01_01 + module Models + # + # Top level error for the job. + # + class Error + + include MsRestAzure + + # @return [String] Error code that can be used to programmatically + # identify the error. + attr_accessor :code + + # @return [String] Describes the error in detail and provides debugging + # information. + attr_accessor :message + + + # + # Mapper for Error class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'Error', + type: { + name: 'Composite', + class_name: 'Error', + model_properties: { + code: { + required: false, + read_only: true, + serialized_name: 'code', + type: { + name: 'String' + } + }, + message: { + required: false, + read_only: true, + serialized_name: 'message', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_databox/lib/2018-01-01/generated/azure_mgmt_databox/models/job_details.rb b/management/azure_mgmt_databox/lib/2018-01-01/generated/azure_mgmt_databox/models/job_details.rb new file mode 100644 index 0000000000..4368f91d59 --- /dev/null +++ b/management/azure_mgmt_databox/lib/2018-01-01/generated/azure_mgmt_databox/models/job_details.rb @@ -0,0 +1,217 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::Compute::Mgmt::V2018_01_01 + module Models + # + # Job details. + # + class JobDetails + + include MsRestAzure + + @@discriminatorMap = Hash.new + @@discriminatorMap["DataBoxDisk"] = "DataBoxDiskJobDetails" + @@discriminatorMap["DataBoxHeavy"] = "DataBoxHeavyJobDetails" + @@discriminatorMap["DataBox"] = "DataBoxJobDetails" + + def initialize + @jobDetailsType = "JobDetails" + end + + attr_accessor :jobDetailsType + + # @return [Integer] The expected size of the data, which needs to be + # transfered in this job, in tera bytes. + attr_accessor :expected_data_size_in_tera_bytes + + # @return [Array] List of stages that run in the job. + attr_accessor :job_stages + + # @return [ContactDetails] Contact details for notification and shipping. + attr_accessor :contact_details + + # @return [ShippingAddress] Shipping address of the customer. + attr_accessor :shipping_address + + # @return [PackageShippingDetails] Delivery package shipping details. + attr_accessor :delivery_package + + # @return [PackageShippingDetails] Return package shipping details. + attr_accessor :return_package + + # @return [Array] Destination account details. + attr_accessor :destination_account_details + + # @return [Array] Error details for failure. This is + # optional. + attr_accessor :error_details + + # @return [Preferences] Preferences for the order. + attr_accessor :preferences + + # @return [Array] List of copy log details. + attr_accessor :copy_log_details + + # @return [String] Shared access key to download the return shipment + # label + attr_accessor :reverse_shipment_label_sas_key + + # @return [String] Shared access key to download the chain of custody + # logs + attr_accessor :chain_of_custody_sas_key + + + # + # Mapper for JobDetails class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'JobDetails', + type: { + name: 'Composite', + polymorphic_discriminator: 'jobDetailsType', + uber_parent: 'JobDetails', + class_name: 'JobDetails', + model_properties: { + expected_data_size_in_tera_bytes: { + required: false, + serialized_name: 'expectedDataSizeInTeraBytes', + type: { + name: 'Number' + } + }, + job_stages: { + required: false, + read_only: true, + serialized_name: 'jobStages', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'JobStagesElementType', + type: { + name: 'Composite', + class_name: 'JobStages' + } + } + } + }, + contact_details: { + required: true, + serialized_name: 'contactDetails', + type: { + name: 'Composite', + class_name: 'ContactDetails' + } + }, + shipping_address: { + required: true, + serialized_name: 'shippingAddress', + type: { + name: 'Composite', + class_name: 'ShippingAddress' + } + }, + delivery_package: { + required: false, + read_only: true, + serialized_name: 'deliveryPackage', + type: { + name: 'Composite', + class_name: 'PackageShippingDetails' + } + }, + return_package: { + required: false, + read_only: true, + serialized_name: 'returnPackage', + type: { + name: 'Composite', + class_name: 'PackageShippingDetails' + } + }, + destination_account_details: { + required: true, + serialized_name: 'destinationAccountDetails', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'DestinationAccountDetailsElementType', + type: { + name: 'Composite', + class_name: 'DestinationAccountDetails' + } + } + } + }, + error_details: { + required: false, + read_only: true, + serialized_name: 'errorDetails', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'JobErrorDetailsElementType', + type: { + name: 'Composite', + class_name: 'JobErrorDetails' + } + } + } + }, + preferences: { + required: false, + serialized_name: 'preferences', + type: { + name: 'Composite', + class_name: 'Preferences' + } + }, + copy_log_details: { + required: false, + read_only: true, + serialized_name: 'copyLogDetails', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'CopyLogDetailsElementType', + type: { + name: 'Composite', + polymorphic_discriminator: 'copyLogDetailsType', + uber_parent: 'CopyLogDetails', + class_name: 'CopyLogDetails' + } + } + } + }, + reverse_shipment_label_sas_key: { + required: false, + read_only: true, + serialized_name: 'reverseShipmentLabelSasKey', + type: { + name: 'String' + } + }, + chain_of_custody_sas_key: { + required: false, + read_only: true, + serialized_name: 'chainOfCustodySasKey', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_databox/lib/2018-01-01/generated/azure_mgmt_databox/models/job_error_details.rb b/management/azure_mgmt_databox/lib/2018-01-01/generated/azure_mgmt_databox/models/job_error_details.rb new file mode 100644 index 0000000000..207c2fe82a --- /dev/null +++ b/management/azure_mgmt_databox/lib/2018-01-01/generated/azure_mgmt_databox/models/job_error_details.rb @@ -0,0 +1,78 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::Compute::Mgmt::V2018_01_01 + module Models + # + # Job Error Details for providing the information and recommended action. + # + class JobErrorDetails + + include MsRestAzure + + # @return [String] Message for the error. + attr_accessor :error_message + + # @return [Integer] Code for the error. + attr_accessor :error_code + + # @return [String] Recommended action for the error. + attr_accessor :recommended_action + + # @return [String] Contains the non localized exception message + attr_accessor :exception_message + + + # + # Mapper for JobErrorDetails class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'JobErrorDetails', + type: { + name: 'Composite', + class_name: 'JobErrorDetails', + model_properties: { + error_message: { + required: false, + read_only: true, + serialized_name: 'errorMessage', + type: { + name: 'String' + } + }, + error_code: { + required: false, + read_only: true, + serialized_name: 'errorCode', + type: { + name: 'Number' + } + }, + recommended_action: { + required: false, + read_only: true, + serialized_name: 'recommendedAction', + type: { + name: 'String' + } + }, + exception_message: { + required: false, + read_only: true, + serialized_name: 'exceptionMessage', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_databox/lib/2018-01-01/generated/azure_mgmt_databox/models/job_resource.rb b/management/azure_mgmt_databox/lib/2018-01-01/generated/azure_mgmt_databox/models/job_resource.rb new file mode 100644 index 0000000000..563a837b6c --- /dev/null +++ b/management/azure_mgmt_databox/lib/2018-01-01/generated/azure_mgmt_databox/models/job_resource.rb @@ -0,0 +1,195 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::Compute::Mgmt::V2018_01_01 + module Models + # + # Job Resource. + # + class JobResource < Resource + + include MsRestAzure + + # @return [Boolean] Describes whether the job is cancellable or not. + attr_accessor :is_cancellable + + # @return [Boolean] Describes whether the job is deletable or not. + attr_accessor :is_deletable + + # @return [Boolean] Describes whether the shipping address is editable or + # not. + attr_accessor :is_shipping_address_editable + + # @return [StageName] Name of the stage which is in progress. Possible + # values include: 'DeviceOrdered', 'DevicePrepared', 'Dispatched', + # 'Delivered', 'PickedUp', 'AtAzureDC', 'DataCopy', 'Completed', + # 'CompletedWithErrors', 'Cancelled', 'Failed_IssueReportedAtCustomer', + # 'Failed_IssueDetectedAtAzureDC', 'Aborted' + attr_accessor :status + + # @return [DateTime] Time at which the job was started in UTC ISO 8601 + # format. + attr_accessor :start_time + + # @return [Error] Top level error for the job. + attr_accessor :error + + # @return [JobDetails] Details of a job run. This field will only be sent + # for expand details filter. + attr_accessor :details + + # @return [String] Reason for cancellation. + attr_accessor :cancellation_reason + + # @return [String] Name of the object. + attr_accessor :name + + # @return [String] Id of the object. + attr_accessor :id + + # @return [String] Type of the object. + attr_accessor :type + + + # + # Mapper for JobResource class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'JobResource', + type: { + name: 'Composite', + class_name: 'JobResource', + model_properties: { + 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' + } + }, + is_cancellable: { + required: false, + read_only: true, + serialized_name: 'properties.isCancellable', + type: { + name: 'Boolean' + } + }, + is_deletable: { + required: false, + read_only: true, + serialized_name: 'properties.isDeletable', + type: { + name: 'Boolean' + } + }, + is_shipping_address_editable: { + required: false, + read_only: true, + serialized_name: 'properties.isShippingAddressEditable', + type: { + name: 'Boolean' + } + }, + status: { + required: false, + read_only: true, + serialized_name: 'properties.status', + type: { + name: 'Enum', + module: 'StageName' + } + }, + start_time: { + required: false, + read_only: true, + serialized_name: 'properties.startTime', + type: { + name: 'DateTime' + } + }, + error: { + required: false, + read_only: true, + serialized_name: 'properties.error', + type: { + name: 'Composite', + class_name: 'Error' + } + }, + details: { + required: false, + serialized_name: 'properties.details', + type: { + name: 'Composite', + polymorphic_discriminator: 'jobDetailsType', + uber_parent: 'JobDetails', + class_name: 'JobDetails' + } + }, + cancellation_reason: { + required: false, + read_only: true, + serialized_name: 'properties.cancellationReason', + type: { + name: 'String' + } + }, + name: { + required: false, + read_only: true, + serialized_name: 'name', + type: { + name: 'String' + } + }, + id: { + required: false, + read_only: true, + serialized_name: 'id', + 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_databox/lib/2018-01-01/generated/azure_mgmt_databox/models/job_resource_list.rb b/management/azure_mgmt_databox/lib/2018-01-01/generated/azure_mgmt_databox/models/job_resource_list.rb new file mode 100644 index 0000000000..9f08592039 --- /dev/null +++ b/management/azure_mgmt_databox/lib/2018-01-01/generated/azure_mgmt_databox/models/job_resource_list.rb @@ -0,0 +1,94 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::Compute::Mgmt::V2018_01_01 + module Models + # + # Job Resource Collection + # + class JobResourceList + + include MsRestAzure + + include MsRest::JSONable + # @return [Array] List of job resources. + attr_accessor :value + + # @return [String] Link for the next set of job resources. + attr_accessor :next_link + + # return [Proc] with next page method call. + attr_accessor :next_method + + # + # Gets the rest of the items for the request, enabling auto-pagination. + # + # @return [Array] operation results. + # + def get_all_items + items = @value + page = self + while page.next_link != nil do + page = page.get_next_page + items.concat(page.value) + end + items + end + + # + # Gets the next page of results. + # + # @return [JobResourceList] 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 JobResourceList class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'JobResourceList', + type: { + name: 'Composite', + class_name: 'JobResourceList', + model_properties: { + value: { + required: false, + serialized_name: 'value', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'JobResourceElementType', + type: { + name: 'Composite', + class_name: 'JobResource' + } + } + } + }, + next_link: { + required: false, + serialized_name: 'nextLink', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_databox/lib/2018-01-01/generated/azure_mgmt_databox/models/job_resource_update_parameter.rb b/management/azure_mgmt_databox/lib/2018-01-01/generated/azure_mgmt_databox/models/job_resource_update_parameter.rb new file mode 100644 index 0000000000..0d54f08ea9 --- /dev/null +++ b/management/azure_mgmt_databox/lib/2018-01-01/generated/azure_mgmt_databox/models/job_resource_update_parameter.rb @@ -0,0 +1,82 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::Compute::Mgmt::V2018_01_01 + module Models + # + # The JobResourceUpdateParameter. + # + class JobResourceUpdateParameter + + include MsRestAzure + + # @return [UpdateJobDetails] Details of a job to be updated. + attr_accessor :details + + # @return [Array] Destination account details. + attr_accessor :destination_account_details + + # @return [Hash{String => String}] The list of key value pairs that + # describe the resource. These tags can be used in viewing and grouping + # this resource (across resource groups). + attr_accessor :tags + + + # + # Mapper for JobResourceUpdateParameter class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'JobResourceUpdateParameter', + type: { + name: 'Composite', + class_name: 'JobResourceUpdateParameter', + model_properties: { + details: { + required: false, + serialized_name: 'properties.details', + type: { + name: 'Composite', + class_name: 'UpdateJobDetails' + } + }, + destination_account_details: { + required: false, + serialized_name: 'properties.destinationAccountDetails', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'DestinationAccountDetailsElementType', + type: { + name: 'Composite', + class_name: 'DestinationAccountDetails' + } + } + } + }, + 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_databox/lib/2018-01-01/generated/azure_mgmt_databox/models/job_secrets.rb b/management/azure_mgmt_databox/lib/2018-01-01/generated/azure_mgmt_databox/models/job_secrets.rb new file mode 100644 index 0000000000..89a8dc38f9 --- /dev/null +++ b/management/azure_mgmt_databox/lib/2018-01-01/generated/azure_mgmt_databox/models/job_secrets.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::Compute::Mgmt::V2018_01_01 + module Models + # + # The base class for the secrets + # + class JobSecrets + + include MsRestAzure + + @@discriminatorMap = Hash.new + @@discriminatorMap["DataBoxDisk"] = "DataBoxDiskJobSecrets" + @@discriminatorMap["DataBoxHeavy"] = "DataBoxHeavyJobSecrets" + @@discriminatorMap["DataBox"] = "DataboxJobSecrets" + + def initialize + @jobSecretsType = "JobSecrets" + end + + attr_accessor :jobSecretsType + + + # + # Mapper for JobSecrets class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'JobSecrets', + type: { + name: 'Composite', + polymorphic_discriminator: 'jobSecretsType', + uber_parent: 'JobSecrets', + class_name: 'JobSecrets', + model_properties: { + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_databox/lib/2018-01-01/generated/azure_mgmt_databox/models/job_stages.rb b/management/azure_mgmt_databox/lib/2018-01-01/generated/azure_mgmt_databox/models/job_stages.rb new file mode 100644 index 0000000000..131ac11bd0 --- /dev/null +++ b/management/azure_mgmt_databox/lib/2018-01-01/generated/azure_mgmt_databox/models/job_stages.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::Compute::Mgmt::V2018_01_01 + module Models + # + # Job stages. + # + class JobStages + + include MsRestAzure + + # @return [StageName] Name of the job stage. Possible values include: + # 'DeviceOrdered', 'DevicePrepared', 'Dispatched', 'Delivered', + # 'PickedUp', 'AtAzureDC', 'DataCopy', 'Completed', + # 'CompletedWithErrors', 'Cancelled', 'Failed_IssueReportedAtCustomer', + # 'Failed_IssueDetectedAtAzureDC', 'Aborted' + attr_accessor :stage_name + + # @return [String] Display name of the job stage. + attr_accessor :display_name + + # @return [StageStatus] Status of the job stage. Possible values include: + # 'None', 'InProgress', 'Succeeded', 'Failed', 'Cancelled', 'Cancelling', + # 'SucceededWithErrors' + attr_accessor :stage_status + + # @return [DateTime] Time for the job stage in UTC ISO 8601 format. + attr_accessor :stage_time + + # @return Job Stage Details + attr_accessor :job_stage_details + + # @return [Array] Error details for the stage. + attr_accessor :error_details + + + # + # Mapper for JobStages class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'JobStages', + type: { + name: 'Composite', + class_name: 'JobStages', + model_properties: { + stage_name: { + required: false, + read_only: true, + serialized_name: 'stageName', + type: { + name: 'Enum', + module: 'StageName' + } + }, + display_name: { + required: false, + read_only: true, + serialized_name: 'displayName', + type: { + name: 'String' + } + }, + stage_status: { + required: false, + read_only: true, + serialized_name: 'stageStatus', + type: { + name: 'Enum', + module: 'StageStatus' + } + }, + stage_time: { + required: false, + read_only: true, + serialized_name: 'stageTime', + type: { + name: 'DateTime' + } + }, + job_stage_details: { + required: false, + read_only: true, + serialized_name: 'jobStageDetails', + type: { + name: 'Object' + } + }, + error_details: { + required: false, + read_only: true, + serialized_name: 'errorDetails', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'JobErrorDetailsElementType', + type: { + name: 'Composite', + class_name: 'JobErrorDetails' + } + } + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_databox/lib/2018-01-01/generated/azure_mgmt_databox/models/notification_preference.rb b/management/azure_mgmt_databox/lib/2018-01-01/generated/azure_mgmt_databox/models/notification_preference.rb new file mode 100644 index 0000000000..79b764a928 --- /dev/null +++ b/management/azure_mgmt_databox/lib/2018-01-01/generated/azure_mgmt_databox/models/notification_preference.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::Compute::Mgmt::V2018_01_01 + module Models + # + # Notification preference for a job stage. + # + class NotificationPreference + + include MsRestAzure + + # @return [NotificationStageName] Name of the stage. Possible values + # include: 'DevicePrepared', 'Dispatched', 'Delivered', 'PickedUp', + # 'AtAzureDC', 'DataCopy' + attr_accessor :stage_name + + # @return [Boolean] Notification is required or not. + attr_accessor :send_notification + + + # + # Mapper for NotificationPreference class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'NotificationPreference', + type: { + name: 'Composite', + class_name: 'NotificationPreference', + model_properties: { + stage_name: { + required: true, + serialized_name: 'stageName', + type: { + name: 'Enum', + module: 'NotificationStageName' + } + }, + send_notification: { + required: true, + serialized_name: 'sendNotification', + type: { + name: 'Boolean' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_databox/lib/2018-01-01/generated/azure_mgmt_databox/models/notification_stage_name.rb b/management/azure_mgmt_databox/lib/2018-01-01/generated/azure_mgmt_databox/models/notification_stage_name.rb new file mode 100644 index 0000000000..3cca89a164 --- /dev/null +++ b/management/azure_mgmt_databox/lib/2018-01-01/generated/azure_mgmt_databox/models/notification_stage_name.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::Compute::Mgmt::V2018_01_01 + module Models + # + # Defines values for NotificationStageName + # + module NotificationStageName + DevicePrepared = "DevicePrepared" + Dispatched = "Dispatched" + Delivered = "Delivered" + PickedUp = "PickedUp" + AtAzureDC = "AtAzureDC" + DataCopy = "DataCopy" + end + end +end diff --git a/management/azure_mgmt_databox/lib/2018-01-01/generated/azure_mgmt_databox/models/operation.rb b/management/azure_mgmt_databox/lib/2018-01-01/generated/azure_mgmt_databox/models/operation.rb new file mode 100644 index 0000000000..7b18a2560b --- /dev/null +++ b/management/azure_mgmt_databox/lib/2018-01-01/generated/azure_mgmt_databox/models/operation.rb @@ -0,0 +1,81 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::Compute::Mgmt::V2018_01_01 + module Models + # + # Operation entity. + # + class Operation + + include MsRestAzure + + # @return [String] Name of the operation. Format: + # {resourceProviderNamespace}/{resourceType}/{read|write|delete|action} + attr_accessor :name + + # @return [OperationDisplay] Operation display values. + attr_accessor :display + + # @return Operation properties. + attr_accessor :properties + + # @return [String] Origin of the operation. Can be : + # user|system|user,system + attr_accessor :origin + + + # + # Mapper for Operation class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'Operation', + type: { + name: 'Composite', + class_name: 'Operation', + model_properties: { + name: { + required: false, + read_only: true, + serialized_name: 'name', + type: { + name: 'String' + } + }, + display: { + required: false, + read_only: true, + serialized_name: 'display', + type: { + name: 'Composite', + class_name: 'OperationDisplay' + } + }, + properties: { + required: false, + read_only: true, + serialized_name: 'properties', + type: { + name: 'Object' + } + }, + origin: { + required: false, + read_only: true, + serialized_name: 'origin', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_databox/lib/2018-01-01/generated/azure_mgmt_databox/models/operation_display.rb b/management/azure_mgmt_databox/lib/2018-01-01/generated/azure_mgmt_databox/models/operation_display.rb new file mode 100644 index 0000000000..affe83b7b5 --- /dev/null +++ b/management/azure_mgmt_databox/lib/2018-01-01/generated/azure_mgmt_databox/models/operation_display.rb @@ -0,0 +1,75 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::Compute::Mgmt::V2018_01_01 + module Models + # + # Operation display + # + class OperationDisplay + + include MsRestAzure + + # @return [String] Provider name. + attr_accessor :provider + + # @return [String] Resource name. + attr_accessor :resource + + # @return [String] Localized name of the operation for display purpose. + attr_accessor :operation + + # @return [String] Localized description of the operation for display + # purpose. + attr_accessor :description + + + # + # Mapper for OperationDisplay class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'OperationDisplay', + type: { + name: 'Composite', + class_name: 'OperationDisplay', + model_properties: { + provider: { + required: false, + 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_databox/lib/2018-01-01/generated/azure_mgmt_databox/models/operation_list.rb b/management/azure_mgmt_databox/lib/2018-01-01/generated/azure_mgmt_databox/models/operation_list.rb new file mode 100644 index 0000000000..3abc5ef69b --- /dev/null +++ b/management/azure_mgmt_databox/lib/2018-01-01/generated/azure_mgmt_databox/models/operation_list.rb @@ -0,0 +1,95 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::Compute::Mgmt::V2018_01_01 + module Models + # + # Operation Collection. + # + class OperationList + + include MsRestAzure + + include MsRest::JSONable + # @return [Array] List of operations. + attr_accessor :value + + # @return [String] Link for the next set of 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 [OperationList] 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 OperationList class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'OperationList', + type: { + name: 'Composite', + class_name: 'OperationList', + 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_databox/lib/2018-01-01/generated/azure_mgmt_databox/models/package_shipping_details.rb b/management/azure_mgmt_databox/lib/2018-01-01/generated/azure_mgmt_databox/models/package_shipping_details.rb new file mode 100644 index 0000000000..cef370a796 --- /dev/null +++ b/management/azure_mgmt_databox/lib/2018-01-01/generated/azure_mgmt_databox/models/package_shipping_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::Compute::Mgmt::V2018_01_01 + module Models + # + # Shipping details. + # + class PackageShippingDetails + + include MsRestAzure + + # @return [String] Name of the carrier. + attr_accessor :carrier_name + + # @return [String] Tracking Id of shipment. + attr_accessor :tracking_id + + # @return [String] Url where shipment can be tracked. + attr_accessor :tracking_url + + + # + # Mapper for PackageShippingDetails class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'PackageShippingDetails', + type: { + name: 'Composite', + class_name: 'PackageShippingDetails', + model_properties: { + carrier_name: { + required: false, + read_only: true, + serialized_name: 'carrierName', + type: { + name: 'String' + } + }, + tracking_id: { + required: false, + read_only: true, + serialized_name: 'trackingId', + type: { + name: 'String' + } + }, + tracking_url: { + required: false, + read_only: true, + serialized_name: 'trackingUrl', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_databox/lib/2018-01-01/generated/azure_mgmt_databox/models/preferences.rb b/management/azure_mgmt_databox/lib/2018-01-01/generated/azure_mgmt_databox/models/preferences.rb new file mode 100644 index 0000000000..21fffd5fa8 --- /dev/null +++ b/management/azure_mgmt_databox/lib/2018-01-01/generated/azure_mgmt_databox/models/preferences.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::Compute::Mgmt::V2018_01_01 + module Models + # + # Preferences related to the order + # + class Preferences + + include MsRestAzure + + # @return [Array] + attr_accessor :preferred_data_center_region + + + # + # Mapper for Preferences class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'Preferences', + type: { + name: 'Composite', + class_name: 'Preferences', + model_properties: { + preferred_data_center_region: { + required: false, + serialized_name: 'preferredDataCenterRegion', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_databox/lib/2018-01-01/generated/azure_mgmt_databox/models/resource.rb b/management/azure_mgmt_databox/lib/2018-01-01/generated/azure_mgmt_databox/models/resource.rb new file mode 100644 index 0000000000..de54f9f931 --- /dev/null +++ b/management/azure_mgmt_databox/lib/2018-01-01/generated/azure_mgmt_databox/models/resource.rb @@ -0,0 +1,78 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::Compute::Mgmt::V2018_01_01 + module Models + # + # Model of the Resource. + # + class Resource + + include MsRestAzure + + # @return [String] The location of the resource. This will be one of the + # supported and registered Azure Regions (e.g. West US, East US, + # Southeast Asia, etc.). The region of a resource cannot be changed once + # it is created, but if an identical region is specified on update the + # request will succeed. + attr_accessor :location + + # @return [Hash{String => String}] The list of key value pairs that + # describe the resource. These tags can be used in viewing and grouping + # this resource (across resource groups). + attr_accessor :tags + + # @return [Sku] The sku type. + attr_accessor :sku + + + # + # 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: { + 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' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_databox/lib/2018-01-01/generated/azure_mgmt_databox/models/share_credential_details.rb b/management/azure_mgmt_databox/lib/2018-01-01/generated/azure_mgmt_databox/models/share_credential_details.rb new file mode 100644 index 0000000000..5c15cc3c11 --- /dev/null +++ b/management/azure_mgmt_databox/lib/2018-01-01/generated/azure_mgmt_databox/models/share_credential_details.rb @@ -0,0 +1,100 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::Compute::Mgmt::V2018_01_01 + module Models + # + # Credential details of the shares in account. + # + class ShareCredentialDetails + + include MsRestAzure + + # @return [String] Name of the share. + attr_accessor :share_name + + # @return [ShareDestinationFormatType] Type of the share. Possible values + # include: 'UnknownType', 'HCS', 'BlockBlob', 'PageBlob', 'AzureFile' + attr_accessor :share_type + + # @return [String] User name for the share. + attr_accessor :user_name + + # @return [String] Password for the share. + attr_accessor :password + + # @return [Array] Access protocols supported on the + # device. + attr_accessor :supported_access_protocols + + + # + # Mapper for ShareCredentialDetails class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'ShareCredentialDetails', + type: { + name: 'Composite', + class_name: 'ShareCredentialDetails', + model_properties: { + share_name: { + required: false, + read_only: true, + serialized_name: 'shareName', + type: { + name: 'String' + } + }, + share_type: { + required: false, + read_only: true, + serialized_name: 'shareType', + type: { + name: 'Enum', + module: 'ShareDestinationFormatType' + } + }, + user_name: { + required: false, + read_only: true, + serialized_name: 'userName', + type: { + name: 'String' + } + }, + password: { + required: false, + read_only: true, + serialized_name: 'password', + type: { + name: 'String' + } + }, + supported_access_protocols: { + required: false, + read_only: true, + serialized_name: 'supportedAccessProtocols', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'AccessProtocolElementType', + type: { + name: 'Enum', + module: 'AccessProtocol' + } + } + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_databox/lib/2018-01-01/generated/azure_mgmt_databox/models/share_destination_format_type.rb b/management/azure_mgmt_databox/lib/2018-01-01/generated/azure_mgmt_databox/models/share_destination_format_type.rb new file mode 100644 index 0000000000..cfa6a46631 --- /dev/null +++ b/management/azure_mgmt_databox/lib/2018-01-01/generated/azure_mgmt_databox/models/share_destination_format_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::Compute::Mgmt::V2018_01_01 + module Models + # + # Defines values for ShareDestinationFormatType + # + module ShareDestinationFormatType + UnknownType = "UnknownType" + HCS = "HCS" + BlockBlob = "BlockBlob" + PageBlob = "PageBlob" + AzureFile = "AzureFile" + end + end +end diff --git a/management/azure_mgmt_databox/lib/2018-01-01/generated/azure_mgmt_databox/models/shipment_pick_up_request.rb b/management/azure_mgmt_databox/lib/2018-01-01/generated/azure_mgmt_databox/models/shipment_pick_up_request.rb new file mode 100644 index 0000000000..fdffad350b --- /dev/null +++ b/management/azure_mgmt_databox/lib/2018-01-01/generated/azure_mgmt_databox/models/shipment_pick_up_request.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::Compute::Mgmt::V2018_01_01 + module Models + # + # Shipment pick up request details. + # + class ShipmentPickUpRequest + + include MsRestAzure + + # @return [DateTime] Minimum date after which the pick up should + # commence, this must be in local time of pick up area. + attr_accessor :start_time + + # @return [DateTime] Maximum date before which the pick up should + # commence, this must be in local time of pick up area. + attr_accessor :end_time + + # @return [String] Shipment Location in the pickup place. Eg.front desk + attr_accessor :shipment_location + + + # + # Mapper for ShipmentPickUpRequest class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'ShipmentPickUpRequest', + type: { + name: 'Composite', + class_name: 'ShipmentPickUpRequest', + model_properties: { + start_time: { + required: true, + serialized_name: 'startTime', + type: { + name: 'DateTime' + } + }, + end_time: { + required: true, + serialized_name: 'endTime', + type: { + name: 'DateTime' + } + }, + shipment_location: { + required: true, + serialized_name: 'shipmentLocation', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_databox/lib/2018-01-01/generated/azure_mgmt_databox/models/shipment_pick_up_response.rb b/management/azure_mgmt_databox/lib/2018-01-01/generated/azure_mgmt_databox/models/shipment_pick_up_response.rb new file mode 100644 index 0000000000..db38f9fa59 --- /dev/null +++ b/management/azure_mgmt_databox/lib/2018-01-01/generated/azure_mgmt_databox/models/shipment_pick_up_response.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::Compute::Mgmt::V2018_01_01 + module Models + # + # Shipment pick up response. + # + class ShipmentPickUpResponse + + include MsRestAzure + + # @return [String] Confirmation number for the pick up request. + attr_accessor :confirmation_number + + # @return [DateTime] Time by which shipment should be ready for pick up, + # this is in local time of pick up area. + attr_accessor :ready_by_time + + + # + # Mapper for ShipmentPickUpResponse class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'ShipmentPickUpResponse', + type: { + name: 'Composite', + class_name: 'ShipmentPickUpResponse', + model_properties: { + confirmation_number: { + required: false, + read_only: true, + serialized_name: 'confirmationNumber', + type: { + name: 'String' + } + }, + ready_by_time: { + required: false, + read_only: true, + serialized_name: 'readyByTime', + type: { + name: 'DateTime' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_databox/lib/2018-01-01/generated/azure_mgmt_databox/models/shipping_address.rb b/management/azure_mgmt_databox/lib/2018-01-01/generated/azure_mgmt_databox/models/shipping_address.rb new file mode 100644 index 0000000000..f40f50980d --- /dev/null +++ b/management/azure_mgmt_databox/lib/2018-01-01/generated/azure_mgmt_databox/models/shipping_address.rb @@ -0,0 +1,136 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::Compute::Mgmt::V2018_01_01 + module Models + # + # Shipping address where customer wishes to receive the device. + # + class ShippingAddress + + include MsRestAzure + + # @return [String] Street Address line 1. + attr_accessor :street_address1 + + # @return [String] Street Address line 2. + attr_accessor :street_address2 + + # @return [String] Street Address line 3. + attr_accessor :street_address3 + + # @return [String] Name of the City. + attr_accessor :city + + # @return [String] Name of the State or Province. + attr_accessor :state_or_province + + # @return [String] Name of the Country. + attr_accessor :country + + # @return [String] Postal code. + attr_accessor :postal_code + + # @return [String] Extended Zip Code. + attr_accessor :zip_extended_code + + # @return [String] Name of the company. + attr_accessor :company_name + + # @return [AddressType] Type of address. Possible values include: 'None', + # 'Residential', 'Commercial' + attr_accessor :address_type + + + # + # Mapper for ShippingAddress class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'ShippingAddress', + type: { + name: 'Composite', + class_name: 'ShippingAddress', + model_properties: { + street_address1: { + required: true, + serialized_name: 'streetAddress1', + type: { + name: 'String' + } + }, + street_address2: { + required: false, + serialized_name: 'streetAddress2', + type: { + name: 'String' + } + }, + street_address3: { + required: false, + serialized_name: 'streetAddress3', + type: { + name: 'String' + } + }, + city: { + required: false, + serialized_name: 'city', + type: { + name: 'String' + } + }, + state_or_province: { + required: false, + serialized_name: 'stateOrProvince', + type: { + name: 'String' + } + }, + country: { + required: true, + serialized_name: 'country', + type: { + name: 'String' + } + }, + postal_code: { + required: true, + serialized_name: 'postalCode', + type: { + name: 'String' + } + }, + zip_extended_code: { + required: false, + serialized_name: 'zipExtendedCode', + type: { + name: 'String' + } + }, + company_name: { + required: false, + serialized_name: 'companyName', + type: { + name: 'String' + } + }, + address_type: { + required: false, + serialized_name: 'addressType', + type: { + name: 'Enum', + module: 'AddressType' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_databox/lib/2018-01-01/generated/azure_mgmt_databox/models/sku.rb b/management/azure_mgmt_databox/lib/2018-01-01/generated/azure_mgmt_databox/models/sku.rb new file mode 100644 index 0000000000..5b9013ecea --- /dev/null +++ b/management/azure_mgmt_databox/lib/2018-01-01/generated/azure_mgmt_databox/models/sku.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::Compute::Mgmt::V2018_01_01 + module Models + # + # The Sku. + # + class Sku + + include MsRestAzure + + # @return [SkuName] The sku name. Possible values include: 'DataBox', + # 'DataBoxDisk', 'DataBoxHeavy' + attr_accessor :name + + # @return [String] The display name of the sku. + attr_accessor :display_name + + # @return [String] The sku family. + attr_accessor :family + + + # + # 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: 'Enum', + module: 'SkuName' + } + }, + display_name: { + required: false, + serialized_name: 'displayName', + type: { + name: 'String' + } + }, + family: { + required: false, + serialized_name: 'family', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_databox/lib/2018-01-01/generated/azure_mgmt_databox/models/sku_capacity.rb b/management/azure_mgmt_databox/lib/2018-01-01/generated/azure_mgmt_databox/models/sku_capacity.rb new file mode 100644 index 0000000000..41e3787896 --- /dev/null +++ b/management/azure_mgmt_databox/lib/2018-01-01/generated/azure_mgmt_databox/models/sku_capacity.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::Compute::Mgmt::V2018_01_01 + module Models + # + # Capacity of the sku. + # + class SkuCapacity + + include MsRestAzure + + # @return [String] Usable capacity in TB. + attr_accessor :usable + + # @return [String] Maximum capacity in TB. + attr_accessor :maximum + + + # + # Mapper for SkuCapacity class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'SkuCapacity', + type: { + name: 'Composite', + class_name: 'SkuCapacity', + model_properties: { + usable: { + required: false, + read_only: true, + serialized_name: 'usable', + type: { + name: 'String' + } + }, + maximum: { + required: false, + read_only: true, + serialized_name: 'maximum', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_databox/lib/2018-01-01/generated/azure_mgmt_databox/models/sku_cost.rb b/management/azure_mgmt_databox/lib/2018-01-01/generated/azure_mgmt_databox/models/sku_cost.rb new file mode 100644 index 0000000000..96e4c2c105 --- /dev/null +++ b/management/azure_mgmt_databox/lib/2018-01-01/generated/azure_mgmt_databox/models/sku_cost.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::Compute::Mgmt::V2018_01_01 + module Models + # + # Describes metadata for retrieving price info. + # + class SkuCost + + include MsRestAzure + + # @return [String] Meter id of the Sku. + attr_accessor :meter_id + + # @return [String] The type of the meter. + attr_accessor :meter_type + + + # + # Mapper for SkuCost class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'SkuCost', + type: { + name: 'Composite', + class_name: 'SkuCost', + model_properties: { + meter_id: { + required: false, + read_only: true, + serialized_name: 'meterId', + type: { + name: 'String' + } + }, + meter_type: { + required: false, + read_only: true, + serialized_name: 'meterType', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_databox/lib/2018-01-01/generated/azure_mgmt_databox/models/sku_disabled_reason.rb b/management/azure_mgmt_databox/lib/2018-01-01/generated/azure_mgmt_databox/models/sku_disabled_reason.rb new file mode 100644 index 0000000000..7555745dda --- /dev/null +++ b/management/azure_mgmt_databox/lib/2018-01-01/generated/azure_mgmt_databox/models/sku_disabled_reason.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::Compute::Mgmt::V2018_01_01 + module Models + # + # Defines values for SkuDisabledReason + # + module SkuDisabledReason + None = "None" + Country = "Country" + Region = "Region" + Feature = "Feature" + OfferType = "OfferType" + end + end +end diff --git a/management/azure_mgmt_databox/lib/2018-01-01/generated/azure_mgmt_databox/models/sku_information.rb b/management/azure_mgmt_databox/lib/2018-01-01/generated/azure_mgmt_databox/models/sku_information.rb new file mode 100644 index 0000000000..10b870b9f8 --- /dev/null +++ b/management/azure_mgmt_databox/lib/2018-01-01/generated/azure_mgmt_databox/models/sku_information.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::Compute::Mgmt::V2018_01_01 + module Models + # + # Information of the sku. + # + class SkuInformation + + include MsRestAzure + + # @return [Sku] The Sku. + attr_accessor :sku + + # @return [Boolean] The sku is enabled or not. + attr_accessor :enabled + + # @return [Array] The map of destination + # location to service location. + attr_accessor :destination_to_service_location_map + + # @return [SkuCapacity] Capacity of the Sku. + attr_accessor :capacity + + # @return [Array] Cost of the Sku. + attr_accessor :costs + + # @return [Array] Api versions that support this Sku. + attr_accessor :api_versions + + # @return [SkuDisabledReason] Reason why the Sku is disabled. Possible + # values include: 'None', 'Country', 'Region', 'Feature', 'OfferType' + attr_accessor :disabled_reason + + # @return [String] Message for why the Sku is disabled. + attr_accessor :disabled_reason_message + + # @return [String] Required feature to access the sku. + attr_accessor :required_feature + + + # + # Mapper for SkuInformation class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'SkuInformation', + type: { + name: 'Composite', + class_name: 'SkuInformation', + model_properties: { + sku: { + required: false, + read_only: true, + serialized_name: 'sku', + type: { + name: 'Composite', + class_name: 'Sku' + } + }, + enabled: { + required: false, + read_only: true, + serialized_name: 'enabled', + type: { + name: 'Boolean' + } + }, + destination_to_service_location_map: { + required: false, + read_only: true, + serialized_name: 'properties.destinationToServiceLocationMap', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'DestinationToServiceLocationMapElementType', + type: { + name: 'Composite', + class_name: 'DestinationToServiceLocationMap' + } + } + } + }, + capacity: { + required: false, + read_only: true, + serialized_name: 'properties.capacity', + type: { + name: 'Composite', + class_name: 'SkuCapacity' + } + }, + costs: { + required: false, + read_only: true, + serialized_name: 'properties.costs', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'SkuCostElementType', + type: { + name: 'Composite', + class_name: 'SkuCost' + } + } + } + }, + api_versions: { + required: false, + read_only: true, + serialized_name: 'properties.apiVersions', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } + }, + disabled_reason: { + required: false, + read_only: true, + serialized_name: 'properties.disabledReason', + type: { + name: 'Enum', + module: 'SkuDisabledReason' + } + }, + disabled_reason_message: { + required: false, + read_only: true, + serialized_name: 'properties.disabledReasonMessage', + type: { + name: 'String' + } + }, + required_feature: { + required: false, + read_only: true, + serialized_name: 'properties.requiredFeature', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_databox/lib/2018-01-01/generated/azure_mgmt_databox/models/sku_name.rb b/management/azure_mgmt_databox/lib/2018-01-01/generated/azure_mgmt_databox/models/sku_name.rb new file mode 100644 index 0000000000..379f9c65fa --- /dev/null +++ b/management/azure_mgmt_databox/lib/2018-01-01/generated/azure_mgmt_databox/models/sku_name.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::Compute::Mgmt::V2018_01_01 + module Models + # + # Defines values for SkuName + # + module SkuName + DataBox = "DataBox" + DataBoxDisk = "DataBoxDisk" + DataBoxHeavy = "DataBoxHeavy" + end + end +end diff --git a/management/azure_mgmt_databox/lib/2018-01-01/generated/azure_mgmt_databox/models/stage_name.rb b/management/azure_mgmt_databox/lib/2018-01-01/generated/azure_mgmt_databox/models/stage_name.rb new file mode 100644 index 0000000000..ed4d99714c --- /dev/null +++ b/management/azure_mgmt_databox/lib/2018-01-01/generated/azure_mgmt_databox/models/stage_name.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::Compute::Mgmt::V2018_01_01 + module Models + # + # Defines values for StageName + # + module StageName + DeviceOrdered = "DeviceOrdered" + DevicePrepared = "DevicePrepared" + Dispatched = "Dispatched" + Delivered = "Delivered" + PickedUp = "PickedUp" + AtAzureDC = "AtAzureDC" + DataCopy = "DataCopy" + Completed = "Completed" + CompletedWithErrors = "CompletedWithErrors" + Cancelled = "Cancelled" + FailedIssueReportedAtCustomer = "Failed_IssueReportedAtCustomer" + FailedIssueDetectedAtAzureDC = "Failed_IssueDetectedAtAzureDC" + Aborted = "Aborted" + end + end +end diff --git a/management/azure_mgmt_databox/lib/2018-01-01/generated/azure_mgmt_databox/models/stage_status.rb b/management/azure_mgmt_databox/lib/2018-01-01/generated/azure_mgmt_databox/models/stage_status.rb new file mode 100644 index 0000000000..6cbe5b24d7 --- /dev/null +++ b/management/azure_mgmt_databox/lib/2018-01-01/generated/azure_mgmt_databox/models/stage_status.rb @@ -0,0 +1,21 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::Compute::Mgmt::V2018_01_01 + module Models + # + # Defines values for StageStatus + # + module StageStatus + None = "None" + InProgress = "InProgress" + Succeeded = "Succeeded" + Failed = "Failed" + Cancelled = "Cancelled" + Cancelling = "Cancelling" + SucceededWithErrors = "SucceededWithErrors" + end + end +end diff --git a/management/azure_mgmt_databox/lib/2018-01-01/generated/azure_mgmt_databox/models/unencrypted_credentials.rb b/management/azure_mgmt_databox/lib/2018-01-01/generated/azure_mgmt_databox/models/unencrypted_credentials.rb new file mode 100644 index 0000000000..a09f27f7b8 --- /dev/null +++ b/management/azure_mgmt_databox/lib/2018-01-01/generated/azure_mgmt_databox/models/unencrypted_credentials.rb @@ -0,0 +1,59 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::Compute::Mgmt::V2018_01_01 + module Models + # + # Unencrypted credentials for accessing device. + # + class UnencryptedCredentials + + include MsRestAzure + + # @return [String] Name of the job. + attr_accessor :job_name + + # @return [JobSecrets] Secrets related to this job. + attr_accessor :job_secrets + + + # + # Mapper for UnencryptedCredentials class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'UnencryptedCredentials', + type: { + name: 'Composite', + class_name: 'UnencryptedCredentials', + model_properties: { + job_name: { + required: false, + read_only: true, + serialized_name: 'jobName', + type: { + name: 'String' + } + }, + job_secrets: { + required: false, + read_only: true, + serialized_name: 'jobSecrets', + type: { + name: 'Composite', + polymorphic_discriminator: 'jobSecretsType', + uber_parent: 'JobSecrets', + class_name: 'JobSecrets' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_databox/lib/2018-01-01/generated/azure_mgmt_databox/models/unencrypted_credentials_list.rb b/management/azure_mgmt_databox/lib/2018-01-01/generated/azure_mgmt_databox/models/unencrypted_credentials_list.rb new file mode 100644 index 0000000000..9df8041434 --- /dev/null +++ b/management/azure_mgmt_databox/lib/2018-01-01/generated/azure_mgmt_databox/models/unencrypted_credentials_list.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::Compute::Mgmt::V2018_01_01 + module Models + # + # List of unencrypted credentials for accessing device. + # + class UnencryptedCredentialsList + + include MsRestAzure + + # @return [Array] List of unencrypted + # credentials. + attr_accessor :value + + # @return [String] Link for the next set of unencrypted credentials. + attr_accessor :next_link + + + # + # Mapper for UnencryptedCredentialsList class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'UnencryptedCredentialsList', + type: { + name: 'Composite', + class_name: 'UnencryptedCredentialsList', + model_properties: { + value: { + required: false, + serialized_name: 'value', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'UnencryptedCredentialsElementType', + type: { + name: 'Composite', + class_name: 'UnencryptedCredentials' + } + } + } + }, + next_link: { + required: false, + serialized_name: 'nextLink', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_databox/lib/2018-01-01/generated/azure_mgmt_databox/models/update_job_details.rb b/management/azure_mgmt_databox/lib/2018-01-01/generated/azure_mgmt_databox/models/update_job_details.rb new file mode 100644 index 0000000000..e707575727 --- /dev/null +++ b/management/azure_mgmt_databox/lib/2018-01-01/generated/azure_mgmt_databox/models/update_job_details.rb @@ -0,0 +1,56 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::Compute::Mgmt::V2018_01_01 + module Models + # + # Job details for update. + # + class UpdateJobDetails + + include MsRestAzure + + # @return [ContactDetails] Contact details for notification and shipping. + attr_accessor :contact_details + + # @return [ShippingAddress] Shipping address of the customer. + attr_accessor :shipping_address + + + # + # Mapper for UpdateJobDetails class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'UpdateJobDetails', + type: { + name: 'Composite', + class_name: 'UpdateJobDetails', + model_properties: { + contact_details: { + required: false, + serialized_name: 'contactDetails', + type: { + name: 'Composite', + class_name: 'ContactDetails' + } + }, + shipping_address: { + required: false, + serialized_name: 'shippingAddress', + type: { + name: 'Composite', + class_name: 'ShippingAddress' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_databox/lib/2018-01-01/generated/azure_mgmt_databox/models/validate_address.rb b/management/azure_mgmt_databox/lib/2018-01-01/generated/azure_mgmt_databox/models/validate_address.rb new file mode 100644 index 0000000000..13375bc5b6 --- /dev/null +++ b/management/azure_mgmt_databox/lib/2018-01-01/generated/azure_mgmt_databox/models/validate_address.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::Compute::Mgmt::V2018_01_01 + module Models + # + # The requirements to validate customer address where the device needs to + # be shipped. + # + class ValidateAddress + + include MsRestAzure + + # @return [ShippingAddress] Shipping address of the customer. + attr_accessor :shipping_address + + # @return [SkuName] Device type to be used for the job. Possible values + # include: 'DataBox', 'DataBoxDisk', 'DataBoxHeavy' + attr_accessor :device_type + + + # + # Mapper for ValidateAddress class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'ValidateAddress', + type: { + name: 'Composite', + class_name: 'ValidateAddress', + model_properties: { + shipping_address: { + required: true, + serialized_name: 'shippingAddress', + type: { + name: 'Composite', + class_name: 'ShippingAddress' + } + }, + device_type: { + required: true, + serialized_name: 'deviceType', + type: { + name: 'Enum', + module: 'SkuName' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_databox/lib/2018-01-01/generated/azure_mgmt_databox/module_definition.rb b/management/azure_mgmt_databox/lib/2018-01-01/generated/azure_mgmt_databox/module_definition.rb new file mode 100644 index 0000000000..c8365561e7 --- /dev/null +++ b/management/azure_mgmt_databox/lib/2018-01-01/generated/azure_mgmt_databox/module_definition.rb @@ -0,0 +1,9 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure end +module Azure::Compute end +module Azure::Compute::Mgmt end +module Azure::Compute::Mgmt::V2018_01_01 end diff --git a/management/azure_mgmt_databox/lib/2018-01-01/generated/azure_mgmt_databox/operations.rb b/management/azure_mgmt_databox/lib/2018-01-01/generated/azure_mgmt_databox/operations.rb new file mode 100644 index 0000000000..d52ec019e7 --- /dev/null +++ b/management/azure_mgmt_databox/lib/2018-01-01/generated/azure_mgmt_databox/operations.rb @@ -0,0 +1,212 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::Compute::Mgmt::V2018_01_01 + # + # 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 [DataBoxManagementClient] reference to the DataBoxManagementClient + attr_reader :client + + # + # This method gets all the 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 + + # + # This method gets all the 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 + + # + # This method gets all the 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.DataBox/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::Compute::Mgmt::V2018_01_01::Models::OperationList.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # This method gets all the operations. + # + # @param next_page_link [String] The NextLink from the previous successful call + # to List operation. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [OperationList] 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 + + # + # This method gets all the operations. + # + # @param next_page_link [String] The NextLink from the previous successful call + # to List operation. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def list_next_with_http_info(next_page_link, custom_headers = nil) + list_next_async(next_page_link, custom_headers).value! + end + + # + # This method gets all the operations. + # + # @param next_page_link [String] The NextLink from the previous successful call + # to List operation. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def list_next_async(next_page_link, custom_headers = nil) + fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = '{nextLink}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'nextLink' => next_page_link}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::Compute::Mgmt::V2018_01_01::Models::OperationList.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # This method gets all the operations. + # + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [OperationList] 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_databox/lib/2018-01-01/generated/azure_mgmt_databox/service.rb b/management/azure_mgmt_databox/lib/2018-01-01/generated/azure_mgmt_databox/service.rb new file mode 100644 index 0000000000..f08ac16867 --- /dev/null +++ b/management/azure_mgmt_databox/lib/2018-01-01/generated/azure_mgmt_databox/service.rb @@ -0,0 +1,348 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::Compute::Mgmt::V2018_01_01 + # + # Service + # + class Service + include MsRestAzure + + # + # Creates and initializes a new instance of the Service class. + # @param client service class for accessing basic functionality. + # + def initialize(client) + @client = client + end + + # @return [DataBoxManagementClient] reference to the DataBoxManagementClient + attr_reader :client + + # + # This method provides the list of available skus for the given subscription + # and location. + # + # @param location [String] The location of the resource + # @param available_sku_request [AvailableSkuRequest] Filters for showing the + # available skus. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Array] operation results. + # + def list_available_skus(location, available_sku_request, custom_headers = nil) + first_page = list_available_skus_as_lazy(location, available_sku_request, custom_headers) + first_page.get_all_items + end + + # + # This method provides the list of available skus for the given subscription + # and location. + # + # @param location [String] The location of the resource + # @param available_sku_request [AvailableSkuRequest] Filters for showing the + # available skus. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def list_available_skus_with_http_info(location, available_sku_request, custom_headers = nil) + list_available_skus_async(location, available_sku_request, custom_headers).value! + end + + # + # This method provides the list of available skus for the given subscription + # and location. + # + # @param location [String] The location of the resource + # @param available_sku_request [AvailableSkuRequest] Filters for showing the + # available skus. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def list_available_skus_async(location, available_sku_request, custom_headers = nil) + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, 'location is nil' if location.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, 'available_sku_request is nil' if available_sku_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::Compute::Mgmt::V2018_01_01::Models::AvailableSkuRequest.mapper() + request_content = @client.serialize(request_mapper, available_sku_request) + request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil + + path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.DataBox/locations/{location}/availableSkus' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'subscriptionId' => @client.subscription_id,'location' => location}, + query_params: {'api-version' => @client.api_version}, + 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::Compute::Mgmt::V2018_01_01::Models::AvailableSkusResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # This method validates the customer shipping address and provide alternate + # addresses if any. + # + # @param location [String] The location of the resource + # @param validate_address [ValidateAddress] Shipping address of the customer. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [AddressValidationOutput] operation results. + # + def validate_address_method(location, validate_address, custom_headers = nil) + response = validate_address_method_async(location, validate_address, custom_headers).value! + response.body unless response.nil? + end + + # + # This method validates the customer shipping address and provide alternate + # addresses if any. + # + # @param location [String] The location of the resource + # @param validate_address [ValidateAddress] Shipping address of the customer. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def validate_address_method_with_http_info(location, validate_address, custom_headers = nil) + validate_address_method_async(location, validate_address, custom_headers).value! + end + + # + # This method validates the customer shipping address and provide alternate + # addresses if any. + # + # @param location [String] The location of the resource + # @param validate_address [ValidateAddress] Shipping address of the customer. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def validate_address_method_async(location, validate_address, custom_headers = nil) + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, 'location is nil' if location.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, 'validate_address is nil' if validate_address.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Serialize Request + request_mapper = Azure::Compute::Mgmt::V2018_01_01::Models::ValidateAddress.mapper() + request_content = @client.serialize(request_mapper, validate_address) + request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil + + path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.DataBox/locations/{location}/validateAddress' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'subscriptionId' => @client.subscription_id,'location' => location}, + query_params: {'api-version' => @client.api_version}, + 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::Compute::Mgmt::V2018_01_01::Models::AddressValidationOutput.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # This method provides the list of available skus for the given subscription + # and location. + # + # @param next_page_link [String] The NextLink from the previous successful call + # to List operation. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [AvailableSkusResult] operation results. + # + def list_available_skus_next(next_page_link, custom_headers = nil) + response = list_available_skus_next_async(next_page_link, custom_headers).value! + response.body unless response.nil? + end + + # + # This method provides the list of available skus for the given subscription + # and location. + # + # @param next_page_link [String] The NextLink from the previous successful call + # to List operation. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def list_available_skus_next_with_http_info(next_page_link, custom_headers = nil) + list_available_skus_next_async(next_page_link, custom_headers).value! + end + + # + # This method provides the list of available skus for the given subscription + # and location. + # + # @param next_page_link [String] The NextLink from the previous successful call + # to List operation. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def list_available_skus_next_async(next_page_link, custom_headers = nil) + fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = '{nextLink}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_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::Compute::Mgmt::V2018_01_01::Models::AvailableSkusResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # This method provides the list of available skus for the given subscription + # and location. + # + # @param location [String] The location of the resource + # @param available_sku_request [AvailableSkuRequest] Filters for showing the + # available skus. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [AvailableSkusResult] which provide lazy access to pages of the + # response. + # + def list_available_skus_as_lazy(location, available_sku_request, custom_headers = nil) + response = list_available_skus_async(location, available_sku_request, custom_headers).value! + unless response.nil? + page = response.body + page.next_method = Proc.new do |next_page_link| + list_available_skus_next_async(next_page_link, custom_headers) + end + page + end + end + + end +end diff --git a/management/azure_mgmt_databox/lib/2018-01-01/generated/azure_mgmt_databox/version.rb b/management/azure_mgmt_databox/lib/2018-01-01/generated/azure_mgmt_databox/version.rb new file mode 100644 index 0000000000..99933fdb38 --- /dev/null +++ b/management/azure_mgmt_databox/lib/2018-01-01/generated/azure_mgmt_databox/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::Compute::Mgmt::V2018_01_01 + VERSION = '0.0.1' +end From c0c68100294ab8caedd9134fce3b854c3b812ac0 Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Tue, 18 Sep 2018 08:47:15 +0000 Subject: [PATCH 2/2] Generated from 7f973829ece4bbb07ce56743d36064b46435e531 Addition of optional list of sku names for filter while getting skuinfo --- .../models/available_sku_request.rb | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/management/azure_mgmt_databox/lib/2018-01-01/generated/azure_mgmt_databox/models/available_sku_request.rb b/management/azure_mgmt_databox/lib/2018-01-01/generated/azure_mgmt_databox/models/available_sku_request.rb index 18bce0f60b..3426bc9e2c 100644 --- a/management/azure_mgmt_databox/lib/2018-01-01/generated/azure_mgmt_databox/models/available_sku_request.rb +++ b/management/azure_mgmt_databox/lib/2018-01-01/generated/azure_mgmt_databox/models/available_sku_request.rb @@ -24,6 +24,9 @@ class AvailableSkuRequest # https://management.azure.com/subscriptions/SUBSCRIPTIONID/locations?api-version=2018-01-01 attr_accessor :location + # @return [Array] Sku Names to filter for available skus + attr_accessor :sku_names + # # Mapper for AvailableSkuRequest class as Ruby Hash. @@ -59,6 +62,21 @@ def self.mapper() type: { name: 'String' } + }, + sku_names: { + required: false, + serialized_name: 'skuNames', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'SkuNameElementType', + type: { + name: 'Enum', + module: 'SkuName' + } + } + } } } }