Skip to content
This repository was archived by the owner on Jan 11, 2023. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -33,26 +33,27 @@ module Azure::ARM::RecoveryServices

module Models
autoload :VaultCertificateResponse, 'generated/azure_mgmt_recovery_services/models/vault_certificate_response.rb'
autoload :JobsSummary, 'generated/azure_mgmt_recovery_services/models/jobs_summary.rb'
autoload :VaultList, 'generated/azure_mgmt_recovery_services/models/vault_list.rb'
autoload :ClientDiscoveryResponse, 'generated/azure_mgmt_recovery_services/models/client_discovery_response.rb'
autoload :Sku, 'generated/azure_mgmt_recovery_services/models/sku.rb'
autoload :ResourceCertificateDetails, 'generated/azure_mgmt_recovery_services/models/resource_certificate_details.rb'
autoload :VaultProperties, 'generated/azure_mgmt_recovery_services/models/vault_properties.rb'
autoload :Sku, 'generated/azure_mgmt_recovery_services/models/sku.rb'
autoload :UpgradeDetails, 'generated/azure_mgmt_recovery_services/models/upgrade_details.rb'
autoload :ClientDiscoveryValueForSingleApi, 'generated/azure_mgmt_recovery_services/models/client_discovery_value_for_single_api.rb'
autoload :NameInfo, 'generated/azure_mgmt_recovery_services/models/name_info.rb'
autoload :JobsSummary, 'generated/azure_mgmt_recovery_services/models/jobs_summary.rb'
autoload :RawCertificateData, 'generated/azure_mgmt_recovery_services/models/raw_certificate_data.rb'
autoload :MonitoringSummary, 'generated/azure_mgmt_recovery_services/models/monitoring_summary.rb'
autoload :VaultUsageList, 'generated/azure_mgmt_recovery_services/models/vault_usage_list.rb'
autoload :ClientDiscoveryResponse, 'generated/azure_mgmt_recovery_services/models/client_discovery_response.rb'
autoload :Resource, 'generated/azure_mgmt_recovery_services/models/resource.rb'
autoload :MonitoringSummary, 'generated/azure_mgmt_recovery_services/models/monitoring_summary.rb'
autoload :CertificateRequest, 'generated/azure_mgmt_recovery_services/models/certificate_request.rb'
autoload :ReplicationUsage, 'generated/azure_mgmt_recovery_services/models/replication_usage.rb'
autoload :VaultUsage, 'generated/azure_mgmt_recovery_services/models/vault_usage.rb'
autoload :ReplicationUsageList, 'generated/azure_mgmt_recovery_services/models/replication_usage_list.rb'
autoload :CertificateRequest, 'generated/azure_mgmt_recovery_services/models/certificate_request.rb'
autoload :VaultUsage, 'generated/azure_mgmt_recovery_services/models/vault_usage.rb'
autoload :ClientDiscoveryDisplay, 'generated/azure_mgmt_recovery_services/models/client_discovery_display.rb'
autoload :Resource, 'generated/azure_mgmt_recovery_services/models/resource.rb'
autoload :NameInfo, 'generated/azure_mgmt_recovery_services/models/name_info.rb'
autoload :ClientDiscoveryForLogSpecification, 'generated/azure_mgmt_recovery_services/models/client_discovery_for_log_specification.rb'
autoload :UpgradeDetails, 'generated/azure_mgmt_recovery_services/models/upgrade_details.rb'
autoload :RawCertificateData, 'generated/azure_mgmt_recovery_services/models/raw_certificate_data.rb'
autoload :ClientDiscoveryForServiceSpecification, 'generated/azure_mgmt_recovery_services/models/client_discovery_for_service_specification.rb'
autoload :VaultProperties, 'generated/azure_mgmt_recovery_services/models/vault_properties.rb'
autoload :ClientDiscoveryForProperties, 'generated/azure_mgmt_recovery_services/models/client_discovery_for_properties.rb'
autoload :BackupStorageConfig, 'generated/azure_mgmt_recovery_services/models/backup_storage_config.rb'
autoload :BackupVaultConfig, 'generated/azure_mgmt_recovery_services/models/backup_vault_config.rb'
autoload :VaultExtendedInfoResource, 'generated/azure_mgmt_recovery_services/models/vault_extended_info_resource.rb'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,16 @@ class ClientDiscoveryDisplay
include MsRestAzure

include MsRest::JSONable
# @return [String] Name of the resource provider.
# @return [String] Name of the provider for display purposes
attr_accessor :provider

# @return [String] Type of the resource.
# @return [String] Name of the resource type for display purposes
attr_accessor :resource

# @return [String] Name of the operation.
# @return [String] Name of the operation for display purposes
attr_accessor :operation

# @return [String] Operation description.
# @return [String] Description of the operation for display purposes
attr_accessor :description


Expand All @@ -40,31 +40,27 @@ def self.mapper()
model_properties: {
provider: {
required: false,
read_only: true,
serialized_name: 'Provider',
type: {
name: 'String'
}
},
resource: {
required: false,
read_only: true,
serialized_name: 'Resource',
type: {
name: 'String'
}
},
operation: {
required: false,
read_only: true,
serialized_name: 'Operation',
type: {
name: 'String'
}
},
description: {
required: false,
read_only: true,
serialized_name: 'Description',
type: {
name: 'String'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
module Azure::ARM::RecoveryServices
module Models
#
# Log specification for the operation.
# Class to represent shoebox log specification in json client discovery.
#
class ClientDiscoveryForLogSpecification

Expand All @@ -16,10 +16,10 @@ class ClientDiscoveryForLogSpecification
# @return [String] Name of the log.
attr_accessor :name

# @return [String] Localized display name.
# @return [String] Localized display name
attr_accessor :display_name

# @return [DateTime] Blob duration.
# @return [String] Blobs created in customer storage account per hour
attr_accessor :blob_duration


Expand All @@ -37,26 +37,23 @@ def self.mapper()
model_properties: {
name: {
required: false,
read_only: true,
serialized_name: 'name',
type: {
name: 'String'
}
},
display_name: {
required: false,
read_only: true,
serialized_name: 'displayName',
type: {
name: 'String'
}
},
blob_duration: {
required: false,
read_only: true,
serialized_name: 'blobDuration',
type: {
name: 'DateTime'
name: 'String'
}
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# encoding: utf-8
# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.

module Azure::ARM::RecoveryServices
module Models
#
# Class to represent shoebox properties in json client discovery.
#
class ClientDiscoveryForProperties

include MsRestAzure

include MsRest::JSONable
# @return [ClientDiscoveryForServiceSpecification] Operation properties.
attr_accessor :service_specification


#
# Mapper for ClientDiscoveryForProperties class as Ruby Hash.
# This will be used for serialization/deserialization.
#
def self.mapper()
{
required: false,
serialized_name: 'ClientDiscoveryForProperties',
type: {
name: 'Composite',
class_name: 'ClientDiscoveryForProperties',
model_properties: {
service_specification: {
required: false,
serialized_name: 'serviceSpecification',
type: {
name: 'Composite',
class_name: 'ClientDiscoveryForServiceSpecification'
}
}
}
}
}
end
end
end
end
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
module Azure::ARM::RecoveryServices
module Models
#
# Operation properties.
# Class to represent shoebox service specification in json client
# discovery.
#
class ClientDiscoveryForServiceSpecification

Expand All @@ -32,7 +33,6 @@ def self.mapper()
model_properties: {
log_specifications: {
required: false,
read_only: true,
serialized_name: 'logSpecifications',
type: {
name: 'Sequence',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
module Azure::ARM::RecoveryServices
module Models
#
# List of available operations.
# Operations List response which contains list of available APIs.
#
class ClientDiscoveryResponse

Expand All @@ -17,7 +17,7 @@ class ClientDiscoveryResponse
# operationss.
attr_accessor :value

# @return [String] NextLink
# @return [String] NextLink of the Response.
attr_accessor :next_link

# return [Proc] with next page method call.
Expand Down Expand Up @@ -66,7 +66,6 @@ def self.mapper()
model_properties: {
value: {
required: false,
read_only: true,
serialized_name: 'Value',
type: {
name: 'Sequence',
Expand All @@ -82,7 +81,6 @@ def self.mapper()
},
next_link: {
required: false,
read_only: true,
serialized_name: 'NextLink',
type: {
name: 'String'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,19 @@ class ClientDiscoveryValueForSingleApi
include MsRestAzure

include MsRest::JSONable
# @return [String] Name of the operation.
# @return [String] Name of the operation
attr_accessor :name

# @return [ClientDiscoveryDisplay] Contains the localized display
# information for this particular operation.
# information for this particular operation
attr_accessor :display

# @return [String] The intended executor of the operation.
# @return [String] The intended executor of the operation;governs the
# display of the operation in the RBAC UX and the audit logs UX
attr_accessor :origin

# @return [ClientDiscoveryForServiceSpecification] Operation properties.
attr_accessor :service_specification
# @return [ClientDiscoveryForProperties] Properties
attr_accessor :properties


#
Expand All @@ -41,15 +42,13 @@ def self.mapper()
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',
Expand All @@ -58,19 +57,17 @@ def self.mapper()
},
origin: {
required: false,
read_only: true,
serialized_name: 'Origin',
type: {
name: 'String'
}
},
service_specification: {
properties: {
required: false,
read_only: true,
serialized_name: 'Properties.serviceSpecification',
serialized_name: 'Properties',
type: {
name: 'Composite',
class_name: 'ClientDiscoveryForServiceSpecification'
class_name: 'ClientDiscoveryForProperties'
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,60 +24,51 @@ def initialize(client)
#
# Returns the list of available operations.
#
# @param resource_group_name [String] The name of the resource group where the
# recovery services vault is present.
# @param custom_headers [Hash{String => String}] A hash of custom headers that
# will be added to the HTTP request.
#
# @return [Array<ClientDiscoveryValueForSingleApi>] operation results.
#
def list(resource_group_name, custom_headers = nil)
first_page = list_as_lazy(resource_group_name, custom_headers)
def list(custom_headers = nil)
first_page = list_as_lazy(custom_headers)
first_page.get_all_items
end

#
# Returns the list of available operations.
#
# @param resource_group_name [String] The name of the resource group where the
# recovery services vault is present.
# @param custom_headers [Hash{String => String}] A hash of custom headers that
# will be added to the HTTP request.
#
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
#
def list_with_http_info(resource_group_name, custom_headers = nil)
list_async(resource_group_name, custom_headers).value!
def list_with_http_info(custom_headers = nil)
list_async(custom_headers).value!
end

#
# Returns the list of available operations.
#
# @param resource_group_name [String] The name of the resource group where the
# recovery services vault is present.
# @param [Hash{String => String}] A hash of custom headers that will be added
# to the HTTP request.
#
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
#
def list_async(resource_group_name, custom_headers = nil)
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
def list_async(custom_headers = nil)
api_version = '2016-06-01'
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?


request_headers = {}

# Set Headers
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
path_template = 'Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/operations'
path_template = 'providers/Microsoft.RecoveryServices/operations'

request_url = @base_url || @client.base_url

options = {
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name},
query_params: {'api-version' => api_version},
headers: request_headers.merge(custom_headers || {}),
base_url: request_url
Expand Down Expand Up @@ -201,16 +192,14 @@ def list_next_async(next_page_link, custom_headers = nil)
#
# Returns the list of available operations.
#
# @param resource_group_name [String] The name of the resource group where the
# recovery services vault is present.
# @param custom_headers [Hash{String => String}] A hash of custom headers that
# will be added to the HTTP request.
#
# @return [ClientDiscoveryResponse] which provide lazy access to pages of the
# response.
#
def list_as_lazy(resource_group_name, custom_headers = nil)
response = list_async(resource_group_name, custom_headers).value!
def list_as_lazy(custom_headers = nil)
response = list_async(custom_headers).value!
unless response.nil?
page = response.body
page.next_method = Proc.new do |next_page_link|
Expand Down