Skip to content

Commit

Permalink
Generated from 7a1976a9842c462ccb967f734612f1257b429ca0 (#2314)
Browse files Browse the repository at this point in the history
Make filter a method paramter
  • Loading branch information
AutorestCI committed May 2, 2018
1 parent 215a44f commit 6adfd65
Show file tree
Hide file tree
Showing 42 changed files with 1,257 additions and 145 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ def __init__(

super(CognitiveServicesManagementClientConfiguration, self).__init__(base_url)

self.add_user_agent('cognitiveservicesmanagementclient/{}'.format(VERSION))
self.add_user_agent('azure-mgmt-cognitiveservices/{}'.format(VERSION))
self.add_user_agent('Azure-SDK-For-Python')

self.credentials = credentials
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,21 +9,44 @@
# regenerated.
# --------------------------------------------------------------------------

from .sku import Sku
from .cognitive_services_account_create_parameters import CognitiveServicesAccountCreateParameters
from .cognitive_services_account_update_parameters import CognitiveServicesAccountUpdateParameters
from .cognitive_services_account import CognitiveServicesAccount
from .cognitive_services_account_keys import CognitiveServicesAccountKeys
from .regenerate_key_parameters import RegenerateKeyParameters
from .cognitive_services_resource_and_sku import CognitiveServicesResourceAndSku
from .cognitive_services_account_enumerate_skus_result import CognitiveServicesAccountEnumerateSkusResult
from .error_body import ErrorBody
from .error import Error, ErrorException
from .operation_display_info import OperationDisplayInfo
from .operation_entity import OperationEntity
from .check_sku_availability_parameter import CheckSkuAvailabilityParameter
from .check_sku_availability_result import CheckSkuAvailabilityResult
from .check_sku_availability_result_list import CheckSkuAvailabilityResultList
try:
from .sku_py3 import Sku
from .cognitive_services_account_create_parameters_py3 import CognitiveServicesAccountCreateParameters
from .cognitive_services_account_update_parameters_py3 import CognitiveServicesAccountUpdateParameters
from .cognitive_services_account_py3 import CognitiveServicesAccount
from .cognitive_services_account_keys_py3 import CognitiveServicesAccountKeys
from .regenerate_key_parameters_py3 import RegenerateKeyParameters
from .cognitive_services_resource_and_sku_py3 import CognitiveServicesResourceAndSku
from .cognitive_services_account_enumerate_skus_result_py3 import CognitiveServicesAccountEnumerateSkusResult
from .metric_name_py3 import MetricName
from .usage_py3 import Usage
from .usages_result_py3 import UsagesResult
from .error_body_py3 import ErrorBody
from .error_py3 import Error, ErrorException
from .operation_display_info_py3 import OperationDisplayInfo
from .operation_entity_py3 import OperationEntity
from .check_sku_availability_parameter_py3 import CheckSkuAvailabilityParameter
from .check_sku_availability_result_py3 import CheckSkuAvailabilityResult
from .check_sku_availability_result_list_py3 import CheckSkuAvailabilityResultList
except (SyntaxError, ImportError):
from .sku import Sku
from .cognitive_services_account_create_parameters import CognitiveServicesAccountCreateParameters
from .cognitive_services_account_update_parameters import CognitiveServicesAccountUpdateParameters
from .cognitive_services_account import CognitiveServicesAccount
from .cognitive_services_account_keys import CognitiveServicesAccountKeys
from .regenerate_key_parameters import RegenerateKeyParameters
from .cognitive_services_resource_and_sku import CognitiveServicesResourceAndSku
from .cognitive_services_account_enumerate_skus_result import CognitiveServicesAccountEnumerateSkusResult
from .metric_name import MetricName
from .usage import Usage
from .usages_result import UsagesResult
from .error_body import ErrorBody
from .error import Error, ErrorException
from .operation_display_info import OperationDisplayInfo
from .operation_entity import OperationEntity
from .check_sku_availability_parameter import CheckSkuAvailabilityParameter
from .check_sku_availability_result import CheckSkuAvailabilityResult
from .check_sku_availability_result_list import CheckSkuAvailabilityResultList
from .cognitive_services_account_paged import CognitiveServicesAccountPaged
from .operation_entity_paged import OperationEntityPaged
from .cognitive_services_management_client_enums import (
Expand All @@ -32,6 +55,8 @@
Kind,
ProvisioningState,
KeyName,
UnitType,
QuotaUsageStatus,
)

__all__ = [
Expand All @@ -43,6 +68,9 @@
'RegenerateKeyParameters',
'CognitiveServicesResourceAndSku',
'CognitiveServicesAccountEnumerateSkusResult',
'MetricName',
'Usage',
'UsagesResult',
'ErrorBody',
'Error', 'ErrorException',
'OperationDisplayInfo',
Expand All @@ -57,4 +85,6 @@
'Kind',
'ProvisioningState',
'KeyName',
'UnitType',
'QuotaUsageStatus',
]
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,18 @@
class CheckSkuAvailabilityParameter(Model):
"""Check SKU availability parameter.
:param skus: The SKU of the resource.
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: 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'
: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
:param type: The Type of the resource.
:param type: Required. The Type of the resource.
:type type: str
"""

Expand All @@ -39,7 +42,8 @@ class CheckSkuAvailabilityParameter(Model):
'type': {'key': 'type', 'type': 'str'},
}

def __init__(self, skus, kind, type):
self.skus = skus
self.kind = kind
self.type = type
def __init__(self, **kwargs):
super(CheckSkuAvailabilityParameter, self).__init__(**kwargs)
self.skus = kwargs.get('skus', None)
self.kind = kwargs.get('kind', None)
self.type = kwargs.get('type', None)
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.
# --------------------------------------------------------------------------

from msrest.serialization import Model


class CheckSkuAvailabilityParameter(Model):
"""Check SKU availability parameter.
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
:param type: Required. The Type of the resource.
:type type: str
"""

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

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

def __init__(self, *, skus, kind, type: str, **kwargs) -> None:
super(CheckSkuAvailabilityParameter, self).__init__(**kwargs)
self.skus = skus
self.kind = kind
self.type = type
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,11 @@ class CheckSkuAvailabilityResult(Model):
"""Check SKU availability result.
: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'
'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 type: The Type of the resource.
:type type: str
Expand All @@ -43,10 +44,11 @@ class CheckSkuAvailabilityResult(Model):
'message': {'key': 'message', 'type': 'str'},
}

def __init__(self, kind=None, type=None, sku_name=None, sku_available=None, reason=None, message=None):
self.kind = kind
self.type = type
self.sku_name = sku_name
self.sku_available = sku_available
self.reason = reason
self.message = message
def __init__(self, **kwargs):
super(CheckSkuAvailabilityResult, self).__init__(**kwargs)
self.kind = kwargs.get('kind', None)
self.type = kwargs.get('type', None)
self.sku_name = kwargs.get('sku_name', None)
self.sku_available = kwargs.get('sku_available', None)
self.reason = kwargs.get('reason', None)
self.message = kwargs.get('message', None)
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,6 @@ class CheckSkuAvailabilityResultList(Model):
'value': {'key': 'value', 'type': '[CheckSkuAvailabilityResult]'},
}

def __init__(self, value=None):
self.value = value
def __init__(self, **kwargs):
super(CheckSkuAvailabilityResultList, self).__init__(**kwargs)
self.value = kwargs.get('value', None)
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.
# --------------------------------------------------------------------------

from msrest.serialization import Model


class CheckSkuAvailabilityResultList(Model):
"""Check SKU availability result list.
:param value: Check SKU availability result list.
:type value:
list[~azure.mgmt.cognitiveservices.models.CheckSkuAvailabilityResult]
"""

_attribute_map = {
'value': {'key': 'value', 'type': '[CheckSkuAvailabilityResult]'},
}

def __init__(self, *, value=None, **kwargs) -> None:
super(CheckSkuAvailabilityResultList, self).__init__(**kwargs)
self.value = value
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.
# --------------------------------------------------------------------------

from msrest.serialization import Model


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 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_available: Indicates the given SKU is available or not.
:type sku_available: bool
:param reason: Reason why the SKU is not available.
:type reason: str
:param message: Additional error message.
:type message: str
"""

_attribute_map = {
'kind': {'key': 'kind', 'type': 'str'},
'type': {'key': 'type', 'type': 'str'},
'sku_name': {'key': 'skuName', 'type': 'str'},
'sku_available': {'key': 'skuAvailable', 'type': 'bool'},
'reason': {'key': 'reason', 'type': 'str'},
'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:
super(CheckSkuAvailabilityResult, self).__init__(**kwargs)
self.kind = kind
self.type = type
self.sku_name = sku_name
self.sku_available = sku_available
self.reason = reason
self.message = message
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ class CognitiveServicesAccount(Model):
: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'
'Creating', 'ResolvingDNS', 'Moving', 'Deleting', 'Succeeded', 'Failed'
:vartype provisioning_state: str or
~azure.mgmt.cognitiveservices.models.ProvisioningState
:param endpoint: Endpoint of the created account.
Expand Down Expand Up @@ -63,23 +63,24 @@ class CognitiveServicesAccount(Model):
'kind': {'key': 'kind', 'type': 'str'},
'location': {'key': 'location', 'type': 'str'},
'name': {'key': 'name', 'type': 'str'},
'provisioning_state': {'key': 'properties.provisioningState', 'type': 'ProvisioningState'},
'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'},
'endpoint': {'key': 'properties.endpoint', 'type': 'str'},
'internal_id': {'key': 'properties.internalId', 'type': 'str'},
'sku': {'key': 'sku', 'type': 'Sku'},
'tags': {'key': 'tags', 'type': '{str}'},
'type': {'key': 'type', 'type': 'str'},
}

def __init__(self, etag=None, kind=None, location=None, endpoint=None, internal_id=None, sku=None, tags=None):
self.etag = etag
def __init__(self, **kwargs):
super(CognitiveServicesAccount, self).__init__(**kwargs)
self.etag = kwargs.get('etag', None)
self.id = None
self.kind = kind
self.location = location
self.kind = kwargs.get('kind', None)
self.location = kwargs.get('location', None)
self.name = None
self.provisioning_state = None
self.endpoint = endpoint
self.internal_id = internal_id
self.sku = sku
self.tags = tags
self.endpoint = kwargs.get('endpoint', None)
self.internal_id = kwargs.get('internal_id', None)
self.sku = kwargs.get('sku', None)
self.tags = kwargs.get('tags', None)
self.type = None
Loading

0 comments on commit 6adfd65

Please sign in to comment.