Skip to content

Commit

Permalink
Rebuild by #2317
Browse files Browse the repository at this point in the history
  • Loading branch information
AutorestCI committed May 21, 2018
1 parent 587948c commit 5184c82
Show file tree
Hide file tree
Showing 12 changed files with 483 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
from msrestazure import AzureConfiguration
from .version import VERSION
from .operations.accounts_operations import AccountsOperations
from .operations.resource_skus_operations import ResourceSkusOperations
from .operations.operations import Operations
from .operations.check_sku_availability_operations import CheckSkuAvailabilityOperations
from . import models
Expand Down Expand Up @@ -59,6 +60,8 @@ class CognitiveServicesManagementClient(object):
:ivar accounts: Accounts operations
:vartype accounts: azure.mgmt.cognitiveservices.operations.AccountsOperations
:ivar resource_skus: ResourceSkus operations
:vartype resource_skus: azure.mgmt.cognitiveservices.operations.ResourceSkusOperations
:ivar operations: Operations operations
:vartype operations: azure.mgmt.cognitiveservices.operations.Operations
:ivar check_sku_availability: CheckSkuAvailability operations
Expand All @@ -85,6 +88,8 @@ def __init__(

self.accounts = AccountsOperations(
self._client, self.config, self._serialize, self._deserialize)
self.resource_skus = ResourceSkusOperations(
self._client, self.config, self._serialize, self._deserialize)
self.operations = Operations(
self._client, self.config, self._serialize, self._deserialize)
self.check_sku_availability = CheckSkuAvailabilityOperations(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@
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
from .resource_sku_restriction_info_py3 import ResourceSkuRestrictionInfo
from .resource_sku_restrictions_py3 import ResourceSkuRestrictions
from .resource_sku_py3 import ResourceSku
except (SyntaxError, ImportError):
from .sku import Sku
from .cognitive_services_account_create_parameters import CognitiveServicesAccountCreateParameters
Expand All @@ -47,7 +50,11 @@
from .check_sku_availability_parameter import CheckSkuAvailabilityParameter
from .check_sku_availability_result import CheckSkuAvailabilityResult
from .check_sku_availability_result_list import CheckSkuAvailabilityResultList
from .resource_sku_restriction_info import ResourceSkuRestrictionInfo
from .resource_sku_restrictions import ResourceSkuRestrictions
from .resource_sku import ResourceSku
from .cognitive_services_account_paged import CognitiveServicesAccountPaged
from .resource_sku_paged import ResourceSkuPaged
from .operation_entity_paged import OperationEntityPaged
from .cognitive_services_management_client_enums import (
SkuName,
Expand All @@ -57,6 +64,8 @@
KeyName,
UnitType,
QuotaUsageStatus,
ResourceSkuRestrictionsType,
ResourceSkuRestrictionsReasonCode,
)

__all__ = [
Expand All @@ -78,7 +87,11 @@
'CheckSkuAvailabilityParameter',
'CheckSkuAvailabilityResult',
'CheckSkuAvailabilityResultList',
'ResourceSkuRestrictionInfo',
'ResourceSkuRestrictions',
'ResourceSku',
'CognitiveServicesAccountPaged',
'ResourceSkuPaged',
'OperationEntityPaged',
'SkuName',
'SkuTier',
Expand All @@ -87,4 +100,6 @@
'KeyName',
'UnitType',
'QuotaUsageStatus',
'ResourceSkuRestrictionsType',
'ResourceSkuRestrictionsReasonCode',
]
Original file line number Diff line number Diff line change
Expand Up @@ -90,3 +90,15 @@ class QuotaUsageStatus(str, Enum):
blocked = "Blocked"
in_overage = "InOverage"
unknown = "Unknown"


class ResourceSkuRestrictionsType(str, Enum):

location = "Location"
zone = "Zone"


class ResourceSkuRestrictionsReasonCode(str, Enum):

quota_id = "QuotaId"
not_available_for_subscription = "NotAvailableForSubscription"
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
# 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 ResourceSku(Model):
"""Describes an available Cognitive Services SKU.
Variables are only populated by the server, and will be ignored when
sending a request.
:ivar resource_type: The type of resource the SKU applies to.
:vartype resource_type: str
:ivar name: The name of SKU.
:vartype name: str
:ivar tier: Specifies the tier of Cognitive Services account.
:vartype tier: str
:ivar kind: The Kind of resources that are supported in this SKU.
:vartype kind: str
:ivar locations: The set of locations that the SKU is available.
:vartype locations: list[str]
:ivar restrictions: The restrictions because of which SKU cannot be used.
This is empty if there are no restrictions.
:vartype restrictions:
list[~azure.mgmt.cognitiveservices.models.ResourceSkuRestrictions]
"""

_validation = {
'resource_type': {'readonly': True},
'name': {'readonly': True},
'tier': {'readonly': True},
'kind': {'readonly': True},
'locations': {'readonly': True},
'restrictions': {'readonly': True},
}

_attribute_map = {
'resource_type': {'key': 'resourceType', 'type': 'str'},
'name': {'key': 'name', 'type': 'str'},
'tier': {'key': 'tier', 'type': 'str'},
'kind': {'key': 'kind', 'type': 'str'},
'locations': {'key': 'locations', 'type': '[str]'},
'restrictions': {'key': 'restrictions', 'type': '[ResourceSkuRestrictions]'},
}

def __init__(self, **kwargs):
super(ResourceSku, self).__init__(**kwargs)
self.resource_type = None
self.name = None
self.tier = None
self.kind = None
self.locations = None
self.restrictions = None
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# 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.paging import Paged


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

_attribute_map = {
'next_link': {'key': 'nextLink', 'type': 'str'},
'current_page': {'key': 'value', 'type': '[ResourceSku]'}
}

def __init__(self, *args, **kwargs):

super(ResourceSkuPaged, self).__init__(*args, **kwargs)
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
# 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 ResourceSku(Model):
"""Describes an available Cognitive Services SKU.
Variables are only populated by the server, and will be ignored when
sending a request.
:ivar resource_type: The type of resource the SKU applies to.
:vartype resource_type: str
:ivar name: The name of SKU.
:vartype name: str
:ivar tier: Specifies the tier of Cognitive Services account.
:vartype tier: str
:ivar kind: The Kind of resources that are supported in this SKU.
:vartype kind: str
:ivar locations: The set of locations that the SKU is available.
:vartype locations: list[str]
:ivar restrictions: The restrictions because of which SKU cannot be used.
This is empty if there are no restrictions.
:vartype restrictions:
list[~azure.mgmt.cognitiveservices.models.ResourceSkuRestrictions]
"""

_validation = {
'resource_type': {'readonly': True},
'name': {'readonly': True},
'tier': {'readonly': True},
'kind': {'readonly': True},
'locations': {'readonly': True},
'restrictions': {'readonly': True},
}

_attribute_map = {
'resource_type': {'key': 'resourceType', 'type': 'str'},
'name': {'key': 'name', 'type': 'str'},
'tier': {'key': 'tier', 'type': 'str'},
'kind': {'key': 'kind', 'type': 'str'},
'locations': {'key': 'locations', 'type': '[str]'},
'restrictions': {'key': 'restrictions', 'type': '[ResourceSkuRestrictions]'},
}

def __init__(self, **kwargs) -> None:
super(ResourceSku, self).__init__(**kwargs)
self.resource_type = None
self.name = None
self.tier = None
self.kind = None
self.locations = None
self.restrictions = None
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# 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 ResourceSkuRestrictionInfo(Model):
"""ResourceSkuRestrictionInfo.
Variables are only populated by the server, and will be ignored when
sending a request.
:ivar locations: Locations where the SKU is restricted
:vartype locations: list[str]
:ivar zones: List of availability zones where the SKU is restricted.
:vartype zones: list[str]
"""

_validation = {
'locations': {'readonly': True},
'zones': {'readonly': True},
}

_attribute_map = {
'locations': {'key': 'locations', 'type': '[str]'},
'zones': {'key': 'zones', 'type': '[str]'},
}

def __init__(self, **kwargs):
super(ResourceSkuRestrictionInfo, self).__init__(**kwargs)
self.locations = None
self.zones = None
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# 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 ResourceSkuRestrictionInfo(Model):
"""ResourceSkuRestrictionInfo.
Variables are only populated by the server, and will be ignored when
sending a request.
:ivar locations: Locations where the SKU is restricted
:vartype locations: list[str]
:ivar zones: List of availability zones where the SKU is restricted.
:vartype zones: list[str]
"""

_validation = {
'locations': {'readonly': True},
'zones': {'readonly': True},
}

_attribute_map = {
'locations': {'key': 'locations', 'type': '[str]'},
'zones': {'key': 'zones', 'type': '[str]'},
}

def __init__(self, **kwargs) -> None:
super(ResourceSkuRestrictionInfo, self).__init__(**kwargs)
self.locations = None
self.zones = None
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
# 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 ResourceSkuRestrictions(Model):
"""Describes restrictions of a SKU.
Variables are only populated by the server, and will be ignored when
sending a request.
:ivar type: The type of restrictions. Possible values include: 'Location',
'Zone'
:vartype type: str or
~azure.mgmt.cognitiveservices.models.ResourceSkuRestrictionsType
:ivar values: The value of restrictions. If the restriction type is set to
location. This would be different locations where the SKU is restricted.
:vartype values: list[str]
:ivar restriction_info: The information about the restriction where the
SKU cannot be used.
:vartype restriction_info:
~azure.mgmt.cognitiveservices.models.ResourceSkuRestrictionInfo
:ivar reason_code: The reason for restriction. Possible values include:
'QuotaId', 'NotAvailableForSubscription'
:vartype reason_code: str or
~azure.mgmt.cognitiveservices.models.ResourceSkuRestrictionsReasonCode
"""

_validation = {
'type': {'readonly': True},
'values': {'readonly': True},
'restriction_info': {'readonly': True},
'reason_code': {'readonly': True},
}

_attribute_map = {
'type': {'key': 'type', 'type': 'ResourceSkuRestrictionsType'},
'values': {'key': 'values', 'type': '[str]'},
'restriction_info': {'key': 'restrictionInfo', 'type': 'ResourceSkuRestrictionInfo'},
'reason_code': {'key': 'reasonCode', 'type': 'str'},
}

def __init__(self, **kwargs):
super(ResourceSkuRestrictions, self).__init__(**kwargs)
self.type = None
self.values = None
self.restriction_info = None
self.reason_code = None
Loading

0 comments on commit 5184c82

Please sign in to comment.