Skip to content

Commit

Permalink
Generated from 60de4c8e4df2bd90b44ed70a90d48385e6f6971a (#14381)
Browse files Browse the repository at this point in the history
* Generated from 60de4c8e4df2bd90b44ed70a90d48385e6f6971a

* changlog/version/test recording

Co-authored-by: SDK Automation <sdkautomation@microsoft.com>
  • Loading branch information
msyyc and SDK Automation authored Oct 13, 2020
1 parent 380ae62 commit 5192df0
Show file tree
Hide file tree
Showing 7 changed files with 193 additions and 36 deletions.
10 changes: 10 additions & 0 deletions sdk/cognitiveservices/azure-mgmt-cognitiveservices/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
# Release History

## 6.3.0 (2020-10-09)

**Features**

- Model CognitiveServicesAccountApiProperties has a new parameter website_name
- Model CognitiveServicesAccountApiProperties has a new parameter super_user
- Model CognitiveServicesAccountApiProperties has a new parameter aad_client_id
- Model CognitiveServicesAccountApiProperties has a new parameter aad_tenant_id
- Added operation PrivateEndpointConnectionsOperations.list

## 6.2.0 (2020-05-29)

**Features**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
from ._models_py3 import OperationEntity
from ._models_py3 import PrivateEndpoint
from ._models_py3 import PrivateEndpointConnection
from ._models_py3 import PrivateEndpointConnectionListResult
from ._models_py3 import PrivateEndpointConnectionProperties
from ._models_py3 import PrivateLinkResource
from ._models_py3 import PrivateLinkResourceListResult
Expand Down Expand Up @@ -78,6 +79,7 @@
from ._models import OperationEntity
from ._models import PrivateEndpoint
from ._models import PrivateEndpointConnection
from ._models import PrivateEndpointConnectionListResult
from ._models import PrivateEndpointConnectionProperties
from ._models import PrivateLinkResource
from ._models import PrivateLinkResourceListResult
Expand Down Expand Up @@ -140,6 +142,7 @@
'OperationEntity',
'PrivateEndpoint',
'PrivateEndpointConnection',
'PrivateEndpointConnectionListResult',
'PrivateEndpointConnectionProperties',
'PrivateLinkResource',
'PrivateLinkResourceListResult',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -318,18 +318,37 @@ class CognitiveServicesAccountApiProperties(Model):
:param storage_account_connection_string: (Personalization Only) The
storage account connection string.
:type storage_account_connection_string: str
:param aad_client_id: (Metrics Advisor Only) The Azure AD Client Id
(Application Id).
:type aad_client_id: str
:param aad_tenant_id: (Metrics Advisor Only) The Azure AD Tenant Id.
:type aad_tenant_id: str
:param super_user: (Metrics Advisor Only) The super user of Metrics
Advisor.
:type super_user: str
:param website_name: (Metrics Advisor Only) The website name of Metrics
Advisor.
:type website_name: str
"""

_validation = {
'event_hub_connection_string': {'max_length': 1000, 'pattern': r'^( *)Endpoint=sb://(.*);( *)SharedAccessKeyName=(.*);( *)SharedAccessKey=(.*)$'},
'storage_account_connection_string': {'max_length': 1000, 'pattern': r'^(( *)DefaultEndpointsProtocol=(http|https)( *);( *))?AccountName=(.*)AccountKey=(.*)EndpointSuffix=(.*)$'},
'aad_client_id': {'max_length': 500},
'aad_tenant_id': {'max_length': 500},
'super_user': {'max_length': 500},
'website_name': {'max_length': 500},
}

_attribute_map = {
'qna_runtime_endpoint': {'key': 'qnaRuntimeEndpoint', 'type': 'str'},
'statistics_enabled': {'key': 'statisticsEnabled', 'type': 'bool'},
'event_hub_connection_string': {'key': 'eventHubConnectionString', 'type': 'str'},
'storage_account_connection_string': {'key': 'storageAccountConnectionString', 'type': 'str'},
'aad_client_id': {'key': 'aadClientId', 'type': 'str'},
'aad_tenant_id': {'key': 'aadTenantId', 'type': 'str'},
'super_user': {'key': 'superUser', 'type': 'str'},
'website_name': {'key': 'websiteName', 'type': 'str'},
}

def __init__(self, **kwargs):
Expand All @@ -338,6 +357,10 @@ def __init__(self, **kwargs):
self.statistics_enabled = kwargs.get('statistics_enabled', None)
self.event_hub_connection_string = kwargs.get('event_hub_connection_string', None)
self.storage_account_connection_string = kwargs.get('storage_account_connection_string', None)
self.aad_client_id = kwargs.get('aad_client_id', None)
self.aad_tenant_id = kwargs.get('aad_tenant_id', None)
self.super_user = kwargs.get('super_user', None)
self.website_name = kwargs.get('website_name', None)


class CognitiveServicesAccountEnumerateSkusResult(Model):
Expand Down Expand Up @@ -826,6 +849,23 @@ def __init__(self, **kwargs):
self.properties = kwargs.get('properties', None)


class PrivateEndpointConnectionListResult(Model):
"""A list of private endpoint connections.
:param value: Array of private endpoint connections
:type value:
list[~azure.mgmt.cognitiveservices.models.PrivateEndpointConnection]
"""

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

def __init__(self, **kwargs):
super(PrivateEndpointConnectionListResult, self).__init__(**kwargs)
self.value = kwargs.get('value', None)


class PrivateEndpointConnectionProperties(Model):
"""Properties of the PrivateEndpointConnectProperties.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -318,26 +318,49 @@ class CognitiveServicesAccountApiProperties(Model):
:param storage_account_connection_string: (Personalization Only) The
storage account connection string.
:type storage_account_connection_string: str
:param aad_client_id: (Metrics Advisor Only) The Azure AD Client Id
(Application Id).
:type aad_client_id: str
:param aad_tenant_id: (Metrics Advisor Only) The Azure AD Tenant Id.
:type aad_tenant_id: str
:param super_user: (Metrics Advisor Only) The super user of Metrics
Advisor.
:type super_user: str
:param website_name: (Metrics Advisor Only) The website name of Metrics
Advisor.
:type website_name: str
"""

_validation = {
'event_hub_connection_string': {'max_length': 1000, 'pattern': r'^( *)Endpoint=sb://(.*);( *)SharedAccessKeyName=(.*);( *)SharedAccessKey=(.*)$'},
'storage_account_connection_string': {'max_length': 1000, 'pattern': r'^(( *)DefaultEndpointsProtocol=(http|https)( *);( *))?AccountName=(.*)AccountKey=(.*)EndpointSuffix=(.*)$'},
'aad_client_id': {'max_length': 500},
'aad_tenant_id': {'max_length': 500},
'super_user': {'max_length': 500},
'website_name': {'max_length': 500},
}

_attribute_map = {
'qna_runtime_endpoint': {'key': 'qnaRuntimeEndpoint', 'type': 'str'},
'statistics_enabled': {'key': 'statisticsEnabled', 'type': 'bool'},
'event_hub_connection_string': {'key': 'eventHubConnectionString', 'type': 'str'},
'storage_account_connection_string': {'key': 'storageAccountConnectionString', 'type': 'str'},
'aad_client_id': {'key': 'aadClientId', 'type': 'str'},
'aad_tenant_id': {'key': 'aadTenantId', 'type': 'str'},
'super_user': {'key': 'superUser', 'type': 'str'},
'website_name': {'key': 'websiteName', 'type': 'str'},
}

def __init__(self, *, qna_runtime_endpoint: str=None, statistics_enabled: bool=None, event_hub_connection_string: str=None, storage_account_connection_string: str=None, **kwargs) -> None:
def __init__(self, *, qna_runtime_endpoint: str=None, statistics_enabled: bool=None, event_hub_connection_string: str=None, storage_account_connection_string: str=None, aad_client_id: str=None, aad_tenant_id: str=None, super_user: str=None, website_name: str=None, **kwargs) -> None:
super(CognitiveServicesAccountApiProperties, self).__init__(**kwargs)
self.qna_runtime_endpoint = qna_runtime_endpoint
self.statistics_enabled = statistics_enabled
self.event_hub_connection_string = event_hub_connection_string
self.storage_account_connection_string = storage_account_connection_string
self.aad_client_id = aad_client_id
self.aad_tenant_id = aad_tenant_id
self.super_user = super_user
self.website_name = website_name


class CognitiveServicesAccountEnumerateSkusResult(Model):
Expand Down Expand Up @@ -826,6 +849,23 @@ def __init__(self, *, properties=None, **kwargs) -> None:
self.properties = properties


class PrivateEndpointConnectionListResult(Model):
"""A list of private endpoint connections.
:param value: Array of private endpoint connections
:type value:
list[~azure.mgmt.cognitiveservices.models.PrivateEndpointConnection]
"""

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

def __init__(self, *, value=None, **kwargs) -> None:
super(PrivateEndpointConnectionListResult, self).__init__(**kwargs)
self.value = value


class PrivateEndpointConnectionProperties(Model):
"""Properties of the PrivateEndpointConnectProperties.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,70 @@ def __init__(self, client, config, serializer, deserializer):

self.config = config

def list(
self, resource_group_name, account_name, custom_headers=None, raw=False, **operation_config):
"""Gets the private endpoint connections associated with the Cognitive
Services account.
:param resource_group_name: The name of the resource group. The name
is case insensitive.
:type resource_group_name: str
:param account_name: The name of Cognitive Services account.
:type account_name: str
:param dict custom_headers: headers that will be added to the request
:param bool raw: returns the direct response alongside the
deserialized response
:param operation_config: :ref:`Operation configuration
overrides<msrest:optionsforoperations>`.
:return: PrivateEndpointConnectionListResult or ClientRawResponse if
raw=true
:rtype:
~azure.mgmt.cognitiveservices.models.PrivateEndpointConnectionListResult
or ~msrest.pipeline.ClientRawResponse
:raises:
:class:`ErrorException<azure.mgmt.cognitiveservices.models.ErrorException>`
"""
# Construct URL
url = self.list.metadata['url']
path_format_arguments = {
'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'),
'accountName': self._serialize.url("account_name", account_name, 'str', max_length=64, min_length=2, pattern=r'^[a-zA-Z0-9][a-zA-Z0-9_.-]*$'),
'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1)
}
url = self._client.format_url(url, **path_format_arguments)

# Construct parameters
query_parameters = {}
query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1)

# Construct headers
header_parameters = {}
header_parameters['Accept'] = 'application/json'
if self.config.generate_client_request_id:
header_parameters['x-ms-client-request-id'] = str(uuid.uuid1())
if custom_headers:
header_parameters.update(custom_headers)
if self.config.accept_language is not None:
header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str')

# Construct and send request
request = self._client.get(url, query_parameters, header_parameters)
response = self._client.send(request, stream=False, **operation_config)

if response.status_code not in [200]:
raise models.ErrorException(self._deserialize, response)

deserialized = None
if response.status_code == 200:
deserialized = self._deserialize('PrivateEndpointConnectionListResult', response)

if raw:
client_raw_response = ClientRawResponse(deserialized, response)
return client_raw_response

return deserialized
list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/privateEndpointConnections'}

def get(
self, resource_group_name, account_name, private_endpoint_connection_name, custom_headers=None, raw=False, **operation_config):
"""Gets the specified private endpoint connection associated with the
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@
# regenerated.
# --------------------------------------------------------------------------

VERSION = "6.2.0"
VERSION = "6.3.0"

Loading

0 comments on commit 5192df0

Please sign in to comment.