Generated from b88ba52c9becb9ad2f7f83d8da6610119327dfc3 (#974)
This commit is contained in:
Родитель
1cc0f4e0d7
Коммит
f9651e3f19
|
@ -20,20 +20,24 @@ require 'generated/azure_mgmt_media_services/module_definition'
|
|||
require 'ms_rest_azure'
|
||||
|
||||
module Azure::ARM::MediaServices
|
||||
autoload :Operations, 'generated/azure_mgmt_media_services/operations.rb'
|
||||
autoload :MediaServiceOperations, 'generated/azure_mgmt_media_services/media_service_operations.rb'
|
||||
autoload :MediaServicesManagementClient, 'generated/azure_mgmt_media_services/media_services_management_client.rb'
|
||||
|
||||
module Models
|
||||
autoload :MediaServiceCollection, 'generated/azure_mgmt_media_services/models/media_service_collection.rb'
|
||||
autoload :ApiEndpoint, 'generated/azure_mgmt_media_services/models/api_endpoint.rb'
|
||||
autoload :RegenerateKeyInput, 'generated/azure_mgmt_media_services/models/regenerate_key_input.rb'
|
||||
autoload :CheckNameAvailabilityInput, 'generated/azure_mgmt_media_services/models/check_name_availability_input.rb'
|
||||
autoload :RegenerateKeyOutput, 'generated/azure_mgmt_media_services/models/regenerate_key_output.rb'
|
||||
autoload :StorageAccount, 'generated/azure_mgmt_media_services/models/storage_account.rb'
|
||||
autoload :ApiError, 'generated/azure_mgmt_media_services/models/api_error.rb'
|
||||
autoload :ServiceKeys, 'generated/azure_mgmt_media_services/models/service_keys.rb'
|
||||
autoload :CheckNameAvailabilityOutput, 'generated/azure_mgmt_media_services/models/check_name_availability_output.rb'
|
||||
autoload :ServiceKeys, 'generated/azure_mgmt_media_services/models/service_keys.rb'
|
||||
autoload :MediaServiceCollection, 'generated/azure_mgmt_media_services/models/media_service_collection.rb'
|
||||
autoload :SyncStorageKeysInput, 'generated/azure_mgmt_media_services/models/sync_storage_keys_input.rb'
|
||||
autoload :CheckNameAvailabilityInput, 'generated/azure_mgmt_media_services/models/check_name_availability_input.rb'
|
||||
autoload :OperationDisplay, 'generated/azure_mgmt_media_services/models/operation_display.rb'
|
||||
autoload :ApiEndpoint, 'generated/azure_mgmt_media_services/models/api_endpoint.rb'
|
||||
autoload :Operation, 'generated/azure_mgmt_media_services/models/operation.rb'
|
||||
autoload :StorageAccount, 'generated/azure_mgmt_media_services/models/storage_account.rb'
|
||||
autoload :OperationListResult, 'generated/azure_mgmt_media_services/models/operation_list_result.rb'
|
||||
autoload :MediaService, 'generated/azure_mgmt_media_services/models/media_service.rb'
|
||||
autoload :ResourceType, 'generated/azure_mgmt_media_services/models/resource_type.rb'
|
||||
autoload :EntityNameUnavailabilityReason, 'generated/azure_mgmt_media_services/models/entity_name_unavailability_reason.rb'
|
||||
|
|
|
@ -25,15 +25,15 @@ module Azure::ARM::MediaServices
|
|||
# Checks whether the Media Service resource name is available. The name must be
|
||||
# globally unique.
|
||||
#
|
||||
# @param check_name_availability_input [CheckNameAvailabilityInput] Properties
|
||||
# needed to check the availability of a name.
|
||||
# @param parameters [CheckNameAvailabilityInput] Properties needed to check the
|
||||
# availability of a name.
|
||||
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
||||
# will be added to the HTTP request.
|
||||
#
|
||||
# @return [CheckNameAvailabilityOutput] operation results.
|
||||
#
|
||||
def check_name_availability(check_name_availability_input, custom_headers = nil)
|
||||
response = check_name_availability_async(check_name_availability_input, custom_headers).value!
|
||||
def check_name_availability(parameters, custom_headers = nil)
|
||||
response = check_name_availability_async(parameters, custom_headers).value!
|
||||
response.body unless response.nil?
|
||||
end
|
||||
|
||||
|
@ -41,32 +41,32 @@ module Azure::ARM::MediaServices
|
|||
# Checks whether the Media Service resource name is available. The name must be
|
||||
# globally unique.
|
||||
#
|
||||
# @param check_name_availability_input [CheckNameAvailabilityInput] Properties
|
||||
# needed to check the availability of a name.
|
||||
# @param parameters [CheckNameAvailabilityInput] Properties needed to check the
|
||||
# availability of a name.
|
||||
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
||||
# will be added to the HTTP request.
|
||||
#
|
||||
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
||||
#
|
||||
def check_name_availability_with_http_info(check_name_availability_input, custom_headers = nil)
|
||||
check_name_availability_async(check_name_availability_input, custom_headers).value!
|
||||
def check_name_availability_with_http_info(parameters, custom_headers = nil)
|
||||
check_name_availability_async(parameters, custom_headers).value!
|
||||
end
|
||||
|
||||
#
|
||||
# Checks whether the Media Service resource name is available. The name must be
|
||||
# globally unique.
|
||||
#
|
||||
# @param check_name_availability_input [CheckNameAvailabilityInput] Properties
|
||||
# needed to check the availability of a name.
|
||||
# @param parameters [CheckNameAvailabilityInput] Properties needed to check the
|
||||
# availability of a name.
|
||||
# @param [Hash{String => String}] A hash of custom headers that will be added
|
||||
# to the HTTP request.
|
||||
#
|
||||
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
||||
#
|
||||
def check_name_availability_async(check_name_availability_input, custom_headers = nil)
|
||||
def check_name_availability_async(parameters, custom_headers = nil)
|
||||
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
||||
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
||||
fail ArgumentError, 'check_name_availability_input is nil' if check_name_availability_input.nil?
|
||||
fail ArgumentError, 'parameters is nil' if parameters.nil?
|
||||
|
||||
|
||||
request_headers = {}
|
||||
|
@ -79,7 +79,7 @@ module Azure::ARM::MediaServices
|
|||
|
||||
# Serialize Request
|
||||
request_mapper = Azure::ARM::MediaServices::Models::CheckNameAvailabilityInput.mapper()
|
||||
request_content = @client.serialize(request_mapper, check_name_availability_input)
|
||||
request_content = @client.serialize(request_mapper, parameters)
|
||||
request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
|
||||
|
||||
path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.Media/CheckNameAvailability'
|
||||
|
@ -313,15 +313,15 @@ module Azure::ARM::MediaServices
|
|||
# @param resource_group_name [String] Name of the resource group within the
|
||||
# Azure subscription.
|
||||
# @param media_service_name [String] Name of the Media Service.
|
||||
# @param media_service [MediaService] Media Service properties needed for
|
||||
# @param parameters [MediaService] Media Service properties needed for
|
||||
# creation.
|
||||
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
||||
# will be added to the HTTP request.
|
||||
#
|
||||
# @return [MediaService] operation results.
|
||||
#
|
||||
def create(resource_group_name, media_service_name, media_service, custom_headers = nil)
|
||||
response = create_async(resource_group_name, media_service_name, media_service, custom_headers).value!
|
||||
def create(resource_group_name, media_service_name, parameters, custom_headers = nil)
|
||||
response = create_async(resource_group_name, media_service_name, parameters, custom_headers).value!
|
||||
response.body unless response.nil?
|
||||
end
|
||||
|
||||
|
@ -331,15 +331,15 @@ module Azure::ARM::MediaServices
|
|||
# @param resource_group_name [String] Name of the resource group within the
|
||||
# Azure subscription.
|
||||
# @param media_service_name [String] Name of the Media Service.
|
||||
# @param media_service [MediaService] Media Service properties needed for
|
||||
# @param parameters [MediaService] Media Service properties needed for
|
||||
# creation.
|
||||
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
||||
# will be added to the HTTP request.
|
||||
#
|
||||
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
||||
#
|
||||
def create_with_http_info(resource_group_name, media_service_name, media_service, custom_headers = nil)
|
||||
create_async(resource_group_name, media_service_name, media_service, custom_headers).value!
|
||||
def create_with_http_info(resource_group_name, media_service_name, parameters, custom_headers = nil)
|
||||
create_async(resource_group_name, media_service_name, parameters, custom_headers).value!
|
||||
end
|
||||
|
||||
#
|
||||
|
@ -348,19 +348,19 @@ module Azure::ARM::MediaServices
|
|||
# @param resource_group_name [String] Name of the resource group within the
|
||||
# Azure subscription.
|
||||
# @param media_service_name [String] Name of the Media Service.
|
||||
# @param media_service [MediaService] Media Service properties needed for
|
||||
# @param parameters [MediaService] Media Service properties needed for
|
||||
# creation.
|
||||
# @param [Hash{String => String}] A hash of custom headers that will be added
|
||||
# to the HTTP request.
|
||||
#
|
||||
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
||||
#
|
||||
def create_async(resource_group_name, media_service_name, media_service, custom_headers = nil)
|
||||
def create_async(resource_group_name, media_service_name, parameters, custom_headers = nil)
|
||||
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
||||
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
||||
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
||||
fail ArgumentError, 'media_service_name is nil' if media_service_name.nil?
|
||||
fail ArgumentError, 'media_service is nil' if media_service.nil?
|
||||
fail ArgumentError, 'parameters is nil' if parameters.nil?
|
||||
|
||||
|
||||
request_headers = {}
|
||||
|
@ -373,7 +373,7 @@ module Azure::ARM::MediaServices
|
|||
|
||||
# Serialize Request
|
||||
request_mapper = Azure::ARM::MediaServices::Models::MediaService.mapper()
|
||||
request_content = @client.serialize(request_mapper, media_service)
|
||||
request_content = @client.serialize(request_mapper, parameters)
|
||||
request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
|
||||
|
||||
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaservices/{mediaServiceName}'
|
||||
|
@ -506,15 +506,14 @@ module Azure::ARM::MediaServices
|
|||
# @param resource_group_name [String] Name of the resource group within the
|
||||
# Azure subscription.
|
||||
# @param media_service_name [String] Name of the Media Service.
|
||||
# @param media_service [MediaService] Media Service properties needed for
|
||||
# update.
|
||||
# @param parameters [MediaService] Media Service properties needed for update.
|
||||
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
||||
# will be added to the HTTP request.
|
||||
#
|
||||
# @return [MediaService] operation results.
|
||||
#
|
||||
def update(resource_group_name, media_service_name, media_service, custom_headers = nil)
|
||||
response = update_async(resource_group_name, media_service_name, media_service, custom_headers).value!
|
||||
def update(resource_group_name, media_service_name, parameters, custom_headers = nil)
|
||||
response = update_async(resource_group_name, media_service_name, parameters, custom_headers).value!
|
||||
response.body unless response.nil?
|
||||
end
|
||||
|
||||
|
@ -524,15 +523,14 @@ module Azure::ARM::MediaServices
|
|||
# @param resource_group_name [String] Name of the resource group within the
|
||||
# Azure subscription.
|
||||
# @param media_service_name [String] Name of the Media Service.
|
||||
# @param media_service [MediaService] Media Service properties needed for
|
||||
# update.
|
||||
# @param parameters [MediaService] Media Service properties needed for update.
|
||||
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
||||
# will be added to the HTTP request.
|
||||
#
|
||||
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
||||
#
|
||||
def update_with_http_info(resource_group_name, media_service_name, media_service, custom_headers = nil)
|
||||
update_async(resource_group_name, media_service_name, media_service, custom_headers).value!
|
||||
def update_with_http_info(resource_group_name, media_service_name, parameters, custom_headers = nil)
|
||||
update_async(resource_group_name, media_service_name, parameters, custom_headers).value!
|
||||
end
|
||||
|
||||
#
|
||||
|
@ -541,19 +539,18 @@ module Azure::ARM::MediaServices
|
|||
# @param resource_group_name [String] Name of the resource group within the
|
||||
# Azure subscription.
|
||||
# @param media_service_name [String] Name of the Media Service.
|
||||
# @param media_service [MediaService] Media Service properties needed for
|
||||
# update.
|
||||
# @param parameters [MediaService] Media Service properties needed for update.
|
||||
# @param [Hash{String => String}] A hash of custom headers that will be added
|
||||
# to the HTTP request.
|
||||
#
|
||||
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
||||
#
|
||||
def update_async(resource_group_name, media_service_name, media_service, custom_headers = nil)
|
||||
def update_async(resource_group_name, media_service_name, parameters, custom_headers = nil)
|
||||
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
||||
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
||||
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
||||
fail ArgumentError, 'media_service_name is nil' if media_service_name.nil?
|
||||
fail ArgumentError, 'media_service is nil' if media_service.nil?
|
||||
fail ArgumentError, 'parameters is nil' if parameters.nil?
|
||||
|
||||
|
||||
request_headers = {}
|
||||
|
@ -566,7 +563,7 @@ module Azure::ARM::MediaServices
|
|||
|
||||
# Serialize Request
|
||||
request_mapper = Azure::ARM::MediaServices::Models::MediaService.mapper()
|
||||
request_content = @client.serialize(request_mapper, media_service)
|
||||
request_content = @client.serialize(request_mapper, parameters)
|
||||
request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
|
||||
|
||||
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaservices/{mediaServiceName}'
|
||||
|
@ -616,15 +613,15 @@ module Azure::ARM::MediaServices
|
|||
# @param resource_group_name [String] Name of the resource group within the
|
||||
# Azure subscription.
|
||||
# @param media_service_name [String] Name of the Media Service.
|
||||
# @param regenerate_key_input [RegenerateKeyInput] Properties needed to
|
||||
# regenerate the Media Service key.
|
||||
# @param parameters [RegenerateKeyInput] Properties needed to regenerate the
|
||||
# Media Service key.
|
||||
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
||||
# will be added to the HTTP request.
|
||||
#
|
||||
# @return [RegenerateKeyOutput] operation results.
|
||||
#
|
||||
def regenerate_key(resource_group_name, media_service_name, regenerate_key_input, custom_headers = nil)
|
||||
response = regenerate_key_async(resource_group_name, media_service_name, regenerate_key_input, custom_headers).value!
|
||||
def regenerate_key(resource_group_name, media_service_name, parameters, custom_headers = nil)
|
||||
response = regenerate_key_async(resource_group_name, media_service_name, parameters, custom_headers).value!
|
||||
response.body unless response.nil?
|
||||
end
|
||||
|
||||
|
@ -634,15 +631,15 @@ module Azure::ARM::MediaServices
|
|||
# @param resource_group_name [String] Name of the resource group within the
|
||||
# Azure subscription.
|
||||
# @param media_service_name [String] Name of the Media Service.
|
||||
# @param regenerate_key_input [RegenerateKeyInput] Properties needed to
|
||||
# regenerate the Media Service key.
|
||||
# @param parameters [RegenerateKeyInput] Properties needed to regenerate the
|
||||
# Media Service key.
|
||||
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
||||
# will be added to the HTTP request.
|
||||
#
|
||||
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
||||
#
|
||||
def regenerate_key_with_http_info(resource_group_name, media_service_name, regenerate_key_input, custom_headers = nil)
|
||||
regenerate_key_async(resource_group_name, media_service_name, regenerate_key_input, custom_headers).value!
|
||||
def regenerate_key_with_http_info(resource_group_name, media_service_name, parameters, custom_headers = nil)
|
||||
regenerate_key_async(resource_group_name, media_service_name, parameters, custom_headers).value!
|
||||
end
|
||||
|
||||
#
|
||||
|
@ -651,19 +648,19 @@ module Azure::ARM::MediaServices
|
|||
# @param resource_group_name [String] Name of the resource group within the
|
||||
# Azure subscription.
|
||||
# @param media_service_name [String] Name of the Media Service.
|
||||
# @param regenerate_key_input [RegenerateKeyInput] Properties needed to
|
||||
# regenerate the Media Service key.
|
||||
# @param parameters [RegenerateKeyInput] Properties needed to regenerate the
|
||||
# Media Service key.
|
||||
# @param [Hash{String => String}] A hash of custom headers that will be added
|
||||
# to the HTTP request.
|
||||
#
|
||||
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
||||
#
|
||||
def regenerate_key_async(resource_group_name, media_service_name, regenerate_key_input, custom_headers = nil)
|
||||
def regenerate_key_async(resource_group_name, media_service_name, parameters, custom_headers = nil)
|
||||
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
||||
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
||||
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
||||
fail ArgumentError, 'media_service_name is nil' if media_service_name.nil?
|
||||
fail ArgumentError, 'regenerate_key_input is nil' if regenerate_key_input.nil?
|
||||
fail ArgumentError, 'parameters is nil' if parameters.nil?
|
||||
|
||||
|
||||
request_headers = {}
|
||||
|
@ -676,7 +673,7 @@ module Azure::ARM::MediaServices
|
|||
|
||||
# Serialize Request
|
||||
request_mapper = Azure::ARM::MediaServices::Models::RegenerateKeyInput.mapper()
|
||||
request_content = @client.serialize(request_mapper, regenerate_key_input)
|
||||
request_content = @client.serialize(request_mapper, parameters)
|
||||
request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
|
||||
|
||||
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaservices/{mediaServiceName}/regenerateKey'
|
||||
|
@ -821,14 +818,14 @@ module Azure::ARM::MediaServices
|
|||
# @param resource_group_name [String] Name of the resource group within the
|
||||
# Azure subscription.
|
||||
# @param media_service_name [String] Name of the Media Service.
|
||||
# @param sync_storage_keys_input [SyncStorageKeysInput] Properties needed to
|
||||
# synchronize the keys for a storage account to the Media Service.
|
||||
# @param parameters [SyncStorageKeysInput] Properties needed to synchronize the
|
||||
# keys for a storage account to the Media Service.
|
||||
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
||||
# will be added to the HTTP request.
|
||||
#
|
||||
#
|
||||
def sync_storage_keys(resource_group_name, media_service_name, sync_storage_keys_input, custom_headers = nil)
|
||||
response = sync_storage_keys_async(resource_group_name, media_service_name, sync_storage_keys_input, custom_headers).value!
|
||||
def sync_storage_keys(resource_group_name, media_service_name, parameters, custom_headers = nil)
|
||||
response = sync_storage_keys_async(resource_group_name, media_service_name, parameters, custom_headers).value!
|
||||
nil
|
||||
end
|
||||
|
||||
|
@ -839,15 +836,15 @@ module Azure::ARM::MediaServices
|
|||
# @param resource_group_name [String] Name of the resource group within the
|
||||
# Azure subscription.
|
||||
# @param media_service_name [String] Name of the Media Service.
|
||||
# @param sync_storage_keys_input [SyncStorageKeysInput] Properties needed to
|
||||
# synchronize the keys for a storage account to the Media Service.
|
||||
# @param parameters [SyncStorageKeysInput] Properties needed to synchronize the
|
||||
# keys for a storage account to the Media Service.
|
||||
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
||||
# will be added to the HTTP request.
|
||||
#
|
||||
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
||||
#
|
||||
def sync_storage_keys_with_http_info(resource_group_name, media_service_name, sync_storage_keys_input, custom_headers = nil)
|
||||
sync_storage_keys_async(resource_group_name, media_service_name, sync_storage_keys_input, custom_headers).value!
|
||||
def sync_storage_keys_with_http_info(resource_group_name, media_service_name, parameters, custom_headers = nil)
|
||||
sync_storage_keys_async(resource_group_name, media_service_name, parameters, custom_headers).value!
|
||||
end
|
||||
|
||||
#
|
||||
|
@ -857,19 +854,19 @@ module Azure::ARM::MediaServices
|
|||
# @param resource_group_name [String] Name of the resource group within the
|
||||
# Azure subscription.
|
||||
# @param media_service_name [String] Name of the Media Service.
|
||||
# @param sync_storage_keys_input [SyncStorageKeysInput] Properties needed to
|
||||
# synchronize the keys for a storage account to the Media Service.
|
||||
# @param parameters [SyncStorageKeysInput] Properties needed to synchronize the
|
||||
# keys for a storage account to the Media Service.
|
||||
# @param [Hash{String => String}] A hash of custom headers that will be added
|
||||
# to the HTTP request.
|
||||
#
|
||||
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
||||
#
|
||||
def sync_storage_keys_async(resource_group_name, media_service_name, sync_storage_keys_input, custom_headers = nil)
|
||||
def sync_storage_keys_async(resource_group_name, media_service_name, parameters, custom_headers = nil)
|
||||
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
||||
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
||||
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
||||
fail ArgumentError, 'media_service_name is nil' if media_service_name.nil?
|
||||
fail ArgumentError, 'sync_storage_keys_input is nil' if sync_storage_keys_input.nil?
|
||||
fail ArgumentError, 'parameters is nil' if parameters.nil?
|
||||
|
||||
|
||||
request_headers = {}
|
||||
|
@ -882,7 +879,7 @@ module Azure::ARM::MediaServices
|
|||
|
||||
# Serialize Request
|
||||
request_mapper = Azure::ARM::MediaServices::Models::SyncStorageKeysInput.mapper()
|
||||
request_content = @client.serialize(request_mapper, sync_storage_keys_input)
|
||||
request_content = @client.serialize(request_mapper, parameters)
|
||||
request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
|
||||
|
||||
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaservices/{mediaServiceName}/syncStorageKeys'
|
||||
|
|
|
@ -22,7 +22,7 @@ module Azure::ARM::MediaServices
|
|||
attr_accessor :subscription_id
|
||||
|
||||
# @return [String] Version of the API to be used with the client request.
|
||||
# Current version is 2015-10-01
|
||||
# The current version is 2015-10-01.
|
||||
attr_reader :api_version
|
||||
|
||||
# @return [String] Gets or sets the preferred language for the response.
|
||||
|
@ -36,6 +36,9 @@ module Azure::ARM::MediaServices
|
|||
# is generated and included in each request. Default is true.
|
||||
attr_accessor :generate_client_request_id
|
||||
|
||||
# @return [Operations] operations
|
||||
attr_reader :operations
|
||||
|
||||
# @return [MediaServiceOperations] media_service_operations
|
||||
attr_reader :media_service_operations
|
||||
|
||||
|
@ -52,6 +55,7 @@ module Azure::ARM::MediaServices
|
|||
fail ArgumentError, 'invalid type of credentials input parameter' unless credentials.is_a?(MsRest::ServiceClientCredentials) unless credentials.nil?
|
||||
@credentials = credentials
|
||||
|
||||
@operations = Operations.new(self)
|
||||
@media_service_operations = MediaServiceOperations.new(self)
|
||||
@api_version = '2015-10-01'
|
||||
@accept_language = 'en-US'
|
||||
|
|
|
@ -40,7 +40,7 @@ module Azure::ARM::MediaServices
|
|||
constraints: {
|
||||
MaxLength: 24,
|
||||
MinLength: 3,
|
||||
Pattern: '^[a-z0-9]'
|
||||
Pattern: '^[a-z0-9]{3,24}$'
|
||||
},
|
||||
type: {
|
||||
name: 'String'
|
||||
|
|
|
@ -40,14 +40,14 @@ module Azure::ARM::MediaServices
|
|||
model_properties: {
|
||||
name_available: {
|
||||
required: false,
|
||||
serialized_name: 'NameAvailable',
|
||||
serialized_name: 'nameAvailable',
|
||||
type: {
|
||||
name: 'Boolean'
|
||||
}
|
||||
},
|
||||
reason: {
|
||||
required: false,
|
||||
serialized_name: 'Reason',
|
||||
serialized_name: 'reason',
|
||||
type: {
|
||||
name: 'Enum',
|
||||
module: 'EntityNameUnavailabilityReason'
|
||||
|
@ -55,7 +55,7 @@ module Azure::ARM::MediaServices
|
|||
},
|
||||
message: {
|
||||
required: false,
|
||||
serialized_name: 'Message',
|
||||
serialized_name: 'message',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
|
|
|
@ -13,7 +13,8 @@ module Azure::ARM::MediaServices
|
|||
include MsRestAzure
|
||||
|
||||
include MsRest::JSONable
|
||||
# @return [Array<MediaService>]
|
||||
# @return [Array<MediaService>] The collection of Media Service
|
||||
# resources.
|
||||
attr_accessor :value
|
||||
|
||||
|
||||
|
|
|
@ -0,0 +1,57 @@
|
|||
# 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::MediaServices
|
||||
module Models
|
||||
#
|
||||
# A Media Services REST API operation
|
||||
#
|
||||
class Operation
|
||||
|
||||
include MsRestAzure
|
||||
|
||||
include MsRest::JSONable
|
||||
# @return [String] Operation name: {provider}/{resource}/{operation}
|
||||
attr_accessor :name
|
||||
|
||||
# @return [OperationDisplay] The object that represents the operation.
|
||||
attr_accessor :display
|
||||
|
||||
|
||||
#
|
||||
# Mapper for Operation class as Ruby Hash.
|
||||
# This will be used for serialization/deserialization.
|
||||
#
|
||||
def self.mapper()
|
||||
{
|
||||
required: false,
|
||||
serialized_name: 'Operation',
|
||||
type: {
|
||||
name: 'Composite',
|
||||
class_name: 'Operation',
|
||||
model_properties: {
|
||||
name: {
|
||||
required: false,
|
||||
read_only: true,
|
||||
serialized_name: 'name',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
display: {
|
||||
required: false,
|
||||
serialized_name: 'display',
|
||||
type: {
|
||||
name: 'Composite',
|
||||
class_name: 'OperationDisplay'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
|
@ -0,0 +1,69 @@
|
|||
# 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::MediaServices
|
||||
module Models
|
||||
#
|
||||
# The object that represents the operation.
|
||||
#
|
||||
class OperationDisplay
|
||||
|
||||
include MsRestAzure
|
||||
|
||||
include MsRest::JSONable
|
||||
# @return [String] Service provider: Microsoft.Media
|
||||
attr_accessor :provider
|
||||
|
||||
# @return [String] Resource on which the operation is performed: Invoice,
|
||||
# etc.
|
||||
attr_accessor :resource
|
||||
|
||||
# @return [String] Operation type: Read, write, delete, etc.
|
||||
attr_accessor :operation
|
||||
|
||||
|
||||
#
|
||||
# Mapper for OperationDisplay class as Ruby Hash.
|
||||
# This will be used for serialization/deserialization.
|
||||
#
|
||||
def self.mapper()
|
||||
{
|
||||
required: false,
|
||||
serialized_name: 'Operation_display',
|
||||
type: {
|
||||
name: 'Composite',
|
||||
class_name: 'OperationDisplay',
|
||||
model_properties: {
|
||||
provider: {
|
||||
required: false,
|
||||
read_only: true,
|
||||
serialized_name: 'provider',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
resource: {
|
||||
required: false,
|
||||
read_only: true,
|
||||
serialized_name: 'resource',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
operation: {
|
||||
required: false,
|
||||
read_only: true,
|
||||
serialized_name: 'operation',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
|
@ -0,0 +1,67 @@
|
|||
# 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::MediaServices
|
||||
module Models
|
||||
#
|
||||
# Result of the request to list Media Services operations.
|
||||
#
|
||||
class OperationListResult
|
||||
|
||||
include MsRestAzure
|
||||
|
||||
include MsRest::JSONable
|
||||
# @return [Array<Operation>] List of Media Services operations supported
|
||||
# by the Microsoft.Media resource provider.
|
||||
attr_accessor :value
|
||||
|
||||
# @return [String] URL to get the next set of operation list results if
|
||||
# there are any.
|
||||
attr_accessor :next_link
|
||||
|
||||
|
||||
#
|
||||
# Mapper for OperationListResult class as Ruby Hash.
|
||||
# This will be used for serialization/deserialization.
|
||||
#
|
||||
def self.mapper()
|
||||
{
|
||||
required: false,
|
||||
serialized_name: 'OperationListResult',
|
||||
type: {
|
||||
name: 'Composite',
|
||||
class_name: 'OperationListResult',
|
||||
model_properties: {
|
||||
value: {
|
||||
required: false,
|
||||
read_only: true,
|
||||
serialized_name: 'value',
|
||||
type: {
|
||||
name: 'Sequence',
|
||||
element: {
|
||||
required: false,
|
||||
serialized_name: 'OperationElementType',
|
||||
type: {
|
||||
name: 'Composite',
|
||||
class_name: 'Operation'
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
next_link: {
|
||||
required: false,
|
||||
read_only: true,
|
||||
serialized_name: 'nextLink',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
|
@ -0,0 +1,106 @@
|
|||
# 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::MediaServices
|
||||
#
|
||||
# Media Services resource management APIs.
|
||||
#
|
||||
class Operations
|
||||
include MsRestAzure
|
||||
|
||||
#
|
||||
# Creates and initializes a new instance of the Operations class.
|
||||
# @param client service class for accessing basic functionality.
|
||||
#
|
||||
def initialize(client)
|
||||
@client = client
|
||||
end
|
||||
|
||||
# @return [MediaServicesManagementClient] reference to the MediaServicesManagementClient
|
||||
attr_reader :client
|
||||
|
||||
#
|
||||
# Lists all of the available Media Services REST API operations.
|
||||
#
|
||||
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
||||
# will be added to the HTTP request.
|
||||
#
|
||||
# @return [OperationListResult] operation results.
|
||||
#
|
||||
def list(custom_headers = nil)
|
||||
response = list_async(custom_headers).value!
|
||||
response.body unless response.nil?
|
||||
end
|
||||
|
||||
#
|
||||
# Lists all of the available Media Services REST API operations.
|
||||
#
|
||||
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
||||
# will be added to the HTTP request.
|
||||
#
|
||||
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
||||
#
|
||||
def list_with_http_info(custom_headers = nil)
|
||||
list_async(custom_headers).value!
|
||||
end
|
||||
|
||||
#
|
||||
# Lists all of the available Media Services REST API operations.
|
||||
#
|
||||
# @param [Hash{String => String}] A hash of custom headers that will be added
|
||||
# to the HTTP request.
|
||||
#
|
||||
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
||||
#
|
||||
def list_async(custom_headers = nil)
|
||||
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
||||
|
||||
|
||||
request_headers = {}
|
||||
|
||||
# Set Headers
|
||||
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
||||
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
||||
path_template = 'providers/Microsoft.Media/operations'
|
||||
|
||||
request_url = @base_url || @client.base_url
|
||||
|
||||
options = {
|
||||
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
||||
query_params: {'api-version' => @client.api_version},
|
||||
headers: request_headers.merge(custom_headers || {}),
|
||||
base_url: request_url
|
||||
}
|
||||
promise = @client.make_request_async(:get, path_template, options)
|
||||
|
||||
promise = promise.then do |result|
|
||||
http_response = result.response
|
||||
status_code = http_response.status
|
||||
response_content = http_response.body
|
||||
unless status_code == 200
|
||||
error_model = JSON.load(response_content)
|
||||
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
||||
end
|
||||
|
||||
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
||||
# Deserialize Response
|
||||
if status_code == 200
|
||||
begin
|
||||
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
||||
result_mapper = Azure::ARM::MediaServices::Models::OperationListResult.mapper()
|
||||
result.body = @client.deserialize(result_mapper, parsed_response)
|
||||
rescue Exception => e
|
||||
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
||||
end
|
||||
end
|
||||
|
||||
result
|
||||
end
|
||||
|
||||
promise.execute
|
||||
end
|
||||
|
||||
end
|
||||
end
|
Загрузка…
Ссылка в новой задаче