Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[AutoPR] cognitiveservices/resource-manager #3761

Merged
merged 8 commits into from
May 1, 2019
17 changes: 15 additions & 2 deletions azure-mgmt-cognitiveservices/HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,19 @@
Release History
===============

4.0.0 (2019-05-01)
++++++++++++++++++

**Features**

- Model CognitiveServicesAccount has a new parameter custom_sub_domain_name
- Model CognitiveServicesAccountUpdateParameters has a new parameter properties
- Operation AccountsOperations.update now takes optional properties

**Breaking changes**

- Remove limited enum Kind and SkuName. Replace all usage by a simple string (e.g. "Bing.SpellCheck.v7")

3.0.0 (2018-05-21)
++++++++++++++++++

Expand All @@ -24,7 +37,7 @@ This version uses a next-generation code generator that *might* introduce breaki

- Return type changes from `msrestazure.azure_operation.AzureOperationPoller` to `msrest.polling.LROPoller`. External API is the same.
- Return type is now **always** a `msrest.polling.LROPoller`, regardless of the optional parameters used.
- The behavior has changed when using `raw=True`. Instead of returning the initial call result as `ClientRawResponse`,
- The behavior has changed when using `raw=True`. Instead of returning the initial call result as `ClientRawResponse`,
without polling, now this returns an LROPoller. After polling, the final resource will be returned as a `ClientRawResponse`.
- New `polling` parameter. The default behavior is `Polling=True` which will poll using ARM algorithm. When `Polling=False`,
the response of the initial call will be returned without polling.
Expand Down Expand Up @@ -62,4 +75,4 @@ This version uses a next-generation code generator that *might* introduce breaki
+++++++++++++++++++

* Initial Release (ApiVersion 2017-04-18)
* This wheel package is now built with the azure wheel extension
* This wheel package is now built with the azure wheel extension
4 changes: 4 additions & 0 deletions azure-mgmt-cognitiveservices/MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
recursive-include tests *.py *.yaml
include *.rst
include azure/__init__.py
include azure/mgmt/__init__.py

19 changes: 0 additions & 19 deletions azure-mgmt-cognitiveservices/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,25 +14,6 @@ For the older Azure Service Management (ASM) libraries, see
For a more complete set of Azure libraries, see the `azure <https://pypi.python.org/pypi/azure>`__ bundle package.


Compatibility
=============

**IMPORTANT**: If you have an earlier version of the azure package
(version < 1.0), you should uninstall it before installing this package.

You can check the version using pip:

.. code:: shell

pip freeze

If you see azure==0.11.0 (or any version below 1.0), uninstall it first:

.. code:: shell

pip uninstall azure


Usage
=====

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,7 @@
from .resource_sku_paged import ResourceSkuPaged
from .operation_entity_paged import OperationEntityPaged
from .cognitive_services_management_client_enums import (
SkuName,
SkuTier,
Kind,
ProvisioningState,
KeyName,
UnitType,
Expand Down Expand Up @@ -93,9 +91,7 @@
'CognitiveServicesAccountPaged',
'ResourceSkuPaged',
'OperationEntityPaged',
'SkuName',
'SkuTier',
'Kind',
'ProvisioningState',
'KeyName',
'UnitType',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,9 @@ class CheckSkuAvailabilityParameter(Model):
All required parameters must be populated in order to send to Azure.

:param skus: Required. The SKU of the resource.
:type skus: list[str or ~azure.mgmt.cognitiveservices.models.SkuName]
:param kind: Required. The Kind of the resource. Possible values include:
'Bing.Autosuggest.v7', 'Bing.CustomSearch', 'Bing.Search.v7',
'Bing.Speech', 'Bing.SpellCheck.v7', 'ComputerVision', 'ContentModerator',
'CustomSpeech', 'CustomVision.Prediction', 'CustomVision.Training',
'Emotion', 'Face', 'LUIS', 'QnAMaker', 'SpeakerRecognition',
'SpeechTranslation', 'TextAnalytics', 'TextTranslation', 'WebLM'
:type kind: str or ~azure.mgmt.cognitiveservices.models.Kind
:type skus: list[str]
:param kind: Required. The Kind of the resource.
:type kind: str
:param type: Required. The Type of the resource.
:type type: str
"""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,9 @@ class CheckSkuAvailabilityParameter(Model):
All required parameters must be populated in order to send to Azure.

:param skus: Required. The SKU of the resource.
:type skus: list[str or ~azure.mgmt.cognitiveservices.models.SkuName]
:param kind: Required. The Kind of the resource. Possible values include:
'Bing.Autosuggest.v7', 'Bing.CustomSearch', 'Bing.Search.v7',
'Bing.Speech', 'Bing.SpellCheck.v7', 'ComputerVision', 'ContentModerator',
'CustomSpeech', 'CustomVision.Prediction', 'CustomVision.Training',
'Emotion', 'Face', 'LUIS', 'QnAMaker', 'SpeakerRecognition',
'SpeechTranslation', 'TextAnalytics', 'TextTranslation', 'WebLM'
:type kind: str or ~azure.mgmt.cognitiveservices.models.Kind
:type skus: list[str]
:param kind: Required. The Kind of the resource.
:type kind: str
:param type: Required. The Type of the resource.
:type type: str
"""
Expand All @@ -42,7 +37,7 @@ class CheckSkuAvailabilityParameter(Model):
'type': {'key': 'type', 'type': 'str'},
}

def __init__(self, *, skus, kind, type: str, **kwargs) -> None:
def __init__(self, *, skus, kind: str, type: str, **kwargs) -> None:
super(CheckSkuAvailabilityParameter, self).__init__(**kwargs)
self.skus = skus
self.kind = kind
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,12 @@
class CheckSkuAvailabilityResult(Model):
"""Check SKU availability result.

:param kind: The Kind of the resource. Possible values include:
'Bing.Autosuggest.v7', 'Bing.CustomSearch', 'Bing.Search.v7',
'Bing.Speech', 'Bing.SpellCheck.v7', 'ComputerVision', 'ContentModerator',
'CustomSpeech', 'CustomVision.Prediction', 'CustomVision.Training',
'Emotion', 'Face', 'LUIS', 'QnAMaker', 'SpeakerRecognition',
'SpeechTranslation', 'TextAnalytics', 'TextTranslation', 'WebLM'
:type kind: str or ~azure.mgmt.cognitiveservices.models.Kind
:param kind: The Kind of the resource.
:type kind: str
:param type: The Type of the resource.
:type type: str
: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_name: The SKU of Cognitive Services account.
:type sku_name: str
: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 Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,12 @@
class CheckSkuAvailabilityResult(Model):
"""Check SKU availability result.

:param kind: The Kind of the resource. Possible values include:
'Bing.Autosuggest.v7', 'Bing.CustomSearch', 'Bing.Search.v7',
'Bing.Speech', 'Bing.SpellCheck.v7', 'ComputerVision', 'ContentModerator',
'CustomSpeech', 'CustomVision.Prediction', 'CustomVision.Training',
'Emotion', 'Face', 'LUIS', 'QnAMaker', 'SpeakerRecognition',
'SpeechTranslation', 'TextAnalytics', 'TextTranslation', 'WebLM'
:type kind: str or ~azure.mgmt.cognitiveservices.models.Kind
:param kind: The Kind of the resource.
:type kind: str
:param type: The Type of the resource.
:type type: str
: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_name: The SKU of Cognitive Services account.
:type sku_name: str
: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 @@ -44,7 +38,7 @@ class CheckSkuAvailabilityResult(Model):
'message': {'key': 'message', 'type': 'str'},
}

def __init__(self, *, kind=None, type: str=None, sku_name=None, sku_available: bool=None, reason: str=None, message: str=None, **kwargs) -> None:
def __init__(self, *, kind: str=None, type: str=None, sku_name: str=None, sku_available: bool=None, reason: str=None, message: str=None, **kwargs) -> None:
super(CheckSkuAvailabilityResult, self).__init__(**kwargs)
self.kind = kind
self.type = type
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@ class CognitiveServicesAccount(Model):
:type endpoint: str
:param internal_id: The internal identifier.
:type internal_id: str
:param custom_sub_domain_name: Optional subdomain name used for
token-based authentication.
:type custom_sub_domain_name: str
:param sku: The SKU of Cognitive Services account.
:type sku: ~azure.mgmt.cognitiveservices.models.Sku
:param tags: Gets or sets a list of key value pairs that describe the
Expand Down Expand Up @@ -66,6 +69,7 @@ class CognitiveServicesAccount(Model):
'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'},
'endpoint': {'key': 'properties.endpoint', 'type': 'str'},
'internal_id': {'key': 'properties.internalId', 'type': 'str'},
'custom_sub_domain_name': {'key': 'properties.customSubDomainName', 'type': 'str'},
'sku': {'key': 'sku', 'type': 'Sku'},
'tags': {'key': 'tags', 'type': '{str}'},
'type': {'key': 'type', 'type': 'str'},
Expand All @@ -81,6 +85,7 @@ def __init__(self, **kwargs):
self.provisioning_state = None
self.endpoint = kwargs.get('endpoint', None)
self.internal_id = kwargs.get('internal_id', None)
self.custom_sub_domain_name = kwargs.get('custom_sub_domain_name', None)
self.sku = kwargs.get('sku', None)
self.tags = kwargs.get('tags', None)
self.type = None
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,7 @@ class CognitiveServicesAccountCreateParameters(Model):
:param sku: Required. Required. Gets or sets the SKU of the resource.
:type sku: ~azure.mgmt.cognitiveservices.models.Sku
:param kind: Required. Required. Gets or sets the Kind of the resource.
Possible values include: 'Bing.Autosuggest.v7', 'Bing.CustomSearch',
'Bing.Search.v7', 'Bing.Speech', 'Bing.SpellCheck.v7', 'ComputerVision',
'ContentModerator', 'CustomSpeech', 'CustomVision.Prediction',
'CustomVision.Training', 'Emotion', 'Face', 'LUIS', 'QnAMaker',
'SpeakerRecognition', 'SpeechTranslation', 'TextAnalytics',
'TextTranslation', 'WebLM'
:type kind: str or ~azure.mgmt.cognitiveservices.models.Kind
:type kind: str
:param location: Required. 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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,7 @@ class CognitiveServicesAccountCreateParameters(Model):
:param sku: Required. Required. Gets or sets the SKU of the resource.
:type sku: ~azure.mgmt.cognitiveservices.models.Sku
:param kind: Required. Required. Gets or sets the Kind of the resource.
Possible values include: 'Bing.Autosuggest.v7', 'Bing.CustomSearch',
'Bing.Search.v7', 'Bing.Speech', 'Bing.SpellCheck.v7', 'ComputerVision',
'ContentModerator', 'CustomSpeech', 'CustomVision.Prediction',
'CustomVision.Training', 'Emotion', 'Face', 'LUIS', 'QnAMaker',
'SpeakerRecognition', 'SpeechTranslation', 'TextAnalytics',
'TextTranslation', 'WebLM'
:type kind: str or ~azure.mgmt.cognitiveservices.models.Kind
:type kind: str
:param location: Required. 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
Expand Down Expand Up @@ -59,7 +53,7 @@ class CognitiveServicesAccountCreateParameters(Model):
'properties': {'key': 'properties', 'type': 'object'},
}

def __init__(self, *, sku, kind, location: str, properties, tags=None, **kwargs) -> None:
def __init__(self, *, sku, kind: str, location: str, properties, tags=None, **kwargs) -> None:
super(CognitiveServicesAccountCreateParameters, self).__init__(**kwargs)
self.sku = sku
self.kind = kind
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@ class CognitiveServicesAccount(Model):
:type endpoint: str
:param internal_id: The internal identifier.
:type internal_id: str
:param custom_sub_domain_name: Optional subdomain name used for
token-based authentication.
:type custom_sub_domain_name: str
:param sku: The SKU of Cognitive Services account.
:type sku: ~azure.mgmt.cognitiveservices.models.Sku
:param tags: Gets or sets a list of key value pairs that describe the
Expand Down Expand Up @@ -66,12 +69,13 @@ class CognitiveServicesAccount(Model):
'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'},
'endpoint': {'key': 'properties.endpoint', 'type': 'str'},
'internal_id': {'key': 'properties.internalId', 'type': 'str'},
'custom_sub_domain_name': {'key': 'properties.customSubDomainName', 'type': 'str'},
'sku': {'key': 'sku', 'type': 'Sku'},
'tags': {'key': 'tags', 'type': '{str}'},
'type': {'key': 'type', 'type': 'str'},
}

def __init__(self, *, etag: str=None, kind: str=None, location: str=None, endpoint: str=None, internal_id: str=None, sku=None, tags=None, **kwargs) -> None:
def __init__(self, *, etag: str=None, kind: str=None, location: str=None, endpoint: str=None, internal_id: str=None, custom_sub_domain_name: str=None, sku=None, tags=None, **kwargs) -> None:
super(CognitiveServicesAccount, self).__init__(**kwargs)
self.etag = etag
self.id = None
Expand All @@ -81,6 +85,7 @@ def __init__(self, *, etag: str=None, kind: str=None, location: str=None, endpoi
self.provisioning_state = None
self.endpoint = endpoint
self.internal_id = internal_id
self.custom_sub_domain_name = custom_sub_domain_name
self.sku = sku
self.tags = tags
self.type = None
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,19 @@ class CognitiveServicesAccountUpdateParameters(Model):
resource. Each tag must have a key no greater than 128 characters and
value no greater than 256 characters.
:type tags: dict[str, str]
:param properties: Additional properties for Account. Only provided fields
will be updated.
:type properties: object
"""

_attribute_map = {
'sku': {'key': 'sku', 'type': 'Sku'},
'tags': {'key': 'tags', 'type': '{str}'},
'properties': {'key': 'properties', 'type': 'object'},
}

def __init__(self, **kwargs):
super(CognitiveServicesAccountUpdateParameters, self).__init__(**kwargs)
self.sku = kwargs.get('sku', None)
self.tags = kwargs.get('tags', None)
self.properties = kwargs.get('properties', None)
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,19 @@ class CognitiveServicesAccountUpdateParameters(Model):
resource. Each tag must have a key no greater than 128 characters and
value no greater than 256 characters.
:type tags: dict[str, str]
:param properties: Additional properties for Account. Only provided fields
will be updated.
:type properties: object
"""

_attribute_map = {
'sku': {'key': 'sku', 'type': 'Sku'},
'tags': {'key': 'tags', 'type': '{str}'},
'properties': {'key': 'properties', 'type': 'object'},
}

def __init__(self, *, sku=None, tags=None, **kwargs) -> None:
def __init__(self, *, sku=None, tags=None, properties=None, **kwargs) -> None:
super(CognitiveServicesAccountUpdateParameters, self).__init__(**kwargs)
self.sku = sku
self.tags = tags
self.properties = properties
Original file line number Diff line number Diff line change
Expand Up @@ -12,51 +12,13 @@
from enum import Enum


class SkuName(str, Enum):

f0 = "F0"
p0 = "P0"
p1 = "P1"
p2 = "P2"
s0 = "S0"
s1 = "S1"
s2 = "S2"
s3 = "S3"
s4 = "S4"
s5 = "S5"
s6 = "S6"


class SkuTier(str, Enum):

free = "Free"
standard = "Standard"
premium = "Premium"


class Kind(str, Enum):

bing_autosuggestv7 = "Bing.Autosuggest.v7"
bing_custom_search = "Bing.CustomSearch"
bing_searchv7 = "Bing.Search.v7"
bing_speech = "Bing.Speech"
bing_spell_checkv7 = "Bing.SpellCheck.v7"
computer_vision = "ComputerVision"
content_moderator = "ContentModerator"
custom_speech = "CustomSpeech"
custom_vision_prediction = "CustomVision.Prediction"
custom_vision_training = "CustomVision.Training"
emotion = "Emotion"
face = "Face"
luis = "LUIS"
qn_amaker = "QnAMaker"
speaker_recognition = "SpeakerRecognition"
speech_translation = "SpeechTranslation"
text_analytics = "TextAnalytics"
text_translation = "TextTranslation"
web_lm = "WebLM"


class ProvisioningState(str, Enum):

creating = "Creating"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,8 @@ class Sku(Model):
All required parameters must be populated in order to send to Azure.

:param name: Required. 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 ~azure.mgmt.cognitiveservices.models.SkuName
creation, optional for update.
:type name: str
:ivar tier: Gets the sku tier. This is based on the SKU name. Possible
values include: 'Free', 'Standard', 'Premium'
:vartype tier: str or ~azure.mgmt.cognitiveservices.models.SkuTier
Expand Down
Loading