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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
604 changes: 334 additions & 270 deletions azure_sdk/lib/latest/modules/recoveryservicesbackup_profile_module.rb

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ def initialize(client)
#
# @return [Array<BackupEngineBaseResource>] operation results.
#
def get(vault_name, resource_group_name, filter:nil, skip_token:nil, custom_headers:nil)
first_page = get_as_lazy(vault_name, resource_group_name, filter:filter, skip_token:skip_token, custom_headers:custom_headers)
def get(vault_name, resource_group_name, filter = nil, skip_token = nil, custom_headers = nil)
first_page = get_as_lazy(vault_name, resource_group_name, filter, skip_token, custom_headers)
first_page.get_all_items
end

Expand All @@ -62,8 +62,8 @@ def get(vault_name, resource_group_name, filter:nil, skip_token:nil, custom_head
#
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
#
def get_with_http_info(vault_name, resource_group_name, filter:nil, skip_token:nil, custom_headers:nil)
get_async(vault_name, resource_group_name, filter:filter, skip_token:skip_token, custom_headers:custom_headers).value!
def get_with_http_info(vault_name, resource_group_name, filter = nil, skip_token = nil, custom_headers = nil)
get_async(vault_name, resource_group_name, filter, skip_token, custom_headers).value!
end

#
Expand All @@ -82,15 +82,14 @@ def get_with_http_info(vault_name, resource_group_name, filter:nil, skip_token:n
#
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
#
def get_async(vault_name, resource_group_name, filter:nil, skip_token:nil, custom_headers:nil)
def get_async(vault_name, resource_group_name, filter = nil, skip_token = nil, custom_headers = nil)
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
fail ArgumentError, 'vault_name is nil' if vault_name.nil?
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?


request_headers = {}
request_headers['Content-Type'] = 'application/json; charset=utf-8'

# Set Headers
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
Expand Down Expand Up @@ -146,8 +145,8 @@ def get_async(vault_name, resource_group_name, filter:nil, skip_token:nil, custo
#
# @return [BackupEngineBaseResourceList] operation results.
#
def get_next(next_page_link, custom_headers:nil)
response = get_next_async(next_page_link, custom_headers:custom_headers).value!
def get_next(next_page_link, custom_headers = nil)
response = get_next_async(next_page_link, custom_headers).value!
response.body unless response.nil?
end

Expand All @@ -162,8 +161,8 @@ def get_next(next_page_link, custom_headers:nil)
#
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
#
def get_next_with_http_info(next_page_link, custom_headers:nil)
get_next_async(next_page_link, custom_headers:custom_headers).value!
def get_next_with_http_info(next_page_link, custom_headers = nil)
get_next_async(next_page_link, custom_headers).value!
end

#
Expand All @@ -177,12 +176,11 @@ def get_next_with_http_info(next_page_link, custom_headers:nil)
#
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
#
def get_next_async(next_page_link, custom_headers:nil)
def get_next_async(next_page_link, custom_headers = nil)
fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?


request_headers = {}
request_headers['Content-Type'] = 'application/json; charset=utf-8'

# Set Headers
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
Expand Down Expand Up @@ -243,12 +241,12 @@ def get_next_async(next_page_link, custom_headers:nil)
# @return [BackupEngineBaseResourceList] which provide lazy access to pages of
# the response.
#
def get_as_lazy(vault_name, resource_group_name, filter:nil, skip_token:nil, custom_headers:nil)
response = get_async(vault_name, resource_group_name, filter:filter, skip_token:skip_token, custom_headers:custom_headers).value!
def get_as_lazy(vault_name, resource_group_name, filter = nil, skip_token = nil, custom_headers = nil)
response = get_async(vault_name, resource_group_name, filter, skip_token, custom_headers).value!
unless response.nil?
page = response.body
page.next_method = Proc.new do |next_page_link|
get_next_async(next_page_link, custom_headers:custom_headers)
get_next_async(next_page_link, custom_headers)
end
page
end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ def initialize(client)
# will be added to the HTTP request.
#
#
def get(vault_name, resource_group_name, operation_id, custom_headers:nil)
response = get_async(vault_name, resource_group_name, operation_id, custom_headers:custom_headers).value!
def get(vault_name, resource_group_name, operation_id, custom_headers = nil)
response = get_async(vault_name, resource_group_name, operation_id, custom_headers).value!
nil
end

Expand All @@ -63,8 +63,8 @@ def get(vault_name, resource_group_name, operation_id, custom_headers:nil)
#
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
#
def get_with_http_info(vault_name, resource_group_name, operation_id, custom_headers:nil)
get_async(vault_name, resource_group_name, operation_id, custom_headers:custom_headers).value!
def get_with_http_info(vault_name, resource_group_name, operation_id, custom_headers = nil)
get_async(vault_name, resource_group_name, operation_id, custom_headers).value!
end

#
Expand All @@ -84,7 +84,7 @@ def get_with_http_info(vault_name, resource_group_name, operation_id, custom_hea
#
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
#
def get_async(vault_name, resource_group_name, operation_id, custom_headers:nil)
def get_async(vault_name, resource_group_name, operation_id, custom_headers = nil)
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
fail ArgumentError, 'vault_name is nil' if vault_name.nil?
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
Expand All @@ -93,7 +93,6 @@ def get_async(vault_name, resource_group_name, operation_id, custom_headers:nil)


request_headers = {}
request_headers['Content-Type'] = 'application/json; charset=utf-8'

# Set Headers
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ def initialize(client)
#
# @return [OperationStatus] operation results.
#
def get(vault_name, resource_group_name, operation_id, custom_headers:nil)
response = get_async(vault_name, resource_group_name, operation_id, custom_headers:custom_headers).value!
def get(vault_name, resource_group_name, operation_id, custom_headers = nil)
response = get_async(vault_name, resource_group_name, operation_id, custom_headers).value!
response.body unless response.nil?
end

Expand All @@ -62,8 +62,8 @@ def get(vault_name, resource_group_name, operation_id, custom_headers:nil)
#
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
#
def get_with_http_info(vault_name, resource_group_name, operation_id, custom_headers:nil)
get_async(vault_name, resource_group_name, operation_id, custom_headers:custom_headers).value!
def get_with_http_info(vault_name, resource_group_name, operation_id, custom_headers = nil)
get_async(vault_name, resource_group_name, operation_id, custom_headers).value!
end

#
Expand All @@ -82,7 +82,7 @@ def get_with_http_info(vault_name, resource_group_name, operation_id, custom_hea
#
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
#
def get_async(vault_name, resource_group_name, operation_id, custom_headers:nil)
def get_async(vault_name, resource_group_name, operation_id, custom_headers = nil)
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
fail ArgumentError, 'vault_name is nil' if vault_name.nil?
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
Expand All @@ -91,7 +91,6 @@ def get_async(vault_name, resource_group_name, operation_id, custom_headers:nil)


request_headers = {}
request_headers['Content-Type'] = 'application/json; charset=utf-8'

# Set Headers
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ def initialize(client)
# will be added to the HTTP request.
#
#
def trigger(vault_name, resource_group_name, fabric_name, container_name, protected_item_name, resource_backup_request, custom_headers:nil)
response = trigger_async(vault_name, resource_group_name, fabric_name, container_name, protected_item_name, resource_backup_request, custom_headers:custom_headers).value!
def trigger(vault_name, resource_group_name, fabric_name, container_name, protected_item_name, resource_backup_request, custom_headers = nil)
response = trigger_async(vault_name, resource_group_name, fabric_name, container_name, protected_item_name, resource_backup_request, custom_headers).value!
nil
end

Expand All @@ -69,8 +69,8 @@ def trigger(vault_name, resource_group_name, fabric_name, container_name, protec
#
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
#
def trigger_with_http_info(vault_name, resource_group_name, fabric_name, container_name, protected_item_name, resource_backup_request, custom_headers:nil)
trigger_async(vault_name, resource_group_name, fabric_name, container_name, protected_item_name, resource_backup_request, custom_headers:custom_headers).value!
def trigger_with_http_info(vault_name, resource_group_name, fabric_name, container_name, protected_item_name, resource_backup_request, custom_headers = nil)
trigger_async(vault_name, resource_group_name, fabric_name, container_name, protected_item_name, resource_backup_request, custom_headers).value!
end

#
Expand All @@ -93,7 +93,7 @@ def trigger_with_http_info(vault_name, resource_group_name, fabric_name, contain
#
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
#
def trigger_async(vault_name, resource_group_name, fabric_name, container_name, protected_item_name, resource_backup_request, custom_headers:nil)
def trigger_async(vault_name, resource_group_name, fabric_name, container_name, protected_item_name, resource_backup_request, custom_headers = nil)
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
fail ArgumentError, 'vault_name is nil' if vault_name.nil?
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
Expand All @@ -105,12 +105,13 @@ def trigger_async(vault_name, resource_group_name, fabric_name, container_name,


request_headers = {}
request_headers['Content-Type'] = 'application/json; charset=utf-8'

# Set Headers
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?

request_headers['Content-Type'] = 'application/json; charset=utf-8'

# Serialize Request
request_mapper = Azure::RecoveryServicesBackup::Mgmt::V2016_06_01::Models::BackupRequestResource.mapper()
request_content = @client.serialize(request_mapper, resource_backup_request)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ def initialize(client)
#
# @return [OperationResultInfoBaseResource] operation results.
#
def get(vault_name, resource_group_name, operation_id, custom_headers:nil)
response = get_async(vault_name, resource_group_name, operation_id, custom_headers:custom_headers).value!
def get(vault_name, resource_group_name, operation_id, custom_headers = nil)
response = get_async(vault_name, resource_group_name, operation_id, custom_headers).value!
response.body unless response.nil?
end

Expand All @@ -54,8 +54,8 @@ def get(vault_name, resource_group_name, operation_id, custom_headers:nil)
#
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
#
def get_with_http_info(vault_name, resource_group_name, operation_id, custom_headers:nil)
get_async(vault_name, resource_group_name, operation_id, custom_headers:custom_headers).value!
def get_with_http_info(vault_name, resource_group_name, operation_id, custom_headers = nil)
get_async(vault_name, resource_group_name, operation_id, custom_headers).value!
end

#
Expand All @@ -70,7 +70,7 @@ def get_with_http_info(vault_name, resource_group_name, operation_id, custom_hea
#
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
#
def get_async(vault_name, resource_group_name, operation_id, custom_headers:nil)
def get_async(vault_name, resource_group_name, operation_id, custom_headers = nil)
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
fail ArgumentError, 'vault_name is nil' if vault_name.nil?
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
Expand All @@ -79,7 +79,6 @@ def get_async(vault_name, resource_group_name, operation_id, custom_headers:nil)


request_headers = {}
request_headers['Content-Type'] = 'application/json; charset=utf-8'

# Set Headers
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ def initialize(client)
# will be added to the HTTP request.
#
#
def revoke(vault_name, resource_group_name, fabric_name, container_name, protected_item_name, recovery_point_id, custom_headers:nil)
response = revoke_async(vault_name, resource_group_name, fabric_name, container_name, protected_item_name, recovery_point_id, custom_headers:custom_headers).value!
def revoke(vault_name, resource_group_name, fabric_name, container_name, protected_item_name, recovery_point_id, custom_headers = nil)
response = revoke_async(vault_name, resource_group_name, fabric_name, container_name, protected_item_name, recovery_point_id, custom_headers).value!
nil
end

Expand All @@ -71,8 +71,8 @@ def revoke(vault_name, resource_group_name, fabric_name, container_name, protect
#
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
#
def revoke_with_http_info(vault_name, resource_group_name, fabric_name, container_name, protected_item_name, recovery_point_id, custom_headers:nil)
revoke_async(vault_name, resource_group_name, fabric_name, container_name, protected_item_name, recovery_point_id, custom_headers:custom_headers).value!
def revoke_with_http_info(vault_name, resource_group_name, fabric_name, container_name, protected_item_name, recovery_point_id, custom_headers = nil)
revoke_async(vault_name, resource_group_name, fabric_name, container_name, protected_item_name, recovery_point_id, custom_headers).value!
end

#
Expand All @@ -96,7 +96,7 @@ def revoke_with_http_info(vault_name, resource_group_name, fabric_name, containe
#
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
#
def revoke_async(vault_name, resource_group_name, fabric_name, container_name, protected_item_name, recovery_point_id, custom_headers:nil)
def revoke_async(vault_name, resource_group_name, fabric_name, container_name, protected_item_name, recovery_point_id, custom_headers = nil)
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
fail ArgumentError, 'vault_name is nil' if vault_name.nil?
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
Expand All @@ -108,7 +108,6 @@ def revoke_async(vault_name, resource_group_name, fabric_name, container_name, p


request_headers = {}
request_headers['Content-Type'] = 'application/json; charset=utf-8'

# Set Headers
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
Expand Down Expand Up @@ -165,8 +164,8 @@ def revoke_async(vault_name, resource_group_name, fabric_name, container_name, p
# will be added to the HTTP request.
#
#
def provision(vault_name, resource_group_name, fabric_name, container_name, protected_item_name, recovery_point_id, resource_ilrrequest, custom_headers:nil)
response = provision_async(vault_name, resource_group_name, fabric_name, container_name, protected_item_name, recovery_point_id, resource_ilrrequest, custom_headers:custom_headers).value!
def provision(vault_name, resource_group_name, fabric_name, container_name, protected_item_name, recovery_point_id, resource_ilrrequest, custom_headers = nil)
response = provision_async(vault_name, resource_group_name, fabric_name, container_name, protected_item_name, recovery_point_id, resource_ilrrequest, custom_headers).value!
nil
end

Expand All @@ -193,8 +192,8 @@ def provision(vault_name, resource_group_name, fabric_name, container_name, prot
#
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
#
def provision_with_http_info(vault_name, resource_group_name, fabric_name, container_name, protected_item_name, recovery_point_id, resource_ilrrequest, custom_headers:nil)
provision_async(vault_name, resource_group_name, fabric_name, container_name, protected_item_name, recovery_point_id, resource_ilrrequest, custom_headers:custom_headers).value!
def provision_with_http_info(vault_name, resource_group_name, fabric_name, container_name, protected_item_name, recovery_point_id, resource_ilrrequest, custom_headers = nil)
provision_async(vault_name, resource_group_name, fabric_name, container_name, protected_item_name, recovery_point_id, resource_ilrrequest, custom_headers).value!
end

#
Expand All @@ -220,7 +219,7 @@ def provision_with_http_info(vault_name, resource_group_name, fabric_name, conta
#
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
#
def provision_async(vault_name, resource_group_name, fabric_name, container_name, protected_item_name, recovery_point_id, resource_ilrrequest, custom_headers:nil)
def provision_async(vault_name, resource_group_name, fabric_name, container_name, protected_item_name, recovery_point_id, resource_ilrrequest, custom_headers = nil)
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
fail ArgumentError, 'vault_name is nil' if vault_name.nil?
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
Expand All @@ -233,12 +232,13 @@ def provision_async(vault_name, resource_group_name, fabric_name, container_name


request_headers = {}
request_headers['Content-Type'] = 'application/json; charset=utf-8'

# Set Headers
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?

request_headers['Content-Type'] = 'application/json; charset=utf-8'

# Serialize Request
request_mapper = Azure::RecoveryServicesBackup::Mgmt::V2016_06_01::Models::ILRRequestResource.mapper()
request_content = @client.serialize(request_mapper, resource_ilrrequest)
Expand Down
Loading