Skip to content

Commit

Permalink
Generated from 8135b46c7d113104fd2450aee6f7566d83954417 (#4070)
Browse files Browse the repository at this point in the history
Change Kind and SKU name to string (from enum).
  • Loading branch information
AutorestCI authored Dec 14, 2018
1 parent 41377ec commit 41a70e6
Show file tree
Hide file tree
Showing 11 changed files with 27 additions and 111 deletions.
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 @@ -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 @@ -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
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 All @@ -39,7 +38,7 @@ class Sku(Model):
'tier': {'key': 'tier', 'type': 'SkuTier'},
}

def __init__(self, *, name, **kwargs) -> None:
def __init__(self, *, name: str, **kwargs) -> None:
super(Sku, self).__init__(**kwargs)
self.name = name
self.tier = None
Original file line number Diff line number Diff line change
Expand Up @@ -44,15 +44,9 @@ def list(
:param location: Resource location.
:type location: str
:param skus: The SKU of the resource.
:type skus: list[str or ~azure.mgmt.cognitiveservices.models.SkuName]
: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
:type skus: list[str]
:param kind: The Kind of the resource.
:type kind: str
:param type: The Type of the resource.
:type type: str
:param dict custom_headers: headers that will be added to the request
Expand Down

0 comments on commit 41a70e6

Please sign in to comment.