Class: Azure::ARM::CognitiveServices::CognitiveServicesManagementClient

Inherits:
MsRestAzure::AzureServiceClient
  • Object
show all
Includes:
MsRestAzure, MsRestAzure::Serialization
Defined in:
lib/generated/azure_mgmt_cognitive_services/cognitive_services_management_client.rb

Overview

A service client - single point of access to the REST API.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(credentials, base_url = nil, options = nil) ⇒ CognitiveServicesManagementClient

Creates initializes a new instance of the CognitiveServicesManagementClient class.

Parameters:

  • credentials (MsRest::ServiceClientCredentials)

    credentials to authorize HTTP requests made by the service client.

  • base_url (String) (defaults to: nil)

    the base URI of the service.

  • options (Array) (defaults to: nil)

    filters to be applied to the HTTP requests.



51
52
53
54
55
56
57
58
59
60
61
62
63
64
# File 'lib/generated/azure_mgmt_cognitive_services/cognitive_services_management_client.rb', line 51

def initialize(credentials, base_url = nil, options = nil)
  super(credentials, options)
  @base_url = base_url || 'https://management.azure.com'

  fail ArgumentError, 'credentials is nil' if credentials.nil?
  fail ArgumentError, 'invalid type of credentials input parameter' unless credentials.is_a?(MsRest::ServiceClientCredentials)
  @credentials = credentials

  @cognitive_services_accounts = CognitiveServicesAccounts.new(self)
  @api_version = '2016-02-01-preview'
  @accept_language = 'en-US'
  @long_running_operation_retry_timeout = 30
  @generate_client_request_id = true
end

Instance Attribute Details

#accept_languageString

Returns Gets or sets the preferred language for the response.

Returns:

  • (String)

    Gets or sets the preferred language for the response.



28
29
30
# File 'lib/generated/azure_mgmt_cognitive_services/cognitive_services_management_client.rb', line 28

def accept_language
  @accept_language
end

#api_versionString (readonly)

Current version is 2016-02-01-preview

Returns:

  • (String)

    Version of the API to be used with the client request.



25
26
27
# File 'lib/generated/azure_mgmt_cognitive_services/cognitive_services_management_client.rb', line 25

def api_version
  @api_version
end

#base_urlString

Returns the base URI of the service.

Returns:

  • (String)

    the base URI of the service.



15
16
17
# File 'lib/generated/azure_mgmt_cognitive_services/cognitive_services_management_client.rb', line 15

def base_url
  @base_url
end

#cognitive_services_accountsCognitiveServicesAccounts (readonly)

Returns cognitive_services_accounts.

Returns:



43
44
45
# File 'lib/generated/azure_mgmt_cognitive_services/cognitive_services_management_client.rb', line 43

def cognitive_services_accounts
  @cognitive_services_accounts
end

#credentialsObject

subscription.

Returns:

  • Subscription credentials which uniquely identify client



18
19
20
# File 'lib/generated/azure_mgmt_cognitive_services/cognitive_services_management_client.rb', line 18

def credentials
  @credentials
end

#generate_client_request_idBoolean

is generated and included in each request. Default is true.

Returns:

  • (Boolean)

    When set to true a unique x-ms-client-request-id value



36
37
38
# File 'lib/generated/azure_mgmt_cognitive_services/cognitive_services_management_client.rb', line 36

def generate_client_request_id
  @generate_client_request_id
end

#long_running_operation_retry_timeoutInteger

Running Operations. Default value is 30.

Returns:

  • (Integer)

    Gets or sets the retry timeout in seconds for Long



32
33
34
# File 'lib/generated/azure_mgmt_cognitive_services/cognitive_services_management_client.rb', line 32

def long_running_operation_retry_timeout
  @long_running_operation_retry_timeout
end

#subscription_idString

Returns Azure Subscription ID.

Returns:

  • (String)

    Azure Subscription ID.



21
22
23
# File 'lib/generated/azure_mgmt_cognitive_services/cognitive_services_management_client.rb', line 21

def subscription_id
  @subscription_id
end