# Source code for azure.cognitiveservices.language.luis.authoring.operations._model_operations

    # 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.pipeline import ClientRawResponse

    from .. import models

    class ModelOperations(object):
        """ModelOperations operations.

        You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute.

        :param client: Client for service requests.
        :param config: Configuration of service client.
        :param serializer: An object model serializer.
        :param deserializer: An object model deserializer.
        """

        models = models

        def __init__(self, client, config, serializer, deserializer):

            self._client = client
            self._serialize = serializer
            self._deserialize = deserializer

            self.config = config

        def add_intent(
                self, app_id, version_id, name=None, custom_headers=None, raw=False, **operation_config):
            """Adds an intent to a version of the application.

            :param app_id: The application ID.
            :type app_id: str
            :param version_id: The version ID.
            :type version_id: str
            :param name: Name of the new entity extractor.
            :type 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: str or ClientRawResponse if raw=true
            :rtype: str or ~msrest.pipeline.ClientRawResponse
            :raises:
             :class:`ErrorResponseException<azure.cognitiveservices.language.luis.authoring.models.ErrorResponseException>`
            """
            intent_create_object = models.ModelCreateObject(name=name)

            # Construct URL
            url = self.add_intent.metadata['url']
            path_format_arguments = {
                'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True),
                'appId': self._serialize.url("app_id", app_id, 'str'),
                'versionId': self._serialize.url("version_id", version_id, 'str')
            }
            url = self._client.format_url(url, **path_format_arguments)

            # Construct parameters
            query_parameters = {}

            # 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(intent_create_object, 'ModelCreateObject')

            # 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 [201]:
                raise models.ErrorResponseException(self._deserialize, response)

            deserialized = None
            if response.status_code == 201:
                deserialized = self._deserialize('str', response)

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

            return deserialized
        add_intent.metadata = {'url': '/apps/{appId}/versions/{versionId}/intents'}

        def list_intents(
                self, app_id, version_id, skip=0, take=100, custom_headers=None, raw=False, **operation_config):
            """Gets information about the intent models in a version of the
            application.

            :param app_id: The application ID.
            :type app_id: str
            :param version_id: The version ID.
            :type version_id: str
            :param skip: The number of entries to skip. Default value is 0.
            :type skip: int
            :param take: The number of entries to return. Maximum page size is
             500. Default is 100.
            :type take: int
            :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: list or ClientRawResponse if raw=true
            :rtype:
             list[~azure.cognitiveservices.language.luis.authoring.models.IntentClassifier]
             or ~msrest.pipeline.ClientRawResponse
            :raises:
             :class:`ErrorResponseException<azure.cognitiveservices.language.luis.authoring.models.ErrorResponseException>`
            """
            # Construct URL
            url = self.list_intents.metadata['url']
            path_format_arguments = {
                'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True),
                'appId': self._serialize.url("app_id", app_id, 'str'),
                'versionId': self._serialize.url("version_id", version_id, 'str')
            }
            url = self._client.format_url(url, **path_format_arguments)

            # Construct parameters
            query_parameters = {}
            if skip is not None:
                query_parameters['skip'] = self._serialize.query("skip", skip, 'int', minimum=0)
            if take is not None:
                query_parameters['take'] = self._serialize.query("take", take, 'int', maximum=500, minimum=0)

            # Construct headers
            header_parameters = {}
            header_parameters['Accept'] = 'application/json'
            if custom_headers:
                header_parameters.update(custom_headers)

            # 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.ErrorResponseException(self._deserialize, response)

            deserialized = None
            if response.status_code == 200:
                deserialized = self._deserialize('[IntentClassifier]', response)

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

            return deserialized
        list_intents.metadata = {'url': '/apps/{appId}/versions/{versionId}/intents'}

        def add_entity(
                self, app_id, version_id, children=None, name=None, custom_headers=None, raw=False, **operation_config):
            """Adds an entity extractor to a version of the application.

            :param app_id: The application ID.
            :type app_id: str
            :param version_id: The version ID.
            :type version_id: str
            :param children: Child entities.
            :type children:
             list[~azure.cognitiveservices.language.luis.authoring.models.ChildEntityModelCreateObject]
            :param name: Entity name.
            :type 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: str or ClientRawResponse if raw=true
            :rtype: str or ~msrest.pipeline.ClientRawResponse
            :raises:
             :class:`ErrorResponseException<azure.cognitiveservices.language.luis.authoring.models.ErrorResponseException>`
            """
            entity_model_create_object = models.EntityModelCreateObject(children=children, name=name)

            # Construct URL
            url = self.add_entity.metadata['url']
            path_format_arguments = {
                'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True),
                'appId': self._serialize.url("app_id", app_id, 'str'),
                'versionId': self._serialize.url("version_id", version_id, 'str')
            }
            url = self._client.format_url(url, **path_format_arguments)

            # Construct parameters
            query_parameters = {}

            # 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(entity_model_create_object, 'EntityModelCreateObject')

            # 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 [201]:
                raise models.ErrorResponseException(self._deserialize, response)

            deserialized = None
            if response.status_code == 201:
                deserialized = self._deserialize('str', response)

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

            return deserialized
        add_entity.metadata = {'url': '/apps/{appId}/versions/{versionId}/entities'}

        def list_entities(
                self, app_id, version_id, skip=0, take=100, custom_headers=None, raw=False, **operation_config):
            """Gets information about all the simple entity models in a version of the
            application.

            :param app_id: The application ID.
            :type app_id: str
            :param version_id: The version ID.
            :type version_id: str
            :param skip: The number of entries to skip. Default value is 0.
            :type skip: int
            :param take: The number of entries to return. Maximum page size is
             500. Default is 100.
            :type take: int
            :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: list or ClientRawResponse if raw=true
            :rtype:
             list[~azure.cognitiveservices.language.luis.authoring.models.NDepthEntityExtractor]
             or ~msrest.pipeline.ClientRawResponse
            :raises:
             :class:`ErrorResponseException<azure.cognitiveservices.language.luis.authoring.models.ErrorResponseException>`
            """
            # Construct URL
            url = self.list_entities.metadata['url']
            path_format_arguments = {
                'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True),
                'appId': self._serialize.url("app_id", app_id, 'str'),
                'versionId': self._serialize.url("version_id", version_id, 'str')
            }
            url = self._client.format_url(url, **path_format_arguments)

            # Construct parameters
            query_parameters = {}
            if skip is not None:
                query_parameters['skip'] = self._serialize.query("skip", skip, 'int', minimum=0)
            if take is not None:
                query_parameters['take'] = self._serialize.query("take", take, 'int', maximum=500, minimum=0)

            # Construct headers
            header_parameters = {}
            header_parameters['Accept'] = 'application/json'
            if custom_headers:
                header_parameters.update(custom_headers)

            # 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.ErrorResponseException(self._deserialize, response)

            deserialized = None
            if response.status_code == 200:
                deserialized = self._deserialize('[NDepthEntityExtractor]', response)

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

            return deserialized
        list_entities.metadata = {'url': '/apps/{appId}/versions/{versionId}/entities'}

        def list_hierarchical_entities(
                self, app_id, version_id, skip=0, take=100, custom_headers=None, raw=False, **operation_config):
            """Gets information about all the hierarchical entity models in a version
            of the application.

            :param app_id: The application ID.
            :type app_id: str
            :param version_id: The version ID.
            :type version_id: str
            :param skip: The number of entries to skip. Default value is 0.
            :type skip: int
            :param take: The number of entries to return. Maximum page size is
             500. Default is 100.
            :type take: int
            :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: list or ClientRawResponse if raw=true
            :rtype:
             list[~azure.cognitiveservices.language.luis.authoring.models.HierarchicalEntityExtractor]
             or ~msrest.pipeline.ClientRawResponse
            :raises:
             :class:`ErrorResponseException<azure.cognitiveservices.language.luis.authoring.models.ErrorResponseException>`
            """
            # Construct URL
            url = self.list_hierarchical_entities.metadata['url']
            path_format_arguments = {
                'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True),
                'appId': self._serialize.url("app_id", app_id, 'str'),
                'versionId': self._serialize.url("version_id", version_id, 'str')
            }
            url = self._client.format_url(url, **path_format_arguments)

            # Construct parameters
            query_parameters = {}
            if skip is not None:
                query_parameters['skip'] = self._serialize.query("skip", skip, 'int', minimum=0)
            if take is not None:
                query_parameters['take'] = self._serialize.query("take", take, 'int', maximum=500, minimum=0)

            # Construct headers
            header_parameters = {}
            header_parameters['Accept'] = 'application/json'
            if custom_headers:
                header_parameters.update(custom_headers)

            # 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.ErrorResponseException(self._deserialize, response)

            deserialized = None
            if response.status_code == 200:
                deserialized = self._deserialize('[HierarchicalEntityExtractor]', response)

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

            return deserialized
        list_hierarchical_entities.metadata = {'url': '/apps/{appId}/versions/{versionId}/hierarchicalentities'}

        def list_composite_entities(
                self, app_id, version_id, skip=0, take=100, custom_headers=None, raw=False, **operation_config):
            """Gets information about all the composite entity models in a version of
            the application.

            :param app_id: The application ID.
            :type app_id: str
            :param version_id: The version ID.
            :type version_id: str
            :param skip: The number of entries to skip. Default value is 0.
            :type skip: int
            :param take: The number of entries to return. Maximum page size is
             500. Default is 100.
            :type take: int
            :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: list or ClientRawResponse if raw=true
            :rtype:
             list[~azure.cognitiveservices.language.luis.authoring.models.CompositeEntityExtractor]
             or ~msrest.pipeline.ClientRawResponse
            :raises:
             :class:`ErrorResponseException<azure.cognitiveservices.language.luis.authoring.models.ErrorResponseException>`
            """
            # Construct URL
            url = self.list_composite_entities.metadata['url']
            path_format_arguments = {
                'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True),
                'appId': self._serialize.url("app_id", app_id, 'str'),
                'versionId': self._serialize.url("version_id", version_id, 'str')
            }
            url = self._client.format_url(url, **path_format_arguments)

            # Construct parameters
            query_parameters = {}
            if skip is not None:
                query_parameters['skip'] = self._serialize.query("skip", skip, 'int', minimum=0)
            if take is not None:
                query_parameters['take'] = self._serialize.query("take", take, 'int', maximum=500, minimum=0)

            # Construct headers
            header_parameters = {}
            header_parameters['Accept'] = 'application/json'
            if custom_headers:
                header_parameters.update(custom_headers)

            # 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.ErrorResponseException(self._deserialize, response)

            deserialized = None
            if response.status_code == 200:
                deserialized = self._deserialize('[CompositeEntityExtractor]', response)

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

            return deserialized
        list_composite_entities.metadata = {'url': '/apps/{appId}/versions/{versionId}/compositeentities'}

        def list_closed_lists(
                self, app_id, version_id, skip=0, take=100, custom_headers=None, raw=False, **operation_config):
            """Gets information about all the list entity models in a version of the
            application.

            :param app_id: The application ID.
            :type app_id: str
            :param version_id: The version ID.
            :type version_id: str
            :param skip: The number of entries to skip. Default value is 0.
            :type skip: int
            :param take: The number of entries to return. Maximum page size is
             500. Default is 100.
            :type take: int
            :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: list or ClientRawResponse if raw=true
            :rtype:
             list[~azure.cognitiveservices.language.luis.authoring.models.ClosedListEntityExtractor]
             or ~msrest.pipeline.ClientRawResponse
            :raises:
             :class:`ErrorResponseException<azure.cognitiveservices.language.luis.authoring.models.ErrorResponseException>`
            """
            # Construct URL
            url = self.list_closed_lists.metadata['url']
            path_format_arguments = {
                'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True),
                'appId': self._serialize.url("app_id", app_id, 'str'),
                'versionId': self._serialize.url("version_id", version_id, 'str')
            }
            url = self._client.format_url(url, **path_format_arguments)

            # Construct parameters
            query_parameters = {}
            if skip is not None:
                query_parameters['skip'] = self._serialize.query("skip", skip, 'int', minimum=0)
            if take is not None:
                query_parameters['take'] = self._serialize.query("take", take, 'int', maximum=500, minimum=0)

            # Construct headers
            header_parameters = {}
            header_parameters['Accept'] = 'application/json'
            if custom_headers:
                header_parameters.update(custom_headers)

            # 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.ErrorResponseException(self._deserialize, response)

            deserialized = None
            if response.status_code == 200:
                deserialized = self._deserialize('[ClosedListEntityExtractor]', response)

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

            return deserialized
        list_closed_lists.metadata = {'url': '/apps/{appId}/versions/{versionId}/closedlists'}

        def add_closed_list(
                self, app_id, version_id, sub_lists=None, name=None, custom_headers=None, raw=False, **operation_config):
            """Adds a list entity model to a version of the application.

            :param app_id: The application ID.
            :type app_id: str
            :param version_id: The version ID.
            :type version_id: str
            :param sub_lists: Sublists for the feature.
            :type sub_lists:
             list[~azure.cognitiveservices.language.luis.authoring.models.WordListObject]
            :param name: Name of the list entity.
            :type 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: str or ClientRawResponse if raw=true
            :rtype: str or ~msrest.pipeline.ClientRawResponse
            :raises:
             :class:`ErrorResponseException<azure.cognitiveservices.language.luis.authoring.models.ErrorResponseException>`
            """
            closed_list_model_create_object = models.ClosedListModelCreateObject(sub_lists=sub_lists, name=name)

            # Construct URL
            url = self.add_closed_list.metadata['url']
            path_format_arguments = {
                'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True),
                'appId': self._serialize.url("app_id", app_id, 'str'),
                'versionId': self._serialize.url("version_id", version_id, 'str')
            }
            url = self._client.format_url(url, **path_format_arguments)

            # Construct parameters
            query_parameters = {}

            # 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(closed_list_model_create_object, 'ClosedListModelCreateObject')

            # 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 [201]:
                raise models.ErrorResponseException(self._deserialize, response)

            deserialized = None
            if response.status_code == 201:
                deserialized = self._deserialize('str', response)

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

            return deserialized
        add_closed_list.metadata = {'url': '/apps/{appId}/versions/{versionId}/closedlists'}

        def add_prebuilt(
                self, app_id, version_id, prebuilt_extractor_names, custom_headers=None, raw=False, **operation_config):
            """Adds a list of prebuilt entities to a version of the application.

            :param app_id: The application ID.
            :type app_id: str
            :param version_id: The version ID.
            :type version_id: str
            :param prebuilt_extractor_names: An array of prebuilt entity extractor
             names.
            :type prebuilt_extractor_names: list[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: list or ClientRawResponse if raw=true
            :rtype:
             list[~azure.cognitiveservices.language.luis.authoring.models.PrebuiltEntityExtractor]
             or ~msrest.pipeline.ClientRawResponse
            :raises:
             :class:`ErrorResponseException<azure.cognitiveservices.language.luis.authoring.models.ErrorResponseException>`
            """
            # Construct URL
            url = self.add_prebuilt.metadata['url']
            path_format_arguments = {
                'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True),
                'appId': self._serialize.url("app_id", app_id, 'str'),
                'versionId': self._serialize.url("version_id", version_id, 'str')
            }
            url = self._client.format_url(url, **path_format_arguments)

            # Construct parameters
            query_parameters = {}

            # 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(prebuilt_extractor_names, '[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 [201]:
                raise models.ErrorResponseException(self._deserialize, response)

            deserialized = None
            if response.status_code == 201:
                deserialized = self._deserialize('[PrebuiltEntityExtractor]', response)

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

            return deserialized
        add_prebuilt.metadata = {'url': '/apps/{appId}/versions/{versionId}/prebuilts'}

        def list_prebuilts(
                self, app_id, version_id, skip=0, take=100, custom_headers=None, raw=False, **operation_config):
            """Gets information about all the prebuilt entities in a version of the
            application.

            :param app_id: The application ID.
            :type app_id: str
            :param version_id: The version ID.
            :type version_id: str
            :param skip: The number of entries to skip. Default value is 0.
            :type skip: int
            :param take: The number of entries to return. Maximum page size is
             500. Default is 100.
            :type take: int
            :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: list or ClientRawResponse if raw=true
            :rtype:
             list[~azure.cognitiveservices.language.luis.authoring.models.PrebuiltEntityExtractor]
             or ~msrest.pipeline.ClientRawResponse
            :raises:
             :class:`ErrorResponseException<azure.cognitiveservices.language.luis.authoring.models.ErrorResponseException>`
            """
            # Construct URL
            url = self.list_prebuilts.metadata['url']
            path_format_arguments = {
                'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True),
                'appId': self._serialize.url("app_id", app_id, 'str'),
                'versionId': self._serialize.url("version_id", version_id, 'str')
            }
            url = self._client.format_url(url, **path_format_arguments)

            # Construct parameters
            query_parameters = {}
            if skip is not None:
                query_parameters['skip'] = self._serialize.query("skip", skip, 'int', minimum=0)
            if take is not None:
                query_parameters['take'] = self._serialize.query("take", take, 'int', maximum=500, minimum=0)

            # Construct headers
            header_parameters = {}
            header_parameters['Accept'] = 'application/json'
            if custom_headers:
                header_parameters.update(custom_headers)

            # 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.ErrorResponseException(self._deserialize, response)

            deserialized = None
            if response.status_code == 200:
                deserialized = self._deserialize('[PrebuiltEntityExtractor]', response)

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

            return deserialized
        list_prebuilts.metadata = {'url': '/apps/{appId}/versions/{versionId}/prebuilts'}

        def list_prebuilt_entities(
                self, app_id, version_id, custom_headers=None, raw=False, **operation_config):
            """Gets all the available prebuilt entities in a version of the
            application.

            :param app_id: The application ID.
            :type app_id: str
            :param version_id: The version ID.
            :type version_id: 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: list or ClientRawResponse if raw=true
            :rtype:
             list[~azure.cognitiveservices.language.luis.authoring.models.AvailablePrebuiltEntityModel]
             or ~msrest.pipeline.ClientRawResponse
            :raises:
             :class:`ErrorResponseException<azure.cognitiveservices.language.luis.authoring.models.ErrorResponseException>`
            """
            # Construct URL
            url = self.list_prebuilt_entities.metadata['url']
            path_format_arguments = {
                'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True),
                'appId': self._serialize.url("app_id", app_id, 'str'),
                'versionId': self._serialize.url("version_id", version_id, 'str')
            }
            url = self._client.format_url(url, **path_format_arguments)

            # Construct parameters
            query_parameters = {}

            # Construct headers
            header_parameters = {}
            header_parameters['Accept'] = 'application/json'
            if custom_headers:
                header_parameters.update(custom_headers)

            # 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.ErrorResponseException(self._deserialize, response)

            deserialized = None
            if response.status_code == 200:
                deserialized = self._deserialize('[AvailablePrebuiltEntityModel]', response)

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

            return deserialized
        list_prebuilt_entities.metadata = {'url': '/apps/{appId}/versions/{versionId}/listprebuilts'}

        def list_models(
                self, app_id, version_id, skip=0, take=100, custom_headers=None, raw=False, **operation_config):
            """Gets information about all the intent and entity models in a version of
            the application.

            :param app_id: The application ID.
            :type app_id: str
            :param version_id: The version ID.
            :type version_id: str
            :param skip: The number of entries to skip. Default value is 0.
            :type skip: int
            :param take: The number of entries to return. Maximum page size is
             500. Default is 100.
            :type take: int
            :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: list or ClientRawResponse if raw=true
            :rtype:
             list[~azure.cognitiveservices.language.luis.authoring.models.ModelInfoResponse]
             or ~msrest.pipeline.ClientRawResponse
            :raises:
             :class:`ErrorResponseException<azure.cognitiveservices.language.luis.authoring.models.ErrorResponseException>`
            """
            # Construct URL
            url = self.list_models.metadata['url']
            path_format_arguments = {
                'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True),
                'appId': self._serialize.url("app_id", app_id, 'str'),
                'versionId': self._serialize.url("version_id", version_id, 'str')
            }
            url = self._client.format_url(url, **path_format_arguments)

            # Construct parameters
            query_parameters = {}
            if skip is not None:
                query_parameters['skip'] = self._serialize.query("skip", skip, 'int', minimum=0)
            if take is not None:
                query_parameters['take'] = self._serialize.query("take", take, 'int', maximum=500, minimum=0)

            # Construct headers
            header_parameters = {}
            header_parameters['Accept'] = 'application/json'
            if custom_headers:
                header_parameters.update(custom_headers)

            # 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.ErrorResponseException(self._deserialize, response)

            deserialized = None
            if response.status_code == 200:
                deserialized = self._deserialize('[ModelInfoResponse]', response)

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

            return deserialized
        list_models.metadata = {'url': '/apps/{appId}/versions/{versionId}/models'}

        def examples_method(
                self, app_id, version_id, model_id, skip=0, take=100, custom_headers=None, raw=False, **operation_config):
            """Gets the example utterances for the given intent or entity model in a
            version of the application.

            :param app_id: The application ID.
            :type app_id: str
            :param version_id: The version ID.
            :type version_id: str
            :param model_id: The ID (GUID) of the model.
            :type model_id: str
            :param skip: The number of entries to skip. Default value is 0.
            :type skip: int
            :param take: The number of entries to return. Maximum page size is
             500. Default is 100.
            :type take: int
            :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: list or ClientRawResponse if raw=true
            :rtype:
             list[~azure.cognitiveservices.language.luis.authoring.models.LabelTextObject]
             or ~msrest.pipeline.ClientRawResponse
            :raises:
             :class:`ErrorResponseException<azure.cognitiveservices.language.luis.authoring.models.ErrorResponseException>`
            """
            # Construct URL
            url = self.examples_method.metadata['url']
            path_format_arguments = {
                'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True),
                'appId': self._serialize.url("app_id", app_id, 'str'),
                'versionId': self._serialize.url("version_id", version_id, 'str'),
                'modelId': self._serialize.url("model_id", model_id, 'str')
            }
            url = self._client.format_url(url, **path_format_arguments)

            # Construct parameters
            query_parameters = {}
            if skip is not None:
                query_parameters['skip'] = self._serialize.query("skip", skip, 'int', minimum=0)
            if take is not None:
                query_parameters['take'] = self._serialize.query("take", take, 'int', maximum=500, minimum=0)

            # Construct headers
            header_parameters = {}
            header_parameters['Accept'] = 'application/json'
            if custom_headers:
                header_parameters.update(custom_headers)

            # 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.ErrorResponseException(self._deserialize, response)

            deserialized = None
            if response.status_code == 200:
                deserialized = self._deserialize('[LabelTextObject]', response)

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

            return deserialized
        examples_method.metadata = {'url': '/apps/{appId}/versions/{versionId}/models/{modelId}/examples'}

        def get_intent(
                self, app_id, version_id, intent_id, custom_headers=None, raw=False, **operation_config):
            """Gets information about the intent model in a version of the
            application.

            :param app_id: The application ID.
            :type app_id: str
            :param version_id: The version ID.
            :type version_id: str
            :param intent_id: The intent classifier ID.
            :type intent_id: 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: IntentClassifier or ClientRawResponse if raw=true
            :rtype:
             ~azure.cognitiveservices.language.luis.authoring.models.IntentClassifier
             or ~msrest.pipeline.ClientRawResponse
            :raises:
             :class:`ErrorResponseException<azure.cognitiveservices.language.luis.authoring.models.ErrorResponseException>`
            """
            # Construct URL
            url = self.get_intent.metadata['url']
            path_format_arguments = {
                'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True),
                'appId': self._serialize.url("app_id", app_id, 'str'),
                'versionId': self._serialize.url("version_id", version_id, 'str'),
                'intentId': self._serialize.url("intent_id", intent_id, 'str')
            }
            url = self._client.format_url(url, **path_format_arguments)

            # Construct parameters
            query_parameters = {}

            # Construct headers
            header_parameters = {}
            header_parameters['Accept'] = 'application/json'
            if custom_headers:
                header_parameters.update(custom_headers)

            # 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.ErrorResponseException(self._deserialize, response)

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

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

            return deserialized
        get_intent.metadata = {'url': '/apps/{appId}/versions/{versionId}/intents/{intentId}'}

        def update_intent(
                self, app_id, version_id, intent_id, name=None, custom_headers=None, raw=False, **operation_config):
            """Updates the name of an intent in a version of the application.

            :param app_id: The application ID.
            :type app_id: str
            :param version_id: The version ID.
            :type version_id: str
            :param intent_id: The intent classifier ID.
            :type intent_id: str
            :param name: The entity's new name.
            :type 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: OperationStatus or ClientRawResponse if raw=true
            :rtype:
             ~azure.cognitiveservices.language.luis.authoring.models.OperationStatus
             or ~msrest.pipeline.ClientRawResponse
            :raises:
             :class:`ErrorResponseException<azure.cognitiveservices.language.luis.authoring.models.ErrorResponseException>`
            """
            model_update_object = models.ModelUpdateObject(name=name)

            # Construct URL
            url = self.update_intent.metadata['url']
            path_format_arguments = {
                'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True),
                'appId': self._serialize.url("app_id", app_id, 'str'),
                'versionId': self._serialize.url("version_id", version_id, 'str'),
                'intentId': self._serialize.url("intent_id", intent_id, 'str')
            }
            url = self._client.format_url(url, **path_format_arguments)

            # Construct parameters
            query_parameters = {}

            # 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(model_update_object, 'ModelUpdateObject')

            # Construct and send request
            request = self._client.put(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.ErrorResponseException(self._deserialize, response)

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

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

            return deserialized
        update_intent.metadata = {'url': '/apps/{appId}/versions/{versionId}/intents/{intentId}'}

        def delete_intent(
                self, app_id, version_id, intent_id, delete_utterances=False, custom_headers=None, raw=False, **operation_config):
            """Deletes an intent from a version of the application.

            :param app_id: The application ID.
            :type app_id: str
            :param version_id: The version ID.
            :type version_id: str
            :param intent_id: The intent classifier ID.
            :type intent_id: str
            :param delete_utterances: If true, deletes the intent's example
             utterances. If false, moves the example utterances to the None intent.
             The default value is false.
            :type delete_utterances: bool
            :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: OperationStatus or ClientRawResponse if raw=true
            :rtype:
             ~azure.cognitiveservices.language.luis.authoring.models.OperationStatus
             or ~msrest.pipeline.ClientRawResponse
            :raises:
             :class:`ErrorResponseException<azure.cognitiveservices.language.luis.authoring.models.ErrorResponseException>`
            """
            # Construct URL
            url = self.delete_intent.metadata['url']
            path_format_arguments = {
                'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True),
                'appId': self._serialize.url("app_id", app_id, 'str'),
                'versionId': self._serialize.url("version_id", version_id, 'str'),
                'intentId': self._serialize.url("intent_id", intent_id, 'str')
            }
            url = self._client.format_url(url, **path_format_arguments)

            # Construct parameters
            query_parameters = {}
            if delete_utterances is not None:
                query_parameters['deleteUtterances'] = self._serialize.query("delete_utterances", delete_utterances, 'bool')

            # Construct headers
            header_parameters = {}
            header_parameters['Accept'] = 'application/json'
            if custom_headers:
                header_parameters.update(custom_headers)

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

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

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

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

            return deserialized
        delete_intent.metadata = {'url': '/apps/{appId}/versions/{versionId}/intents/{intentId}'}

        def get_entity(
                self, app_id, version_id, entity_id, custom_headers=None, raw=False, **operation_config):
            """Gets information about an entity model in a version of the application.

            :param app_id: The application ID.
            :type app_id: str
            :param version_id: The version ID.
            :type version_id: str
            :param entity_id: The entity extractor ID.
            :type entity_id: 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: NDepthEntityExtractor or ClientRawResponse if raw=true
            :rtype:
             ~azure.cognitiveservices.language.luis.authoring.models.NDepthEntityExtractor
             or ~msrest.pipeline.ClientRawResponse
            :raises:
             :class:`ErrorResponseException<azure.cognitiveservices.language.luis.authoring.models.ErrorResponseException>`
            """
            # Construct URL
            url = self.get_entity.metadata['url']
            path_format_arguments = {
                'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True),
                'appId': self._serialize.url("app_id", app_id, 'str'),
                'versionId': self._serialize.url("version_id", version_id, 'str'),
                'entityId': self._serialize.url("entity_id", entity_id, 'str')
            }
            url = self._client.format_url(url, **path_format_arguments)

            # Construct parameters
            query_parameters = {}

            # Construct headers
            header_parameters = {}
            header_parameters['Accept'] = 'application/json'
            if custom_headers:
                header_parameters.update(custom_headers)

            # 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.ErrorResponseException(self._deserialize, response)

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

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

            return deserialized
        get_entity.metadata = {'url': '/apps/{appId}/versions/{versionId}/entities/{entityId}'}

        def delete_entity(
                self, app_id, version_id, entity_id, custom_headers=None, raw=False, **operation_config):
            """Deletes an entity or a child from a version of the application.

            :param app_id: The application ID.
            :type app_id: str
            :param version_id: The version ID.
            :type version_id: str
            :param entity_id: The entity extractor or the child entity extractor
             ID.
            :type entity_id: 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: OperationStatus or ClientRawResponse if raw=true
            :rtype:
             ~azure.cognitiveservices.language.luis.authoring.models.OperationStatus
             or ~msrest.pipeline.ClientRawResponse
            :raises:
             :class:`ErrorResponseException<azure.cognitiveservices.language.luis.authoring.models.ErrorResponseException>`
            """
            # Construct URL
            url = self.delete_entity.metadata['url']
            path_format_arguments = {
                'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True),
                'appId': self._serialize.url("app_id", app_id, 'str'),
                'versionId': self._serialize.url("version_id", version_id, 'str'),
                'entityId': self._serialize.url("entity_id", entity_id, 'str')
            }
            url = self._client.format_url(url, **path_format_arguments)

            # Construct parameters
            query_parameters = {}

            # Construct headers
            header_parameters = {}
            header_parameters['Accept'] = 'application/json'
            if custom_headers:
                header_parameters.update(custom_headers)

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

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

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

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

            return deserialized
        delete_entity.metadata = {'url': '/apps/{appId}/versions/{versionId}/entities/{entityId}'}

        def update_entity_child(
                self, app_id, version_id, entity_id, name=None, instance_of=None, custom_headers=None, raw=False, **operation_config):
            """Updates the name of an entity extractor or the name and instanceOf
            model of a child entity extractor.

            :param app_id: The application ID.
            :type app_id: str
            :param version_id: The version ID.
            :type version_id: str
            :param entity_id: The entity extractor or the child entity extractor
             ID.
            :type entity_id: str
            :param name: Entity name.
            :type name: str
            :param instance_of: The instance of model name
            :type instance_of: 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: OperationStatus or ClientRawResponse if raw=true
            :rtype:
             ~azure.cognitiveservices.language.luis.authoring.models.OperationStatus
             or ~msrest.pipeline.ClientRawResponse
            :raises:
             :class:`ErrorResponseException<azure.cognitiveservices.language.luis.authoring.models.ErrorResponseException>`
            """
            entity_model_update_object = models.EntityModelUpdateObject(name=name, instance_of=instance_of)

            # Construct URL
            url = self.update_entity_child.metadata['url']
            path_format_arguments = {
                'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True),
                'appId': self._serialize.url("app_id", app_id, 'str'),
                'versionId': self._serialize.url("version_id", version_id, 'str'),
                'entityId': self._serialize.url("entity_id", entity_id, 'str')
            }
            url = self._client.format_url(url, **path_format_arguments)

            # Construct parameters
            query_parameters = {}

            # 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(entity_model_update_object, 'EntityModelUpdateObject')

            # Construct and send request
            request = self._client.patch(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.ErrorResponseException(self._deserialize, response)

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

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

            return deserialized
        update_entity_child.metadata = {'url': '/apps/{appId}/versions/{versionId}/entities/{entityId}'}

        def get_intent_features(
                self, app_id, version_id, intent_id, custom_headers=None, raw=False, **operation_config):
            """Gets the information of the features used by the intent in a version of
            the application.

            :param app_id: The application ID.
            :type app_id: str
            :param version_id: The version ID.
            :type version_id: str
            :param intent_id: The intent classifier ID.
            :type intent_id: 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: list or ClientRawResponse if raw=true
            :rtype:
             list[~azure.cognitiveservices.language.luis.authoring.models.ModelFeatureInformation]
             or ~msrest.pipeline.ClientRawResponse
            :raises:
             :class:`ErrorResponseException<azure.cognitiveservices.language.luis.authoring.models.ErrorResponseException>`
            """
            # Construct URL
            url = self.get_intent_features.metadata['url']
            path_format_arguments = {
                'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True),
                'appId': self._serialize.url("app_id", app_id, 'str'),
                'versionId': self._serialize.url("version_id", version_id, 'str'),
                'intentId': self._serialize.url("intent_id", intent_id, 'str')
            }
            url = self._client.format_url(url, **path_format_arguments)

            # Construct parameters
            query_parameters = {}

            # Construct headers
            header_parameters = {}
            header_parameters['Accept'] = 'application/json'
            if custom_headers:
                header_parameters.update(custom_headers)

            # 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.ErrorResponseException(self._deserialize, response)

            deserialized = None
            if response.status_code == 200:
                deserialized = self._deserialize('[ModelFeatureInformation]', response)

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

            return deserialized
        get_intent_features.metadata = {'url': '/apps/{appId}/versions/{versionId}/intents/{intentId}/features'}

        def replace_intent_features(
                self, app_id, version_id, intent_id, feature_relations_update_object, custom_headers=None, raw=False, **operation_config):
            """Updates the information of the features used by the intent in a version
            of the application.

            :param app_id: The application ID.
            :type app_id: str
            :param version_id: The version ID.
            :type version_id: str
            :param intent_id: The intent classifier ID.
            :type intent_id: str
            :param feature_relations_update_object: A list of feature information
             objects containing the new feature relations.
            :type feature_relations_update_object:
             list[~azure.cognitiveservices.language.luis.authoring.models.ModelFeatureInformation]
            :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: OperationStatus or ClientRawResponse if raw=true
            :rtype:
             ~azure.cognitiveservices.language.luis.authoring.models.OperationStatus
             or ~msrest.pipeline.ClientRawResponse
            :raises:
             :class:`ErrorResponseException<azure.cognitiveservices.language.luis.authoring.models.ErrorResponseException>`
            """
            # Construct URL
            url = self.replace_intent_features.metadata['url']
            path_format_arguments = {
                'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True),
                'appId': self._serialize.url("app_id", app_id, 'str'),
                'versionId': self._serialize.url("version_id", version_id, 'str'),
                'intentId': self._serialize.url("intent_id", intent_id, 'str')
            }
            url = self._client.format_url(url, **path_format_arguments)

            # Construct parameters
            query_parameters = {}

            # 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(feature_relations_update_object, '[ModelFeatureInformation]')

            # Construct and send request
            request = self._client.put(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.ErrorResponseException(self._deserialize, response)

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

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

            return deserialized
        replace_intent_features.metadata = {'url': '/apps/{appId}/versions/{versionId}/intents/{intentId}/features'}

        def delete_intent_feature(
                self, app_id, version_id, intent_id, model_name=None, feature_name=None, custom_headers=None, raw=False, **operation_config):
            """Deletes a relation from the feature relations used by the intent in a
            version of the application.

            :param app_id: The application ID.
            :type app_id: str
            :param version_id: The version ID.
            :type version_id: str
            :param intent_id: The intent classifier ID.
            :type intent_id: str
            :param model_name: The name of the model used.
            :type model_name: str
            :param feature_name: The name of the feature used.
            :type feature_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: OperationStatus or ClientRawResponse if raw=true
            :rtype:
             ~azure.cognitiveservices.language.luis.authoring.models.OperationStatus
             or ~msrest.pipeline.ClientRawResponse
            :raises:
             :class:`ErrorResponseException<azure.cognitiveservices.language.luis.authoring.models.ErrorResponseException>`
            """
            feature_relation_delete_object = models.ModelFeatureInformation(model_name=model_name, feature_name=feature_name)

            # Construct URL
            url = self.delete_intent_feature.metadata['url']
            path_format_arguments = {
                'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True),
                'appId': self._serialize.url("app_id", app_id, 'str'),
                'versionId': self._serialize.url("version_id", version_id, 'str'),
                'intentId': self._serialize.url("intent_id", intent_id, 'str')
            }
            url = self._client.format_url(url, **path_format_arguments)

            # Construct parameters
            query_parameters = {}

            # 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(feature_relation_delete_object, 'ModelFeatureInformation')

            # Construct and send request
            request = self._client.delete(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.ErrorResponseException(self._deserialize, response)

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

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

            return deserialized
        delete_intent_feature.metadata = {'url': '/apps/{appId}/versions/{versionId}/intents/{intentId}/features'}

        def get_entity_features(
                self, app_id, version_id, entity_id, custom_headers=None, raw=False, **operation_config):
            """Gets the information of the features used by the entity in a version of
            the application.

            :param app_id: The application ID.
            :type app_id: str
            :param version_id: The version ID.
            :type version_id: str
            :param entity_id: The entity extractor ID.
            :type entity_id: 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: list or ClientRawResponse if raw=true
            :rtype:
             list[~azure.cognitiveservices.language.luis.authoring.models.ModelFeatureInformation]
             or ~msrest.pipeline.ClientRawResponse
            :raises:
             :class:`ErrorResponseException<azure.cognitiveservices.language.luis.authoring.models.ErrorResponseException>`
            """
            # Construct URL
            url = self.get_entity_features.metadata['url']
            path_format_arguments = {
                'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True),
                'appId': self._serialize.url("app_id", app_id, 'str'),
                'versionId': self._serialize.url("version_id", version_id, 'str'),
                'entityId': self._serialize.url("entity_id", entity_id, 'str')
            }
            url = self._client.format_url(url, **path_format_arguments)

            # Construct parameters
            query_parameters = {}

            # Construct headers
            header_parameters = {}
            header_parameters['Accept'] = 'application/json'
            if custom_headers:
                header_parameters.update(custom_headers)

            # 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.ErrorResponseException(self._deserialize, response)

            deserialized = None
            if response.status_code == 200:
                deserialized = self._deserialize('[ModelFeatureInformation]', response)

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

            return deserialized
        get_entity_features.metadata = {'url': '/apps/{appId}/versions/{versionId}/entities/{entityId}/features'}

        def replace_entity_features(
                self, app_id, version_id, entity_id, feature_relations_update_object, custom_headers=None, raw=False, **operation_config):
            """Updates the information of the features used by the entity in a version
            of the application.

            :param app_id: The application ID.
            :type app_id: str
            :param version_id: The version ID.
            :type version_id: str
            :param entity_id: The entity extractor ID.
            :type entity_id: str
            :param feature_relations_update_object: A list of feature information
             objects containing the new feature relations.
            :type feature_relations_update_object:
             list[~azure.cognitiveservices.language.luis.authoring.models.ModelFeatureInformation]
            :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: OperationStatus or ClientRawResponse if raw=true
            :rtype:
             ~azure.cognitiveservices.language.luis.authoring.models.OperationStatus
             or ~msrest.pipeline.ClientRawResponse
            :raises:
             :class:`ErrorResponseException<azure.cognitiveservices.language.luis.authoring.models.ErrorResponseException>`
            """
            # Construct URL
            url = self.replace_entity_features.metadata['url']
            path_format_arguments = {
                'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True),
                'appId': self._serialize.url("app_id", app_id, 'str'),
                'versionId': self._serialize.url("version_id", version_id, 'str'),
                'entityId': self._serialize.url("entity_id", entity_id, 'str')
            }
            url = self._client.format_url(url, **path_format_arguments)

            # Construct parameters
            query_parameters = {}

            # 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(feature_relations_update_object, '[ModelFeatureInformation]')

            # Construct and send request
            request = self._client.put(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.ErrorResponseException(self._deserialize, response)

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

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

            return deserialized
        replace_entity_features.metadata = {'url': '/apps/{appId}/versions/{versionId}/entities/{entityId}/features'}

        def delete_entity_feature(
                self, app_id, version_id, entity_id, model_name=None, feature_name=None, custom_headers=None, raw=False, **operation_config):
            """Deletes a relation from the feature relations used by the entity in a
            version of the application.

            :param app_id: The application ID.
            :type app_id: str
            :param version_id: The version ID.
            :type version_id: str
            :param entity_id: The entity extractor ID.
            :type entity_id: str
            :param model_name: The name of the model used.
            :type model_name: str
            :param feature_name: The name of the feature used.
            :type feature_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: OperationStatus or ClientRawResponse if raw=true
            :rtype:
             ~azure.cognitiveservices.language.luis.authoring.models.OperationStatus
             or ~msrest.pipeline.ClientRawResponse
            :raises:
             :class:`ErrorResponseException<azure.cognitiveservices.language.luis.authoring.models.ErrorResponseException>`
            """
            feature_relation_delete_object = models.ModelFeatureInformation(model_name=model_name, feature_name=feature_name)

            # Construct URL
            url = self.delete_entity_feature.metadata['url']
            path_format_arguments = {
                'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True),
                'appId': self._serialize.url("app_id", app_id, 'str'),
                'versionId': self._serialize.url("version_id", version_id, 'str'),
                'entityId': self._serialize.url("entity_id", entity_id, 'str')
            }
            url = self._client.format_url(url, **path_format_arguments)

            # Construct parameters
            query_parameters = {}

            # 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(feature_relation_delete_object, 'ModelFeatureInformation')

            # Construct and send request
            request = self._client.delete(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.ErrorResponseException(self._deserialize, response)

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

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

            return deserialized
        delete_entity_feature.metadata = {'url': '/apps/{appId}/versions/{versionId}/entities/{entityId}/features'}

        def get_hierarchical_entity(
                self, app_id, version_id, h_entity_id, custom_headers=None, raw=False, **operation_config):
            """Gets information about a hierarchical entity in a version of the
            application.

            :param app_id: The application ID.
            :type app_id: str
            :param version_id: The version ID.
            :type version_id: str
            :param h_entity_id: The hierarchical entity extractor ID.
            :type h_entity_id: 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: HierarchicalEntityExtractor or ClientRawResponse if raw=true
            :rtype:
             ~azure.cognitiveservices.language.luis.authoring.models.HierarchicalEntityExtractor
             or ~msrest.pipeline.ClientRawResponse
            :raises:
             :class:`ErrorResponseException<azure.cognitiveservices.language.luis.authoring.models.ErrorResponseException>`
            """
            # Construct URL
            url = self.get_hierarchical_entity.metadata['url']
            path_format_arguments = {
                'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True),
                'appId': self._serialize.url("app_id", app_id, 'str'),
                'versionId': self._serialize.url("version_id", version_id, 'str'),
                'hEntityId': self._serialize.url("h_entity_id", h_entity_id, 'str')
            }
            url = self._client.format_url(url, **path_format_arguments)

            # Construct parameters
            query_parameters = {}

            # Construct headers
            header_parameters = {}
            header_parameters['Accept'] = 'application/json'
            if custom_headers:
                header_parameters.update(custom_headers)

            # 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.ErrorResponseException(self._deserialize, response)

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

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

            return deserialized
        get_hierarchical_entity.metadata = {'url': '/apps/{appId}/versions/{versionId}/hierarchicalentities/{hEntityId}'}

        def update_hierarchical_entity(
                self, app_id, version_id, h_entity_id, name=None, custom_headers=None, raw=False, **operation_config):
            """Updates the name of a hierarchical entity model in a version of the
            application.

            :param app_id: The application ID.
            :type app_id: str
            :param version_id: The version ID.
            :type version_id: str
            :param h_entity_id: The hierarchical entity extractor ID.
            :type h_entity_id: str
            :param name: The entity's new name.
            :type 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: OperationStatus or ClientRawResponse if raw=true
            :rtype:
             ~azure.cognitiveservices.language.luis.authoring.models.OperationStatus
             or ~msrest.pipeline.ClientRawResponse
            :raises:
             :class:`ErrorResponseException<azure.cognitiveservices.language.luis.authoring.models.ErrorResponseException>`
            """
            model_update_object = models.ModelUpdateObject(name=name)

            # Construct URL
            url = self.update_hierarchical_entity.metadata['url']
            path_format_arguments = {
                'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True),
                'appId': self._serialize.url("app_id", app_id, 'str'),
                'versionId': self._serialize.url("version_id", version_id, 'str'),
                'hEntityId': self._serialize.url("h_entity_id", h_entity_id, 'str')
            }
            url = self._client.format_url(url, **path_format_arguments)

            # Construct parameters
            query_parameters = {}

            # 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(model_update_object, 'ModelUpdateObject')

            # Construct and send request
            request = self._client.patch(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.ErrorResponseException(self._deserialize, response)

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

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

            return deserialized
        update_hierarchical_entity.metadata = {'url': '/apps/{appId}/versions/{versionId}/hierarchicalentities/{hEntityId}'}

        def delete_hierarchical_entity(
                self, app_id, version_id, h_entity_id, custom_headers=None, raw=False, **operation_config):
            """Deletes a hierarchical entity from a version of the application.

            :param app_id: The application ID.
            :type app_id: str
            :param version_id: The version ID.
            :type version_id: str
            :param h_entity_id: The hierarchical entity extractor ID.
            :type h_entity_id: 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: OperationStatus or ClientRawResponse if raw=true
            :rtype:
             ~azure.cognitiveservices.language.luis.authoring.models.OperationStatus
             or ~msrest.pipeline.ClientRawResponse
            :raises:
             :class:`ErrorResponseException<azure.cognitiveservices.language.luis.authoring.models.ErrorResponseException>`
            """
            # Construct URL
            url = self.delete_hierarchical_entity.metadata['url']
            path_format_arguments = {
                'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True),
                'appId': self._serialize.url("app_id", app_id, 'str'),
                'versionId': self._serialize.url("version_id", version_id, 'str'),
                'hEntityId': self._serialize.url("h_entity_id", h_entity_id, 'str')
            }
            url = self._client.format_url(url, **path_format_arguments)

            # Construct parameters
            query_parameters = {}

            # Construct headers
            header_parameters = {}
            header_parameters['Accept'] = 'application/json'
            if custom_headers:
                header_parameters.update(custom_headers)

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

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

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

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

            return deserialized
        delete_hierarchical_entity.metadata = {'url': '/apps/{appId}/versions/{versionId}/hierarchicalentities/{hEntityId}'}

        def get_composite_entity(
                self, app_id, version_id, c_entity_id, custom_headers=None, raw=False, **operation_config):
            """Gets information about a composite entity in a version of the
            application.

            :param app_id: The application ID.
            :type app_id: str
            :param version_id: The version ID.
            :type version_id: str
            :param c_entity_id: The composite entity extractor ID.
            :type c_entity_id: 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: CompositeEntityExtractor or ClientRawResponse if raw=true
            :rtype:
             ~azure.cognitiveservices.language.luis.authoring.models.CompositeEntityExtractor
             or ~msrest.pipeline.ClientRawResponse
            :raises:
             :class:`ErrorResponseException<azure.cognitiveservices.language.luis.authoring.models.ErrorResponseException>`
            """
            # Construct URL
            url = self.get_composite_entity.metadata['url']
            path_format_arguments = {
                'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True),
                'appId': self._serialize.url("app_id", app_id, 'str'),
                'versionId': self._serialize.url("version_id", version_id, 'str'),
                'cEntityId': self._serialize.url("c_entity_id", c_entity_id, 'str')
            }
            url = self._client.format_url(url, **path_format_arguments)

            # Construct parameters
            query_parameters = {}

            # Construct headers
            header_parameters = {}
            header_parameters['Accept'] = 'application/json'
            if custom_headers:
                header_parameters.update(custom_headers)

            # 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.ErrorResponseException(self._deserialize, response)

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

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

            return deserialized
        get_composite_entity.metadata = {'url': '/apps/{appId}/versions/{versionId}/compositeentities/{cEntityId}'}

        def update_composite_entity(
                self, app_id, version_id, c_entity_id, children=None, name=None, custom_headers=None, raw=False, **operation_config):
            """Updates a composite entity in a version of the application.

            :param app_id: The application ID.
            :type app_id: str
            :param version_id: The version ID.
            :type version_id: str
            :param c_entity_id: The composite entity extractor ID.
            :type c_entity_id: str
            :param children: Child entities.
            :type children: list[str]
            :param name: Entity name.
            :type 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: OperationStatus or ClientRawResponse if raw=true
            :rtype:
             ~azure.cognitiveservices.language.luis.authoring.models.OperationStatus
             or ~msrest.pipeline.ClientRawResponse
            :raises:
             :class:`ErrorResponseException<azure.cognitiveservices.language.luis.authoring.models.ErrorResponseException>`
            """
            composite_model_update_object = models.CompositeEntityModel(children=children, name=name)

            # Construct URL
            url = self.update_composite_entity.metadata['url']
            path_format_arguments = {
                'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True),
                'appId': self._serialize.url("app_id", app_id, 'str'),
                'versionId': self._serialize.url("version_id", version_id, 'str'),
                'cEntityId': self._serialize.url("c_entity_id", c_entity_id, 'str')
            }
            url = self._client.format_url(url, **path_format_arguments)

            # Construct parameters
            query_parameters = {}

            # 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(composite_model_update_object, 'CompositeEntityModel')

            # Construct and send request
            request = self._client.put(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.ErrorResponseException(self._deserialize, response)

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

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

            return deserialized
        update_composite_entity.metadata = {'url': '/apps/{appId}/versions/{versionId}/compositeentities/{cEntityId}'}

        def delete_composite_entity(
                self, app_id, version_id, c_entity_id, custom_headers=None, raw=False, **operation_config):
            """Deletes a composite entity from a version of the application.

            :param app_id: The application ID.
            :type app_id: str
            :param version_id: The version ID.
            :type version_id: str
            :param c_entity_id: The composite entity extractor ID.
            :type c_entity_id: 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: OperationStatus or ClientRawResponse if raw=true
            :rtype:
             ~azure.cognitiveservices.language.luis.authoring.models.OperationStatus
             or ~msrest.pipeline.ClientRawResponse
            :raises:
             :class:`ErrorResponseException<azure.cognitiveservices.language.luis.authoring.models.ErrorResponseException>`
            """
            # Construct URL
            url = self.delete_composite_entity.metadata['url']
            path_format_arguments = {
                'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True),
                'appId': self._serialize.url("app_id", app_id, 'str'),
                'versionId': self._serialize.url("version_id", version_id, 'str'),
                'cEntityId': self._serialize.url("c_entity_id", c_entity_id, 'str')
            }
            url = self._client.format_url(url, **path_format_arguments)

            # Construct parameters
            query_parameters = {}

            # Construct headers
            header_parameters = {}
            header_parameters['Accept'] = 'application/json'
            if custom_headers:
                header_parameters.update(custom_headers)

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

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

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

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

            return deserialized
        delete_composite_entity.metadata = {'url': '/apps/{appId}/versions/{versionId}/compositeentities/{cEntityId}'}

        def get_closed_list(
                self, app_id, version_id, cl_entity_id, custom_headers=None, raw=False, **operation_config):
            """Gets information about a list entity in a version of the application.

            :param app_id: The application ID.
            :type app_id: str
            :param version_id: The version ID.
            :type version_id: str
            :param cl_entity_id: The list model ID.
            :type cl_entity_id: 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: ClosedListEntityExtractor or ClientRawResponse if raw=true
            :rtype:
             ~azure.cognitiveservices.language.luis.authoring.models.ClosedListEntityExtractor
             or ~msrest.pipeline.ClientRawResponse
            :raises:
             :class:`ErrorResponseException<azure.cognitiveservices.language.luis.authoring.models.ErrorResponseException>`
            """
            # Construct URL
            url = self.get_closed_list.metadata['url']
            path_format_arguments = {
                'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True),
                'appId': self._serialize.url("app_id", app_id, 'str'),
                'versionId': self._serialize.url("version_id", version_id, 'str'),
                'clEntityId': self._serialize.url("cl_entity_id", cl_entity_id, 'str')
            }
            url = self._client.format_url(url, **path_format_arguments)

            # Construct parameters
            query_parameters = {}

            # Construct headers
            header_parameters = {}
            header_parameters['Accept'] = 'application/json'
            if custom_headers:
                header_parameters.update(custom_headers)

            # 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.ErrorResponseException(self._deserialize, response)

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

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

            return deserialized
        get_closed_list.metadata = {'url': '/apps/{appId}/versions/{versionId}/closedlists/{clEntityId}'}

        def update_closed_list(
                self, app_id, version_id, cl_entity_id, sub_lists=None, name=None, custom_headers=None, raw=False, **operation_config):
            """Updates the list entity in a version of the application.

            :param app_id: The application ID.
            :type app_id: str
            :param version_id: The version ID.
            :type version_id: str
            :param cl_entity_id: The list model ID.
            :type cl_entity_id: str
            :param sub_lists: The new sublists for the feature.
            :type sub_lists:
             list[~azure.cognitiveservices.language.luis.authoring.models.WordListObject]
            :param name: The new name of the list entity.
            :type 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: OperationStatus or ClientRawResponse if raw=true
            :rtype:
             ~azure.cognitiveservices.language.luis.authoring.models.OperationStatus
             or ~msrest.pipeline.ClientRawResponse
            :raises:
             :class:`ErrorResponseException<azure.cognitiveservices.language.luis.authoring.models.ErrorResponseException>`
            """
            closed_list_model_update_object = models.ClosedListModelUpdateObject(sub_lists=sub_lists, name=name)

            # Construct URL
            url = self.update_closed_list.metadata['url']
            path_format_arguments = {
                'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True),
                'appId': self._serialize.url("app_id", app_id, 'str'),
                'versionId': self._serialize.url("version_id", version_id, 'str'),
                'clEntityId': self._serialize.url("cl_entity_id", cl_entity_id, 'str')
            }
            url = self._client.format_url(url, **path_format_arguments)

            # Construct parameters
            query_parameters = {}

            # 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(closed_list_model_update_object, 'ClosedListModelUpdateObject')

            # Construct and send request
            request = self._client.put(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.ErrorResponseException(self._deserialize, response)

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

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

            return deserialized
        update_closed_list.metadata = {'url': '/apps/{appId}/versions/{versionId}/closedlists/{clEntityId}'}

        def patch_closed_list(
                self, app_id, version_id, cl_entity_id, sub_lists=None, custom_headers=None, raw=False, **operation_config):
            """Adds a batch of sublists to an existing list entity in a version of the
            application.

            :param app_id: The application ID.
            :type app_id: str
            :param version_id: The version ID.
            :type version_id: str
            :param cl_entity_id: The list entity model ID.
            :type cl_entity_id: str
            :param sub_lists: Sublists to add.
            :type sub_lists:
             list[~azure.cognitiveservices.language.luis.authoring.models.WordListObject]
            :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: OperationStatus or ClientRawResponse if raw=true
            :rtype:
             ~azure.cognitiveservices.language.luis.authoring.models.OperationStatus
             or ~msrest.pipeline.ClientRawResponse
            :raises:
             :class:`ErrorResponseException<azure.cognitiveservices.language.luis.authoring.models.ErrorResponseException>`
            """
            closed_list_model_patch_object = models.ClosedListModelPatchObject(sub_lists=sub_lists)

            # Construct URL
            url = self.patch_closed_list.metadata['url']
            path_format_arguments = {
                'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True),
                'appId': self._serialize.url("app_id", app_id, 'str'),
                'versionId': self._serialize.url("version_id", version_id, 'str'),
                'clEntityId': self._serialize.url("cl_entity_id", cl_entity_id, 'str')
            }
            url = self._client.format_url(url, **path_format_arguments)

            # Construct parameters
            query_parameters = {}

            # 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(closed_list_model_patch_object, 'ClosedListModelPatchObject')

            # Construct and send request
            request = self._client.patch(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.ErrorResponseException(self._deserialize, response)

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

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

            return deserialized
        patch_closed_list.metadata = {'url': '/apps/{appId}/versions/{versionId}/closedlists/{clEntityId}'}

        def delete_closed_list(
                self, app_id, version_id, cl_entity_id, custom_headers=None, raw=False, **operation_config):
            """Deletes a list entity model from a version of the application.

            :param app_id: The application ID.
            :type app_id: str
            :param version_id: The version ID.
            :type version_id: str
            :param cl_entity_id: The list entity model ID.
            :type cl_entity_id: 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: OperationStatus or ClientRawResponse if raw=true
            :rtype:
             ~azure.cognitiveservices.language.luis.authoring.models.OperationStatus
             or ~msrest.pipeline.ClientRawResponse
            :raises:
             :class:`ErrorResponseException<azure.cognitiveservices.language.luis.authoring.models.ErrorResponseException>`
            """
            # Construct URL
            url = self.delete_closed_list.metadata['url']
            path_format_arguments = {
                'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True),
                'appId': self._serialize.url("app_id", app_id, 'str'),
                'versionId': self._serialize.url("version_id", version_id, 'str'),
                'clEntityId': self._serialize.url("cl_entity_id", cl_entity_id, 'str')
            }
            url = self._client.format_url(url, **path_format_arguments)

            # Construct parameters
            query_parameters = {}

            # Construct headers
            header_parameters = {}
            header_parameters['Accept'] = 'application/json'
            if custom_headers:
                header_parameters.update(custom_headers)

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

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

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

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

            return deserialized
        delete_closed_list.metadata = {'url': '/apps/{appId}/versions/{versionId}/closedlists/{clEntityId}'}

        def get_prebuilt(
                self, app_id, version_id, prebuilt_id, custom_headers=None, raw=False, **operation_config):
            """Gets information about a prebuilt entity model in a version of the
            application.

            :param app_id: The application ID.
            :type app_id: str
            :param version_id: The version ID.
            :type version_id: str
            :param prebuilt_id: The prebuilt entity extractor ID.
            :type prebuilt_id: 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: PrebuiltEntityExtractor or ClientRawResponse if raw=true
            :rtype:
             ~azure.cognitiveservices.language.luis.authoring.models.PrebuiltEntityExtractor
             or ~msrest.pipeline.ClientRawResponse
            :raises:
             :class:`ErrorResponseException<azure.cognitiveservices.language.luis.authoring.models.ErrorResponseException>`
            """
            # Construct URL
            url = self.get_prebuilt.metadata['url']
            path_format_arguments = {
                'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True),
                'appId': self._serialize.url("app_id", app_id, 'str'),
                'versionId': self._serialize.url("version_id", version_id, 'str'),
                'prebuiltId': self._serialize.url("prebuilt_id", prebuilt_id, 'str')
            }
            url = self._client.format_url(url, **path_format_arguments)

            # Construct parameters
            query_parameters = {}

            # Construct headers
            header_parameters = {}
            header_parameters['Accept'] = 'application/json'
            if custom_headers:
                header_parameters.update(custom_headers)

            # 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.ErrorResponseException(self._deserialize, response)

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

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

            return deserialized
        get_prebuilt.metadata = {'url': '/apps/{appId}/versions/{versionId}/prebuilts/{prebuiltId}'}

        def delete_prebuilt(
                self, app_id, version_id, prebuilt_id, custom_headers=None, raw=False, **operation_config):
            """Deletes a prebuilt entity extractor from a version of the application.

            :param app_id: The application ID.
            :type app_id: str
            :param version_id: The version ID.
            :type version_id: str
            :param prebuilt_id: The prebuilt entity extractor ID.
            :type prebuilt_id: 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: OperationStatus or ClientRawResponse if raw=true
            :rtype:
             ~azure.cognitiveservices.language.luis.authoring.models.OperationStatus
             or ~msrest.pipeline.ClientRawResponse
            :raises:
             :class:`ErrorResponseException<azure.cognitiveservices.language.luis.authoring.models.ErrorResponseException>`
            """
            # Construct URL
            url = self.delete_prebuilt.metadata['url']
            path_format_arguments = {
                'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True),
                'appId': self._serialize.url("app_id", app_id, 'str'),
                'versionId': self._serialize.url("version_id", version_id, 'str'),
                'prebuiltId': self._serialize.url("prebuilt_id", prebuilt_id, 'str')
            }
            url = self._client.format_url(url, **path_format_arguments)

            # Construct parameters
            query_parameters = {}

            # Construct headers
            header_parameters = {}
            header_parameters['Accept'] = 'application/json'
            if custom_headers:
                header_parameters.update(custom_headers)

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

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

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

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

            return deserialized
        delete_prebuilt.metadata = {'url': '/apps/{appId}/versions/{versionId}/prebuilts/{prebuiltId}'}

        def delete_sub_list(
                self, app_id, version_id, cl_entity_id, sub_list_id, custom_headers=None, raw=False, **operation_config):
            """Deletes a sublist of a specific list entity model from a version of the
            application.

            :param app_id: The application ID.
            :type app_id: str
            :param version_id: The version ID.
            :type version_id: str
            :param cl_entity_id: The list entity extractor ID.
            :type cl_entity_id: str
            :param sub_list_id: The sublist ID.
            :type sub_list_id: long
            :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: OperationStatus or ClientRawResponse if raw=true
            :rtype:
             ~azure.cognitiveservices.language.luis.authoring.models.OperationStatus
             or ~msrest.pipeline.ClientRawResponse
            :raises:
             :class:`ErrorResponseException<azure.cognitiveservices.language.luis.authoring.models.ErrorResponseException>`
            """
            # Construct URL
            url = self.delete_sub_list.metadata['url']
            path_format_arguments = {
                'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True),
                'appId': self._serialize.url("app_id", app_id, 'str'),
                'versionId': self._serialize.url("version_id", version_id, 'str'),
                'clEntityId': self._serialize.url("cl_entity_id", cl_entity_id, 'str'),
                'subListId': self._serialize.url("sub_list_id", sub_list_id, 'long')
            }
            url = self._client.format_url(url, **path_format_arguments)

            # Construct parameters
            query_parameters = {}

            # Construct headers
            header_parameters = {}
            header_parameters['Accept'] = 'application/json'
            if custom_headers:
                header_parameters.update(custom_headers)

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

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

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

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

            return deserialized
        delete_sub_list.metadata = {'url': '/apps/{appId}/versions/{versionId}/closedlists/{clEntityId}/sublists/{subListId}'}

        def update_sub_list(
                self, app_id, version_id, cl_entity_id, sub_list_id, canonical_form=None, list=None, custom_headers=None, raw=False, **operation_config):
            """Updates one of the list entity's sublists in a version of the
            application.

            :param app_id: The application ID.
            :type app_id: str
            :param version_id: The version ID.
            :type version_id: str
            :param cl_entity_id: The list entity extractor ID.
            :type cl_entity_id: str
            :param sub_list_id: The sublist ID.
            :type sub_list_id: long
            :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 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: OperationStatus or ClientRawResponse if raw=true
            :rtype:
             ~azure.cognitiveservices.language.luis.authoring.models.OperationStatus
             or ~msrest.pipeline.ClientRawResponse
            :raises:
             :class:`ErrorResponseException<azure.cognitiveservices.language.luis.authoring.models.ErrorResponseException>`
            """
            word_list_base_update_object = models.WordListBaseUpdateObject(canonical_form=canonical_form, list=list)

            # Construct URL
            url = self.update_sub_list.metadata['url']
            path_format_arguments = {
                'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True),
                'appId': self._serialize.url("app_id", app_id, 'str'),
                'versionId': self._serialize.url("version_id", version_id, 'str'),
                'clEntityId': self._serialize.url("cl_entity_id", cl_entity_id, 'str'),
                'subListId': self._serialize.url("sub_list_id", sub_list_id, 'long')
            }
            url = self._client.format_url(url, **path_format_arguments)

            # Construct parameters
            query_parameters = {}

            # 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(word_list_base_update_object, 'WordListBaseUpdateObject')

            # Construct and send request
            request = self._client.put(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.ErrorResponseException(self._deserialize, response)

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

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

            return deserialized
        update_sub_list.metadata = {'url': '/apps/{appId}/versions/{versionId}/closedlists/{clEntityId}/sublists/{subListId}'}

        def list_intent_suggestions(
                self, app_id, version_id, intent_id, take=100, custom_headers=None, raw=False, **operation_config):
            """Suggests example utterances that would improve the accuracy of the
            intent model in a version of the application.

            :param app_id: The application ID.
            :type app_id: str
            :param version_id: The version ID.
            :type version_id: str
            :param intent_id: The intent classifier ID.
            :type intent_id: str
            :param take: The number of entries to return. Maximum page size is
             500. Default is 100.
            :type take: int
            :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: list or ClientRawResponse if raw=true
            :rtype:
             list[~azure.cognitiveservices.language.luis.authoring.models.IntentsSuggestionExample]
             or ~msrest.pipeline.ClientRawResponse
            :raises:
             :class:`ErrorResponseException<azure.cognitiveservices.language.luis.authoring.models.ErrorResponseException>`
            """
            # Construct URL
            url = self.list_intent_suggestions.metadata['url']
            path_format_arguments = {
                'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True),
                'appId': self._serialize.url("app_id", app_id, 'str'),
                'versionId': self._serialize.url("version_id", version_id, 'str'),
                'intentId': self._serialize.url("intent_id", intent_id, 'str')
            }
            url = self._client.format_url(url, **path_format_arguments)

            # Construct parameters
            query_parameters = {}
            if take is not None:
                query_parameters['take'] = self._serialize.query("take", take, 'int', maximum=500, minimum=0)

            # Construct headers
            header_parameters = {}
            header_parameters['Accept'] = 'application/json'
            if custom_headers:
                header_parameters.update(custom_headers)

            # 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.ErrorResponseException(self._deserialize, response)

            deserialized = None
            if response.status_code == 200:
                deserialized = self._deserialize('[IntentsSuggestionExample]', response)

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

            return deserialized
        list_intent_suggestions.metadata = {'url': '/apps/{appId}/versions/{versionId}/intents/{intentId}/suggest'}

        def list_entity_suggestions(
                self, app_id, version_id, entity_id, take=100, custom_headers=None, raw=False, **operation_config):
            """Get suggested example utterances that would improve the accuracy of the
            entity model in a version of the application.

            :param app_id: The application ID.
            :type app_id: str
            :param version_id: The version ID.
            :type version_id: str
            :param entity_id: The target entity extractor model to enhance.
            :type entity_id: str
            :param take: The number of entries to return. Maximum page size is
             500. Default is 100.
            :type take: int
            :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: list or ClientRawResponse if raw=true
            :rtype:
             list[~azure.cognitiveservices.language.luis.authoring.models.EntitiesSuggestionExample]
             or ~msrest.pipeline.ClientRawResponse
            :raises:
             :class:`ErrorResponseException<azure.cognitiveservices.language.luis.authoring.models.ErrorResponseException>`
            """
            # Construct URL
            url = self.list_entity_suggestions.metadata['url']
            path_format_arguments = {
                'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True),
                'appId': self._serialize.url("app_id", app_id, 'str'),
                'versionId': self._serialize.url("version_id", version_id, 'str'),
                'entityId': self._serialize.url("entity_id", entity_id, 'str')
            }
            url = self._client.format_url(url, **path_format_arguments)

            # Construct parameters
            query_parameters = {}
            if take is not None:
                query_parameters['take'] = self._serialize.query("take", take, 'int', maximum=500, minimum=0)

            # Construct headers
            header_parameters = {}
            header_parameters['Accept'] = 'application/json'
            if custom_headers:
                header_parameters.update(custom_headers)

            # 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.ErrorResponseException(self._deserialize, response)

            deserialized = None
            if response.status_code == 200:
                deserialized = self._deserialize('[EntitiesSuggestionExample]', response)

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

            return deserialized
        list_entity_suggestions.metadata = {'url': '/apps/{appId}/versions/{versionId}/entities/{entityId}/suggest'}

        def add_sub_list(
                self, app_id, version_id, cl_entity_id, canonical_form=None, list=None, custom_headers=None, raw=False, **operation_config):
            """Adds a sublist to an existing list entity in a version of the
            application.

            :param app_id: The application ID.
            :type app_id: str
            :param version_id: The version ID.
            :type version_id: str
            :param cl_entity_id: The list entity extractor ID.
            :type cl_entity_id: str
            :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 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: long or ClientRawResponse if raw=true
            :rtype: long or ~msrest.pipeline.ClientRawResponse
            :raises:
             :class:`ErrorResponseException<azure.cognitiveservices.language.luis.authoring.models.ErrorResponseException>`
            """
            word_list_create_object = models.WordListObject(canonical_form=canonical_form, list=list)

            # Construct URL
            url = self.add_sub_list.metadata['url']
            path_format_arguments = {
                'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True),
                'appId': self._serialize.url("app_id", app_id, 'str'),
                'versionId': self._serialize.url("version_id", version_id, 'str'),
                'clEntityId': self._serialize.url("cl_entity_id", cl_entity_id, 'str')
            }
            url = self._client.format_url(url, **path_format_arguments)

            # Construct parameters
            query_parameters = {}

            # 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(word_list_create_object, 'WordListObject')

            # 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 [201]:
                raise models.ErrorResponseException(self._deserialize, response)

            deserialized = None
            if response.status_code == 201:
                deserialized = self._deserialize('long', response)

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

            return deserialized
        add_sub_list.metadata = {'url': '/apps/{appId}/versions/{versionId}/closedlists/{clEntityId}/sublists'}

        def add_custom_prebuilt_domain(
                self, app_id, version_id, domain_name=None, custom_headers=None, raw=False, **operation_config):
            """Adds a customizable prebuilt domain along with all of its intent and
            entity models in a version of the application.

            :param app_id: The application ID.
            :type app_id: str
            :param version_id: The version ID.
            :type version_id: str
            :param domain_name: The domain name.
            :type domain_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: list or ClientRawResponse if raw=true
            :rtype: list[str] or ~msrest.pipeline.ClientRawResponse
            :raises:
             :class:`ErrorResponseException<azure.cognitiveservices.language.luis.authoring.models.ErrorResponseException>`
            """
            prebuilt_domain_object = models.PrebuiltDomainCreateBaseObject(domain_name=domain_name)

            # Construct URL
            url = self.add_custom_prebuilt_domain.metadata['url']
            path_format_arguments = {
                'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True),
                'appId': self._serialize.url("app_id", app_id, 'str'),
                'versionId': self._serialize.url("version_id", version_id, 'str')
            }
            url = self._client.format_url(url, **path_format_arguments)

            # Construct parameters
            query_parameters = {}

            # 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(prebuilt_domain_object, 'PrebuiltDomainCreateBaseObject')

            # 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 [201]:
                raise models.ErrorResponseException(self._deserialize, response)

            deserialized = None
            if response.status_code == 201:
                deserialized = self._deserialize('[str]', response)

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

            return deserialized
        add_custom_prebuilt_domain.metadata = {'url': '/apps/{appId}/versions/{versionId}/customprebuiltdomains'}

        def add_custom_prebuilt_intent(
                self, app_id, version_id, domain_name=None, model_name=None, custom_headers=None, raw=False, **operation_config):
            """Adds a customizable prebuilt intent model to a version of the
            application.

            :param app_id: The application ID.
            :type app_id: str
            :param version_id: The version ID.
            :type version_id: str
            :param domain_name: The domain name.
            :type domain_name: str
            :param model_name: The intent name or entity name.
            :type model_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: str or ClientRawResponse if raw=true
            :rtype: str or ~msrest.pipeline.ClientRawResponse
            :raises:
             :class:`ErrorResponseException<azure.cognitiveservices.language.luis.authoring.models.ErrorResponseException>`
            """
            prebuilt_domain_model_create_object = models.PrebuiltDomainModelCreateObject(domain_name=domain_name, model_name=model_name)

            # Construct URL
            url = self.add_custom_prebuilt_intent.metadata['url']
            path_format_arguments = {
                'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True),
                'appId': self._serialize.url("app_id", app_id, 'str'),
                'versionId': self._serialize.url("version_id", version_id, 'str')
            }
            url = self._client.format_url(url, **path_format_arguments)

            # Construct parameters
            query_parameters = {}

            # 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(prebuilt_domain_model_create_object, 'PrebuiltDomainModelCreateObject')

            # 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 [201]:
                raise models.ErrorResponseException(self._deserialize, response)

            deserialized = None
            if response.status_code == 201:
                deserialized = self._deserialize('str', response)

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

            return deserialized
        add_custom_prebuilt_intent.metadata = {'url': '/apps/{appId}/versions/{versionId}/customprebuiltintents'}

        def list_custom_prebuilt_intents(
                self, app_id, version_id, custom_headers=None, raw=False, **operation_config):
            """Gets information about customizable prebuilt intents added to a version
            of the application.

            :param app_id: The application ID.
            :type app_id: str
            :param version_id: The version ID.
            :type version_id: 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: list or ClientRawResponse if raw=true
            :rtype:
             list[~azure.cognitiveservices.language.luis.authoring.models.IntentClassifier]
             or ~msrest.pipeline.ClientRawResponse
            :raises:
             :class:`ErrorResponseException<azure.cognitiveservices.language.luis.authoring.models.ErrorResponseException>`
            """
            # Construct URL
            url = self.list_custom_prebuilt_intents.metadata['url']
            path_format_arguments = {
                'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True),
                'appId': self._serialize.url("app_id", app_id, 'str'),
                'versionId': self._serialize.url("version_id", version_id, 'str')
            }
            url = self._client.format_url(url, **path_format_arguments)

            # Construct parameters
            query_parameters = {}

            # Construct headers
            header_parameters = {}
            header_parameters['Accept'] = 'application/json'
            if custom_headers:
                header_parameters.update(custom_headers)

            # 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.ErrorResponseException(self._deserialize, response)

            deserialized = None
            if response.status_code == 200:
                deserialized = self._deserialize('[IntentClassifier]', response)

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

            return deserialized
        list_custom_prebuilt_intents.metadata = {'url': '/apps/{appId}/versions/{versionId}/customprebuiltintents'}

        def add_custom_prebuilt_entity(
                self, app_id, version_id, domain_name=None, model_name=None, custom_headers=None, raw=False, **operation_config):
            """Adds a prebuilt entity model to a version of the application.

            :param app_id: The application ID.
            :type app_id: str
            :param version_id: The version ID.
            :type version_id: str
            :param domain_name: The domain name.
            :type domain_name: str
            :param model_name: The intent name or entity name.
            :type model_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: str or ClientRawResponse if raw=true
            :rtype: str or ~msrest.pipeline.ClientRawResponse
            :raises:
             :class:`ErrorResponseException<azure.cognitiveservices.language.luis.authoring.models.ErrorResponseException>`
            """
            prebuilt_domain_model_create_object = models.PrebuiltDomainModelCreateObject(domain_name=domain_name, model_name=model_name)

            # Construct URL
            url = self.add_custom_prebuilt_entity.metadata['url']
            path_format_arguments = {
                'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True),
                'appId': self._serialize.url("app_id", app_id, 'str'),
                'versionId': self._serialize.url("version_id", version_id, 'str')
            }
            url = self._client.format_url(url, **path_format_arguments)

            # Construct parameters
            query_parameters = {}

            # 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(prebuilt_domain_model_create_object, 'PrebuiltDomainModelCreateObject')

            # 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 [201]:
                raise models.ErrorResponseException(self._deserialize, response)

            deserialized = None
            if response.status_code == 201:
                deserialized = self._deserialize('str', response)

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

            return deserialized
        add_custom_prebuilt_entity.metadata = {'url': '/apps/{appId}/versions/{versionId}/customprebuiltentities'}

        def list_custom_prebuilt_entities(
                self, app_id, version_id, custom_headers=None, raw=False, **operation_config):
            """Gets all prebuilt entities used in a version of the application.

            :param app_id: The application ID.
            :type app_id: str
            :param version_id: The version ID.
            :type version_id: 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: list or ClientRawResponse if raw=true
            :rtype:
             list[~azure.cognitiveservices.language.luis.authoring.models.EntityExtractor]
             or ~msrest.pipeline.ClientRawResponse
            :raises:
             :class:`ErrorResponseException<azure.cognitiveservices.language.luis.authoring.models.ErrorResponseException>`
            """
            # Construct URL
            url = self.list_custom_prebuilt_entities.metadata['url']
            path_format_arguments = {
                'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True),
                'appId': self._serialize.url("app_id", app_id, 'str'),
                'versionId': self._serialize.url("version_id", version_id, 'str')
            }
            url = self._client.format_url(url, **path_format_arguments)

            # Construct parameters
            query_parameters = {}

            # Construct headers
            header_parameters = {}
            header_parameters['Accept'] = 'application/json'
            if custom_headers:
                header_parameters.update(custom_headers)

            # 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.ErrorResponseException(self._deserialize, response)

            deserialized = None
            if response.status_code == 200:
                deserialized = self._deserialize('[EntityExtractor]', response)

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

            return deserialized
        list_custom_prebuilt_entities.metadata = {'url': '/apps/{appId}/versions/{versionId}/customprebuiltentities'}

        def list_custom_prebuilt_models(
                self, app_id, version_id, custom_headers=None, raw=False, **operation_config):
            """Gets all prebuilt intent and entity model information used in a version
            of this application.

            :param app_id: The application ID.
            :type app_id: str
            :param version_id: The version ID.
            :type version_id: 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: list or ClientRawResponse if raw=true
            :rtype:
             list[~azure.cognitiveservices.language.luis.authoring.models.CustomPrebuiltModel]
             or ~msrest.pipeline.ClientRawResponse
            :raises:
             :class:`ErrorResponseException<azure.cognitiveservices.language.luis.authoring.models.ErrorResponseException>`
            """
            # Construct URL
            url = self.list_custom_prebuilt_models.metadata['url']
            path_format_arguments = {
                'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True),
                'appId': self._serialize.url("app_id", app_id, 'str'),
                'versionId': self._serialize.url("version_id", version_id, 'str')
            }
            url = self._client.format_url(url, **path_format_arguments)

            # Construct parameters
            query_parameters = {}

            # Construct headers
            header_parameters = {}
            header_parameters['Accept'] = 'application/json'
            if custom_headers:
                header_parameters.update(custom_headers)

            # 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.ErrorResponseException(self._deserialize, response)

            deserialized = None
            if response.status_code == 200:
                deserialized = self._deserialize('[CustomPrebuiltModel]', response)

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

            return deserialized
        list_custom_prebuilt_models.metadata = {'url': '/apps/{appId}/versions/{versionId}/customprebuiltmodels'}

        def delete_custom_prebuilt_domain(
                self, app_id, version_id, domain_name, custom_headers=None, raw=False, **operation_config):
            """Deletes a prebuilt domain's models in a version of the application.

            :param app_id: The application ID.
            :type app_id: str
            :param version_id: The version ID.
            :type version_id: str
            :param domain_name: Domain name.
            :type domain_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: OperationStatus or ClientRawResponse if raw=true
            :rtype:
             ~azure.cognitiveservices.language.luis.authoring.models.OperationStatus
             or ~msrest.pipeline.ClientRawResponse
            :raises:
             :class:`ErrorResponseException<azure.cognitiveservices.language.luis.authoring.models.ErrorResponseException>`
            """
            # Construct URL
            url = self.delete_custom_prebuilt_domain.metadata['url']
            path_format_arguments = {
                'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True),
                'appId': self._serialize.url("app_id", app_id, 'str'),
                'versionId': self._serialize.url("version_id", version_id, 'str'),
                'domainName': self._serialize.url("domain_name", domain_name, 'str')
            }
            url = self._client.format_url(url, **path_format_arguments)

            # Construct parameters
            query_parameters = {}

            # Construct headers
            header_parameters = {}
            header_parameters['Accept'] = 'application/json'
            if custom_headers:
                header_parameters.update(custom_headers)

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

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

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

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

            return deserialized
        delete_custom_prebuilt_domain.metadata = {'url': '/apps/{appId}/versions/{versionId}/customprebuiltdomains/{domainName}'}

        def add_entity_child(
                self, app_id, version_id, entity_id, child_entity_model_create_object, custom_headers=None, raw=False, **operation_config):
            """Creates a single child in an existing entity model hierarchy in a
            version of the application.

            :param app_id: The application ID.
            :type app_id: str
            :param version_id: The version ID.
            :type version_id: str
            :param entity_id: The entity extractor ID.
            :type entity_id: str
            :param child_entity_model_create_object: A model object containing the
             name of the new child model and its children.
            :type child_entity_model_create_object:
             ~azure.cognitiveservices.language.luis.authoring.models.ChildEntityModelCreateObject
            :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: str or ClientRawResponse if raw=true
            :rtype: str or ~msrest.pipeline.ClientRawResponse
            :raises:
             :class:`ErrorResponseException<azure.cognitiveservices.language.luis.authoring.models.ErrorResponseException>`
            """
            # Construct URL
            url = self.add_entity_child.metadata['url']
            path_format_arguments = {
                'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True),
                'appId': self._serialize.url("app_id", app_id, 'str'),
                'versionId': self._serialize.url("version_id", version_id, 'str'),
                'entityId': self._serialize.url("entity_id", entity_id, 'str')
            }
            url = self._client.format_url(url, **path_format_arguments)

            # Construct parameters
            query_parameters = {}

            # 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(child_entity_model_create_object, 'ChildEntityModelCreateObject')

            # 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 [201]:
                raise models.ErrorResponseException(self._deserialize, response)

            deserialized = None
            if response.status_code == 201:
                deserialized = self._deserialize('str', response)

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

            return deserialized
        add_entity_child.metadata = {'url': '/apps/{appId}/versions/{versionId}/entities/{entityId}/children'}

        def get_hierarchical_entity_child(
                self, app_id, version_id, h_entity_id, h_child_id, custom_headers=None, raw=False, **operation_config):
            """Gets information about the child's model contained in an hierarchical
            entity child model in a version of the application.

            :param app_id: The application ID.
            :type app_id: str
            :param version_id: The version ID.
            :type version_id: str
            :param h_entity_id: The hierarchical entity extractor ID.
            :type h_entity_id: str
            :param h_child_id: The hierarchical entity extractor child ID.
            :type h_child_id: 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: HierarchicalChildEntity or ClientRawResponse if raw=true
            :rtype:
             ~azure.cognitiveservices.language.luis.authoring.models.HierarchicalChildEntity
             or ~msrest.pipeline.ClientRawResponse
            :raises:
             :class:`ErrorResponseException<azure.cognitiveservices.language.luis.authoring.models.ErrorResponseException>`
            """
            # Construct URL
            url = self.get_hierarchical_entity_child.metadata['url']
            path_format_arguments = {
                'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True),
                'appId': self._serialize.url("app_id", app_id, 'str'),
                'versionId': self._serialize.url("version_id", version_id, 'str'),
                'hEntityId': self._serialize.url("h_entity_id", h_entity_id, 'str'),
                'hChildId': self._serialize.url("h_child_id", h_child_id, 'str')
            }
            url = self._client.format_url(url, **path_format_arguments)

            # Construct parameters
            query_parameters = {}

            # Construct headers
            header_parameters = {}
            header_parameters['Accept'] = 'application/json'
            if custom_headers:
                header_parameters.update(custom_headers)

            # 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.ErrorResponseException(self._deserialize, response)

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

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

            return deserialized
        get_hierarchical_entity_child.metadata = {'url': '/apps/{appId}/versions/{versionId}/hierarchicalentities/{hEntityId}/children/{hChildId}'}

        def update_hierarchical_entity_child(
                self, app_id, version_id, h_entity_id, h_child_id, name=None, custom_headers=None, raw=False, **operation_config):
            """Renames a single child in an existing hierarchical entity model in a
            version of the application.

            :param app_id: The application ID.
            :type app_id: str
            :param version_id: The version ID.
            :type version_id: str
            :param h_entity_id: The hierarchical entity extractor ID.
            :type h_entity_id: str
            :param h_child_id: The hierarchical entity extractor child ID.
            :type h_child_id: str
            :param name:
            :type 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: OperationStatus or ClientRawResponse if raw=true
            :rtype:
             ~azure.cognitiveservices.language.luis.authoring.models.OperationStatus
             or ~msrest.pipeline.ClientRawResponse
            :raises:
             :class:`ErrorResponseException<azure.cognitiveservices.language.luis.authoring.models.ErrorResponseException>`
            """
            hierarchical_child_model_update_object = models.HierarchicalChildModelUpdateObject(name=name)

            # Construct URL
            url = self.update_hierarchical_entity_child.metadata['url']
            path_format_arguments = {
                'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True),
                'appId': self._serialize.url("app_id", app_id, 'str'),
                'versionId': self._serialize.url("version_id", version_id, 'str'),
                'hEntityId': self._serialize.url("h_entity_id", h_entity_id, 'str'),
                'hChildId': self._serialize.url("h_child_id", h_child_id, 'str')
            }
            url = self._client.format_url(url, **path_format_arguments)

            # Construct parameters
            query_parameters = {}

            # 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(hierarchical_child_model_update_object, 'HierarchicalChildModelUpdateObject')

            # Construct and send request
            request = self._client.patch(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.ErrorResponseException(self._deserialize, response)

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

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

            return deserialized
        update_hierarchical_entity_child.metadata = {'url': '/apps/{appId}/versions/{versionId}/hierarchicalentities/{hEntityId}/children/{hChildId}'}

        def delete_hierarchical_entity_child(
                self, app_id, version_id, h_entity_id, h_child_id, custom_headers=None, raw=False, **operation_config):
            """Deletes a hierarchical entity extractor child in a version of the
            application.

            :param app_id: The application ID.
            :type app_id: str
            :param version_id: The version ID.
            :type version_id: str
            :param h_entity_id: The hierarchical entity extractor ID.
            :type h_entity_id: str
            :param h_child_id: The hierarchical entity extractor child ID.
            :type h_child_id: 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: OperationStatus or ClientRawResponse if raw=true
            :rtype:
             ~azure.cognitiveservices.language.luis.authoring.models.OperationStatus
             or ~msrest.pipeline.ClientRawResponse
            :raises:
             :class:`ErrorResponseException<azure.cognitiveservices.language.luis.authoring.models.ErrorResponseException>`
            """
            # Construct URL
            url = self.delete_hierarchical_entity_child.metadata['url']
            path_format_arguments = {
                'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True),
                'appId': self._serialize.url("app_id", app_id, 'str'),
                'versionId': self._serialize.url("version_id", version_id, 'str'),
                'hEntityId': self._serialize.url("h_entity_id", h_entity_id, 'str'),
                'hChildId': self._serialize.url("h_child_id", h_child_id, 'str')
            }
            url = self._client.format_url(url, **path_format_arguments)

            # Construct parameters
            query_parameters = {}

            # Construct headers
            header_parameters = {}
            header_parameters['Accept'] = 'application/json'
            if custom_headers:
                header_parameters.update(custom_headers)

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

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

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

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

            return deserialized
        delete_hierarchical_entity_child.metadata = {'url': '/apps/{appId}/versions/{versionId}/hierarchicalentities/{hEntityId}/children/{hChildId}'}

        def add_composite_entity_child(
                self, app_id, version_id, c_entity_id, name=None, custom_headers=None, raw=False, **operation_config):
            """Creates a single child in an existing composite entity model in a
            version of the application.

            :param app_id: The application ID.
            :type app_id: str
            :param version_id: The version ID.
            :type version_id: str
            :param c_entity_id: The composite entity extractor ID.
            :type c_entity_id: str
            :param name:
            :type 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: str or ClientRawResponse if raw=true
            :rtype: str or ~msrest.pipeline.ClientRawResponse
            :raises:
             :class:`ErrorResponseException<azure.cognitiveservices.language.luis.authoring.models.ErrorResponseException>`
            """
            composite_child_model_create_object = models.CompositeChildModelCreateObject(name=name)

            # Construct URL
            url = self.add_composite_entity_child.metadata['url']
            path_format_arguments = {
                'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True),
                'appId': self._serialize.url("app_id", app_id, 'str'),
                'versionId': self._serialize.url("version_id", version_id, 'str'),
                'cEntityId': self._serialize.url("c_entity_id", c_entity_id, 'str')
            }
            url = self._client.format_url(url, **path_format_arguments)

            # Construct parameters
            query_parameters = {}

            # 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(composite_child_model_create_object, 'CompositeChildModelCreateObject')

            # 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 [201]:
                raise models.ErrorResponseException(self._deserialize, response)

            deserialized = None
            if response.status_code == 201:
                deserialized = self._deserialize('str', response)

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

            return deserialized
        add_composite_entity_child.metadata = {'url': '/apps/{appId}/versions/{versionId}/compositeentities/{cEntityId}/children'}

        def delete_composite_entity_child(
                self, app_id, version_id, c_entity_id, c_child_id, custom_headers=None, raw=False, **operation_config):
            """Deletes a composite entity extractor child from a version of the
            application.

            :param app_id: The application ID.
            :type app_id: str
            :param version_id: The version ID.
            :type version_id: str
            :param c_entity_id: The composite entity extractor ID.
            :type c_entity_id: str
            :param c_child_id: The hierarchical entity extractor child ID.
            :type c_child_id: 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: OperationStatus or ClientRawResponse if raw=true
            :rtype:
             ~azure.cognitiveservices.language.luis.authoring.models.OperationStatus
             or ~msrest.pipeline.ClientRawResponse
            :raises:
             :class:`ErrorResponseException<azure.cognitiveservices.language.luis.authoring.models.ErrorResponseException>`
            """
            # Construct URL
            url = self.delete_composite_entity_child.metadata['url']
            path_format_arguments = {
                'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True),
                'appId': self._serialize.url("app_id", app_id, 'str'),
                'versionId': self._serialize.url("version_id", version_id, 'str'),
                'cEntityId': self._serialize.url("c_entity_id", c_entity_id, 'str'),
                'cChildId': self._serialize.url("c_child_id", c_child_id, 'str')
            }
            url = self._client.format_url(url, **path_format_arguments)

            # Construct parameters
            query_parameters = {}

            # Construct headers
            header_parameters = {}
            header_parameters['Accept'] = 'application/json'
            if custom_headers:
                header_parameters.update(custom_headers)

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

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

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

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

            return deserialized
        delete_composite_entity_child.metadata = {'url': '/apps/{appId}/versions/{versionId}/compositeentities/{cEntityId}/children/{cChildId}'}

        def list_regex_entity_infos(
                self, app_id, version_id, skip=0, take=100, custom_headers=None, raw=False, **operation_config):
            """Gets information about the regular expression entity models in a
            version of the application.

            :param app_id: The application ID.
            :type app_id: str
            :param version_id: The version ID.
            :type version_id: str
            :param skip: The number of entries to skip. Default value is 0.
            :type skip: int
            :param take: The number of entries to return. Maximum page size is
             500. Default is 100.
            :type take: int
            :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: list or ClientRawResponse if raw=true
            :rtype:
             list[~azure.cognitiveservices.language.luis.authoring.models.RegexEntityExtractor]
             or ~msrest.pipeline.ClientRawResponse
            :raises:
             :class:`ErrorResponseException<azure.cognitiveservices.language.luis.authoring.models.ErrorResponseException>`
            """
            # Construct URL
            url = self.list_regex_entity_infos.metadata['url']
            path_format_arguments = {
                'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True),
                'appId': self._serialize.url("app_id", app_id, 'str'),
                'versionId': self._serialize.url("version_id", version_id, 'str')
            }
            url = self._client.format_url(url, **path_format_arguments)

            # Construct parameters
            query_parameters = {}
            if skip is not None:
                query_parameters['skip'] = self._serialize.query("skip", skip, 'int', minimum=0)
            if take is not None:
                query_parameters['take'] = self._serialize.query("take", take, 'int', maximum=500, minimum=0)

            # Construct headers
            header_parameters = {}
            header_parameters['Accept'] = 'application/json'
            if custom_headers:
                header_parameters.update(custom_headers)

            # 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.ErrorResponseException(self._deserialize, response)

            deserialized = None
            if response.status_code == 200:
                deserialized = self._deserialize('[RegexEntityExtractor]', response)

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

            return deserialized
        list_regex_entity_infos.metadata = {'url': '/apps/{appId}/versions/{versionId}/regexentities'}

        def create_regex_entity_model(
                self, app_id, version_id, regex_pattern=None, name=None, custom_headers=None, raw=False, **operation_config):
            """Adds a regular expression entity model to a version of the application.

            :param app_id: The application ID.
            :type app_id: str
            :param version_id: The version ID.
            :type version_id: str
            :param regex_pattern: The regular expression entity pattern.
            :type regex_pattern: str
            :param name: The model name.
            :type 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: str or ClientRawResponse if raw=true
            :rtype: str or ~msrest.pipeline.ClientRawResponse
            :raises:
             :class:`ErrorResponseException<azure.cognitiveservices.language.luis.authoring.models.ErrorResponseException>`
            """
            regex_entity_extractor_create_obj = models.RegexModelCreateObject(regex_pattern=regex_pattern, name=name)

            # Construct URL
            url = self.create_regex_entity_model.metadata['url']
            path_format_arguments = {
                'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True),
                'appId': self._serialize.url("app_id", app_id, 'str'),
                'versionId': self._serialize.url("version_id", version_id, 'str')
            }
            url = self._client.format_url(url, **path_format_arguments)

            # Construct parameters
            query_parameters = {}

            # 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(regex_entity_extractor_create_obj, 'RegexModelCreateObject')

            # 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 [201]:
                raise models.ErrorResponseException(self._deserialize, response)

            deserialized = None
            if response.status_code == 201:
                deserialized = self._deserialize('str', response)

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

            return deserialized
        create_regex_entity_model.metadata = {'url': '/apps/{appId}/versions/{versionId}/regexentities'}

        def list_pattern_any_entity_infos(
                self, app_id, version_id, skip=0, take=100, custom_headers=None, raw=False, **operation_config):
            """Get information about the Pattern.Any entity models in a version of the
            application.

            :param app_id: The application ID.
            :type app_id: str
            :param version_id: The version ID.
            :type version_id: str
            :param skip: The number of entries to skip. Default value is 0.
            :type skip: int
            :param take: The number of entries to return. Maximum page size is
             500. Default is 100.
            :type take: int
            :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: list or ClientRawResponse if raw=true
            :rtype:
             list[~azure.cognitiveservices.language.luis.authoring.models.PatternAnyEntityExtractor]
             or ~msrest.pipeline.ClientRawResponse
            :raises:
             :class:`ErrorResponseException<azure.cognitiveservices.language.luis.authoring.models.ErrorResponseException>`
            """
            # Construct URL
            url = self.list_pattern_any_entity_infos.metadata['url']
            path_format_arguments = {
                'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True),
                'appId': self._serialize.url("app_id", app_id, 'str'),
                'versionId': self._serialize.url("version_id", version_id, 'str')
            }
            url = self._client.format_url(url, **path_format_arguments)

            # Construct parameters
            query_parameters = {}
            if skip is not None:
                query_parameters['skip'] = self._serialize.query("skip", skip, 'int', minimum=0)
            if take is not None:
                query_parameters['take'] = self._serialize.query("take", take, 'int', maximum=500, minimum=0)

            # Construct headers
            header_parameters = {}
            header_parameters['Accept'] = 'application/json'
            if custom_headers:
                header_parameters.update(custom_headers)

            # 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.ErrorResponseException(self._deserialize, response)

            deserialized = None
            if response.status_code == 200:
                deserialized = self._deserialize('[PatternAnyEntityExtractor]', response)

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

            return deserialized
        list_pattern_any_entity_infos.metadata = {'url': '/apps/{appId}/versions/{versionId}/patternanyentities'}

        def create_pattern_any_entity_model(
                self, app_id, version_id, name=None, explicit_list=None, custom_headers=None, raw=False, **operation_config):
            """Adds a pattern.any entity extractor to a version of the application.

            :param app_id: The application ID.
            :type app_id: str
            :param version_id: The version ID.
            :type version_id: str
            :param name: The model name.
            :type name: str
            :param explicit_list: The Pattern.Any explicit list.
            :type explicit_list: list[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: str or ClientRawResponse if raw=true
            :rtype: str or ~msrest.pipeline.ClientRawResponse
            :raises:
             :class:`ErrorResponseException<azure.cognitiveservices.language.luis.authoring.models.ErrorResponseException>`
            """
            extractor_create_object = models.PatternAnyModelCreateObject(name=name, explicit_list=explicit_list)

            # Construct URL
            url = self.create_pattern_any_entity_model.metadata['url']
            path_format_arguments = {
                'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True),
                'appId': self._serialize.url("app_id", app_id, 'str'),
                'versionId': self._serialize.url("version_id", version_id, 'str')
            }
            url = self._client.format_url(url, **path_format_arguments)

            # Construct parameters
            query_parameters = {}

            # 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(extractor_create_object, 'PatternAnyModelCreateObject')

            # 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 [201]:
                raise models.ErrorResponseException(self._deserialize, response)

            deserialized = None
            if response.status_code == 201:
                deserialized = self._deserialize('str', response)

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

            return deserialized
        create_pattern_any_entity_model.metadata = {'url': '/apps/{appId}/versions/{versionId}/patternanyentities'}

        def list_entity_roles(
                self, app_id, version_id, entity_id, custom_headers=None, raw=False, **operation_config):
            """Get all roles for an entity in a version of the application.

            :param app_id: The application ID.
            :type app_id: str
            :param version_id: The version ID.
            :type version_id: str
            :param entity_id: entity Id
            :type entity_id: 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: list or ClientRawResponse if raw=true
            :rtype:
             list[~azure.cognitiveservices.language.luis.authoring.models.EntityRole]
             or ~msrest.pipeline.ClientRawResponse
            :raises:
             :class:`ErrorResponseException<azure.cognitiveservices.language.luis.authoring.models.ErrorResponseException>`
            """
            # Construct URL
            url = self.list_entity_roles.metadata['url']
            path_format_arguments = {
                'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True),
                'appId': self._serialize.url("app_id", app_id, 'str'),
                'versionId': self._serialize.url("version_id", version_id, 'str'),
                'entityId': self._serialize.url("entity_id", entity_id, 'str')
            }
            url = self._client.format_url(url, **path_format_arguments)

            # Construct parameters
            query_parameters = {}

            # Construct headers
            header_parameters = {}
            header_parameters['Accept'] = 'application/json'
            if custom_headers:
                header_parameters.update(custom_headers)

            # 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.ErrorResponseException(self._deserialize, response)

            deserialized = None
            if response.status_code == 200:
                deserialized = self._deserialize('[EntityRole]', response)

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

            return deserialized
        list_entity_roles.metadata = {'url': '/apps/{appId}/versions/{versionId}/entities/{entityId}/roles'}

        def create_entity_role(
                self, app_id, version_id, entity_id, name=None, custom_headers=None, raw=False, **operation_config):
            """Create an entity role in a version of the application.

            :param app_id: The application ID.
            :type app_id: str
            :param version_id: The version ID.
            :type version_id: str
            :param entity_id: The entity model ID.
            :type entity_id: str
            :param name: The entity role name.
            :type 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: str or ClientRawResponse if raw=true
            :rtype: str or ~msrest.pipeline.ClientRawResponse
            :raises:
             :class:`ErrorResponseException<azure.cognitiveservices.language.luis.authoring.models.ErrorResponseException>`
            """
            entity_role_create_object = models.EntityRoleCreateObject(name=name)

            # Construct URL
            url = self.create_entity_role.metadata['url']
            path_format_arguments = {
                'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True),
                'appId': self._serialize.url("app_id", app_id, 'str'),
                'versionId': self._serialize.url("version_id", version_id, 'str'),
                'entityId': self._serialize.url("entity_id", entity_id, 'str')
            }
            url = self._client.format_url(url, **path_format_arguments)

            # Construct parameters
            query_parameters = {}

            # 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(entity_role_create_object, 'EntityRoleCreateObject')

            # 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 [201]:
                raise models.ErrorResponseException(self._deserialize, response)

            deserialized = None
            if response.status_code == 201:
                deserialized = self._deserialize('str', response)

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

            return deserialized
        create_entity_role.metadata = {'url': '/apps/{appId}/versions/{versionId}/entities/{entityId}/roles'}

        def list_prebuilt_entity_roles(
                self, app_id, version_id, entity_id, custom_headers=None, raw=False, **operation_config):
            """Get a prebuilt entity's roles in a version of the application.

            :param app_id: The application ID.
            :type app_id: str
            :param version_id: The version ID.
            :type version_id: str
            :param entity_id: entity Id
            :type entity_id: 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: list or ClientRawResponse if raw=true
            :rtype:
             list[~azure.cognitiveservices.language.luis.authoring.models.EntityRole]
             or ~msrest.pipeline.ClientRawResponse
            :raises:
             :class:`ErrorResponseException<azure.cognitiveservices.language.luis.authoring.models.ErrorResponseException>`
            """
            # Construct URL
            url = self.list_prebuilt_entity_roles.metadata['url']
            path_format_arguments = {
                'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True),
                'appId': self._serialize.url("app_id", app_id, 'str'),
                'versionId': self._serialize.url("version_id", version_id, 'str'),
                'entityId': self._serialize.url("entity_id", entity_id, 'str')
            }
            url = self._client.format_url(url, **path_format_arguments)

            # Construct parameters
            query_parameters = {}

            # Construct headers
            header_parameters = {}
            header_parameters['Accept'] = 'application/json'
            if custom_headers:
                header_parameters.update(custom_headers)

            # 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.ErrorResponseException(self._deserialize, response)

            deserialized = None
            if response.status_code == 200:
                deserialized = self._deserialize('[EntityRole]', response)

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

            return deserialized
        list_prebuilt_entity_roles.metadata = {'url': '/apps/{appId}/versions/{versionId}/prebuilts/{entityId}/roles'}

        def create_prebuilt_entity_role(
                self, app_id, version_id, entity_id, name=None, custom_headers=None, raw=False, **operation_config):
            """Create a role for a prebuilt entity in a version of the application.

            :param app_id: The application ID.
            :type app_id: str
            :param version_id: The version ID.
            :type version_id: str
            :param entity_id: The entity model ID.
            :type entity_id: str
            :param name: The entity role name.
            :type 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: str or ClientRawResponse if raw=true
            :rtype: str or ~msrest.pipeline.ClientRawResponse
            :raises:
             :class:`ErrorResponseException<azure.cognitiveservices.language.luis.authoring.models.ErrorResponseException>`
            """
            entity_role_create_object = models.EntityRoleCreateObject(name=name)

            # Construct URL
            url = self.create_prebuilt_entity_role.metadata['url']
            path_format_arguments = {
                'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True),
                'appId': self._serialize.url("app_id", app_id, 'str'),
                'versionId': self._serialize.url("version_id", version_id, 'str'),
                'entityId': self._serialize.url("entity_id", entity_id, 'str')
            }
            url = self._client.format_url(url, **path_format_arguments)

            # Construct parameters
            query_parameters = {}

            # 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(entity_role_create_object, 'EntityRoleCreateObject')

            # 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 [201]:
                raise models.ErrorResponseException(self._deserialize, response)

            deserialized = None
            if response.status_code == 201:
                deserialized = self._deserialize('str', response)

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

            return deserialized
        create_prebuilt_entity_role.metadata = {'url': '/apps/{appId}/versions/{versionId}/prebuilts/{entityId}/roles'}

        def list_closed_list_entity_roles(
                self, app_id, version_id, entity_id, custom_headers=None, raw=False, **operation_config):
            """Get all roles for a list entity in a version of the application.

            :param app_id: The application ID.
            :type app_id: str
            :param version_id: The version ID.
            :type version_id: str
            :param entity_id: entity Id
            :type entity_id: 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: list or ClientRawResponse if raw=true
            :rtype:
             list[~azure.cognitiveservices.language.luis.authoring.models.EntityRole]
             or ~msrest.pipeline.ClientRawResponse
            :raises:
             :class:`ErrorResponseException<azure.cognitiveservices.language.luis.authoring.models.ErrorResponseException>`
            """
            # Construct URL
            url = self.list_closed_list_entity_roles.metadata['url']
            path_format_arguments = {
                'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True),
                'appId': self._serialize.url("app_id", app_id, 'str'),
                'versionId': self._serialize.url("version_id", version_id, 'str'),
                'entityId': self._serialize.url("entity_id", entity_id, 'str')
            }
            url = self._client.format_url(url, **path_format_arguments)

            # Construct parameters
            query_parameters = {}

            # Construct headers
            header_parameters = {}
            header_parameters['Accept'] = 'application/json'
            if custom_headers:
                header_parameters.update(custom_headers)

            # 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.ErrorResponseException(self._deserialize, response)

            deserialized = None
            if response.status_code == 200:
                deserialized = self._deserialize('[EntityRole]', response)

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

            return deserialized
        list_closed_list_entity_roles.metadata = {'url': '/apps/{appId}/versions/{versionId}/closedlists/{entityId}/roles'}

        def create_closed_list_entity_role(
                self, app_id, version_id, entity_id, name=None, custom_headers=None, raw=False, **operation_config):
            """Create a role for a list entity in a version of the application.

            :param app_id: The application ID.
            :type app_id: str
            :param version_id: The version ID.
            :type version_id: str
            :param entity_id: The entity model ID.
            :type entity_id: str
            :param name: The entity role name.
            :type 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: str or ClientRawResponse if raw=true
            :rtype: str or ~msrest.pipeline.ClientRawResponse
            :raises:
             :class:`ErrorResponseException<azure.cognitiveservices.language.luis.authoring.models.ErrorResponseException>`
            """
            entity_role_create_object = models.EntityRoleCreateObject(name=name)

            # Construct URL
            url = self.create_closed_list_entity_role.metadata['url']
            path_format_arguments = {
                'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True),
                'appId': self._serialize.url("app_id", app_id, 'str'),
                'versionId': self._serialize.url("version_id", version_id, 'str'),
                'entityId': self._serialize.url("entity_id", entity_id, 'str')
            }
            url = self._client.format_url(url, **path_format_arguments)

            # Construct parameters
            query_parameters = {}

            # 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(entity_role_create_object, 'EntityRoleCreateObject')

            # 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 [201]:
                raise models.ErrorResponseException(self._deserialize, response)

            deserialized = None
            if response.status_code == 201:
                deserialized = self._deserialize('str', response)

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

            return deserialized
        create_closed_list_entity_role.metadata = {'url': '/apps/{appId}/versions/{versionId}/closedlists/{entityId}/roles'}

        def list_regex_entity_roles(
                self, app_id, version_id, entity_id, custom_headers=None, raw=False, **operation_config):
            """Get all roles for a regular expression entity in a version of the
            application.

            :param app_id: The application ID.
            :type app_id: str
            :param version_id: The version ID.
            :type version_id: str
            :param entity_id: entity Id
            :type entity_id: 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: list or ClientRawResponse if raw=true
            :rtype:
             list[~azure.cognitiveservices.language.luis.authoring.models.EntityRole]
             or ~msrest.pipeline.ClientRawResponse
            :raises:
             :class:`ErrorResponseException<azure.cognitiveservices.language.luis.authoring.models.ErrorResponseException>`
            """
            # Construct URL
            url = self.list_regex_entity_roles.metadata['url']
            path_format_arguments = {
                'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True),
                'appId': self._serialize.url("app_id", app_id, 'str'),
                'versionId': self._serialize.url("version_id", version_id, 'str'),
                'entityId': self._serialize.url("entity_id", entity_id, 'str')
            }
            url = self._client.format_url(url, **path_format_arguments)

            # Construct parameters
            query_parameters = {}

            # Construct headers
            header_parameters = {}
            header_parameters['Accept'] = 'application/json'
            if custom_headers:
                header_parameters.update(custom_headers)

            # 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.ErrorResponseException(self._deserialize, response)

            deserialized = None
            if response.status_code == 200:
                deserialized = self._deserialize('[EntityRole]', response)

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

            return deserialized
        list_regex_entity_roles.metadata = {'url': '/apps/{appId}/versions/{versionId}/regexentities/{entityId}/roles'}

        def create_regex_entity_role(
                self, app_id, version_id, entity_id, name=None, custom_headers=None, raw=False, **operation_config):
            """Create a role for an regular expression entity in a version of the
            application.

            :param app_id: The application ID.
            :type app_id: str
            :param version_id: The version ID.
            :type version_id: str
            :param entity_id: The entity model ID.
            :type entity_id: str
            :param name: The entity role name.
            :type 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: str or ClientRawResponse if raw=true
            :rtype: str or ~msrest.pipeline.ClientRawResponse
            :raises:
             :class:`ErrorResponseException<azure.cognitiveservices.language.luis.authoring.models.ErrorResponseException>`
            """
            entity_role_create_object = models.EntityRoleCreateObject(name=name)

            # Construct URL
            url = self.create_regex_entity_role.metadata['url']
            path_format_arguments = {
                'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True),
                'appId': self._serialize.url("app_id", app_id, 'str'),
                'versionId': self._serialize.url("version_id", version_id, 'str'),
                'entityId': self._serialize.url("entity_id", entity_id, 'str')
            }
            url = self._client.format_url(url, **path_format_arguments)

            # Construct parameters
            query_parameters = {}

            # 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(entity_role_create_object, 'EntityRoleCreateObject')

            # 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 [201]:
                raise models.ErrorResponseException(self._deserialize, response)

            deserialized = None
            if response.status_code == 201:
                deserialized = self._deserialize('str', response)

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

            return deserialized
        create_regex_entity_role.metadata = {'url': '/apps/{appId}/versions/{versionId}/regexentities/{entityId}/roles'}

        def list_composite_entity_roles(
                self, app_id, version_id, c_entity_id, custom_headers=None, raw=False, **operation_config):
            """Get all roles for a composite entity in a version of the application.

            :param app_id: The application ID.
            :type app_id: str
            :param version_id: The version ID.
            :type version_id: str
            :param c_entity_id: The composite entity extractor ID.
            :type c_entity_id: 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: list or ClientRawResponse if raw=true
            :rtype:
             list[~azure.cognitiveservices.language.luis.authoring.models.EntityRole]
             or ~msrest.pipeline.ClientRawResponse
            :raises:
             :class:`ErrorResponseException<azure.cognitiveservices.language.luis.authoring.models.ErrorResponseException>`
            """
            # Construct URL
            url = self.list_composite_entity_roles.metadata['url']
            path_format_arguments = {
                'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True),
                'appId': self._serialize.url("app_id", app_id, 'str'),
                'versionId': self._serialize.url("version_id", version_id, 'str'),
                'cEntityId': self._serialize.url("c_entity_id", c_entity_id, 'str')
            }
            url = self._client.format_url(url, **path_format_arguments)

            # Construct parameters
            query_parameters = {}

            # Construct headers
            header_parameters = {}
            header_parameters['Accept'] = 'application/json'
            if custom_headers:
                header_parameters.update(custom_headers)

            # 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.ErrorResponseException(self._deserialize, response)

            deserialized = None
            if response.status_code == 200:
                deserialized = self._deserialize('[EntityRole]', response)

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

            return deserialized
        list_composite_entity_roles.metadata = {'url': '/apps/{appId}/versions/{versionId}/compositeentities/{cEntityId}/roles'}

        def create_composite_entity_role(
                self, app_id, version_id, c_entity_id, name=None, custom_headers=None, raw=False, **operation_config):
            """Create a role for a composite entity in a version of the application.

            :param app_id: The application ID.
            :type app_id: str
            :param version_id: The version ID.
            :type version_id: str
            :param c_entity_id: The composite entity extractor ID.
            :type c_entity_id: str
            :param name: The entity role name.
            :type 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: str or ClientRawResponse if raw=true
            :rtype: str or ~msrest.pipeline.ClientRawResponse
            :raises:
             :class:`ErrorResponseException<azure.cognitiveservices.language.luis.authoring.models.ErrorResponseException>`
            """
            entity_role_create_object = models.EntityRoleCreateObject(name=name)

            # Construct URL
            url = self.create_composite_entity_role.metadata['url']
            path_format_arguments = {
                'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True),
                'appId': self._serialize.url("app_id", app_id, 'str'),
                'versionId': self._serialize.url("version_id", version_id, 'str'),
                'cEntityId': self._serialize.url("c_entity_id", c_entity_id, 'str')
            }
            url = self._client.format_url(url, **path_format_arguments)

            # Construct parameters
            query_parameters = {}

            # 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(entity_role_create_object, 'EntityRoleCreateObject')

            # 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 [201]:
                raise models.ErrorResponseException(self._deserialize, response)

            deserialized = None
            if response.status_code == 201:
                deserialized = self._deserialize('str', response)

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

            return deserialized
        create_composite_entity_role.metadata = {'url': '/apps/{appId}/versions/{versionId}/compositeentities/{cEntityId}/roles'}

        def list_pattern_any_entity_roles(
                self, app_id, version_id, entity_id, custom_headers=None, raw=False, **operation_config):
            """Get all roles for a Pattern.any entity in a version of the application.

            :param app_id: The application ID.
            :type app_id: str
            :param version_id: The version ID.
            :type version_id: str
            :param entity_id: entity Id
            :type entity_id: 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: list or ClientRawResponse if raw=true
            :rtype:
             list[~azure.cognitiveservices.language.luis.authoring.models.EntityRole]
             or ~msrest.pipeline.ClientRawResponse
            :raises:
             :class:`ErrorResponseException<azure.cognitiveservices.language.luis.authoring.models.ErrorResponseException>`
            """
            # Construct URL
            url = self.list_pattern_any_entity_roles.metadata['url']
            path_format_arguments = {
                'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True),
                'appId': self._serialize.url("app_id", app_id, 'str'),
                'versionId': self._serialize.url("version_id", version_id, 'str'),
                'entityId': self._serialize.url("entity_id", entity_id, 'str')
            }
            url = self._client.format_url(url, **path_format_arguments)

            # Construct parameters
            query_parameters = {}

            # Construct headers
            header_parameters = {}
            header_parameters['Accept'] = 'application/json'
            if custom_headers:
                header_parameters.update(custom_headers)

            # 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.ErrorResponseException(self._deserialize, response)

            deserialized = None
            if response.status_code == 200:
                deserialized = self._deserialize('[EntityRole]', response)

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

            return deserialized
        list_pattern_any_entity_roles.metadata = {'url': '/apps/{appId}/versions/{versionId}/patternanyentities/{entityId}/roles'}

        def create_pattern_any_entity_role(
                self, app_id, version_id, entity_id, name=None, custom_headers=None, raw=False, **operation_config):
            """Create a role for an Pattern.any entity in a version of the
            application.

            :param app_id: The application ID.
            :type app_id: str
            :param version_id: The version ID.
            :type version_id: str
            :param entity_id: The entity model ID.
            :type entity_id: str
            :param name: The entity role name.
            :type 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: str or ClientRawResponse if raw=true
            :rtype: str or ~msrest.pipeline.ClientRawResponse
            :raises:
             :class:`ErrorResponseException<azure.cognitiveservices.language.luis.authoring.models.ErrorResponseException>`
            """
            entity_role_create_object = models.EntityRoleCreateObject(name=name)

            # Construct URL
            url = self.create_pattern_any_entity_role.metadata['url']
            path_format_arguments = {
                'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True),
                'appId': self._serialize.url("app_id", app_id, 'str'),
                'versionId': self._serialize.url("version_id", version_id, 'str'),
                'entityId': self._serialize.url("entity_id", entity_id, 'str')
            }
            url = self._client.format_url(url, **path_format_arguments)

            # Construct parameters
            query_parameters = {}

            # 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(entity_role_create_object, 'EntityRoleCreateObject')

            # 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 [201]:
                raise models.ErrorResponseException(self._deserialize, response)

            deserialized = None
            if response.status_code == 201:
                deserialized = self._deserialize('str', response)

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

            return deserialized
        create_pattern_any_entity_role.metadata = {'url': '/apps/{appId}/versions/{versionId}/patternanyentities/{entityId}/roles'}

        def list_hierarchical_entity_roles(
                self, app_id, version_id, h_entity_id, custom_headers=None, raw=False, **operation_config):
            """Get all roles for a hierarchical entity in a version of the
            application.

            :param app_id: The application ID.
            :type app_id: str
            :param version_id: The version ID.
            :type version_id: str
            :param h_entity_id: The hierarchical entity extractor ID.
            :type h_entity_id: 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: list or ClientRawResponse if raw=true
            :rtype:
             list[~azure.cognitiveservices.language.luis.authoring.models.EntityRole]
             or ~msrest.pipeline.ClientRawResponse
            :raises:
             :class:`ErrorResponseException<azure.cognitiveservices.language.luis.authoring.models.ErrorResponseException>`
            """
            # Construct URL
            url = self.list_hierarchical_entity_roles.metadata['url']
            path_format_arguments = {
                'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True),
                'appId': self._serialize.url("app_id", app_id, 'str'),
                'versionId': self._serialize.url("version_id", version_id, 'str'),
                'hEntityId': self._serialize.url("h_entity_id", h_entity_id, 'str')
            }
            url = self._client.format_url(url, **path_format_arguments)

            # Construct parameters
            query_parameters = {}

            # Construct headers
            header_parameters = {}
            header_parameters['Accept'] = 'application/json'
            if custom_headers:
                header_parameters.update(custom_headers)

            # 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.ErrorResponseException(self._deserialize, response)

            deserialized = None
            if response.status_code == 200:
                deserialized = self._deserialize('[EntityRole]', response)

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

            return deserialized
        list_hierarchical_entity_roles.metadata = {'url': '/apps/{appId}/versions/{versionId}/hierarchicalentities/{hEntityId}/roles'}

        def create_hierarchical_entity_role(
                self, app_id, version_id, h_entity_id, name=None, custom_headers=None, raw=False, **operation_config):
            """Create a role for an hierarchical entity in a version of the
            application.

            :param app_id: The application ID.
            :type app_id: str
            :param version_id: The version ID.
            :type version_id: str
            :param h_entity_id: The hierarchical entity extractor ID.
            :type h_entity_id: str
            :param name: The entity role name.
            :type 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: str or ClientRawResponse if raw=true
            :rtype: str or ~msrest.pipeline.ClientRawResponse
            :raises:
             :class:`ErrorResponseException<azure.cognitiveservices.language.luis.authoring.models.ErrorResponseException>`
            """
            entity_role_create_object = models.EntityRoleCreateObject(name=name)

            # Construct URL
            url = self.create_hierarchical_entity_role.metadata['url']
            path_format_arguments = {
                'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True),
                'appId': self._serialize.url("app_id", app_id, 'str'),
                'versionId': self._serialize.url("version_id", version_id, 'str'),
                'hEntityId': self._serialize.url("h_entity_id", h_entity_id, 'str')
            }
            url = self._client.format_url(url, **path_format_arguments)

            # Construct parameters
            query_parameters = {}

            # 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(entity_role_create_object, 'EntityRoleCreateObject')

            # 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 [201]:
                raise models.ErrorResponseException(self._deserialize, response)

            deserialized = None
            if response.status_code == 201:
                deserialized = self._deserialize('str', response)

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

            return deserialized
        create_hierarchical_entity_role.metadata = {'url': '/apps/{appId}/versions/{versionId}/hierarchicalentities/{hEntityId}/roles'}

        def list_custom_prebuilt_entity_roles(
                self, app_id, version_id, entity_id, custom_headers=None, raw=False, **operation_config):
            """Get all roles for a prebuilt entity in a version of the application.

            :param app_id: The application ID.
            :type app_id: str
            :param version_id: The version ID.
            :type version_id: str
            :param entity_id: entity Id
            :type entity_id: 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: list or ClientRawResponse if raw=true
            :rtype:
             list[~azure.cognitiveservices.language.luis.authoring.models.EntityRole]
             or ~msrest.pipeline.ClientRawResponse
            :raises:
             :class:`ErrorResponseException<azure.cognitiveservices.language.luis.authoring.models.ErrorResponseException>`
            """
            # Construct URL
            url = self.list_custom_prebuilt_entity_roles.metadata['url']
            path_format_arguments = {
                'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True),
                'appId': self._serialize.url("app_id", app_id, 'str'),
                'versionId': self._serialize.url("version_id", version_id, 'str'),
                'entityId': self._serialize.url("entity_id", entity_id, 'str')
            }
            url = self._client.format_url(url, **path_format_arguments)

            # Construct parameters
            query_parameters = {}

            # Construct headers
            header_parameters = {}
            header_parameters['Accept'] = 'application/json'
            if custom_headers:
                header_parameters.update(custom_headers)

            # 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.ErrorResponseException(self._deserialize, response)

            deserialized = None
            if response.status_code == 200:
                deserialized = self._deserialize('[EntityRole]', response)

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

            return deserialized
        list_custom_prebuilt_entity_roles.metadata = {'url': '/apps/{appId}/versions/{versionId}/customprebuiltentities/{entityId}/roles'}

        def create_custom_prebuilt_entity_role(
                self, app_id, version_id, entity_id, name=None, custom_headers=None, raw=False, **operation_config):
            """Create a role for a prebuilt entity in a version of the application.

            :param app_id: The application ID.
            :type app_id: str
            :param version_id: The version ID.
            :type version_id: str
            :param entity_id: The entity model ID.
            :type entity_id: str
            :param name: The entity role name.
            :type 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: str or ClientRawResponse if raw=true
            :rtype: str or ~msrest.pipeline.ClientRawResponse
            :raises:
             :class:`ErrorResponseException<azure.cognitiveservices.language.luis.authoring.models.ErrorResponseException>`
            """
            entity_role_create_object = models.EntityRoleCreateObject(name=name)

            # Construct URL
            url = self.create_custom_prebuilt_entity_role.metadata['url']
            path_format_arguments = {
                'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True),
                'appId': self._serialize.url("app_id", app_id, 'str'),
                'versionId': self._serialize.url("version_id", version_id, 'str'),
                'entityId': self._serialize.url("entity_id", entity_id, 'str')
            }
            url = self._client.format_url(url, **path_format_arguments)

            # Construct parameters
            query_parameters = {}

            # 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(entity_role_create_object, 'EntityRoleCreateObject')

            # 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 [201]:
                raise models.ErrorResponseException(self._deserialize, response)

            deserialized = None
            if response.status_code == 201:
                deserialized = self._deserialize('str', response)

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

            return deserialized
        create_custom_prebuilt_entity_role.metadata = {'url': '/apps/{appId}/versions/{versionId}/customprebuiltentities/{entityId}/roles'}

        def get_explicit_list(
                self, app_id, version_id, entity_id, custom_headers=None, raw=False, **operation_config):
            """Get the explicit (exception) list of the pattern.any entity in a
            version of the application.

            :param app_id: The application ID.
            :type app_id: str
            :param version_id: The version ID.
            :type version_id: str
            :param entity_id: The Pattern.Any entity id.
            :type entity_id: 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: list or ClientRawResponse if raw=true
            :rtype:
             list[~azure.cognitiveservices.language.luis.authoring.models.ExplicitListItem]
             or ~msrest.pipeline.ClientRawResponse
            :raises:
             :class:`ErrorResponseException<azure.cognitiveservices.language.luis.authoring.models.ErrorResponseException>`
            """
            # Construct URL
            url = self.get_explicit_list.metadata['url']
            path_format_arguments = {
                'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True),
                'appId': self._serialize.url("app_id", app_id, 'str'),
                'versionId': self._serialize.url("version_id", version_id, 'str'),
                'entityId': self._serialize.url("entity_id", entity_id, 'str')
            }
            url = self._client.format_url(url, **path_format_arguments)

            # Construct parameters
            query_parameters = {}

            # Construct headers
            header_parameters = {}
            header_parameters['Accept'] = 'application/json'
            if custom_headers:
                header_parameters.update(custom_headers)

            # 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.ErrorResponseException(self._deserialize, response)

            deserialized = None
            if response.status_code == 200:
                deserialized = self._deserialize('[ExplicitListItem]', response)

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

            return deserialized
        get_explicit_list.metadata = {'url': '/apps/{appId}/versions/{versionId}/patternanyentities/{entityId}/explicitlist'}

        def add_explicit_list_item(
                self, app_id, version_id, entity_id, explicit_list_item=None, custom_headers=None, raw=False, **operation_config):
            """Add a new exception to the explicit list for the Pattern.Any entity in
            a version of the application.

            :param app_id: The application ID.
            :type app_id: str
            :param version_id: The version ID.
            :type version_id: str
            :param entity_id: The Pattern.Any entity extractor ID.
            :type entity_id: str
            :param explicit_list_item: The explicit list item.
            :type explicit_list_item: 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: int or ClientRawResponse if raw=true
            :rtype: int or ~msrest.pipeline.ClientRawResponse
            :raises:
             :class:`ErrorResponseException<azure.cognitiveservices.language.luis.authoring.models.ErrorResponseException>`
            """
            item = models.ExplicitListItemCreateObject(explicit_list_item=explicit_list_item)

            # Construct URL
            url = self.add_explicit_list_item.metadata['url']
            path_format_arguments = {
                'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True),
                'appId': self._serialize.url("app_id", app_id, 'str'),
                'versionId': self._serialize.url("version_id", version_id, 'str'),
                'entityId': self._serialize.url("entity_id", entity_id, 'str')
            }
            url = self._client.format_url(url, **path_format_arguments)

            # Construct parameters
            query_parameters = {}

            # 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(item, 'ExplicitListItemCreateObject')

            # 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 [201]:
                raise models.ErrorResponseException(self._deserialize, response)

            deserialized = None
            if response.status_code == 201:
                deserialized = self._deserialize('int', response)

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

            return deserialized
        add_explicit_list_item.metadata = {'url': '/apps/{appId}/versions/{versionId}/patternanyentities/{entityId}/explicitlist'}

        def get_regex_entity_entity_info(
                self, app_id, version_id, regex_entity_id, custom_headers=None, raw=False, **operation_config):
            """Gets information about a regular expression entity in a version of the
            application.

            :param app_id: The application ID.
            :type app_id: str
            :param version_id: The version ID.
            :type version_id: str
            :param regex_entity_id: The regular expression entity model ID.
            :type regex_entity_id: 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: RegexEntityExtractor or ClientRawResponse if raw=true
            :rtype:
             ~azure.cognitiveservices.language.luis.authoring.models.RegexEntityExtractor
             or ~msrest.pipeline.ClientRawResponse
            :raises:
             :class:`ErrorResponseException<azure.cognitiveservices.language.luis.authoring.models.ErrorResponseException>`
            """
            # Construct URL
            url = self.get_regex_entity_entity_info.metadata['url']
            path_format_arguments = {
                'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True),
                'appId': self._serialize.url("app_id", app_id, 'str'),
                'versionId': self._serialize.url("version_id", version_id, 'str'),
                'regexEntityId': self._serialize.url("regex_entity_id", regex_entity_id, 'str')
            }
            url = self._client.format_url(url, **path_format_arguments)

            # Construct parameters
            query_parameters = {}

            # Construct headers
            header_parameters = {}
            header_parameters['Accept'] = 'application/json'
            if custom_headers:
                header_parameters.update(custom_headers)

            # 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.ErrorResponseException(self._deserialize, response)

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

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

            return deserialized
        get_regex_entity_entity_info.metadata = {'url': '/apps/{appId}/versions/{versionId}/regexentities/{regexEntityId}'}

        def update_regex_entity_model(
                self, app_id, version_id, regex_entity_id, regex_pattern=None, name=None, custom_headers=None, raw=False, **operation_config):
            """Updates the regular expression entity in a version of the application.

            :param app_id: The application ID.
            :type app_id: str
            :param version_id: The version ID.
            :type version_id: str
            :param regex_entity_id: The regular expression entity extractor ID.
            :type regex_entity_id: str
            :param regex_pattern: The regular expression entity pattern.
            :type regex_pattern: str
            :param name: The model name.
            :type 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: OperationStatus or ClientRawResponse if raw=true
            :rtype:
             ~azure.cognitiveservices.language.luis.authoring.models.OperationStatus
             or ~msrest.pipeline.ClientRawResponse
            :raises:
             :class:`ErrorResponseException<azure.cognitiveservices.language.luis.authoring.models.ErrorResponseException>`
            """
            regex_entity_update_object = models.RegexModelUpdateObject(regex_pattern=regex_pattern, name=name)

            # Construct URL
            url = self.update_regex_entity_model.metadata['url']
            path_format_arguments = {
                'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True),
                'appId': self._serialize.url("app_id", app_id, 'str'),
                'versionId': self._serialize.url("version_id", version_id, 'str'),
                'regexEntityId': self._serialize.url("regex_entity_id", regex_entity_id, 'str')
            }
            url = self._client.format_url(url, **path_format_arguments)

            # Construct parameters
            query_parameters = {}

            # 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(regex_entity_update_object, 'RegexModelUpdateObject')

            # Construct and send request
            request = self._client.put(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.ErrorResponseException(self._deserialize, response)

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

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

            return deserialized
        update_regex_entity_model.metadata = {'url': '/apps/{appId}/versions/{versionId}/regexentities/{regexEntityId}'}

        def delete_regex_entity_model(
                self, app_id, version_id, regex_entity_id, custom_headers=None, raw=False, **operation_config):
            """Deletes a regular expression entity from a version of the application.

            :param app_id: The application ID.
            :type app_id: str
            :param version_id: The version ID.
            :type version_id: str
            :param regex_entity_id: The regular expression entity extractor ID.
            :type regex_entity_id: 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: OperationStatus or ClientRawResponse if raw=true
            :rtype:
             ~azure.cognitiveservices.language.luis.authoring.models.OperationStatus
             or ~msrest.pipeline.ClientRawResponse
            :raises:
             :class:`ErrorResponseException<azure.cognitiveservices.language.luis.authoring.models.ErrorResponseException>`
            """
            # Construct URL
            url = self.delete_regex_entity_model.metadata['url']
            path_format_arguments = {
                'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True),
                'appId': self._serialize.url("app_id", app_id, 'str'),
                'versionId': self._serialize.url("version_id", version_id, 'str'),
                'regexEntityId': self._serialize.url("regex_entity_id", regex_entity_id, 'str')
            }
            url = self._client.format_url(url, **path_format_arguments)

            # Construct parameters
            query_parameters = {}

            # Construct headers
            header_parameters = {}
            header_parameters['Accept'] = 'application/json'
            if custom_headers:
                header_parameters.update(custom_headers)

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

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

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

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

            return deserialized
        delete_regex_entity_model.metadata = {'url': '/apps/{appId}/versions/{versionId}/regexentities/{regexEntityId}'}

        def get_pattern_any_entity_info(
                self, app_id, version_id, entity_id, custom_headers=None, raw=False, **operation_config):
            """Gets information about the Pattern.Any model in a version of the
            application.

            :param app_id: The application ID.
            :type app_id: str
            :param version_id: The version ID.
            :type version_id: str
            :param entity_id: The entity extractor ID.
            :type entity_id: 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: PatternAnyEntityExtractor or ClientRawResponse if raw=true
            :rtype:
             ~azure.cognitiveservices.language.luis.authoring.models.PatternAnyEntityExtractor
             or ~msrest.pipeline.ClientRawResponse
            :raises:
             :class:`ErrorResponseException<azure.cognitiveservices.language.luis.authoring.models.ErrorResponseException>`
            """
            # Construct URL
            url = self.get_pattern_any_entity_info.metadata['url']
            path_format_arguments = {
                'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True),
                'appId': self._serialize.url("app_id", app_id, 'str'),
                'versionId': self._serialize.url("version_id", version_id, 'str'),
                'entityId': self._serialize.url("entity_id", entity_id, 'str')
            }
            url = self._client.format_url(url, **path_format_arguments)

            # Construct parameters
            query_parameters = {}

            # Construct headers
            header_parameters = {}
            header_parameters['Accept'] = 'application/json'
            if custom_headers:
                header_parameters.update(custom_headers)

            # 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.ErrorResponseException(self._deserialize, response)

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

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

            return deserialized
        get_pattern_any_entity_info.metadata = {'url': '/apps/{appId}/versions/{versionId}/patternanyentities/{entityId}'}

        def update_pattern_any_entity_model(
                self, app_id, version_id, entity_id, name=None, explicit_list=None, custom_headers=None, raw=False, **operation_config):
            """Updates the name and explicit (exception) list of a Pattern.Any entity
            model in a version of the application.

            :param app_id: The application ID.
            :type app_id: str
            :param version_id: The version ID.
            :type version_id: str
            :param entity_id: The Pattern.Any entity extractor ID.
            :type entity_id: str
            :param name: The model name.
            :type name: str
            :param explicit_list: The Pattern.Any explicit list.
            :type explicit_list: list[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: OperationStatus or ClientRawResponse if raw=true
            :rtype:
             ~azure.cognitiveservices.language.luis.authoring.models.OperationStatus
             or ~msrest.pipeline.ClientRawResponse
            :raises:
             :class:`ErrorResponseException<azure.cognitiveservices.language.luis.authoring.models.ErrorResponseException>`
            """
            pattern_any_update_object = models.PatternAnyModelUpdateObject(name=name, explicit_list=explicit_list)

            # Construct URL
            url = self.update_pattern_any_entity_model.metadata['url']
            path_format_arguments = {
                'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True),
                'appId': self._serialize.url("app_id", app_id, 'str'),
                'versionId': self._serialize.url("version_id", version_id, 'str'),
                'entityId': self._serialize.url("entity_id", entity_id, 'str')
            }
            url = self._client.format_url(url, **path_format_arguments)

            # Construct parameters
            query_parameters = {}

            # 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(pattern_any_update_object, 'PatternAnyModelUpdateObject')

            # Construct and send request
            request = self._client.put(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.ErrorResponseException(self._deserialize, response)

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

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

            return deserialized
        update_pattern_any_entity_model.metadata = {'url': '/apps/{appId}/versions/{versionId}/patternanyentities/{entityId}'}

        def delete_pattern_any_entity_model(
                self, app_id, version_id, entity_id, custom_headers=None, raw=False, **operation_config):
            """Deletes a Pattern.Any entity extractor from a version of the
            application.

            :param app_id: The application ID.
            :type app_id: str
            :param version_id: The version ID.
            :type version_id: str
            :param entity_id: The Pattern.Any entity extractor ID.
            :type entity_id: 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: OperationStatus or ClientRawResponse if raw=true
            :rtype:
             ~azure.cognitiveservices.language.luis.authoring.models.OperationStatus
             or ~msrest.pipeline.ClientRawResponse
            :raises:
             :class:`ErrorResponseException<azure.cognitiveservices.language.luis.authoring.models.ErrorResponseException>`
            """
            # Construct URL
            url = self.delete_pattern_any_entity_model.metadata['url']
            path_format_arguments = {
                'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True),
                'appId': self._serialize.url("app_id", app_id, 'str'),
                'versionId': self._serialize.url("version_id", version_id, 'str'),
                'entityId': self._serialize.url("entity_id", entity_id, 'str')
            }
            url = self._client.format_url(url, **path_format_arguments)

            # Construct parameters
            query_parameters = {}

            # Construct headers
            header_parameters = {}
            header_parameters['Accept'] = 'application/json'
            if custom_headers:
                header_parameters.update(custom_headers)

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

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

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

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

            return deserialized
        delete_pattern_any_entity_model.metadata = {'url': '/apps/{appId}/versions/{versionId}/patternanyentities/{entityId}'}

        def get_entity_role(
                self, app_id, version_id, entity_id, role_id, custom_headers=None, raw=False, **operation_config):
            """Get one role for a given entity in a version of the application.

            :param app_id: The application ID.
            :type app_id: str
            :param version_id: The version ID.
            :type version_id: str
            :param entity_id: entity ID.
            :type entity_id: str
            :param role_id: entity role ID.
            :type role_id: 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: EntityRole or ClientRawResponse if raw=true
            :rtype:
             ~azure.cognitiveservices.language.luis.authoring.models.EntityRole or
             ~msrest.pipeline.ClientRawResponse
            :raises:
             :class:`ErrorResponseException<azure.cognitiveservices.language.luis.authoring.models.ErrorResponseException>`
            """
            # Construct URL
            url = self.get_entity_role.metadata['url']
            path_format_arguments = {
                'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True),
                'appId': self._serialize.url("app_id", app_id, 'str'),
                'versionId': self._serialize.url("version_id", version_id, 'str'),
                'entityId': self._serialize.url("entity_id", entity_id, 'str'),
                'roleId': self._serialize.url("role_id", role_id, 'str')
            }
            url = self._client.format_url(url, **path_format_arguments)

            # Construct parameters
            query_parameters = {}

            # Construct headers
            header_parameters = {}
            header_parameters['Accept'] = 'application/json'
            if custom_headers:
                header_parameters.update(custom_headers)

            # 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.ErrorResponseException(self._deserialize, response)

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

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

            return deserialized
        get_entity_role.metadata = {'url': '/apps/{appId}/versions/{versionId}/entities/{entityId}/roles/{roleId}'}

        def update_entity_role(
                self, app_id, version_id, entity_id, role_id, name=None, custom_headers=None, raw=False, **operation_config):
            """Update a role for a given entity in a version of the application.

            :param app_id: The application ID.
            :type app_id: str
            :param version_id: The version ID.
            :type version_id: str
            :param entity_id: The entity ID.
            :type entity_id: str
            :param role_id: The entity role ID.
            :type role_id: str
            :param name: The entity role name.
            :type 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: OperationStatus or ClientRawResponse if raw=true
            :rtype:
             ~azure.cognitiveservices.language.luis.authoring.models.OperationStatus
             or ~msrest.pipeline.ClientRawResponse
            :raises:
             :class:`ErrorResponseException<azure.cognitiveservices.language.luis.authoring.models.ErrorResponseException>`
            """
            entity_role_update_object = models.EntityRoleUpdateObject(name=name)

            # Construct URL
            url = self.update_entity_role.metadata['url']
            path_format_arguments = {
                'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True),
                'appId': self._serialize.url("app_id", app_id, 'str'),
                'versionId': self._serialize.url("version_id", version_id, 'str'),
                'entityId': self._serialize.url("entity_id", entity_id, 'str'),
                'roleId': self._serialize.url("role_id", role_id, 'str')
            }
            url = self._client.format_url(url, **path_format_arguments)

            # Construct parameters
            query_parameters = {}

            # 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(entity_role_update_object, 'EntityRoleUpdateObject')

            # Construct and send request
            request = self._client.put(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.ErrorResponseException(self._deserialize, response)

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

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

            return deserialized
        update_entity_role.metadata = {'url': '/apps/{appId}/versions/{versionId}/entities/{entityId}/roles/{roleId}'}

        def delete_entity_role(
                self, app_id, version_id, entity_id, role_id, custom_headers=None, raw=False, **operation_config):
            """Delete an entity role in a version of the application.

            :param app_id: The application ID.
            :type app_id: str
            :param version_id: The version ID.
            :type version_id: str
            :param entity_id: The entity ID.
            :type entity_id: str
            :param role_id: The entity role Id.
            :type role_id: 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: OperationStatus or ClientRawResponse if raw=true
            :rtype:
             ~azure.cognitiveservices.language.luis.authoring.models.OperationStatus
             or ~msrest.pipeline.ClientRawResponse
            :raises:
             :class:`ErrorResponseException<azure.cognitiveservices.language.luis.authoring.models.ErrorResponseException>`
            """
            # Construct URL
            url = self.delete_entity_role.metadata['url']
            path_format_arguments = {
                'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True),
                'appId': self._serialize.url("app_id", app_id, 'str'),
                'versionId': self._serialize.url("version_id", version_id, 'str'),
                'entityId': self._serialize.url("entity_id", entity_id, 'str'),
                'roleId': self._serialize.url("role_id", role_id, 'str')
            }
            url = self._client.format_url(url, **path_format_arguments)

            # Construct parameters
            query_parameters = {}

            # Construct headers
            header_parameters = {}
            header_parameters['Accept'] = 'application/json'
            if custom_headers:
                header_parameters.update(custom_headers)

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

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

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

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

            return deserialized
        delete_entity_role.metadata = {'url': '/apps/{appId}/versions/{versionId}/entities/{entityId}/roles/{roleId}'}

        def get_prebuilt_entity_role(
                self, app_id, version_id, entity_id, role_id, custom_headers=None, raw=False, **operation_config):
            """Get one role for a given prebuilt entity in a version of the
            application.

            :param app_id: The application ID.
            :type app_id: str
            :param version_id: The version ID.
            :type version_id: str
            :param entity_id: entity ID.
            :type entity_id: str
            :param role_id: entity role ID.
            :type role_id: 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: EntityRole or ClientRawResponse if raw=true
            :rtype:
             ~azure.cognitiveservices.language.luis.authoring.models.EntityRole or
             ~msrest.pipeline.ClientRawResponse
            :raises:
             :class:`ErrorResponseException<azure.cognitiveservices.language.luis.authoring.models.ErrorResponseException>`
            """
            # Construct URL
            url = self.get_prebuilt_entity_role.metadata['url']
            path_format_arguments = {
                'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True),
                'appId': self._serialize.url("app_id", app_id, 'str'),
                'versionId': self._serialize.url("version_id", version_id, 'str'),
                'entityId': self._serialize.url("entity_id", entity_id, 'str'),
                'roleId': self._serialize.url("role_id", role_id, 'str')
            }
            url = self._client.format_url(url, **path_format_arguments)

            # Construct parameters
            query_parameters = {}

            # Construct headers
            header_parameters = {}
            header_parameters['Accept'] = 'application/json'
            if custom_headers:
                header_parameters.update(custom_headers)

            # 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.ErrorResponseException(self._deserialize, response)

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

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

            return deserialized
        get_prebuilt_entity_role.metadata = {'url': '/apps/{appId}/versions/{versionId}/prebuilts/{entityId}/roles/{roleId}'}

        def update_prebuilt_entity_role(
                self, app_id, version_id, entity_id, role_id, name=None, custom_headers=None, raw=False, **operation_config):
            """Update a role for a given prebuilt entity in a version of the
            application.

            :param app_id: The application ID.
            :type app_id: str
            :param version_id: The version ID.
            :type version_id: str
            :param entity_id: The entity ID.
            :type entity_id: str
            :param role_id: The entity role ID.
            :type role_id: str
            :param name: The entity role name.
            :type 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: OperationStatus or ClientRawResponse if raw=true
            :rtype:
             ~azure.cognitiveservices.language.luis.authoring.models.OperationStatus
             or ~msrest.pipeline.ClientRawResponse
            :raises:
             :class:`ErrorResponseException<azure.cognitiveservices.language.luis.authoring.models.ErrorResponseException>`
            """
            entity_role_update_object = models.EntityRoleUpdateObject(name=name)

            # Construct URL
            url = self.update_prebuilt_entity_role.metadata['url']
            path_format_arguments = {
                'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True),
                'appId': self._serialize.url("app_id", app_id, 'str'),
                'versionId': self._serialize.url("version_id", version_id, 'str'),
                'entityId': self._serialize.url("entity_id", entity_id, 'str'),
                'roleId': self._serialize.url("role_id", role_id, 'str')
            }
            url = self._client.format_url(url, **path_format_arguments)

            # Construct parameters
            query_parameters = {}

            # 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(entity_role_update_object, 'EntityRoleUpdateObject')

            # Construct and send request
            request = self._client.put(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.ErrorResponseException(self._deserialize, response)

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

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

            return deserialized
        update_prebuilt_entity_role.metadata = {'url': '/apps/{appId}/versions/{versionId}/prebuilts/{entityId}/roles/{roleId}'}

        def delete_prebuilt_entity_role(
                self, app_id, version_id, entity_id, role_id, custom_headers=None, raw=False, **operation_config):
            """Delete a role in a prebuilt entity in a version of the application.

            :param app_id: The application ID.
            :type app_id: str
            :param version_id: The version ID.
            :type version_id: str
            :param entity_id: The entity ID.
            :type entity_id: str
            :param role_id: The entity role Id.
            :type role_id: 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: OperationStatus or ClientRawResponse if raw=true
            :rtype:
             ~azure.cognitiveservices.language.luis.authoring.models.OperationStatus
             or ~msrest.pipeline.ClientRawResponse
            :raises:
             :class:`ErrorResponseException<azure.cognitiveservices.language.luis.authoring.models.ErrorResponseException>`
            """
            # Construct URL
            url = self.delete_prebuilt_entity_role.metadata['url']
            path_format_arguments = {
                'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True),
                'appId': self._serialize.url("app_id", app_id, 'str'),
                'versionId': self._serialize.url("version_id", version_id, 'str'),
                'entityId': self._serialize.url("entity_id", entity_id, 'str'),
                'roleId': self._serialize.url("role_id", role_id, 'str')
            }
            url = self._client.format_url(url, **path_format_arguments)

            # Construct parameters
            query_parameters = {}

            # Construct headers
            header_parameters = {}
            header_parameters['Accept'] = 'application/json'
            if custom_headers:
                header_parameters.update(custom_headers)

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

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

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

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

            return deserialized
        delete_prebuilt_entity_role.metadata = {'url': '/apps/{appId}/versions/{versionId}/prebuilts/{entityId}/roles/{roleId}'}

        def get_closed_list_entity_role(
                self, app_id, version_id, entity_id, role_id, custom_headers=None, raw=False, **operation_config):
            """Get one role for a given list entity in a version of the application.

            :param app_id: The application ID.
            :type app_id: str
            :param version_id: The version ID.
            :type version_id: str
            :param entity_id: entity ID.
            :type entity_id: str
            :param role_id: entity role ID.
            :type role_id: 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: EntityRole or ClientRawResponse if raw=true
            :rtype:
             ~azure.cognitiveservices.language.luis.authoring.models.EntityRole or
             ~msrest.pipeline.ClientRawResponse
            :raises:
             :class:`ErrorResponseException<azure.cognitiveservices.language.luis.authoring.models.ErrorResponseException>`
            """
            # Construct URL
            url = self.get_closed_list_entity_role.metadata['url']
            path_format_arguments = {
                'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True),
                'appId': self._serialize.url("app_id", app_id, 'str'),
                'versionId': self._serialize.url("version_id", version_id, 'str'),
                'entityId': self._serialize.url("entity_id", entity_id, 'str'),
                'roleId': self._serialize.url("role_id", role_id, 'str')
            }
            url = self._client.format_url(url, **path_format_arguments)

            # Construct parameters
            query_parameters = {}

            # Construct headers
            header_parameters = {}
            header_parameters['Accept'] = 'application/json'
            if custom_headers:
                header_parameters.update(custom_headers)

            # 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.ErrorResponseException(self._deserialize, response)

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

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

            return deserialized
        get_closed_list_entity_role.metadata = {'url': '/apps/{appId}/versions/{versionId}/closedlists/{entityId}/roles/{roleId}'}

        def update_closed_list_entity_role(
                self, app_id, version_id, entity_id, role_id, name=None, custom_headers=None, raw=False, **operation_config):
            """Update a role for a given list entity in a version of the application.

            :param app_id: The application ID.
            :type app_id: str
            :param version_id: The version ID.
            :type version_id: str
            :param entity_id: The entity ID.
            :type entity_id: str
            :param role_id: The entity role ID.
            :type role_id: str
            :param name: The entity role name.
            :type 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: OperationStatus or ClientRawResponse if raw=true
            :rtype:
             ~azure.cognitiveservices.language.luis.authoring.models.OperationStatus
             or ~msrest.pipeline.ClientRawResponse
            :raises:
             :class:`ErrorResponseException<azure.cognitiveservices.language.luis.authoring.models.ErrorResponseException>`
            """
            entity_role_update_object = models.EntityRoleUpdateObject(name=name)

            # Construct URL
            url = self.update_closed_list_entity_role.metadata['url']
            path_format_arguments = {
                'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True),
                'appId': self._serialize.url("app_id", app_id, 'str'),
                'versionId': self._serialize.url("version_id", version_id, 'str'),
                'entityId': self._serialize.url("entity_id", entity_id, 'str'),
                'roleId': self._serialize.url("role_id", role_id, 'str')
            }
            url = self._client.format_url(url, **path_format_arguments)

            # Construct parameters
            query_parameters = {}

            # 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(entity_role_update_object, 'EntityRoleUpdateObject')

            # Construct and send request
            request = self._client.put(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.ErrorResponseException(self._deserialize, response)

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

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

            return deserialized
        update_closed_list_entity_role.metadata = {'url': '/apps/{appId}/versions/{versionId}/closedlists/{entityId}/roles/{roleId}'}

        def delete_closed_list_entity_role(
                self, app_id, version_id, entity_id, role_id, custom_headers=None, raw=False, **operation_config):
            """Delete a role for a given list entity in a version of the application.

            :param app_id: The application ID.
            :type app_id: str
            :param version_id: The version ID.
            :type version_id: str
            :param entity_id: The entity ID.
            :type entity_id: str
            :param role_id: The entity role Id.
            :type role_id: 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: OperationStatus or ClientRawResponse if raw=true
            :rtype:
             ~azure.cognitiveservices.language.luis.authoring.models.OperationStatus
             or ~msrest.pipeline.ClientRawResponse
            :raises:
             :class:`ErrorResponseException<azure.cognitiveservices.language.luis.authoring.models.ErrorResponseException>`
            """
            # Construct URL
            url = self.delete_closed_list_entity_role.metadata['url']
            path_format_arguments = {
                'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True),
                'appId': self._serialize.url("app_id", app_id, 'str'),
                'versionId': self._serialize.url("version_id", version_id, 'str'),
                'entityId': self._serialize.url("entity_id", entity_id, 'str'),
                'roleId': self._serialize.url("role_id", role_id, 'str')
            }
            url = self._client.format_url(url, **path_format_arguments)

            # Construct parameters
            query_parameters = {}

            # Construct headers
            header_parameters = {}
            header_parameters['Accept'] = 'application/json'
            if custom_headers:
                header_parameters.update(custom_headers)

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

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

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

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

            return deserialized
        delete_closed_list_entity_role.metadata = {'url': '/apps/{appId}/versions/{versionId}/closedlists/{entityId}/roles/{roleId}'}

        def get_regex_entity_role(
                self, app_id, version_id, entity_id, role_id, custom_headers=None, raw=False, **operation_config):
            """Get one role for a given regular expression entity in a version of the
            application.

            :param app_id: The application ID.
            :type app_id: str
            :param version_id: The version ID.
            :type version_id: str
            :param entity_id: entity ID.
            :type entity_id: str
            :param role_id: entity role ID.
            :type role_id: 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: EntityRole or ClientRawResponse if raw=true
            :rtype:
             ~azure.cognitiveservices.language.luis.authoring.models.EntityRole or
             ~msrest.pipeline.ClientRawResponse
            :raises:
             :class:`ErrorResponseException<azure.cognitiveservices.language.luis.authoring.models.ErrorResponseException>`
            """
            # Construct URL
            url = self.get_regex_entity_role.metadata['url']
            path_format_arguments = {
                'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True),
                'appId': self._serialize.url("app_id", app_id, 'str'),
                'versionId': self._serialize.url("version_id", version_id, 'str'),
                'entityId': self._serialize.url("entity_id", entity_id, 'str'),
                'roleId': self._serialize.url("role_id", role_id, 'str')
            }
            url = self._client.format_url(url, **path_format_arguments)

            # Construct parameters
            query_parameters = {}

            # Construct headers
            header_parameters = {}
            header_parameters['Accept'] = 'application/json'
            if custom_headers:
                header_parameters.update(custom_headers)

            # 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.ErrorResponseException(self._deserialize, response)

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

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

            return deserialized
        get_regex_entity_role.metadata = {'url': '/apps/{appId}/versions/{versionId}/regexentities/{entityId}/roles/{roleId}'}

        def update_regex_entity_role(
                self, app_id, version_id, entity_id, role_id, name=None, custom_headers=None, raw=False, **operation_config):
            """Update a role for a given regular expression entity in a version of the
            application.

            :param app_id: The application ID.
            :type app_id: str
            :param version_id: The version ID.
            :type version_id: str
            :param entity_id: The entity ID.
            :type entity_id: str
            :param role_id: The entity role ID.
            :type role_id: str
            :param name: The entity role name.
            :type 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: OperationStatus or ClientRawResponse if raw=true
            :rtype:
             ~azure.cognitiveservices.language.luis.authoring.models.OperationStatus
             or ~msrest.pipeline.ClientRawResponse
            :raises:
             :class:`ErrorResponseException<azure.cognitiveservices.language.luis.authoring.models.ErrorResponseException>`
            """
            entity_role_update_object = models.EntityRoleUpdateObject(name=name)

            # Construct URL
            url = self.update_regex_entity_role.metadata['url']
            path_format_arguments = {
                'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True),
                'appId': self._serialize.url("app_id", app_id, 'str'),
                'versionId': self._serialize.url("version_id", version_id, 'str'),
                'entityId': self._serialize.url("entity_id", entity_id, 'str'),
                'roleId': self._serialize.url("role_id", role_id, 'str')
            }
            url = self._client.format_url(url, **path_format_arguments)

            # Construct parameters
            query_parameters = {}

            # 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(entity_role_update_object, 'EntityRoleUpdateObject')

            # Construct and send request
            request = self._client.put(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.ErrorResponseException(self._deserialize, response)

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

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

            return deserialized
        update_regex_entity_role.metadata = {'url': '/apps/{appId}/versions/{versionId}/regexentities/{entityId}/roles/{roleId}'}

        def delete_regex_entity_role(
                self, app_id, version_id, entity_id, role_id, custom_headers=None, raw=False, **operation_config):
            """Delete a role for a given regular expression in a version of the
            application.

            :param app_id: The application ID.
            :type app_id: str
            :param version_id: The version ID.
            :type version_id: str
            :param entity_id: The entity ID.
            :type entity_id: str
            :param role_id: The entity role Id.
            :type role_id: 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: OperationStatus or ClientRawResponse if raw=true
            :rtype:
             ~azure.cognitiveservices.language.luis.authoring.models.OperationStatus
             or ~msrest.pipeline.ClientRawResponse
            :raises:
             :class:`ErrorResponseException<azure.cognitiveservices.language.luis.authoring.models.ErrorResponseException>`
            """
            # Construct URL
            url = self.delete_regex_entity_role.metadata['url']
            path_format_arguments = {
                'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True),
                'appId': self._serialize.url("app_id", app_id, 'str'),
                'versionId': self._serialize.url("version_id", version_id, 'str'),
                'entityId': self._serialize.url("entity_id", entity_id, 'str'),
                'roleId': self._serialize.url("role_id", role_id, 'str')
            }
            url = self._client.format_url(url, **path_format_arguments)

            # Construct parameters
            query_parameters = {}

            # Construct headers
            header_parameters = {}
            header_parameters['Accept'] = 'application/json'
            if custom_headers:
                header_parameters.update(custom_headers)

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

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

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

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

            return deserialized
        delete_regex_entity_role.metadata = {'url': '/apps/{appId}/versions/{versionId}/regexentities/{entityId}/roles/{roleId}'}

        def get_composite_entity_role(
                self, app_id, version_id, c_entity_id, role_id, custom_headers=None, raw=False, **operation_config):
            """Get one role for a given composite entity in a version of the
            application.

            :param app_id: The application ID.
            :type app_id: str
            :param version_id: The version ID.
            :type version_id: str
            :param c_entity_id: The composite entity extractor ID.
            :type c_entity_id: str
            :param role_id: entity role ID.
            :type role_id: 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: EntityRole or ClientRawResponse if raw=true
            :rtype:
             ~azure.cognitiveservices.language.luis.authoring.models.EntityRole or
             ~msrest.pipeline.ClientRawResponse
            :raises:
             :class:`ErrorResponseException<azure.cognitiveservices.language.luis.authoring.models.ErrorResponseException>`
            """
            # Construct URL
            url = self.get_composite_entity_role.metadata['url']
            path_format_arguments = {
                'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True),
                'appId': self._serialize.url("app_id", app_id, 'str'),
                'versionId': self._serialize.url("version_id", version_id, 'str'),
                'cEntityId': self._serialize.url("c_entity_id", c_entity_id, 'str'),
                'roleId': self._serialize.url("role_id", role_id, 'str')
            }
            url = self._client.format_url(url, **path_format_arguments)

            # Construct parameters
            query_parameters = {}

            # Construct headers
            header_parameters = {}
            header_parameters['Accept'] = 'application/json'
            if custom_headers:
                header_parameters.update(custom_headers)

            # 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.ErrorResponseException(self._deserialize, response)

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

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

            return deserialized
        get_composite_entity_role.metadata = {'url': '/apps/{appId}/versions/{versionId}/compositeentities/{cEntityId}/roles/{roleId}'}

        def update_composite_entity_role(
                self, app_id, version_id, c_entity_id, role_id, name=None, custom_headers=None, raw=False, **operation_config):
            """Update a role for a given composite entity in a version of the
            application.

            :param app_id: The application ID.
            :type app_id: str
            :param version_id: The version ID.
            :type version_id: str
            :param c_entity_id: The composite entity extractor ID.
            :type c_entity_id: str
            :param role_id: The entity role ID.
            :type role_id: str
            :param name: The entity role name.
            :type 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: OperationStatus or ClientRawResponse if raw=true
            :rtype:
             ~azure.cognitiveservices.language.luis.authoring.models.OperationStatus
             or ~msrest.pipeline.ClientRawResponse
            :raises:
             :class:`ErrorResponseException<azure.cognitiveservices.language.luis.authoring.models.ErrorResponseException>`
            """
            entity_role_update_object = models.EntityRoleUpdateObject(name=name)

            # Construct URL
            url = self.update_composite_entity_role.metadata['url']
            path_format_arguments = {
                'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True),
                'appId': self._serialize.url("app_id", app_id, 'str'),
                'versionId': self._serialize.url("version_id", version_id, 'str'),
                'cEntityId': self._serialize.url("c_entity_id", c_entity_id, 'str'),
                'roleId': self._serialize.url("role_id", role_id, 'str')
            }
            url = self._client.format_url(url, **path_format_arguments)

            # Construct parameters
            query_parameters = {}

            # 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(entity_role_update_object, 'EntityRoleUpdateObject')

            # Construct and send request
            request = self._client.put(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.ErrorResponseException(self._deserialize, response)

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

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

            return deserialized
        update_composite_entity_role.metadata = {'url': '/apps/{appId}/versions/{versionId}/compositeentities/{cEntityId}/roles/{roleId}'}

        def delete_composite_entity_role(
                self, app_id, version_id, c_entity_id, role_id, custom_headers=None, raw=False, **operation_config):
            """Delete a role for a given composite entity in a version of the
            application.

            :param app_id: The application ID.
            :type app_id: str
            :param version_id: The version ID.
            :type version_id: str
            :param c_entity_id: The composite entity extractor ID.
            :type c_entity_id: str
            :param role_id: The entity role Id.
            :type role_id: 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: OperationStatus or ClientRawResponse if raw=true
            :rtype:
             ~azure.cognitiveservices.language.luis.authoring.models.OperationStatus
             or ~msrest.pipeline.ClientRawResponse
            :raises:
             :class:`ErrorResponseException<azure.cognitiveservices.language.luis.authoring.models.ErrorResponseException>`
            """
            # Construct URL
            url = self.delete_composite_entity_role.metadata['url']
            path_format_arguments = {
                'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True),
                'appId': self._serialize.url("app_id", app_id, 'str'),
                'versionId': self._serialize.url("version_id", version_id, 'str'),
                'cEntityId': self._serialize.url("c_entity_id", c_entity_id, 'str'),
                'roleId': self._serialize.url("role_id", role_id, 'str')
            }
            url = self._client.format_url(url, **path_format_arguments)

            # Construct parameters
            query_parameters = {}

            # Construct headers
            header_parameters = {}
            header_parameters['Accept'] = 'application/json'
            if custom_headers:
                header_parameters.update(custom_headers)

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

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

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

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

            return deserialized
        delete_composite_entity_role.metadata = {'url': '/apps/{appId}/versions/{versionId}/compositeentities/{cEntityId}/roles/{roleId}'}

        def get_pattern_any_entity_role(
                self, app_id, version_id, entity_id, role_id, custom_headers=None, raw=False, **operation_config):
            """Get one role for a given Pattern.any entity in a version of the
            application.

            :param app_id: The application ID.
            :type app_id: str
            :param version_id: The version ID.
            :type version_id: str
            :param entity_id: entity ID.
            :type entity_id: str
            :param role_id: entity role ID.
            :type role_id: 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: EntityRole or ClientRawResponse if raw=true
            :rtype:
             ~azure.cognitiveservices.language.luis.authoring.models.EntityRole or
             ~msrest.pipeline.ClientRawResponse
            :raises:
             :class:`ErrorResponseException<azure.cognitiveservices.language.luis.authoring.models.ErrorResponseException>`
            """
            # Construct URL
            url = self.get_pattern_any_entity_role.metadata['url']
            path_format_arguments = {
                'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True),
                'appId': self._serialize.url("app_id", app_id, 'str'),
                'versionId': self._serialize.url("version_id", version_id, 'str'),
                'entityId': self._serialize.url("entity_id", entity_id, 'str'),
                'roleId': self._serialize.url("role_id", role_id, 'str')
            }
            url = self._client.format_url(url, **path_format_arguments)

            # Construct parameters
            query_parameters = {}

            # Construct headers
            header_parameters = {}
            header_parameters['Accept'] = 'application/json'
            if custom_headers:
                header_parameters.update(custom_headers)

            # 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.ErrorResponseException(self._deserialize, response)

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

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

            return deserialized
        get_pattern_any_entity_role.metadata = {'url': '/apps/{appId}/versions/{versionId}/patternanyentities/{entityId}/roles/{roleId}'}

        def update_pattern_any_entity_role(
                self, app_id, version_id, entity_id, role_id, name=None, custom_headers=None, raw=False, **operation_config):
            """Update a role for a given Pattern.any entity in a version of the
            application.

            :param app_id: The application ID.
            :type app_id: str
            :param version_id: The version ID.
            :type version_id: str
            :param entity_id: The entity ID.
            :type entity_id: str
            :param role_id: The entity role ID.
            :type role_id: str
            :param name: The entity role name.
            :type 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: OperationStatus or ClientRawResponse if raw=true
            :rtype:
             ~azure.cognitiveservices.language.luis.authoring.models.OperationStatus
             or ~msrest.pipeline.ClientRawResponse
            :raises:
             :class:`ErrorResponseException<azure.cognitiveservices.language.luis.authoring.models.ErrorResponseException>`
            """
            entity_role_update_object = models.EntityRoleUpdateObject(name=name)

            # Construct URL
            url = self.update_pattern_any_entity_role.metadata['url']
            path_format_arguments = {
                'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True),
                'appId': self._serialize.url("app_id", app_id, 'str'),
                'versionId': self._serialize.url("version_id", version_id, 'str'),
                'entityId': self._serialize.url("entity_id", entity_id, 'str'),
                'roleId': self._serialize.url("role_id", role_id, 'str')
            }
            url = self._client.format_url(url, **path_format_arguments)

            # Construct parameters
            query_parameters = {}

            # 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(entity_role_update_object, 'EntityRoleUpdateObject')

            # Construct and send request
            request = self._client.put(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.ErrorResponseException(self._deserialize, response)

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

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

            return deserialized
        update_pattern_any_entity_role.metadata = {'url': '/apps/{appId}/versions/{versionId}/patternanyentities/{entityId}/roles/{roleId}'}

        def delete_pattern_any_entity_role(
                self, app_id, version_id, entity_id, role_id, custom_headers=None, raw=False, **operation_config):
            """Delete a role for a given Pattern.any entity in a version of the
            application.

            :param app_id: The application ID.
            :type app_id: str
            :param version_id: The version ID.
            :type version_id: str
            :param entity_id: The entity ID.
            :type entity_id: str
            :param role_id: The entity role Id.
            :type role_id: 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: OperationStatus or ClientRawResponse if raw=true
            :rtype:
             ~azure.cognitiveservices.language.luis.authoring.models.OperationStatus
             or ~msrest.pipeline.ClientRawResponse
            :raises:
             :class:`ErrorResponseException<azure.cognitiveservices.language.luis.authoring.models.ErrorResponseException>`
            """
            # Construct URL
            url = self.delete_pattern_any_entity_role.metadata['url']
            path_format_arguments = {
                'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True),
                'appId': self._serialize.url("app_id", app_id, 'str'),
                'versionId': self._serialize.url("version_id", version_id, 'str'),
                'entityId': self._serialize.url("entity_id", entity_id, 'str'),
                'roleId': self._serialize.url("role_id", role_id, 'str')
            }
            url = self._client.format_url(url, **path_format_arguments)

            # Construct parameters
            query_parameters = {}

            # Construct headers
            header_parameters = {}
            header_parameters['Accept'] = 'application/json'
            if custom_headers:
                header_parameters.update(custom_headers)

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

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

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

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

            return deserialized
        delete_pattern_any_entity_role.metadata = {'url': '/apps/{appId}/versions/{versionId}/patternanyentities/{entityId}/roles/{roleId}'}

        def get_hierarchical_entity_role(
                self, app_id, version_id, h_entity_id, role_id, custom_headers=None, raw=False, **operation_config):
            """Get one role for a given hierarchical entity in a version of the
            application.

            :param app_id: The application ID.
            :type app_id: str
            :param version_id: The version ID.
            :type version_id: str
            :param h_entity_id: The hierarchical entity extractor ID.
            :type h_entity_id: str
            :param role_id: entity role ID.
            :type role_id: 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: EntityRole or ClientRawResponse if raw=true
            :rtype:
             ~azure.cognitiveservices.language.luis.authoring.models.EntityRole or
             ~msrest.pipeline.ClientRawResponse
            :raises:
             :class:`ErrorResponseException<azure.cognitiveservices.language.luis.authoring.models.ErrorResponseException>`
            """
            # Construct URL
            url = self.get_hierarchical_entity_role.metadata['url']
            path_format_arguments = {
                'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True),
                'appId': self._serialize.url("app_id", app_id, 'str'),
                'versionId': self._serialize.url("version_id", version_id, 'str'),
                'hEntityId': self._serialize.url("h_entity_id", h_entity_id, 'str'),
                'roleId': self._serialize.url("role_id", role_id, 'str')
            }
            url = self._client.format_url(url, **path_format_arguments)

            # Construct parameters
            query_parameters = {}

            # Construct headers
            header_parameters = {}
            header_parameters['Accept'] = 'application/json'
            if custom_headers:
                header_parameters.update(custom_headers)

            # 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.ErrorResponseException(self._deserialize, response)

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

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

            return deserialized
        get_hierarchical_entity_role.metadata = {'url': '/apps/{appId}/versions/{versionId}/hierarchicalentities/{hEntityId}/roles/{roleId}'}

        def update_hierarchical_entity_role(
                self, app_id, version_id, h_entity_id, role_id, name=None, custom_headers=None, raw=False, **operation_config):
            """Update a role for a given hierarchical entity in a version of the
            application.

            :param app_id: The application ID.
            :type app_id: str
            :param version_id: The version ID.
            :type version_id: str
            :param h_entity_id: The hierarchical entity extractor ID.
            :type h_entity_id: str
            :param role_id: The entity role ID.
            :type role_id: str
            :param name: The entity role name.
            :type 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: OperationStatus or ClientRawResponse if raw=true
            :rtype:
             ~azure.cognitiveservices.language.luis.authoring.models.OperationStatus
             or ~msrest.pipeline.ClientRawResponse
            :raises:
             :class:`ErrorResponseException<azure.cognitiveservices.language.luis.authoring.models.ErrorResponseException>`
            """
            entity_role_update_object = models.EntityRoleUpdateObject(name=name)

            # Construct URL
            url = self.update_hierarchical_entity_role.metadata['url']
            path_format_arguments = {
                'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True),
                'appId': self._serialize.url("app_id", app_id, 'str'),
                'versionId': self._serialize.url("version_id", version_id, 'str'),
                'hEntityId': self._serialize.url("h_entity_id", h_entity_id, 'str'),
                'roleId': self._serialize.url("role_id", role_id, 'str')
            }
            url = self._client.format_url(url, **path_format_arguments)

            # Construct parameters
            query_parameters = {}

            # 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(entity_role_update_object, 'EntityRoleUpdateObject')

            # Construct and send request
            request = self._client.put(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.ErrorResponseException(self._deserialize, response)

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

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

            return deserialized
        update_hierarchical_entity_role.metadata = {'url': '/apps/{appId}/versions/{versionId}/hierarchicalentities/{hEntityId}/roles/{roleId}'}

        def delete_hierarchical_entity_role(
                self, app_id, version_id, h_entity_id, role_id, custom_headers=None, raw=False, **operation_config):
            """Delete a role for a given hierarchical role in a version of the
            application.

            :param app_id: The application ID.
            :type app_id: str
            :param version_id: The version ID.
            :type version_id: str
            :param h_entity_id: The hierarchical entity extractor ID.
            :type h_entity_id: str
            :param role_id: The entity role Id.
            :type role_id: 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: OperationStatus or ClientRawResponse if raw=true
            :rtype:
             ~azure.cognitiveservices.language.luis.authoring.models.OperationStatus
             or ~msrest.pipeline.ClientRawResponse
            :raises:
             :class:`ErrorResponseException<azure.cognitiveservices.language.luis.authoring.models.ErrorResponseException>`
            """
            # Construct URL
            url = self.delete_hierarchical_entity_role.metadata['url']
            path_format_arguments = {
                'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True),
                'appId': self._serialize.url("app_id", app_id, 'str'),
                'versionId': self._serialize.url("version_id", version_id, 'str'),
                'hEntityId': self._serialize.url("h_entity_id", h_entity_id, 'str'),
                'roleId': self._serialize.url("role_id", role_id, 'str')
            }
            url = self._client.format_url(url, **path_format_arguments)

            # Construct parameters
            query_parameters = {}

            # Construct headers
            header_parameters = {}
            header_parameters['Accept'] = 'application/json'
            if custom_headers:
                header_parameters.update(custom_headers)

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

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

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

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

            return deserialized
        delete_hierarchical_entity_role.metadata = {'url': '/apps/{appId}/versions/{versionId}/hierarchicalentities/{hEntityId}/roles/{roleId}'}

        def get_custom_entity_role(
                self, app_id, version_id, entity_id, role_id, custom_headers=None, raw=False, **operation_config):
            """Get one role for a given prebuilt entity in a version of the
            application.

            :param app_id: The application ID.
            :type app_id: str
            :param version_id: The version ID.
            :type version_id: str
            :param entity_id: entity ID.
            :type entity_id: str
            :param role_id: entity role ID.
            :type role_id: 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: EntityRole or ClientRawResponse if raw=true
            :rtype:
             ~azure.cognitiveservices.language.luis.authoring.models.EntityRole or
             ~msrest.pipeline.ClientRawResponse
            :raises:
             :class:`ErrorResponseException<azure.cognitiveservices.language.luis.authoring.models.ErrorResponseException>`
            """
            # Construct URL
            url = self.get_custom_entity_role.metadata['url']
            path_format_arguments = {
                'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True),
                'appId': self._serialize.url("app_id", app_id, 'str'),
                'versionId': self._serialize.url("version_id", version_id, 'str'),
                'entityId': self._serialize.url("entity_id", entity_id, 'str'),
                'roleId': self._serialize.url("role_id", role_id, 'str')
            }
            url = self._client.format_url(url, **path_format_arguments)

            # Construct parameters
            query_parameters = {}

            # Construct headers
            header_parameters = {}
            header_parameters['Accept'] = 'application/json'
            if custom_headers:
                header_parameters.update(custom_headers)

            # 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.ErrorResponseException(self._deserialize, response)

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

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

            return deserialized
        get_custom_entity_role.metadata = {'url': '/apps/{appId}/versions/{versionId}/customprebuiltentities/{entityId}/roles/{roleId}'}

        def update_custom_prebuilt_entity_role(
                self, app_id, version_id, entity_id, role_id, name=None, custom_headers=None, raw=False, **operation_config):
            """Update a role for a given prebuilt entity in a version of the
            application.

            :param app_id: The application ID.
            :type app_id: str
            :param version_id: The version ID.
            :type version_id: str
            :param entity_id: The entity ID.
            :type entity_id: str
            :param role_id: The entity role ID.
            :type role_id: str
            :param name: The entity role name.
            :type 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: OperationStatus or ClientRawResponse if raw=true
            :rtype:
             ~azure.cognitiveservices.language.luis.authoring.models.OperationStatus
             or ~msrest.pipeline.ClientRawResponse
            :raises:
             :class:`ErrorResponseException<azure.cognitiveservices.language.luis.authoring.models.ErrorResponseException>`
            """
            entity_role_update_object = models.EntityRoleUpdateObject(name=name)

            # Construct URL
            url = self.update_custom_prebuilt_entity_role.metadata['url']
            path_format_arguments = {
                'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True),
                'appId': self._serialize.url("app_id", app_id, 'str'),
                'versionId': self._serialize.url("version_id", version_id, 'str'),
                'entityId': self._serialize.url("entity_id", entity_id, 'str'),
                'roleId': self._serialize.url("role_id", role_id, 'str')
            }
            url = self._client.format_url(url, **path_format_arguments)

            # Construct parameters
            query_parameters = {}

            # 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(entity_role_update_object, 'EntityRoleUpdateObject')

            # Construct and send request
            request = self._client.put(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.ErrorResponseException(self._deserialize, response)

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

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

            return deserialized
        update_custom_prebuilt_entity_role.metadata = {'url': '/apps/{appId}/versions/{versionId}/customprebuiltentities/{entityId}/roles/{roleId}'}

        def delete_custom_entity_role(
                self, app_id, version_id, entity_id, role_id, custom_headers=None, raw=False, **operation_config):
            """Delete a role for a given prebuilt entity in a version of the
            application.

            :param app_id: The application ID.
            :type app_id: str
            :param version_id: The version ID.
            :type version_id: str
            :param entity_id: The entity ID.
            :type entity_id: str
            :param role_id: The entity role Id.
            :type role_id: 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: OperationStatus or ClientRawResponse if raw=true
            :rtype:
             ~azure.cognitiveservices.language.luis.authoring.models.OperationStatus
             or ~msrest.pipeline.ClientRawResponse
            :raises:
             :class:`ErrorResponseException<azure.cognitiveservices.language.luis.authoring.models.ErrorResponseException>`
            """
            # Construct URL
            url = self.delete_custom_entity_role.metadata['url']
            path_format_arguments = {
                'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True),
                'appId': self._serialize.url("app_id", app_id, 'str'),
                'versionId': self._serialize.url("version_id", version_id, 'str'),
                'entityId': self._serialize.url("entity_id", entity_id, 'str'),
                'roleId': self._serialize.url("role_id", role_id, 'str')
            }
            url = self._client.format_url(url, **path_format_arguments)

            # Construct parameters
            query_parameters = {}

            # Construct headers
            header_parameters = {}
            header_parameters['Accept'] = 'application/json'
            if custom_headers:
                header_parameters.update(custom_headers)

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

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

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

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

            return deserialized
        delete_custom_entity_role.metadata = {'url': '/apps/{appId}/versions/{versionId}/customprebuiltentities/{entityId}/roles/{roleId}'}

        def get_explicit_list_item(
                self, app_id, version_id, entity_id, item_id, custom_headers=None, raw=False, **operation_config):
            """Get the explicit (exception) list of the pattern.any entity in a
            version of the application.

            :param app_id: The application ID.
            :type app_id: str
            :param version_id: The version ID.
            :type version_id: str
            :param entity_id: The Pattern.Any entity Id.
            :type entity_id: str
            :param item_id: The explicit list item Id.
            :type item_id: long
            :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: ExplicitListItem or ClientRawResponse if raw=true
            :rtype:
             ~azure.cognitiveservices.language.luis.authoring.models.ExplicitListItem
             or ~msrest.pipeline.ClientRawResponse
            :raises:
             :class:`ErrorResponseException<azure.cognitiveservices.language.luis.authoring.models.ErrorResponseException>`
            """
            # Construct URL
            url = self.get_explicit_list_item.metadata['url']
            path_format_arguments = {
                'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True),
                'appId': self._serialize.url("app_id", app_id, 'str'),
                'versionId': self._serialize.url("version_id", version_id, 'str'),
                'entityId': self._serialize.url("entity_id", entity_id, 'str'),
                'itemId': self._serialize.url("item_id", item_id, 'long')
            }
            url = self._client.format_url(url, **path_format_arguments)

            # Construct parameters
            query_parameters = {}

            # Construct headers
            header_parameters = {}
            header_parameters['Accept'] = 'application/json'
            if custom_headers:
                header_parameters.update(custom_headers)

            # 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.ErrorResponseException(self._deserialize, response)

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

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

            return deserialized
        get_explicit_list_item.metadata = {'url': '/apps/{appId}/versions/{versionId}/patternanyentities/{entityId}/explicitlist/{itemId}'}

        def update_explicit_list_item(
                self, app_id, version_id, entity_id, item_id, explicit_list_item=None, custom_headers=None, raw=False, **operation_config):
            """Updates an explicit (exception) list item for a Pattern.Any entity in a
            version of the application.

            :param app_id: The application ID.
            :type app_id: str
            :param version_id: The version ID.
            :type version_id: str
            :param entity_id: The Pattern.Any entity extractor ID.
            :type entity_id: str
            :param item_id: The explicit list item ID.
            :type item_id: long
            :param explicit_list_item: The explicit list item.
            :type explicit_list_item: 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: OperationStatus or ClientRawResponse if raw=true
            :rtype:
             ~azure.cognitiveservices.language.luis.authoring.models.OperationStatus
             or ~msrest.pipeline.ClientRawResponse
            :raises:
             :class:`ErrorResponseException<azure.cognitiveservices.language.luis.authoring.models.ErrorResponseException>`
            """
            item = models.ExplicitListItemUpdateObject(explicit_list_item=explicit_list_item)

            # Construct URL
            url = self.update_explicit_list_item.metadata['url']
            path_format_arguments = {
                'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True),
                'appId': self._serialize.url("app_id", app_id, 'str'),
                'versionId': self._serialize.url("version_id", version_id, 'str'),
                'entityId': self._serialize.url("entity_id", entity_id, 'str'),
                'itemId': self._serialize.url("item_id", item_id, 'long')
            }
            url = self._client.format_url(url, **path_format_arguments)

            # Construct parameters
            query_parameters = {}

            # 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(item, 'ExplicitListItemUpdateObject')

            # Construct and send request
            request = self._client.put(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.ErrorResponseException(self._deserialize, response)

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

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

            return deserialized
        update_explicit_list_item.metadata = {'url': '/apps/{appId}/versions/{versionId}/patternanyentities/{entityId}/explicitlist/{itemId}'}

        def delete_explicit_list_item(
                self, app_id, version_id, entity_id, item_id, custom_headers=None, raw=False, **operation_config):
            """Delete an item from the explicit (exception) list for a Pattern.any
            entity in a version of the application.

            :param app_id: The application ID.
            :type app_id: str
            :param version_id: The version ID.
            :type version_id: str
            :param entity_id: The pattern.any entity id.
            :type entity_id: str
            :param item_id: The explicit list item which will be deleted.
            :type item_id: long
            :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: OperationStatus or ClientRawResponse if raw=true
            :rtype:
             ~azure.cognitiveservices.language.luis.authoring.models.OperationStatus
             or ~msrest.pipeline.ClientRawResponse
            :raises:
             :class:`ErrorResponseException<azure.cognitiveservices.language.luis.authoring.models.ErrorResponseException>`
            """
            # Construct URL
            url = self.delete_explicit_list_item.metadata['url']
            path_format_arguments = {
                'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True),
                'appId': self._serialize.url("app_id", app_id, 'str'),
                'versionId': self._serialize.url("version_id", version_id, 'str'),
                'entityId': self._serialize.url("entity_id", entity_id, 'str'),
                'itemId': self._serialize.url("item_id", item_id, 'long')
            }
            url = self._client.format_url(url, **path_format_arguments)

            # Construct parameters
            query_parameters = {}

            # Construct headers
            header_parameters = {}
            header_parameters['Accept'] = 'application/json'
            if custom_headers:
                header_parameters.update(custom_headers)

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

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

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

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

            return deserialized
        delete_explicit_list_item.metadata = {'url': '/apps/{appId}/versions/{versionId}/patternanyentities/{entityId}/explicitlist/{itemId}'}