Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
# 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 .sub_closed_list import SubClosedList
class SubClosedListResponse(SubClosedList):
"""Sublist of items for a list entity.
:param canonical_form: The standard form that the list represents.
:type canonical_form: str
:param list: List of synonym words.
:type list: list[str]
:param id: The sublist ID
:type id: int
"""
_attribute_map = {
'canonical_form': {'key': 'canonicalForm', 'type': 'str'},
'list': {'key': 'list', 'type': '[str]'},
'id': {'key': 'id', 'type': 'int'},
}
def __init__(self, **kwargs):
super(SubClosedList, self).__init__(**kwargs)
self.canonical_form = kwargs.get('canonical_form', None)
self.list = kwargs.get('list', None)
def __init__(self, *, canonical_form: str=None, list=None, **kwargs) -> None:
super(SubClosedList, self).__init__(**kwargs)
self.canonical_form = canonical_form
self.list = list
# 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 .sub_closed_list_py3 import SubClosedList
class SubClosedListResponse(SubClosedList):
"""Sublist of items for a list entity.
:param canonical_form: The standard form that the list represents.
:type canonical_form: str
:param list: List of synonym words.
:type list: list[str]
:param id: The sublist ID
:type id: int
"""
_attribute_map = {
'canonical_form': {'key': 'canonicalForm', 'type': 'str'},
'list': {'key': 'list', 'type': '[str]'},
'id': {'key': 'id', 'type': 'int'},
}
# Construct headers
header_parameters = {}
header_parameters['Accept'] = 'application/json'
header_parameters['Content-Type'] = 'application/json; charset=utf-8'
if custom_headers:
header_parameters.update(custom_headers)
# Construct body
body_content = self._serialize.body(query, 'str')
# Construct and send request
request = self._client.post(url, query_parameters, header_parameters, body_content)
response = self._client.send(request, stream=False, **operation_config)
if response.status_code not in [200]:
raise models.APIErrorException(self._deserialize, response)
deserialized = None
if response.status_code == 200:
deserialized = self._deserialize('LuisResult', response)
if raw:
client_raw_response = ClientRawResponse(deserialized, response)
return client_raw_response
return deserialized
resolve.metadata = {'url': '/apps/{appId}'}
# 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 .endpoint_info import EndpointInfo
class ProductionOrStagingEndpointInfo(EndpointInfo):
"""ProductionOrStagingEndpointInfo.
:param version_id: The version ID to publish.
:type version_id: str
:param is_staging: Indicates if the staging slot should be used, instead
of the Production one.
:type is_staging: bool
:param endpoint_url: The Runtime endpoint URL for this model version.
:type endpoint_url: str
:param region: The target region that the application is published to.
:type region: str
:param assigned_endpoint_key: The endpoint key.
:type assigned_endpoint_key: str
:param endpoint_region: The endpoint's region.
:type endpoint_region: str
:param failed_regions: Regions where publishing failed.
# 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 .endpoint_info_py3 import EndpointInfo
class ProductionOrStagingEndpointInfo(EndpointInfo):
"""ProductionOrStagingEndpointInfo.
:param version_id: The version ID to publish.
:type version_id: str
:param is_staging: Indicates if the staging slot should be used, instead
of the Production one.
:type is_staging: bool
:param endpoint_url: The Runtime endpoint URL for this model version.
:type endpoint_url: str
:param region: The target region that the application is published to.
:type region: str
:param assigned_endpoint_key: The endpoint key.
:type assigned_endpoint_key: str
:param endpoint_region: The endpoint's region.
:type endpoint_region: str
:param failed_regions: Regions where publishing failed.
def __init__(self, *, text: str=None, tokenized_text=None, intent_predictions=None, entity_predictions=None, **kwargs) -> None:
super(IntentsSuggestionExample, self).__init__(**kwargs)
self.text = text
self.tokenized_text = tokenized_text
self.intent_predictions = intent_predictions
self.entity_predictions = entity_predictions
def __init__(self, **kwargs):
super(JSONModelFeature, self).__init__(**kwargs)
self.activated = kwargs.get('activated', None)
self.name = kwargs.get('name', None)
self.words = kwargs.get('words', None)
self.mode = kwargs.get('mode', None)
def __init__(self, *, activated: bool=None, name: str=None, words: str=None, mode: bool=None, **kwargs) -> None:
super(JSONModelFeature, self).__init__(**kwargs)
self.activated = activated
self.name = name
self.words = words
self.mode = mode