Skip to content
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
Empty file.
28 changes: 6 additions & 22 deletions ...mt-cognitiveservices/azure/mgmt/cognitiveservices/cognitive_services_management_client.py
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
from msrest import Serializer, Deserializer
from msrestazure import AzureConfiguration
from .version import VERSION
from .operations.cognitive_services_accounts_operations import CognitiveServicesAccountsOperations
from .operations.accounts_operations import AccountsOperations
from .operations.operations import Operations
from .operations.check_sku_availability_operations import CheckSkuAvailabilityOperations
Expand All @@ -30,24 +29,16 @@ class CognitiveServicesManagementClientConfiguration(AzureConfiguration):
object<msrestazure.azure_active_directory>`
:param subscription_id: Azure Subscription ID.
:type subscription_id: str
:param location: Resource location.
:type location: str
:param str base_url: Service URL
"""

def __init__(
self, credentials, subscription_id, location, base_url=None):
self, credentials, subscription_id, base_url=None):

if credentials is None:
raise ValueError("Parameter 'credentials' must not be None.")
if subscription_id is None:
raise ValueError("Parameter 'subscription_id' must not be None.")
if not isinstance(subscription_id, str):
raise TypeError("Parameter 'subscription_id' must be str.")
if location is None:
raise ValueError("Parameter 'location' must not be None.")
if not isinstance(location, str):
raise TypeError("Parameter 'location' must be str.")
if not base_url:
base_url = 'https://management.azure.com'

Expand All @@ -58,7 +49,6 @@ def __init__(

self.credentials = credentials
self.subscription_id = subscription_id
self.location = location


class CognitiveServicesManagementClient(object):
Expand All @@ -67,38 +57,32 @@ class CognitiveServicesManagementClient(object):
:ivar config: Configuration for client.
:vartype config: CognitiveServicesManagementClientConfiguration

:ivar cognitive_services_accounts: CognitiveServicesAccounts operations
:vartype cognitive_services_accounts: .operations.CognitiveServicesAccountsOperations
:ivar accounts: Accounts operations
:vartype accounts: .operations.AccountsOperations
:vartype accounts: azure.mgmt.cognitiveservices.operations.AccountsOperations
:ivar operations: Operations operations
:vartype operations: .operations.Operations
:vartype operations: azure.mgmt.cognitiveservices.operations.Operations
:ivar check_sku_availability: CheckSkuAvailability operations
:vartype check_sku_availability: .operations.CheckSkuAvailabilityOperations
:vartype check_sku_availability: azure.mgmt.cognitiveservices.operations.CheckSkuAvailabilityOperations

:param credentials: Credentials needed for the client to connect to Azure.
:type credentials: :mod:`A msrestazure Credentials
object<msrestazure.azure_active_directory>`
:param subscription_id: Azure Subscription ID.
:type subscription_id: str
:param location: Resource location.
:type location: str
:param str base_url: Service URL
"""

def __init__(
self, credentials, subscription_id, location, base_url=None):
self, credentials, subscription_id, base_url=None):

self.config = CognitiveServicesManagementClientConfiguration(credentials, subscription_id, location, base_url)
self.config = CognitiveServicesManagementClientConfiguration(credentials, subscription_id, base_url)
self._client = ServiceClient(self.config.credentials, self.config)

client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)}
self.api_version = '2017-04-18'
self._serialize = Serializer(client_models)
self._deserialize = Deserializer(client_models)

self.cognitive_services_accounts = CognitiveServicesAccountsOperations(
self._client, self.config, self._serialize, self._deserialize)
self.accounts = AccountsOperations(
self._client, self.config, self._serialize, self._deserialize)
self.operations = Operations(
Expand Down
Empty file.
15 changes: 10 additions & 5 deletions ...cognitiveservices/azure/mgmt/cognitiveservices/models/check_sku_availability_parameter.py
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -16,25 +16,30 @@ class CheckSkuAvailabilityParameter(Model):
"""Check SKU availability parameter.

:param skus: The SKU of the resource.
:type skus: list of :class:`Sku <azure.mgmt.cognitiveservices.models.Sku>`
:type skus: list[str or ~azure.mgmt.cognitiveservices.models.SkuName]
:param kind: The Kind of the resource. Possible values include:
'Academic', 'Bing.Autosuggest', 'Bing.Search', 'Bing.Speech',
'Bing.SpellCheck', 'ComputerVision', 'ContentModerator', 'CustomSpeech',
'Emotion', 'Face', 'LUIS', 'Recommendations', 'SpeakerRecognition',
'Speech', 'SpeechTranslation', 'TextAnalytics', 'TextTranslation', 'WebLM'
:type kind: str or :class:`Kind
<azure.mgmt.cognitiveservices.models.Kind>`
:type kind: str or ~azure.mgmt.cognitiveservices.models.Kind
:param type: The Type of the resource.
:type type: str
"""

_validation = {
'skus': {'required': True},
'kind': {'required': True},
'type': {'required': True},
}

_attribute_map = {
'skus': {'key': 'skus', 'type': '[Sku]'},
'skus': {'key': 'skus', 'type': '[str]'},
'kind': {'key': 'kind', 'type': 'str'},
'type': {'key': 'type', 'type': 'str'},
}

def __init__(self, skus=None, kind=None, type=None):
def __init__(self, skus, kind, type):
self.skus = skus
self.kind = kind
self.type = type
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@ class CheckSkuAvailabilityResult(Model):
'Bing.SpellCheck', 'ComputerVision', 'ContentModerator', 'CustomSpeech',
'Emotion', 'Face', 'LUIS', 'Recommendations', 'SpeakerRecognition',
'Speech', 'SpeechTranslation', 'TextAnalytics', 'TextTranslation', 'WebLM'
:type kind: str or :class:`Kind
<azure.mgmt.cognitiveservices.models.Kind>`
:type kind: str or ~azure.mgmt.cognitiveservices.models.Kind
:param type: The Type of the resource.
:type type: str
:param sku_name: The SKU of Cognitive Services account.
:type sku_name: :class:`Sku <azure.mgmt.cognitiveservices.models.Sku>`
:param sku_name: The SKU of Cognitive Services account. Possible values
include: 'F0', 'P0', 'P1', 'P2', 'S0', 'S1', 'S2', 'S3', 'S4', 'S5', 'S6'
:type sku_name: str or ~azure.mgmt.cognitiveservices.models.SkuName
:param sku_available: Indicates the given SKU is available or not.
:type sku_available: bool
:param reason: Reason why the SKU is not available.
Expand All @@ -37,7 +37,7 @@ class CheckSkuAvailabilityResult(Model):
_attribute_map = {
'kind': {'key': 'kind', 'type': 'str'},
'type': {'key': 'type', 'type': 'str'},
'sku_name': {'key': 'skuName', 'type': 'Sku'},
'sku_name': {'key': 'skuName', 'type': 'str'},
'sku_available': {'key': 'skuAvailable', 'type': 'bool'},
'reason': {'key': 'reason', 'type': 'str'},
'message': {'key': 'message', 'type': 'str'},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ class CheckSkuAvailabilityResultList(Model):
"""Check SKU availability result list.

:param value: Check SKU availability result list.
:type value: list of :class:`CheckSkuAvailabilityResult
<azure.mgmt.cognitiveservices.models.CheckSkuAvailabilityResult>`
:type value:
list[~azure.mgmt.cognitiveservices.models.CheckSkuAvailabilityResult]
"""

_attribute_map = {
Expand Down
31 changes: 17 additions & 14 deletions ...-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/cognitive_services_account.py
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -21,37 +21,40 @@ class CognitiveServicesAccount(Model):

:param etag: Entity Tag
:type etag: str
:param id: The id of the created account
:type id: str
:ivar id: The id of the created account
:vartype id: str
:param kind: Type of cognitive service account.
:type kind: str
:param location: The location of the resource
:type location: str
:param name: The name of the created account
:type name: str
:ivar name: The name of the created account
:vartype name: str
:ivar provisioning_state: Gets the status of the cognitive services
account at the time the operation was called. Possible values include:
'Creating', 'ResolvingDNS', 'Succeeded', 'Failed'
:vartype provisioning_state: str or :class:`ProvisioningState
<azure.mgmt.cognitiveservices.models.ProvisioningState>`
:vartype provisioning_state: str or
~azure.mgmt.cognitiveservices.models.ProvisioningState
:param endpoint: Endpoint of the created account.
:type endpoint: str
:param internal_id: The internal identifier.
:type internal_id: str
:param sku: The SKU of Cognitive Services account.
:type sku: :class:`Sku <azure.mgmt.cognitiveservices.models.Sku>`
:type sku: ~azure.mgmt.cognitiveservices.models.Sku
:param tags: Gets or sets a list of key value pairs that describe the
resource. These tags can be used in viewing and grouping this resource
(across resource groups). A maximum of 15 tags can be provided for a
resource. Each tag must have a key no greater than 128 characters and
value no greater than 256 characters.
:type tags: dict
:param type: Resource type
:type type: str
:type tags: dict[str, str]
:ivar type: Resource type
:vartype type: str
"""

_validation = {
'id': {'readonly': True},
'name': {'readonly': True},
'provisioning_state': {'readonly': True},
'type': {'readonly': True},
}

_attribute_map = {
Expand All @@ -68,15 +71,15 @@ class CognitiveServicesAccount(Model):
'type': {'key': 'type', 'type': 'str'},
}

def __init__(self, etag=None, id=None, kind=None, location=None, name=None, endpoint=None, internal_id=None, sku=None, tags=None, type=None):
def __init__(self, etag=None, kind=None, location=None, endpoint=None, internal_id=None, sku=None, tags=None):
self.etag = etag
self.id = id
self.id = None
self.kind = kind
self.location = location
self.name = name
self.name = None
self.provisioning_state = None
self.endpoint = endpoint
self.internal_id = internal_id
self.sku = sku
self.tags = tags
self.type = type
self.type = None
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,14 @@ class CognitiveServicesAccountCreateParameters(Model):
"""The parameters to provide for the account.

:param sku: Required. Gets or sets the SKU of the resource.
:type sku: :class:`Sku <azure.mgmt.cognitiveservices.models.Sku>`
:type sku: ~azure.mgmt.cognitiveservices.models.Sku
:param kind: Required. Gets or sets the Kind of the resource. Possible
values include: 'Academic', 'Bing.Autosuggest', 'Bing.Search',
'Bing.Speech', 'Bing.SpellCheck', 'ComputerVision', 'ContentModerator',
'CustomSpeech', 'Emotion', 'Face', 'LUIS', 'Recommendations',
'SpeakerRecognition', 'Speech', 'SpeechTranslation', 'TextAnalytics',
'TextTranslation', 'WebLM'
:type kind: str or :class:`Kind
<azure.mgmt.cognitiveservices.models.Kind>`
:type kind: str or ~azure.mgmt.cognitiveservices.models.Kind
:param location: Required. Gets or sets the location of the resource. This
will be one of the supported and registered Azure Geo Regions (e.g. West
US, East US, Southeast Asia, etc.). The geo region of a resource cannot be
Expand All @@ -36,7 +35,7 @@ class CognitiveServicesAccountCreateParameters(Model):
(across resource groups). A maximum of 15 tags can be provided for a
resource. Each tag must have a key no greater than 128 characters and
value no greater than 256 characters.
:type tags: dict
:type tags: dict[str, str]
:param properties: Must exist in the request. Must be an empty object.
Must not be null.
:type properties: object
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ class CognitiveServicesAccountEnumerateSkusResult(Model):

:ivar value: Gets the list of Cognitive Services accounts and their
properties.
:vartype value: list of :class:`CognitiveServicesResourceAndSku
<azure.mgmt.cognitiveservices.models.CognitiveServicesResourceAndSku>`
:vartype value:
list[~azure.mgmt.cognitiveservices.models.CognitiveServicesResourceAndSku]
"""

_validation = {
Expand Down
Empty file.
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

class CognitiveServicesAccountPaged(Paged):
"""
A paging container for iterating over a list of CognitiveServicesAccount object
A paging container for iterating over a list of :class:`CognitiveServicesAccount <azure.mgmt.cognitiveservices.models.CognitiveServicesAccount>` object
"""

_attribute_map = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@ class CognitiveServicesAccountUpdateParameters(Model):
"""The parameters to provide for the account.

:param sku: Gets or sets the SKU of the resource.
:type sku: :class:`Sku <azure.mgmt.cognitiveservices.models.Sku>`
:type sku: ~azure.mgmt.cognitiveservices.models.Sku
:param tags: Gets or sets a list of key value pairs that describe the
resource. These tags can be used in viewing and grouping this resource
(across resource groups). A maximum of 15 tags can be provided for a
resource. Each tag must have a key no greater than 128 characters and
value no greater than 256 characters.
:type tags: dict
:type tags: dict[str, str]
"""

_attribute_map = {
Expand Down
Empty file.
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class CognitiveServicesResourceAndSku(Model):
:param resource_type: Resource Namespace and Type
:type resource_type: str
:param sku: The SKU of Cognitive Services account.
:type sku: :class:`Sku <azure.mgmt.cognitiveservices.models.Sku>`
:type sku: ~azure.mgmt.cognitiveservices.models.Sku
"""

_attribute_map = {
Expand Down
3 changes: 1 addition & 2 deletions azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/error.py
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@ class Error(Model):
"""Cognitive Services error object.

:param error: The error body.
:type error: :class:`ErrorBody
<azure.mgmt.cognitiveservices.models.ErrorBody>`
:type error: ~azure.mgmt.cognitiveservices.models.ErrorBody
"""

_attribute_map = {
Expand Down
Empty file.
Empty file.
3 changes: 1 addition & 2 deletions azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/operation_entity.py
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@ class OperationEntity(Model):
:param name: Operation name: {provider}/{resource}/{operation}.
:type name: str
:param display: The operation supported by Cognitive Services.
:type display: :class:`OperationDisplayInfo
<azure.mgmt.cognitiveservices.models.OperationDisplayInfo>`
:type display: ~azure.mgmt.cognitiveservices.models.OperationDisplayInfo
:param origin: The origin of the operation.
:type origin: str
:param properties: Additional properties.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

class OperationEntityPaged(Paged):
"""
A paging container for iterating over a list of OperationEntity object
A paging container for iterating over a list of :class:`OperationEntity <azure.mgmt.cognitiveservices.models.OperationEntity>` object
"""

_attribute_map = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,16 @@ class RegenerateKeyParameters(Model):

:param key_name: key name to generate (Key1|Key2). Possible values
include: 'Key1', 'Key2'
:type key_name: str or :class:`KeyName
<azure.mgmt.cognitiveservices.models.KeyName>`
:type key_name: str or ~azure.mgmt.cognitiveservices.models.KeyName
"""

_validation = {
'key_name': {'required': True},
}

_attribute_map = {
'key_name': {'key': 'keyName', 'type': 'KeyName'},
}

def __init__(self, key_name=None):
def __init__(self, key_name):
self.key_name = key_name
6 changes: 2 additions & 4 deletions azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/sku.py
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,10 @@ class Sku(Model):
:param name: Gets or sets the sku name. Required for account creation,
optional for update. Possible values include: 'F0', 'P0', 'P1', 'P2',
'S0', 'S1', 'S2', 'S3', 'S4', 'S5', 'S6'
:type name: str or :class:`SkuName
<azure.mgmt.cognitiveservices.models.SkuName>`
:type name: str or ~azure.mgmt.cognitiveservices.models.SkuName
:ivar tier: Gets the sku tier. This is based on the SKU name. Possible
values include: 'Free', 'Standard', 'Premium'
:vartype tier: str or :class:`SkuTier
<azure.mgmt.cognitiveservices.models.SkuTier>`
:vartype tier: str or ~azure.mgmt.cognitiveservices.models.SkuTier
"""

_validation = {
Expand Down
2 changes: 0 additions & 2 deletions azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/operations/__init__.py
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,11 @@
# regenerated.
# --------------------------------------------------------------------------

from .cognitive_services_accounts_operations import CognitiveServicesAccountsOperations
from .accounts_operations import AccountsOperations
from .operations import Operations
from .check_sku_availability_operations import CheckSkuAvailabilityOperations

__all__ = [
'CognitiveServicesAccountsOperations',
'AccountsOperations',
'Operations',
'CheckSkuAvailabilityOperations',
Expand Down
Loading