Skip to content

Commit

Permalink
[AutoRelease] t2-cognitiveservices-2022-06-08-73722(Do not merge) (Az…
Browse files Browse the repository at this point in the history
…ure#24760)

* code and test

* update version

* Update CHANGELOG.md

Co-authored-by: PythonSdkPipelines <PythonSdkPipelines>
Co-authored-by: Jiefeng Chen (WICRESOFT NORTH AMERICA LTD) <v-jiechen@microsoft.com>
Co-authored-by: Yuchao Yan <yuchaoyan@microsoft.com>
  • Loading branch information
3 people authored Jun 9, 2022
1 parent 986d087 commit 4138caa
Show file tree
Hide file tree
Showing 32 changed files with 1,153 additions and 782 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Release History

## 13.2.0 (2022-06-08)

**Features**

- `scale_type` of Model DeploymentScaleType has a new Enum type STANDARD

## 13.1.0 (2022-03-25)

**Features**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ include *.md
include azure/__init__.py
include azure/mgmt/__init__.py
include LICENSE
include azure/mgmt/cognitiveservices/py.typed
6 changes: 3 additions & 3 deletions sdk/cognitiveservices/azure-mgmt-cognitiveservices/_meta.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"autorest": "3.7.2",
"use": [
"@autorest/python@5.12.0",
"@autorest/python@5.13.0",
"@autorest/modelerfour@4.19.3"
],
"commit": "5dad3b83d0926768ede15ed41895d5f38defd512",
"commit": "ad5110c7ba2113d5f77946338231f45ac4d09c82",
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
"autorest_command": "autorest specification/cognitiveservices/resource-manager/readme.md --multiapi --python --python-mode=update --python-sdks-folder=/home/vsts/work/1/azure-sdk-for-python/sdk --python3-only --track2 --use=@autorest/python@5.12.0 --use=@autorest/modelerfour@4.19.3 --version=3.7.2",
"autorest_command": "autorest specification/cognitiveservices/resource-manager/readme.md --python --python-sdks-folder=/home/vsts/work/1/azure-sdk-for-python/sdk --python3-only --use=@autorest/python@5.13.0 --use=@autorest/modelerfour@4.19.3 --version=3.7.2",
"readme": "specification/cognitiveservices/resource-manager/readme.md"
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,12 @@
# --------------------------------------------------------------------------

from copy import deepcopy
from typing import Any, Optional, TYPE_CHECKING
from typing import Any, TYPE_CHECKING

from msrest import Deserializer, Serializer

from azure.core.rest import HttpRequest, HttpResponse
from azure.mgmt.core import ARMPipelineClient
from msrest import Deserializer, Serializer

from . import models
from ._configuration import CognitiveServicesManagementClientConfiguration
Expand All @@ -21,7 +22,7 @@
# pylint: disable=unused-import,ungrouped-imports
from azure.core.credentials import TokenCredential

class CognitiveServicesManagementClient(CognitiveServicesManagementClientOperationsMixin):
class CognitiveServicesManagementClient(CognitiveServicesManagementClientOperationsMixin): # pylint: disable=too-many-instance-attributes
"""Cognitive Services Management Client.
:ivar accounts: AccountsOperations operations
Expand All @@ -48,8 +49,11 @@ class CognitiveServicesManagementClient(CognitiveServicesManagementClientOperati
:type credential: ~azure.core.credentials.TokenCredential
:param subscription_id: The ID of the target subscription.
:type subscription_id: str
:param base_url: Service URL. Default value is 'https://management.azure.com'.
:param base_url: Service URL. Default value is "https://management.azure.com".
:type base_url: str
:keyword api_version: Api Version. Default value is "2022-03-01". Note that overriding this
default value may result in unsupported behavior.
:paramtype api_version: str
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no
Retry-After header is present.
"""
Expand Down Expand Up @@ -81,7 +85,7 @@ def __init__(

def _send_request(
self,
request, # type: HttpRequest
request: HttpRequest,
**kwargs: Any
) -> HttpResponse:
"""Runs the network request through the client's chained policies.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
from azure.core.credentials import TokenCredential


class CognitiveServicesManagementClientConfiguration(Configuration):
class CognitiveServicesManagementClientConfiguration(Configuration): # pylint: disable=too-many-instance-attributes
"""Configuration for CognitiveServicesManagementClient.
Note that all parameters used to create this instance are saved as instance
Expand All @@ -29,6 +29,9 @@ class CognitiveServicesManagementClientConfiguration(Configuration):
:type credential: ~azure.core.credentials.TokenCredential
:param subscription_id: The ID of the target subscription.
:type subscription_id: str
:keyword api_version: Api Version. Default value is "2022-03-01". Note that overriding this
default value may result in unsupported behavior.
:paramtype api_version: str
"""

def __init__(
Expand All @@ -38,14 +41,16 @@ def __init__(
**kwargs: Any
) -> None:
super(CognitiveServicesManagementClientConfiguration, self).__init__(**kwargs)
api_version = kwargs.pop('api_version', "2022-03-01") # type: str

if credential is None:
raise ValueError("Parameter 'credential' must not be None.")
if subscription_id is None:
raise ValueError("Parameter 'subscription_id' must not be None.")

self.credential = credential
self.subscription_id = subscription_id
self.api_version = "2022-03-01"
self.api_version = api_version
self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default'])
kwargs.setdefault('sdk_moniker', 'mgmt-cognitiveservices/{}'.format(VERSION))
self._configure(**kwargs)
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------

VERSION = "13.1.0"
VERSION = "13.2.0"
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,12 @@
# --------------------------------------------------------------------------

from copy import deepcopy
from typing import Any, Awaitable, Optional, TYPE_CHECKING
from typing import Any, Awaitable, TYPE_CHECKING

from msrest import Deserializer, Serializer

from azure.core.rest import AsyncHttpResponse, HttpRequest
from azure.mgmt.core import AsyncARMPipelineClient
from msrest import Deserializer, Serializer

from .. import models
from ._configuration import CognitiveServicesManagementClientConfiguration
Expand All @@ -21,7 +22,7 @@
# pylint: disable=unused-import,ungrouped-imports
from azure.core.credentials_async import AsyncTokenCredential

class CognitiveServicesManagementClient(CognitiveServicesManagementClientOperationsMixin):
class CognitiveServicesManagementClient(CognitiveServicesManagementClientOperationsMixin): # pylint: disable=too-many-instance-attributes
"""Cognitive Services Management Client.
:ivar accounts: AccountsOperations operations
Expand Down Expand Up @@ -51,8 +52,11 @@ class CognitiveServicesManagementClient(CognitiveServicesManagementClientOperati
:type credential: ~azure.core.credentials_async.AsyncTokenCredential
:param subscription_id: The ID of the target subscription.
:type subscription_id: str
:param base_url: Service URL. Default value is 'https://management.azure.com'.
:param base_url: Service URL. Default value is "https://management.azure.com".
:type base_url: str
:keyword api_version: Api Version. Default value is "2022-03-01". Note that overriding this
default value may result in unsupported behavior.
:paramtype api_version: str
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no
Retry-After header is present.
"""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
from azure.core.credentials_async import AsyncTokenCredential


class CognitiveServicesManagementClientConfiguration(Configuration):
class CognitiveServicesManagementClientConfiguration(Configuration): # pylint: disable=too-many-instance-attributes
"""Configuration for CognitiveServicesManagementClient.
Note that all parameters used to create this instance are saved as instance
Expand All @@ -29,6 +29,9 @@ class CognitiveServicesManagementClientConfiguration(Configuration):
:type credential: ~azure.core.credentials_async.AsyncTokenCredential
:param subscription_id: The ID of the target subscription.
:type subscription_id: str
:keyword api_version: Api Version. Default value is "2022-03-01". Note that overriding this
default value may result in unsupported behavior.
:paramtype api_version: str
"""

def __init__(
Expand All @@ -38,14 +41,16 @@ def __init__(
**kwargs: Any
) -> None:
super(CognitiveServicesManagementClientConfiguration, self).__init__(**kwargs)
api_version = kwargs.pop('api_version', "2022-03-01") # type: str

if credential is None:
raise ValueError("Parameter 'credential' must not be None.")
if subscription_id is None:
raise ValueError("Parameter 'subscription_id' must not be None.")

self.credential = credential
self.subscription_id = subscription_id
self.api_version = "2022-03-01"
self.api_version = api_version
self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default'])
kwargs.setdefault('sdk_moniker', 'mgmt-cognitiveservices/{}'.format(VERSION))
self._configure(**kwargs)
Expand Down
Loading

0 comments on commit 4138caa

Please sign in to comment.