def get_image_performance_count(<EOL>self, project_id, iteration_id, tag_ids=None, custom_headers=None, raw=False, **operation_config):

<EOL>url = self.get_image_performance_count.metadata['<STR_LIT:url>']<EOL>path_format_arguments = {<EOL>'<STR_LIT>': self._serialize.url("<STR_LIT>", self.config.endpoint, '<STR_LIT:str>', skip_quote=True),<EOL>'<STR_LIT>': self._serialize.url("<STR_LIT>", project_id, '<STR_LIT:str>'),<EOL>'<STR_LIT>': self._serialize.url("<STR_LIT>", iteration_id, '<STR_LIT:str>')<EOL>}<EOL>url = self._client.format_url(url, **path_format_arguments)<EOL>query_parameters = {}<EOL>if tag_ids is not None:<EOL><INDENT>query_parameters['<STR_LIT>'] = self._serialize.query("<STR_LIT>", tag_ids, '<STR_LIT>', div='<STR_LIT:U+002C>')<EOL><DEDENT>header_parameters = {}<EOL>header_parameters['<STR_LIT>'] = '<STR_LIT:application/json>'<EOL>if custom_headers:<EOL><INDENT>header_parameters.update(custom_headers)<EOL><DEDENT>header_parameters['<STR_LIT>'] = self._serialize.header("<STR_LIT>", self.config.api_key, '<STR_LIT:str>')<EOL>request = self._client.get(url, query_parameters, header_parameters)<EOL>response = self._client.send(request, stream=False, **operation_config)<EOL>if response.status_code not in [<NUM_LIT:200>]:<EOL><INDENT>raise models.CustomVisionErrorException(self._deserialize, response)<EOL><DEDENT>deserialized = None<EOL>if response.status_code == <NUM_LIT:200>:<EOL><INDENT>deserialized = self._deserialize('<STR_LIT:int>', response)<EOL><DEDENT>if raw:<EOL><INDENT>client_raw_response = ClientRawResponse(deserialized, response)<EOL>return client_raw_response<EOL><DEDENT>return deserialized<EOL>

Gets the number of images tagged with the provided {tagIds} that have
        prediction results from
        training for the provided iteration {iterationId}.

        The filtering is on an and/or relationship. For example, if the
        provided tag ids are for the "Dog" and
        "Cat" tags, then only images tagged with Dog and/or Cat will be
        returned.

        :param project_id: The project id.
        :type project_id: str
        :param iteration_id: The iteration id. Defaults to workspace.
        :type iteration_id: str
        :param tag_ids: A list of tags ids to filter the images to count.
         Defaults to all tags when null.
        :type tag_ids: 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: int or ClientRawResponse if raw=true
        :rtype: int or ~msrest.pipeline.ClientRawResponse
        :raises:
         :class:`CustomVisionErrorException<azure.cognitiveservices.vision.customvision.training.models.CustomVisionErrorException>`


def get_projects(<EOL>self, custom_headers=None, raw=False, **operation_config):

<EOL>url = self.get_projects.metadata['<STR_LIT:url>']<EOL>path_format_arguments = {<EOL>'<STR_LIT>': self._serialize.url("<STR_LIT>", self.config.endpoint, '<STR_LIT:str>', skip_quote=True)<EOL>}<EOL>url = self._client.format_url(url, **path_format_arguments)<EOL>query_parameters = {}<EOL>header_parameters = {}<EOL>header_parameters['<STR_LIT>'] = '<STR_LIT:application/json>'<EOL>if custom_headers:<EOL><INDENT>header_parameters.update(custom_headers)<EOL><DEDENT>header_parameters['<STR_LIT>'] = self._serialize.header("<STR_LIT>", self.config.api_key, '<STR_LIT:str>')<EOL>request = self._client.get(url, query_parameters, header_parameters)<EOL>response = self._client.send(request, stream=False, **operation_config)<EOL>if response.status_code not in [<NUM_LIT:200>]:<EOL><INDENT>raise models.CustomVisionErrorException(self._deserialize, response)<EOL><DEDENT>deserialized = None<EOL>if response.status_code == <NUM_LIT:200>:<EOL><INDENT>deserialized = self._deserialize('<STR_LIT>', response)<EOL><DEDENT>if raw:<EOL><INDENT>client_raw_response = ClientRawResponse(deserialized, response)<EOL>return client_raw_response<EOL><DEDENT>return deserialized<EOL>

Get your projects.

        :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.vision.customvision.training.models.Project]
         or ~msrest.pipeline.ClientRawResponse
        :raises:
         :class:`CustomVisionErrorException<azure.cognitiveservices.vision.customvision.training.models.CustomVisionErrorException>`


def create_project(<EOL>self, name, description=None, domain_id=None, classification_type=None, target_export_platforms=None, custom_headers=None, raw=False, **operation_config):

<EOL>url = self.create_project.metadata['<STR_LIT:url>']<EOL>path_format_arguments = {<EOL>'<STR_LIT>': self._serialize.url("<STR_LIT>", self.config.endpoint, '<STR_LIT:str>', skip_quote=True)<EOL>}<EOL>url = self._client.format_url(url, **path_format_arguments)<EOL>query_parameters = {}<EOL>query_parameters['<STR_LIT:name>'] = self._serialize.query("<STR_LIT:name>", name, '<STR_LIT:str>')<EOL>if description is not None:<EOL><INDENT>query_parameters['<STR_LIT:description>'] = self._serialize.query("<STR_LIT:description>", description, '<STR_LIT:str>')<EOL><DEDENT>if domain_id is not None:<EOL><INDENT>query_parameters['<STR_LIT>'] = self._serialize.query("<STR_LIT>", domain_id, '<STR_LIT:str>')<EOL><DEDENT>if classification_type is not None:<EOL><INDENT>query_parameters['<STR_LIT>'] = self._serialize.query("<STR_LIT>", classification_type, '<STR_LIT:str>')<EOL><DEDENT>if target_export_platforms is not None:<EOL><INDENT>query_parameters['<STR_LIT>'] = self._serialize.query("<STR_LIT>", target_export_platforms, '<STR_LIT>', div='<STR_LIT:U+002C>')<EOL><DEDENT>header_parameters = {}<EOL>header_parameters['<STR_LIT>'] = '<STR_LIT:application/json>'<EOL>if custom_headers:<EOL><INDENT>header_parameters.update(custom_headers)<EOL><DEDENT>header_parameters['<STR_LIT>'] = self._serialize.header("<STR_LIT>", self.config.api_key, '<STR_LIT:str>')<EOL>request = self._client.post(url, query_parameters, header_parameters)<EOL>response = self._client.send(request, stream=False, **operation_config)<EOL>if response.status_code not in [<NUM_LIT:200>]:<EOL><INDENT>raise models.CustomVisionErrorException(self._deserialize, response)<EOL><DEDENT>deserialized = None<EOL>if response.status_code == <NUM_LIT:200>:<EOL><INDENT>deserialized = self._deserialize('<STR_LIT>', response)<EOL><DEDENT>if raw:<EOL><INDENT>client_raw_response = ClientRawResponse(deserialized, response)<EOL>return client_raw_response<EOL><DEDENT>return deserialized<EOL>

Create a project.

        :param name: Name of the project.
        :type name: str
        :param description: The description of the project.
        :type description: str
        :param domain_id: The id of the domain to use for this project.
         Defaults to General.
        :type domain_id: str
        :param classification_type: The type of classifier to create for this
         project. Possible values include: 'Multiclass', 'Multilabel'
        :type classification_type: str
        :param target_export_platforms: List of platforms the trained model is
         intending exporting to.
        :type target_export_platforms: 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: Project or ClientRawResponse if raw=true
        :rtype:
         ~azure.cognitiveservices.vision.customvision.training.models.Project
         or ~msrest.pipeline.ClientRawResponse
        :raises:
         :class:`CustomVisionErrorException<azure.cognitiveservices.vision.customvision.training.models.CustomVisionErrorException>`


def get_project(<EOL>self, project_id, custom_headers=None, raw=False, **operation_config):

<EOL>url = self.get_project.metadata['<STR_LIT:url>']<EOL>path_format_arguments = {<EOL>'<STR_LIT>': self._serialize.url("<STR_LIT>", self.config.endpoint, '<STR_LIT:str>', skip_quote=True),<EOL>'<STR_LIT>': self._serialize.url("<STR_LIT>", project_id, '<STR_LIT:str>')<EOL>}<EOL>url = self._client.format_url(url, **path_format_arguments)<EOL>query_parameters = {}<EOL>header_parameters = {}<EOL>header_parameters['<STR_LIT>'] = '<STR_LIT:application/json>'<EOL>if custom_headers:<EOL><INDENT>header_parameters.update(custom_headers)<EOL><DEDENT>header_parameters['<STR_LIT>'] = self._serialize.header("<STR_LIT>", self.config.api_key, '<STR_LIT:str>')<EOL>request = self._client.get(url, query_parameters, header_parameters)<EOL>response = self._client.send(request, stream=False, **operation_config)<EOL>if response.status_code not in [<NUM_LIT:200>]:<EOL><INDENT>raise models.CustomVisionErrorException(self._deserialize, response)<EOL><DEDENT>deserialized = None<EOL>if response.status_code == <NUM_LIT:200>:<EOL><INDENT>deserialized = self._deserialize('<STR_LIT>', response)<EOL><DEDENT>if raw:<EOL><INDENT>client_raw_response = ClientRawResponse(deserialized, response)<EOL>return client_raw_response<EOL><DEDENT>return deserialized<EOL>

Get a specific project.

        :param project_id: The id of the project to get.
        :type project_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: Project or ClientRawResponse if raw=true
        :rtype:
         ~azure.cognitiveservices.vision.customvision.training.models.Project
         or ~msrest.pipeline.ClientRawResponse
        :raises:
         :class:`CustomVisionErrorException<azure.cognitiveservices.vision.customvision.training.models.CustomVisionErrorException>`


def delete_project(<EOL>self, project_id, custom_headers=None, raw=False, **operation_config):

<EOL>url = self.delete_project.metadata['<STR_LIT:url>']<EOL>path_format_arguments = {<EOL>'<STR_LIT>': self._serialize.url("<STR_LIT>", self.config.endpoint, '<STR_LIT:str>', skip_quote=True),<EOL>'<STR_LIT>': self._serialize.url("<STR_LIT>", project_id, '<STR_LIT:str>')<EOL>}<EOL>url = self._client.format_url(url, **path_format_arguments)<EOL>query_parameters = {}<EOL>header_parameters = {}<EOL>if custom_headers:<EOL><INDENT>header_parameters.update(custom_headers)<EOL><DEDENT>header_parameters['<STR_LIT>'] = self._serialize.header("<STR_LIT>", self.config.api_key, '<STR_LIT:str>')<EOL>request = self._client.delete(url, query_parameters, header_parameters)<EOL>response = self._client.send(request, stream=False, **operation_config)<EOL>if response.status_code not in [<NUM_LIT>]:<EOL><INDENT>raise models.CustomVisionErrorException(self._deserialize, response)<EOL><DEDENT>if raw:<EOL><INDENT>client_raw_response = ClientRawResponse(None, response)<EOL>return client_raw_response<EOL><DEDENT>

Delete a specific project.

        :param project_id: The project id.
        :type project_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: None or ClientRawResponse if raw=true
        :rtype: None or ~msrest.pipeline.ClientRawResponse
        :raises:
         :class:`CustomVisionErrorException<azure.cognitiveservices.vision.customvision.training.models.CustomVisionErrorException>`


def update_project(<EOL>self, project_id, updated_project, custom_headers=None, raw=False, **operation_config):

<EOL>url = self.update_project.metadata['<STR_LIT:url>']<EOL>path_format_arguments = {<EOL>'<STR_LIT>': self._serialize.url("<STR_LIT>", self.config.endpoint, '<STR_LIT:str>', skip_quote=True),<EOL>'<STR_LIT>': self._serialize.url("<STR_LIT>", project_id, '<STR_LIT:str>')<EOL>}<EOL>url = self._client.format_url(url, **path_format_arguments)<EOL>query_parameters = {}<EOL>header_parameters = {}<EOL>header_parameters['<STR_LIT>'] = '<STR_LIT:application/json>'<EOL>header_parameters['<STR_LIT:Content-Type>'] = '<STR_LIT>'<EOL>if custom_headers:<EOL><INDENT>header_parameters.update(custom_headers)<EOL><DEDENT>header_parameters['<STR_LIT>'] = self._serialize.header("<STR_LIT>", self.config.api_key, '<STR_LIT:str>')<EOL>body_content = self._serialize.body(updated_project, '<STR_LIT>')<EOL>request = self._client.patch(url, query_parameters, header_parameters, body_content)<EOL>response = self._client.send(request, stream=False, **operation_config)<EOL>if response.status_code not in [<NUM_LIT:200>]:<EOL><INDENT>raise models.CustomVisionErrorException(self._deserialize, response)<EOL><DEDENT>deserialized = None<EOL>if response.status_code == <NUM_LIT:200>:<EOL><INDENT>deserialized = self._deserialize('<STR_LIT>', response)<EOL><DEDENT>if raw:<EOL><INDENT>client_raw_response = ClientRawResponse(deserialized, response)<EOL>return client_raw_response<EOL><DEDENT>return deserialized<EOL>

Update a specific project.

        :param project_id: The id of the project to update.
        :type project_id: str
        :param updated_project: The updated project model.
        :type updated_project:
         ~azure.cognitiveservices.vision.customvision.training.models.Project
        :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: Project or ClientRawResponse if raw=true
        :rtype:
         ~azure.cognitiveservices.vision.customvision.training.models.Project
         or ~msrest.pipeline.ClientRawResponse
        :raises:
         :class:`CustomVisionErrorException<azure.cognitiveservices.vision.customvision.training.models.CustomVisionErrorException>`


def train_project(<EOL>self, project_id, training_type=None, reserved_budget_in_hours=<NUM_LIT:0>, force_train=False, notification_email_address=None, custom_headers=None, raw=False, **operation_config):

<EOL>url = self.train_project.metadata['<STR_LIT:url>']<EOL>path_format_arguments = {<EOL>'<STR_LIT>': self._serialize.url("<STR_LIT>", self.config.endpoint, '<STR_LIT:str>', skip_quote=True),<EOL>'<STR_LIT>': self._serialize.url("<STR_LIT>", project_id, '<STR_LIT:str>')<EOL>}<EOL>url = self._client.format_url(url, **path_format_arguments)<EOL>query_parameters = {}<EOL>if training_type is not None:<EOL><INDENT>query_parameters['<STR_LIT>'] = self._serialize.query("<STR_LIT>", training_type, '<STR_LIT:str>')<EOL><DEDENT>if reserved_budget_in_hours is not None:<EOL><INDENT>query_parameters['<STR_LIT>'] = self._serialize.query("<STR_LIT>", reserved_budget_in_hours, '<STR_LIT:int>')<EOL><DEDENT>if force_train is not None:<EOL><INDENT>query_parameters['<STR_LIT>'] = self._serialize.query("<STR_LIT>", force_train, '<STR_LIT:bool>')<EOL><DEDENT>if notification_email_address is not None:<EOL><INDENT>query_parameters['<STR_LIT>'] = self._serialize.query("<STR_LIT>", notification_email_address, '<STR_LIT:str>')<EOL><DEDENT>header_parameters = {}<EOL>header_parameters['<STR_LIT>'] = '<STR_LIT:application/json>'<EOL>if custom_headers:<EOL><INDENT>header_parameters.update(custom_headers)<EOL><DEDENT>header_parameters['<STR_LIT>'] = self._serialize.header("<STR_LIT>", self.config.api_key, '<STR_LIT:str>')<EOL>request = self._client.post(url, query_parameters, header_parameters)<EOL>response = self._client.send(request, stream=False, **operation_config)<EOL>if response.status_code not in [<NUM_LIT:200>]:<EOL><INDENT>raise models.CustomVisionErrorException(self._deserialize, response)<EOL><DEDENT>deserialized = None<EOL>if response.status_code == <NUM_LIT:200>:<EOL><INDENT>deserialized = self._deserialize('<STR_LIT>', response)<EOL><DEDENT>if raw:<EOL><INDENT>client_raw_response = ClientRawResponse(deserialized, response)<EOL>return client_raw_response<EOL><DEDENT>return deserialized<EOL>

Queues project for training.

        :param project_id: The project id.
        :type project_id: str
        :param training_type: The type of training to use to train the project
         (default: Regular). Possible values include: 'Regular', 'Advanced'
        :type training_type: str
        :param reserved_budget_in_hours: The number of hours reserved as
         budget for training (if applicable).
        :type reserved_budget_in_hours: int
        :param force_train: Whether to force train even if dataset and
         configuration does not change (default: false).
        :type force_train: bool
        :param notification_email_address: The email address to send
         notification to when training finishes (default: null).
        :type notification_email_address: 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: Iteration or ClientRawResponse if raw=true
        :rtype:
         ~azure.cognitiveservices.vision.customvision.training.models.Iteration
         or ~msrest.pipeline.ClientRawResponse
        :raises:
         :class:`CustomVisionErrorException<azure.cognitiveservices.vision.customvision.training.models.CustomVisionErrorException>`


def get_iterations(<EOL>self, project_id, custom_headers=None, raw=False, **operation_config):

<EOL>url = self.get_iterations.metadata['<STR_LIT:url>']<EOL>path_format_arguments = {<EOL>'<STR_LIT>': self._serialize.url("<STR_LIT>", self.config.endpoint, '<STR_LIT:str>', skip_quote=True),<EOL>'<STR_LIT>': self._serialize.url("<STR_LIT>", project_id, '<STR_LIT:str>')<EOL>}<EOL>url = self._client.format_url(url, **path_format_arguments)<EOL>query_parameters = {}<EOL>header_parameters = {}<EOL>header_parameters['<STR_LIT>'] = '<STR_LIT:application/json>'<EOL>if custom_headers:<EOL><INDENT>header_parameters.update(custom_headers)<EOL><DEDENT>header_parameters['<STR_LIT>'] = self._serialize.header("<STR_LIT>", self.config.api_key, '<STR_LIT:str>')<EOL>request = self._client.get(url, query_parameters, header_parameters)<EOL>response = self._client.send(request, stream=False, **operation_config)<EOL>if response.status_code not in [<NUM_LIT:200>]:<EOL><INDENT>raise models.CustomVisionErrorException(self._deserialize, response)<EOL><DEDENT>deserialized = None<EOL>if response.status_code == <NUM_LIT:200>:<EOL><INDENT>deserialized = self._deserialize('<STR_LIT>', response)<EOL><DEDENT>if raw:<EOL><INDENT>client_raw_response = ClientRawResponse(deserialized, response)<EOL>return client_raw_response<EOL><DEDENT>return deserialized<EOL>

Get iterations for the project.

        :param project_id: The project id.
        :type project_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.vision.customvision.training.models.Iteration]
         or ~msrest.pipeline.ClientRawResponse
        :raises:
         :class:`CustomVisionErrorException<azure.cognitiveservices.vision.customvision.training.models.CustomVisionErrorException>`


def get_iteration(<EOL>self, project_id, iteration_id, custom_headers=None, raw=False, **operation_config):

<EOL>url = self.get_iteration.metadata['<STR_LIT:url>']<EOL>path_format_arguments = {<EOL>'<STR_LIT>': self._serialize.url("<STR_LIT>", self.config.endpoint, '<STR_LIT:str>', skip_quote=True),<EOL>'<STR_LIT>': self._serialize.url("<STR_LIT>", project_id, '<STR_LIT:str>'),<EOL>'<STR_LIT>': self._serialize.url("<STR_LIT>", iteration_id, '<STR_LIT:str>')<EOL>}<EOL>url = self._client.format_url(url, **path_format_arguments)<EOL>query_parameters = {}<EOL>header_parameters = {}<EOL>header_parameters['<STR_LIT>'] = '<STR_LIT:application/json>'<EOL>if custom_headers:<EOL><INDENT>header_parameters.update(custom_headers)<EOL><DEDENT>header_parameters['<STR_LIT>'] = self._serialize.header("<STR_LIT>", self.config.api_key, '<STR_LIT:str>')<EOL>request = self._client.get(url, query_parameters, header_parameters)<EOL>response = self._client.send(request, stream=False, **operation_config)<EOL>if response.status_code not in [<NUM_LIT:200>]:<EOL><INDENT>raise models.CustomVisionErrorException(self._deserialize, response)<EOL><DEDENT>deserialized = None<EOL>if response.status_code == <NUM_LIT:200>:<EOL><INDENT>deserialized = self._deserialize('<STR_LIT>', response)<EOL><DEDENT>if raw:<EOL><INDENT>client_raw_response = ClientRawResponse(deserialized, response)<EOL>return client_raw_response<EOL><DEDENT>return deserialized<EOL>

Get a specific iteration.

        :param project_id: The id of the project the iteration belongs to.
        :type project_id: str
        :param iteration_id: The id of the iteration to get.
        :type iteration_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: Iteration or ClientRawResponse if raw=true
        :rtype:
         ~azure.cognitiveservices.vision.customvision.training.models.Iteration
         or ~msrest.pipeline.ClientRawResponse
        :raises:
         :class:`CustomVisionErrorException<azure.cognitiveservices.vision.customvision.training.models.CustomVisionErrorException>`


def delete_iteration(<EOL>self, project_id, iteration_id, custom_headers=None, raw=False, **operation_config):

<EOL>url = self.delete_iteration.metadata['<STR_LIT:url>']<EOL>path_format_arguments = {<EOL>'<STR_LIT>': self._serialize.url("<STR_LIT>", self.config.endpoint, '<STR_LIT:str>', skip_quote=True),<EOL>'<STR_LIT>': self._serialize.url("<STR_LIT>", project_id, '<STR_LIT:str>'),<EOL>'<STR_LIT>': self._serialize.url("<STR_LIT>", iteration_id, '<STR_LIT:str>')<EOL>}<EOL>url = self._client.format_url(url, **path_format_arguments)<EOL>query_parameters = {}<EOL>header_parameters = {}<EOL>if custom_headers:<EOL><INDENT>header_parameters.update(custom_headers)<EOL><DEDENT>header_parameters['<STR_LIT>'] = self._serialize.header("<STR_LIT>", self.config.api_key, '<STR_LIT:str>')<EOL>request = self._client.delete(url, query_parameters, header_parameters)<EOL>response = self._client.send(request, stream=False, **operation_config)<EOL>if response.status_code not in [<NUM_LIT>]:<EOL><INDENT>raise models.CustomVisionErrorException(self._deserialize, response)<EOL><DEDENT>if raw:<EOL><INDENT>client_raw_response = ClientRawResponse(None, response)<EOL>return client_raw_response<EOL><DEDENT>

Delete a specific iteration of a project.

        :param project_id: The project id.
        :type project_id: str
        :param iteration_id: The iteration id.
        :type iteration_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: None or ClientRawResponse if raw=true
        :rtype: None or ~msrest.pipeline.ClientRawResponse
        :raises:
         :class:`CustomVisionErrorException<azure.cognitiveservices.vision.customvision.training.models.CustomVisionErrorException>`


def update_iteration(<EOL>self, project_id, iteration_id, name, custom_headers=None, raw=False, **operation_config):

updated_iteration = models.Iteration(name=name)<EOL>url = self.update_iteration.metadata['<STR_LIT:url>']<EOL>path_format_arguments = {<EOL>'<STR_LIT>': self._serialize.url("<STR_LIT>", self.config.endpoint, '<STR_LIT:str>', skip_quote=True),<EOL>'<STR_LIT>': self._serialize.url("<STR_LIT>", project_id, '<STR_LIT:str>'),<EOL>'<STR_LIT>': self._serialize.url("<STR_LIT>", iteration_id, '<STR_LIT:str>')<EOL>}<EOL>url = self._client.format_url(url, **path_format_arguments)<EOL>query_parameters = {}<EOL>header_parameters = {}<EOL>header_parameters['<STR_LIT>'] = '<STR_LIT:application/json>'<EOL>header_parameters['<STR_LIT:Content-Type>'] = '<STR_LIT>'<EOL>if custom_headers:<EOL><INDENT>header_parameters.update(custom_headers)<EOL><DEDENT>header_parameters['<STR_LIT>'] = self._serialize.header("<STR_LIT>", self.config.api_key, '<STR_LIT:str>')<EOL>body_content = self._serialize.body(updated_iteration, '<STR_LIT>')<EOL>request = self._client.patch(url, query_parameters, header_parameters, body_content)<EOL>response = self._client.send(request, stream=False, **operation_config)<EOL>if response.status_code not in [<NUM_LIT:200>]:<EOL><INDENT>raise models.CustomVisionErrorException(self._deserialize, response)<EOL><DEDENT>deserialized = None<EOL>if response.status_code == <NUM_LIT:200>:<EOL><INDENT>deserialized = self._deserialize('<STR_LIT>', response)<EOL><DEDENT>if raw:<EOL><INDENT>client_raw_response = ClientRawResponse(deserialized, response)<EOL>return client_raw_response<EOL><DEDENT>return deserialized<EOL>

Update a specific iteration.

        :param project_id: Project id.
        :type project_id: str
        :param iteration_id: Iteration id.
        :type iteration_id: str
        :param name: Gets or sets the name of the iteration.
        :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: Iteration or ClientRawResponse if raw=true
        :rtype:
         ~azure.cognitiveservices.vision.customvision.training.models.Iteration
         or ~msrest.pipeline.ClientRawResponse
        :raises:
         :class:`CustomVisionErrorException<azure.cognitiveservices.vision.customvision.training.models.CustomVisionErrorException>`


def publish_iteration(<EOL>self, project_id, iteration_id, publish_name, prediction_id, custom_headers=None, raw=False, **operation_config):

<EOL>url = self.publish_iteration.metadata['<STR_LIT:url>']<EOL>path_format_arguments = {<EOL>'<STR_LIT>': self._serialize.url("<STR_LIT>", self.config.endpoint, '<STR_LIT:str>', skip_quote=True),<EOL>'<STR_LIT>': self._serialize.url("<STR_LIT>", project_id, '<STR_LIT:str>'),<EOL>'<STR_LIT>': self._serialize.url("<STR_LIT>", iteration_id, '<STR_LIT:str>')<EOL>}<EOL>url = self._client.format_url(url, **path_format_arguments)<EOL>query_parameters = {}<EOL>query_parameters['<STR_LIT>'] = self._serialize.query("<STR_LIT>", publish_name, '<STR_LIT:str>')<EOL>query_parameters['<STR_LIT>'] = self._serialize.query("<STR_LIT>", prediction_id, '<STR_LIT:str>')<EOL>header_parameters = {}<EOL>header_parameters['<STR_LIT>'] = '<STR_LIT:application/json>'<EOL>if custom_headers:<EOL><INDENT>header_parameters.update(custom_headers)<EOL><DEDENT>header_parameters['<STR_LIT>'] = self._serialize.header("<STR_LIT>", self.config.api_key, '<STR_LIT:str>')<EOL>request = self._client.post(url, query_parameters, header_parameters)<EOL>response = self._client.send(request, stream=False, **operation_config)<EOL>if response.status_code not in [<NUM_LIT:200>]:<EOL><INDENT>raise models.CustomVisionErrorException(self._deserialize, response)<EOL><DEDENT>deserialized = None<EOL>if response.status_code == <NUM_LIT:200>:<EOL><INDENT>deserialized = self._deserialize('<STR_LIT:bool>', response)<EOL><DEDENT>if raw:<EOL><INDENT>client_raw_response = ClientRawResponse(deserialized, response)<EOL>return client_raw_response<EOL><DEDENT>return deserialized<EOL>

Publish a specific iteration.

        :param project_id: The project id.
        :type project_id: str
        :param iteration_id: The iteration id.
        :type iteration_id: str
        :param publish_name: The name to give the published iteration.
        :type publish_name: str
        :param prediction_id: The id of the prediction resource to publish to.
        :type prediction_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: bool or ClientRawResponse if raw=true
        :rtype: bool or ~msrest.pipeline.ClientRawResponse
        :raises:
         :class:`CustomVisionErrorException<azure.cognitiveservices.vision.customvision.training.models.CustomVisionErrorException>`


def unpublish_iteration(<EOL>self, project_id, iteration_id, custom_headers=None, raw=False, **operation_config):

<EOL>url = self.unpublish_iteration.metadata['<STR_LIT:url>']<EOL>path_format_arguments = {<EOL>'<STR_LIT>': self._serialize.url("<STR_LIT>", self.config.endpoint, '<STR_LIT:str>', skip_quote=True),<EOL>'<STR_LIT>': self._serialize.url("<STR_LIT>", project_id, '<STR_LIT:str>'),<EOL>'<STR_LIT>': self._serialize.url("<STR_LIT>", iteration_id, '<STR_LIT:str>')<EOL>}<EOL>url = self._client.format_url(url, **path_format_arguments)<EOL>query_parameters = {}<EOL>header_parameters = {}<EOL>if custom_headers:<EOL><INDENT>header_parameters.update(custom_headers)<EOL><DEDENT>header_parameters['<STR_LIT>'] = self._serialize.header("<STR_LIT>", self.config.api_key, '<STR_LIT:str>')<EOL>request = self._client.delete(url, query_parameters, header_parameters)<EOL>response = self._client.send(request, stream=False, **operation_config)<EOL>if response.status_code not in [<NUM_LIT>]:<EOL><INDENT>raise models.CustomVisionErrorException(self._deserialize, response)<EOL><DEDENT>if raw:<EOL><INDENT>client_raw_response = ClientRawResponse(None, response)<EOL>return client_raw_response<EOL><DEDENT>

Unpublish a specific iteration.

        :param project_id: The project id.
        :type project_id: str
        :param iteration_id: The iteration id.
        :type iteration_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: None or ClientRawResponse if raw=true
        :rtype: None or ~msrest.pipeline.ClientRawResponse
        :raises:
         :class:`CustomVisionErrorException<azure.cognitiveservices.vision.customvision.training.models.CustomVisionErrorException>`


def get_exports(<EOL>self, project_id, iteration_id, custom_headers=None, raw=False, **operation_config):

<EOL>url = self.get_exports.metadata['<STR_LIT:url>']<EOL>path_format_arguments = {<EOL>'<STR_LIT>': self._serialize.url("<STR_LIT>", self.config.endpoint, '<STR_LIT:str>', skip_quote=True),<EOL>'<STR_LIT>': self._serialize.url("<STR_LIT>", project_id, '<STR_LIT:str>'),<EOL>'<STR_LIT>': self._serialize.url("<STR_LIT>", iteration_id, '<STR_LIT:str>')<EOL>}<EOL>url = self._client.format_url(url, **path_format_arguments)<EOL>query_parameters = {}<EOL>header_parameters = {}<EOL>header_parameters['<STR_LIT>'] = '<STR_LIT:application/json>'<EOL>if custom_headers:<EOL><INDENT>header_parameters.update(custom_headers)<EOL><DEDENT>header_parameters['<STR_LIT>'] = self._serialize.header("<STR_LIT>", self.config.api_key, '<STR_LIT:str>')<EOL>request = self._client.get(url, query_parameters, header_parameters)<EOL>response = self._client.send(request, stream=False, **operation_config)<EOL>if response.status_code not in [<NUM_LIT:200>]:<EOL><INDENT>raise models.CustomVisionErrorException(self._deserialize, response)<EOL><DEDENT>deserialized = None<EOL>if response.status_code == <NUM_LIT:200>:<EOL><INDENT>deserialized = self._deserialize('<STR_LIT>', response)<EOL><DEDENT>if raw:<EOL><INDENT>client_raw_response = ClientRawResponse(deserialized, response)<EOL>return client_raw_response<EOL><DEDENT>return deserialized<EOL>

Get the list of exports for a specific iteration.

        :param project_id: The project id.
        :type project_id: str
        :param iteration_id: The iteration id.
        :type iteration_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.vision.customvision.training.models.Export]
         or ~msrest.pipeline.ClientRawResponse
        :raises:
         :class:`CustomVisionErrorException<azure.cognitiveservices.vision.customvision.training.models.CustomVisionErrorException>`


def export_iteration(<EOL>self, project_id, iteration_id, platform, flavor=None, custom_headers=None, raw=False, **operation_config):

<EOL>url = self.export_iteration.metadata['<STR_LIT:url>']<EOL>path_format_arguments = {<EOL>'<STR_LIT>': self._serialize.url("<STR_LIT>", self.config.endpoint, '<STR_LIT:str>', skip_quote=True),<EOL>'<STR_LIT>': self._serialize.url("<STR_LIT>", project_id, '<STR_LIT:str>'),<EOL>'<STR_LIT>': self._serialize.url("<STR_LIT>", iteration_id, '<STR_LIT:str>')<EOL>}<EOL>url = self._client.format_url(url, **path_format_arguments)<EOL>query_parameters = {}<EOL>query_parameters['<STR_LIT>'] = self._serialize.query("<STR_LIT>", platform, '<STR_LIT:str>')<EOL>if flavor is not None:<EOL><INDENT>query_parameters['<STR_LIT>'] = self._serialize.query("<STR_LIT>", flavor, '<STR_LIT:str>')<EOL><DEDENT>header_parameters = {}<EOL>header_parameters['<STR_LIT>'] = '<STR_LIT:application/json>'<EOL>if custom_headers:<EOL><INDENT>header_parameters.update(custom_headers)<EOL><DEDENT>header_parameters['<STR_LIT>'] = self._serialize.header("<STR_LIT>", self.config.api_key, '<STR_LIT:str>')<EOL>request = self._client.post(url, query_parameters, header_parameters)<EOL>response = self._client.send(request, stream=False, **operation_config)<EOL>if response.status_code not in [<NUM_LIT:200>]:<EOL><INDENT>raise models.CustomVisionErrorException(self._deserialize, response)<EOL><DEDENT>deserialized = None<EOL>if response.status_code == <NUM_LIT:200>:<EOL><INDENT>deserialized = self._deserialize('<STR_LIT>', response)<EOL><DEDENT>if raw:<EOL><INDENT>client_raw_response = ClientRawResponse(deserialized, response)<EOL>return client_raw_response<EOL><DEDENT>return deserialized<EOL>

Export a trained iteration.

        :param project_id: The project id.
        :type project_id: str
        :param iteration_id: The iteration id.
        :type iteration_id: str
        :param platform: The target platform. Possible values include:
         'CoreML', 'TensorFlow', 'DockerFile', 'ONNX', 'VAIDK'
        :type platform: str
        :param flavor: The flavor of the target platform. Possible values
         include: 'Linux', 'Windows', 'ONNX10', 'ONNX12', 'ARM'
        :type flavor: 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: Export or ClientRawResponse if raw=true
        :rtype:
         ~azure.cognitiveservices.vision.customvision.training.models.Export or
         ~msrest.pipeline.ClientRawResponse
        :raises:
         :class:`CustomVisionErrorException<azure.cognitiveservices.vision.customvision.training.models.CustomVisionErrorException>`


def get_tag(<EOL>self, project_id, tag_id, iteration_id=None, custom_headers=None, raw=False, **operation_config):

<EOL>url = self.get_tag.metadata['<STR_LIT:url>']<EOL>path_format_arguments = {<EOL>'<STR_LIT>': self._serialize.url("<STR_LIT>", self.config.endpoint, '<STR_LIT:str>', skip_quote=True),<EOL>'<STR_LIT>': self._serialize.url("<STR_LIT>", project_id, '<STR_LIT:str>'),<EOL>'<STR_LIT>': self._serialize.url("<STR_LIT>", tag_id, '<STR_LIT:str>')<EOL>}<EOL>url = self._client.format_url(url, **path_format_arguments)<EOL>query_parameters = {}<EOL>if iteration_id is not None:<EOL><INDENT>query_parameters['<STR_LIT>'] = self._serialize.query("<STR_LIT>", iteration_id, '<STR_LIT:str>')<EOL><DEDENT>header_parameters = {}<EOL>header_parameters['<STR_LIT>'] = '<STR_LIT:application/json>'<EOL>if custom_headers:<EOL><INDENT>header_parameters.update(custom_headers)<EOL><DEDENT>header_parameters['<STR_LIT>'] = self._serialize.header("<STR_LIT>", self.config.api_key, '<STR_LIT:str>')<EOL>request = self._client.get(url, query_parameters, header_parameters)<EOL>response = self._client.send(request, stream=False, **operation_config)<EOL>if response.status_code not in [<NUM_LIT:200>]:<EOL><INDENT>raise models.CustomVisionErrorException(self._deserialize, response)<EOL><DEDENT>deserialized = None<EOL>if response.status_code == <NUM_LIT:200>:<EOL><INDENT>deserialized = self._deserialize('<STR_LIT>', response)<EOL><DEDENT>if raw:<EOL><INDENT>client_raw_response = ClientRawResponse(deserialized, response)<EOL>return client_raw_response<EOL><DEDENT>return deserialized<EOL>

Get information about a specific tag.

        :param project_id: The project this tag belongs to.
        :type project_id: str
        :param tag_id: The tag id.
        :type tag_id: str
        :param iteration_id: The iteration to retrieve this tag from.
         Optional, defaults to current training set.
        :type iteration_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: Tag or ClientRawResponse if raw=true
        :rtype:
         ~azure.cognitiveservices.vision.customvision.training.models.Tag or
         ~msrest.pipeline.ClientRawResponse
        :raises:
         :class:`CustomVisionErrorException<azure.cognitiveservices.vision.customvision.training.models.CustomVisionErrorException>`


def delete_tag(<EOL>self, project_id, tag_id, custom_headers=None, raw=False, **operation_config):

<EOL>url = self.delete_tag.metadata['<STR_LIT:url>']<EOL>path_format_arguments = {<EOL>'<STR_LIT>': self._serialize.url("<STR_LIT>", self.config.endpoint, '<STR_LIT:str>', skip_quote=True),<EOL>'<STR_LIT>': self._serialize.url("<STR_LIT>", project_id, '<STR_LIT:str>'),<EOL>'<STR_LIT>': self._serialize.url("<STR_LIT>", tag_id, '<STR_LIT:str>')<EOL>}<EOL>url = self._client.format_url(url, **path_format_arguments)<EOL>query_parameters = {}<EOL>header_parameters = {}<EOL>if custom_headers:<EOL><INDENT>header_parameters.update(custom_headers)<EOL><DEDENT>header_parameters['<STR_LIT>'] = self._serialize.header("<STR_LIT>", self.config.api_key, '<STR_LIT:str>')<EOL>request = self._client.delete(url, query_parameters, header_parameters)<EOL>response = self._client.send(request, stream=False, **operation_config)<EOL>if response.status_code not in [<NUM_LIT>]:<EOL><INDENT>raise models.CustomVisionErrorException(self._deserialize, response)<EOL><DEDENT>if raw:<EOL><INDENT>client_raw_response = ClientRawResponse(None, response)<EOL>return client_raw_response<EOL><DEDENT>

Delete a tag from the project.

        :param project_id: The project id.
        :type project_id: str
        :param tag_id: Id of the tag to be deleted.
        :type tag_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: None or ClientRawResponse if raw=true
        :rtype: None or ~msrest.pipeline.ClientRawResponse
        :raises:
         :class:`CustomVisionErrorException<azure.cognitiveservices.vision.customvision.training.models.CustomVisionErrorException>`


def update_tag(<EOL>self, project_id, tag_id, updated_tag, custom_headers=None, raw=False, **operation_config):

<EOL>url = self.update_tag.metadata['<STR_LIT:url>']<EOL>path_format_arguments = {<EOL>'<STR_LIT>': self._serialize.url("<STR_LIT>", self.config.endpoint, '<STR_LIT:str>', skip_quote=True),<EOL>'<STR_LIT>': self._serialize.url("<STR_LIT>", project_id, '<STR_LIT:str>'),<EOL>'<STR_LIT>': self._serialize.url("<STR_LIT>", tag_id, '<STR_LIT:str>')<EOL>}<EOL>url = self._client.format_url(url, **path_format_arguments)<EOL>query_parameters = {}<EOL>header_parameters = {}<EOL>header_parameters['<STR_LIT>'] = '<STR_LIT:application/json>'<EOL>header_parameters['<STR_LIT:Content-Type>'] = '<STR_LIT>'<EOL>if custom_headers:<EOL><INDENT>header_parameters.update(custom_headers)<EOL><DEDENT>header_parameters['<STR_LIT>'] = self._serialize.header("<STR_LIT>", self.config.api_key, '<STR_LIT:str>')<EOL>body_content = self._serialize.body(updated_tag, '<STR_LIT>')<EOL>request = self._client.patch(url, query_parameters, header_parameters, body_content)<EOL>response = self._client.send(request, stream=False, **operation_config)<EOL>if response.status_code not in [<NUM_LIT:200>]:<EOL><INDENT>raise models.CustomVisionErrorException(self._deserialize, response)<EOL><DEDENT>deserialized = None<EOL>if response.status_code == <NUM_LIT:200>:<EOL><INDENT>deserialized = self._deserialize('<STR_LIT>', response)<EOL><DEDENT>if raw:<EOL><INDENT>client_raw_response = ClientRawResponse(deserialized, response)<EOL>return client_raw_response<EOL><DEDENT>return deserialized<EOL>

Update a tag.

        :param project_id: The project id.
        :type project_id: str
        :param tag_id: The id of the target tag.
        :type tag_id: str
        :param updated_tag: The updated tag model.
        :type updated_tag:
         ~azure.cognitiveservices.vision.customvision.training.models.Tag
        :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: Tag or ClientRawResponse if raw=true
        :rtype:
         ~azure.cognitiveservices.vision.customvision.training.models.Tag or
         ~msrest.pipeline.ClientRawResponse
        :raises:
         :class:`CustomVisionErrorException<azure.cognitiveservices.vision.customvision.training.models.CustomVisionErrorException>`


def get_tags(<EOL>self, project_id, iteration_id=None, custom_headers=None, raw=False, **operation_config):

<EOL>url = self.get_tags.metadata['<STR_LIT:url>']<EOL>path_format_arguments = {<EOL>'<STR_LIT>': self._serialize.url("<STR_LIT>", self.config.endpoint, '<STR_LIT:str>', skip_quote=True),<EOL>'<STR_LIT>': self._serialize.url("<STR_LIT>", project_id, '<STR_LIT:str>')<EOL>}<EOL>url = self._client.format_url(url, **path_format_arguments)<EOL>query_parameters = {}<EOL>if iteration_id is not None:<EOL><INDENT>query_parameters['<STR_LIT>'] = self._serialize.query("<STR_LIT>", iteration_id, '<STR_LIT:str>')<EOL><DEDENT>header_parameters = {}<EOL>header_parameters['<STR_LIT>'] = '<STR_LIT:application/json>'<EOL>if custom_headers:<EOL><INDENT>header_parameters.update(custom_headers)<EOL><DEDENT>header_parameters['<STR_LIT>'] = self._serialize.header("<STR_LIT>", self.config.api_key, '<STR_LIT:str>')<EOL>request = self._client.get(url, query_parameters, header_parameters)<EOL>response = self._client.send(request, stream=False, **operation_config)<EOL>if response.status_code not in [<NUM_LIT:200>]:<EOL><INDENT>raise models.CustomVisionErrorException(self._deserialize, response)<EOL><DEDENT>deserialized = None<EOL>if response.status_code == <NUM_LIT:200>:<EOL><INDENT>deserialized = self._deserialize('<STR_LIT>', response)<EOL><DEDENT>if raw:<EOL><INDENT>client_raw_response = ClientRawResponse(deserialized, response)<EOL>return client_raw_response<EOL><DEDENT>return deserialized<EOL>

Get the tags for a given project and iteration.

        :param project_id: The project id.
        :type project_id: str
        :param iteration_id: The iteration id. Defaults to workspace.
        :type iteration_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.vision.customvision.training.models.Tag]
         or ~msrest.pipeline.ClientRawResponse
        :raises:
         :class:`CustomVisionErrorException<azure.cognitiveservices.vision.customvision.training.models.CustomVisionErrorException>`


def create_tag(<EOL>self, project_id, name, description=None, type=None, custom_headers=None, raw=False, **operation_config):

<EOL>url = self.create_tag.metadata['<STR_LIT:url>']<EOL>path_format_arguments = {<EOL>'<STR_LIT>': self._serialize.url("<STR_LIT>", self.config.endpoint, '<STR_LIT:str>', skip_quote=True),<EOL>'<STR_LIT>': self._serialize.url("<STR_LIT>", project_id, '<STR_LIT:str>')<EOL>}<EOL>url = self._client.format_url(url, **path_format_arguments)<EOL>query_parameters = {}<EOL>query_parameters['<STR_LIT:name>'] = self._serialize.query("<STR_LIT:name>", name, '<STR_LIT:str>')<EOL>if description is not None:<EOL><INDENT>query_parameters['<STR_LIT:description>'] = self._serialize.query("<STR_LIT:description>", description, '<STR_LIT:str>')<EOL><DEDENT>if type is not None:<EOL><INDENT>query_parameters['<STR_LIT:type>'] = self._serialize.query("<STR_LIT:type>", type, '<STR_LIT:str>')<EOL><DEDENT>header_parameters = {}<EOL>header_parameters['<STR_LIT>'] = '<STR_LIT:application/json>'<EOL>if custom_headers:<EOL><INDENT>header_parameters.update(custom_headers)<EOL><DEDENT>header_parameters['<STR_LIT>'] = self._serialize.header("<STR_LIT>", self.config.api_key, '<STR_LIT:str>')<EOL>request = self._client.post(url, query_parameters, header_parameters)<EOL>response = self._client.send(request, stream=False, **operation_config)<EOL>if response.status_code not in [<NUM_LIT:200>]:<EOL><INDENT>raise models.CustomVisionErrorException(self._deserialize, response)<EOL><DEDENT>deserialized = None<EOL>if response.status_code == <NUM_LIT:200>:<EOL><INDENT>deserialized = self._deserialize('<STR_LIT>', response)<EOL><DEDENT>if raw:<EOL><INDENT>client_raw_response = ClientRawResponse(deserialized, response)<EOL>return client_raw_response<EOL><DEDENT>return deserialized<EOL>

Create a tag for the project.

        :param project_id: The project id.
        :type project_id: str
        :param name: The tag name.
        :type name: str
        :param description: Optional description for the tag.
        :type description: str
        :param type: Optional type for the tag. Possible values include:
         'Regular', 'Negative'
        :type type: 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: Tag or ClientRawResponse if raw=true
        :rtype:
         ~azure.cognitiveservices.vision.customvision.training.models.Tag or
         ~msrest.pipeline.ClientRawResponse
        :raises:
         :class:`CustomVisionErrorException<azure.cognitiveservices.vision.customvision.training.models.CustomVisionErrorException>`


def list(<EOL>self, custom_headers=None, raw=False, **operation_config):

def internal_paging(next_link=None, raw=False):<EOL><INDENT>if not next_link:<EOL><INDENT>url = self.list.metadata['<STR_LIT:url>']<EOL>query_parameters = {}<EOL>query_parameters['<STR_LIT>'] = self._serialize.query("<STR_LIT>", self.api_version, '<STR_LIT:str>')<EOL><DEDENT>else:<EOL><INDENT>url = next_link<EOL>query_parameters = {}<EOL><DEDENT>header_parameters = {}<EOL>header_parameters['<STR_LIT:Content-Type>'] = '<STR_LIT>'<EOL>if self.config.generate_client_request_id:<EOL><INDENT>header_parameters['<STR_LIT>'] = str(uuid.uuid1())<EOL><DEDENT>if custom_headers:<EOL><INDENT>header_parameters.update(custom_headers)<EOL><DEDENT>if self.config.accept_language is not None:<EOL><INDENT>header_parameters['<STR_LIT>'] = self._serialize.header("<STR_LIT>", self.config.accept_language, '<STR_LIT:str>')<EOL><DEDENT>request = self._client.get(url, query_parameters)<EOL>response = self._client.send(<EOL>request, header_parameters, stream=False, **operation_config)<EOL>if response.status_code not in [<NUM_LIT:200>]:<EOL><INDENT>exp = CloudError(response)<EOL>exp.request_id = response.headers.get('<STR_LIT>')<EOL>raise exp<EOL><DEDENT>return response<EOL><DEDENT>deserialized = models.OperationPaged(internal_paging, self._deserialize.dependencies)<EOL>if raw:<EOL><INDENT>header_dict = {}<EOL>client_raw_response = models.OperationPaged(internal_paging, self._deserialize.dependencies, header_dict)<EOL>return client_raw_response<EOL><DEDENT>return deserialized<EOL>

Lists all of the available REST API operations of the Microsoft.Search
        provider.

        :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: An iterator like instance of Operation
        :rtype:
         ~azure.mgmt.search.models.OperationPaged[~azure.mgmt.search.models.Operation]
        :raises: :class:`CloudError<msrestazure.azure_exceptions.CloudError>`


def create_or_update(<EOL>self, resource_group_name, search_service_name, service, search_management_request_options=None, custom_headers=None, raw=False, polling=True, **operation_config):

raw_result = self._create_or_update_initial(<EOL>resource_group_name=resource_group_name,<EOL>search_service_name=search_service_name,<EOL>service=service,<EOL>search_management_request_options=search_management_request_options,<EOL>custom_headers=custom_headers,<EOL>raw=True,<EOL>**operation_config<EOL>)<EOL>def get_long_running_output(response):<EOL><INDENT>deserialized = self._deserialize('<STR_LIT>', response)<EOL>if raw:<EOL><INDENT>client_raw_response = ClientRawResponse(deserialized, response)<EOL>return client_raw_response<EOL><DEDENT>return deserialized<EOL><DEDENT>lro_delay = operation_config.get(<EOL>'<STR_LIT>',<EOL>self.config.long_running_operation_timeout)<EOL>if polling is True: polling_method = ARMPolling(lro_delay, **operation_config)<EOL>elif polling is False: polling_method = NoPolling()<EOL>else: polling_method = polling<EOL>return LROPoller(self._client, raw_result, get_long_running_output, polling_method)<EOL>

Creates or updates a Search service in the given resource group. If the
        Search service already exists, all properties will be updated with the
        given values.

        :param resource_group_name: The name of the resource group within the
         current subscription. You can obtain this value from the Azure
         Resource Manager API or the portal.
        :type resource_group_name: str
        :param search_service_name: The name of the Azure Search service to
         create or update. Search service names must only contain lowercase
         letters, digits or dashes, cannot use dash as the first two or last
         one characters, cannot contain consecutive dashes, and must be between
         2 and 60 characters in length. Search service names must be globally
         unique since they are part of the service URI
         (https://<name>.search.windows.net). You cannot change the service
         name after the service is created.
        :type search_service_name: str
        :param service: The definition of the Search service to create or
         update.
        :type service: ~azure.mgmt.search.models.SearchService
        :param search_management_request_options: Additional parameters for
         the operation
        :type search_management_request_options:
         ~azure.mgmt.search.models.SearchManagementRequestOptions
        :param dict custom_headers: headers that will be added to the request
        :param bool raw: The poller return type is ClientRawResponse, the
         direct response alongside the deserialized response
        :param polling: True for ARMPolling, False for no polling, or a
         polling object for personal polling strategy
        :return: An instance of LROPoller that returns SearchService or
         ClientRawResponse<SearchService> if raw==True
        :rtype:
         ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.search.models.SearchService]
         or
         ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.search.models.SearchService]]
        :raises: :class:`CloudError<msrestazure.azure_exceptions.CloudError>`


def update(<EOL>self, resource_group_name, search_service_name, service, search_management_request_options=None, custom_headers=None, raw=False, **operation_config):

client_request_id = None<EOL>if search_management_request_options is not None:<EOL><INDENT>client_request_id = search_management_request_options.client_request_id<EOL><DEDENT>url = self.update.metadata['<STR_LIT:url>']<EOL>path_format_arguments = {<EOL>'<STR_LIT>': self._serialize.url("<STR_LIT>", resource_group_name, '<STR_LIT:str>'),<EOL>'<STR_LIT>': self._serialize.url("<STR_LIT>", search_service_name, '<STR_LIT:str>'),<EOL>'<STR_LIT>': self._serialize.url("<STR_LIT>", self.config.subscription_id, '<STR_LIT:str>')<EOL>}<EOL>url = self._client.format_url(url, **path_format_arguments)<EOL>query_parameters = {}<EOL>query_parameters['<STR_LIT>'] = self._serialize.query("<STR_LIT>", self.api_version, '<STR_LIT:str>')<EOL>header_parameters = {}<EOL>header_parameters['<STR_LIT:Content-Type>'] = '<STR_LIT>'<EOL>if self.config.generate_client_request_id:<EOL><INDENT>header_parameters['<STR_LIT>'] = str(uuid.uuid1())<EOL><DEDENT>if custom_headers:<EOL><INDENT>header_parameters.update(custom_headers)<EOL><DEDENT>if self.config.accept_language is not None:<EOL><INDENT>header_parameters['<STR_LIT>'] = self._serialize.header("<STR_LIT>", self.config.accept_language, '<STR_LIT:str>')<EOL><DEDENT>if client_request_id is not None:<EOL><INDENT>header_parameters['<STR_LIT>'] = self._serialize.header("<STR_LIT>", client_request_id, '<STR_LIT:str>')<EOL><DEDENT>body_content = self._serialize.body(service, '<STR_LIT>')<EOL>request = self._client.patch(url, query_parameters)<EOL>response = self._client.send(<EOL>request, header_parameters, body_content, stream=False, **operation_config)<EOL>if response.status_code not in [<NUM_LIT:200>]:<EOL><INDENT>exp = CloudError(response)<EOL>exp.request_id = response.headers.get('<STR_LIT>')<EOL>raise exp<EOL><DEDENT>deserialized = None<EOL>if response.status_code == <NUM_LIT:200>:<EOL><INDENT>deserialized = self._deserialize('<STR_LIT>', response)<EOL><DEDENT>if raw:<EOL><INDENT>client_raw_response = ClientRawResponse(deserialized, response)<EOL>return client_raw_response<EOL><DEDENT>return deserialized<EOL>

Updates an existing Search service in the given resource group.

        :param resource_group_name: The name of the resource group within the
         current subscription. You can obtain this value from the Azure
         Resource Manager API or the portal.
        :type resource_group_name: str
        :param search_service_name: The name of the Azure Search service to
         update.
        :type search_service_name: str
        :param service: The definition of the Search service to update.
        :type service: ~azure.mgmt.search.models.SearchService
        :param search_management_request_options: Additional parameters for
         the operation
        :type search_management_request_options:
         ~azure.mgmt.search.models.SearchManagementRequestOptions
        :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: SearchService or ClientRawResponse if raw=true
        :rtype: ~azure.mgmt.search.models.SearchService or
         ~msrest.pipeline.ClientRawResponse
        :raises: :class:`CloudError<msrestazure.azure_exceptions.CloudError>`


def get(<EOL>self, resource_group_name, search_service_name, search_management_request_options=None, custom_headers=None, raw=False, **operation_config):

client_request_id = None<EOL>if search_management_request_options is not None:<EOL><INDENT>client_request_id = search_management_request_options.client_request_id<EOL><DEDENT>url = self.get.metadata['<STR_LIT:url>']<EOL>path_format_arguments = {<EOL>'<STR_LIT>': self._serialize.url("<STR_LIT>", resource_group_name, '<STR_LIT:str>'),<EOL>'<STR_LIT>': self._serialize.url("<STR_LIT>", search_service_name, '<STR_LIT:str>'),<EOL>'<STR_LIT>': self._serialize.url("<STR_LIT>", self.config.subscription_id, '<STR_LIT:str>')<EOL>}<EOL>url = self._client.format_url(url, **path_format_arguments)<EOL>query_parameters = {}<EOL>query_parameters['<STR_LIT>'] = self._serialize.query("<STR_LIT>", self.api_version, '<STR_LIT:str>')<EOL>header_parameters = {}<EOL>header_parameters['<STR_LIT:Content-Type>'] = '<STR_LIT>'<EOL>if self.config.generate_client_request_id:<EOL><INDENT>header_parameters['<STR_LIT>'] = str(uuid.uuid1())<EOL><DEDENT>if custom_headers:<EOL><INDENT>header_parameters.update(custom_headers)<EOL><DEDENT>if self.config.accept_language is not None:<EOL><INDENT>header_parameters['<STR_LIT>'] = self._serialize.header("<STR_LIT>", self.config.accept_language, '<STR_LIT:str>')<EOL><DEDENT>if client_request_id is not None:<EOL><INDENT>header_parameters['<STR_LIT>'] = self._serialize.header("<STR_LIT>", client_request_id, '<STR_LIT:str>')<EOL><DEDENT>request = self._client.get(url, query_parameters)<EOL>response = self._client.send(request, header_parameters, stream=False, **operation_config)<EOL>if response.status_code not in [<NUM_LIT:200>]:<EOL><INDENT>exp = CloudError(response)<EOL>exp.request_id = response.headers.get('<STR_LIT>')<EOL>raise exp<EOL><DEDENT>deserialized = None<EOL>if response.status_code == <NUM_LIT:200>:<EOL><INDENT>deserialized = self._deserialize('<STR_LIT>', response)<EOL><DEDENT>if raw:<EOL><INDENT>client_raw_response = ClientRawResponse(deserialized, response)<EOL>return client_raw_response<EOL><DEDENT>return deserialized<EOL>

Gets the Search service with the given name in the given resource
        group.

        :param resource_group_name: The name of the resource group within the
         current subscription. You can obtain this value from the Azure
         Resource Manager API or the portal.
        :type resource_group_name: str
        :param search_service_name: The name of the Azure Search service
         associated with the specified resource group.
        :type search_service_name: str
        :param search_management_request_options: Additional parameters for
         the operation
        :type search_management_request_options:
         ~azure.mgmt.search.models.SearchManagementRequestOptions
        :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: SearchService or ClientRawResponse if raw=true
        :rtype: ~azure.mgmt.search.models.SearchService or
         ~msrest.pipeline.ClientRawResponse
        :raises: :class:`CloudError<msrestazure.azure_exceptions.CloudError>`


def delete(<EOL>self, resource_group_name, search_service_name, search_management_request_options=None, custom_headers=None, raw=False, **operation_config):

client_request_id = None<EOL>if search_management_request_options is not None:<EOL><INDENT>client_request_id = search_management_request_options.client_request_id<EOL><DEDENT>url = self.delete.metadata['<STR_LIT:url>']<EOL>path_format_arguments = {<EOL>'<STR_LIT>': self._serialize.url("<STR_LIT>", resource_group_name, '<STR_LIT:str>'),<EOL>'<STR_LIT>': self._serialize.url("<STR_LIT>", search_service_name, '<STR_LIT:str>'),<EOL>'<STR_LIT>': self._serialize.url("<STR_LIT>", self.config.subscription_id, '<STR_LIT:str>')<EOL>}<EOL>url = self._client.format_url(url, **path_format_arguments)<EOL>query_parameters = {}<EOL>query_parameters['<STR_LIT>'] = self._serialize.query("<STR_LIT>", self.api_version, '<STR_LIT:str>')<EOL>header_parameters = {}<EOL>header_parameters['<STR_LIT:Content-Type>'] = '<STR_LIT>'<EOL>if self.config.generate_client_request_id:<EOL><INDENT>header_parameters['<STR_LIT>'] = str(uuid.uuid1())<EOL><DEDENT>if custom_headers:<EOL><INDENT>header_parameters.update(custom_headers)<EOL><DEDENT>if self.config.accept_language is not None:<EOL><INDENT>header_parameters['<STR_LIT>'] = self._serialize.header("<STR_LIT>", self.config.accept_language, '<STR_LIT:str>')<EOL><DEDENT>if client_request_id is not None:<EOL><INDENT>header_parameters['<STR_LIT>'] = self._serialize.header("<STR_LIT>", client_request_id, '<STR_LIT:str>')<EOL><DEDENT>request = self._client.delete(url, query_parameters)<EOL>response = self._client.send(request, header_parameters, stream=False, **operation_config)<EOL>if response.status_code not in [<NUM_LIT:200>, <NUM_LIT>, <NUM_LIT>]:<EOL><INDENT>exp = CloudError(response)<EOL>exp.request_id = response.headers.get('<STR_LIT>')<EOL>raise exp<EOL><DEDENT>if raw:<EOL><INDENT>client_raw_response = ClientRawResponse(None, response)<EOL>return client_raw_response<EOL><DEDENT>

Deletes a Search service in the given resource group, along with its
        associated resources.

        :param resource_group_name: The name of the resource group within the
         current subscription. You can obtain this value from the Azure
         Resource Manager API or the portal.
        :type resource_group_name: str
        :param search_service_name: The name of the Azure Search service
         associated with the specified resource group.
        :type search_service_name: str
        :param search_management_request_options: Additional parameters for
         the operation
        :type search_management_request_options:
         ~azure.mgmt.search.models.SearchManagementRequestOptions
        :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: None or ClientRawResponse if raw=true
        :rtype: None or ~msrest.pipeline.ClientRawResponse
        :raises: :class:`CloudError<msrestazure.azure_exceptions.CloudError>`


def list_by_resource_group(<EOL>self, resource_group_name, search_management_request_options=None, custom_headers=None, raw=False, **operation_config):

client_request_id = None<EOL>if search_management_request_options is not None:<EOL><INDENT>client_request_id = search_management_request_options.client_request_id<EOL><DEDENT>def internal_paging(next_link=None, raw=False):<EOL><INDENT>if not next_link:<EOL><INDENT>url = self.list_by_resource_group.metadata['<STR_LIT:url>']<EOL>path_format_arguments = {<EOL>'<STR_LIT>': self._serialize.url("<STR_LIT>", resource_group_name, '<STR_LIT:str>'),<EOL>'<STR_LIT>': self._serialize.url("<STR_LIT>", self.config.subscription_id, '<STR_LIT:str>')<EOL>}<EOL>url = self._client.format_url(url, **path_format_arguments)<EOL>query_parameters = {}<EOL>query_parameters['<STR_LIT>'] = self._serialize.query("<STR_LIT>", self.api_version, '<STR_LIT:str>')<EOL><DEDENT>else:<EOL><INDENT>url = next_link<EOL>query_parameters = {}<EOL><DEDENT>header_parameters = {}<EOL>header_parameters['<STR_LIT:Content-Type>'] = '<STR_LIT>'<EOL>if self.config.generate_client_request_id:<EOL><INDENT>header_parameters['<STR_LIT>'] = str(uuid.uuid1())<EOL><DEDENT>if custom_headers:<EOL><INDENT>header_parameters.update(custom_headers)<EOL><DEDENT>if self.config.accept_language is not None:<EOL><INDENT>header_parameters['<STR_LIT>'] = self._serialize.header("<STR_LIT>", self.config.accept_language, '<STR_LIT:str>')<EOL><DEDENT>if client_request_id is not None:<EOL><INDENT>header_parameters['<STR_LIT>'] = self._serialize.header("<STR_LIT>", client_request_id, '<STR_LIT:str>')<EOL><DEDENT>request = self._client.get(url, query_parameters)<EOL>response = self._client.send(<EOL>request, header_parameters, stream=False, **operation_config)<EOL>if response.status_code not in [<NUM_LIT:200>]:<EOL><INDENT>exp = CloudError(response)<EOL>exp.request_id = response.headers.get('<STR_LIT>')<EOL>raise exp<EOL><DEDENT>return response<EOL><DEDENT>deserialized = models.SearchServicePaged(internal_paging, self._deserialize.dependencies)<EOL>if raw:<EOL><INDENT>header_dict = {}<EOL>client_raw_response = models.SearchServicePaged(internal_paging, self._deserialize.dependencies, header_dict)<EOL>return client_raw_response<EOL><DEDENT>return deserialized<EOL>

Gets a list of all Search services in the given resource group.

        :param resource_group_name: The name of the resource group within the
         current subscription. You can obtain this value from the Azure
         Resource Manager API or the portal.
        :type resource_group_name: str
        :param search_management_request_options: Additional parameters for
         the operation
        :type search_management_request_options:
         ~azure.mgmt.search.models.SearchManagementRequestOptions
        :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: An iterator like instance of SearchService
        :rtype:
         ~azure.mgmt.search.models.SearchServicePaged[~azure.mgmt.search.models.SearchService]
        :raises: :class:`CloudError<msrestazure.azure_exceptions.CloudError>`


def check_name_availability(<EOL>self, name, search_management_request_options=None, custom_headers=None, raw=False, **operation_config):

client_request_id = None<EOL>if search_management_request_options is not None:<EOL><INDENT>client_request_id = search_management_request_options.client_request_id<EOL><DEDENT>check_name_availability_input = models.CheckNameAvailabilityInput(name=name)<EOL>url = self.check_name_availability.metadata['<STR_LIT:url>']<EOL>path_format_arguments = {<EOL>'<STR_LIT>': self._serialize.url("<STR_LIT>", self.config.subscription_id, '<STR_LIT:str>')<EOL>}<EOL>url = self._client.format_url(url, **path_format_arguments)<EOL>query_parameters = {}<EOL>query_parameters['<STR_LIT>'] = self._serialize.query("<STR_LIT>", self.api_version, '<STR_LIT:str>')<EOL>header_parameters = {}<EOL>header_parameters['<STR_LIT:Content-Type>'] = '<STR_LIT>'<EOL>if self.config.generate_client_request_id:<EOL><INDENT>header_parameters['<STR_LIT>'] = str(uuid.uuid1())<EOL><DEDENT>if custom_headers:<EOL><INDENT>header_parameters.update(custom_headers)<EOL><DEDENT>if self.config.accept_language is not None:<EOL><INDENT>header_parameters['<STR_LIT>'] = self._serialize.header("<STR_LIT>", self.config.accept_language, '<STR_LIT:str>')<EOL><DEDENT>if client_request_id is not None:<EOL><INDENT>header_parameters['<STR_LIT>'] = self._serialize.header("<STR_LIT>", client_request_id, '<STR_LIT:str>')<EOL><DEDENT>body_content = self._serialize.body(check_name_availability_input, '<STR_LIT>')<EOL>request = self._client.post(url, query_parameters)<EOL>response = self._client.send(<EOL>request, header_parameters, body_content, stream=False, **operation_config)<EOL>if response.status_code not in [<NUM_LIT:200>]:<EOL><INDENT>exp = CloudError(response)<EOL>exp.request_id = response.headers.get('<STR_LIT>')<EOL>raise exp<EOL><DEDENT>deserialized = None<EOL>if response.status_code == <NUM_LIT:200>:<EOL><INDENT>deserialized = self._deserialize('<STR_LIT>', response)<EOL><DEDENT>if raw:<EOL><INDENT>client_raw_response = ClientRawResponse(deserialized, response)<EOL>return client_raw_response<EOL><DEDENT>return deserialized<EOL>

Checks whether or not the given Search service name is available for
        use. Search service names must be globally unique since they are part
        of the service URI (https://<name>.search.windows.net).

        :param name: The Search service name to validate. Search service names
         must only contain lowercase letters, digits or dashes, cannot use dash
         as the first two or last one characters, cannot contain consecutive
         dashes, and must be between 2 and 60 characters in length.
        :type name: str
        :param search_management_request_options: Additional parameters for
         the operation
        :type search_management_request_options:
         ~azure.mgmt.search.models.SearchManagementRequestOptions
        :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: CheckNameAvailabilityOutput or ClientRawResponse if raw=true
        :rtype: ~azure.mgmt.search.models.CheckNameAvailabilityOutput or
         ~msrest.pipeline.ClientRawResponse
        :raises: :class:`CloudError<msrestazure.azure_exceptions.CloudError>`


client_request_id = None<EOL>if search_management_request_options is not None:<EOL><INDENT>client_request_id = search_management_request_options.client_request_id<EOL><DEDENT>url = self.get.metadata['<STR_LIT:url>']<EOL>path_format_arguments = {<EOL>'<STR_LIT>': self._serialize.url("<STR_LIT>", resource_group_name, '<STR_LIT:str>'),<EOL>'<STR_LIT>': self._serialize.url("<STR_LIT>", search_service_name, '<STR_LIT:str>'),<EOL>'<STR_LIT>': self._serialize.url("<STR_LIT>", self.config.subscription_id, '<STR_LIT:str>')<EOL>}<EOL>url = self._client.format_url(url, **path_format_arguments)<EOL>query_parameters = {}<EOL>query_parameters['<STR_LIT>'] = self._serialize.query("<STR_LIT>", self.api_version, '<STR_LIT:str>')<EOL>header_parameters = {}<EOL>header_parameters['<STR_LIT:Content-Type>'] = '<STR_LIT>'<EOL>if self.config.generate_client_request_id:<EOL><INDENT>header_parameters['<STR_LIT>'] = str(uuid.uuid1())<EOL><DEDENT>if custom_headers:<EOL><INDENT>header_parameters.update(custom_headers)<EOL><DEDENT>if self.config.accept_language is not None:<EOL><INDENT>header_parameters['<STR_LIT>'] = self._serialize.header("<STR_LIT>", self.config.accept_language, '<STR_LIT:str>')<EOL><DEDENT>if client_request_id is not None:<EOL><INDENT>header_parameters['<STR_LIT>'] = self._serialize.header("<STR_LIT>", client_request_id, '<STR_LIT:str>')<EOL><DEDENT>request = self._client.post(url, query_parameters)<EOL>response = self._client.send(request, header_parameters, stream=False, **operation_config)<EOL>if response.status_code not in [<NUM_LIT:200>]:<EOL><INDENT>exp = CloudError(response)<EOL>exp.request_id = response.headers.get('<STR_LIT>')<EOL>raise exp<EOL><DEDENT>deserialized = None<EOL>if response.status_code == <NUM_LIT:200>:<EOL><INDENT>deserialized = self._deserialize('<STR_LIT>', response)<EOL><DEDENT>if raw:<EOL><INDENT>client_raw_response = ClientRawResponse(deserialized, response)<EOL>return client_raw_response<EOL><DEDENT>return deserialized<EOL>

Gets the primary and secondary admin API keys for the specified Azure
        Search service.

        :param resource_group_name: The name of the resource group within the
         current subscription. You can obtain this value from the Azure
         Resource Manager API or the portal.
        :type resource_group_name: str
        :param search_service_name: The name of the Azure Search service
         associated with the specified resource group.
        :type search_service_name: str
        :param search_management_request_options: Additional parameters for
         the operation
        :type search_management_request_options:
         ~azure.mgmt.search.models.SearchManagementRequestOptions
        :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: AdminKeyResult or ClientRawResponse if raw=true
        :rtype: ~azure.mgmt.search.models.AdminKeyResult or
         ~msrest.pipeline.ClientRawResponse
        :raises: :class:`CloudError<msrestazure.azure_exceptions.CloudError>`


def regenerate(<EOL>self, resource_group_name, search_service_name, key_kind, search_management_request_options=None, custom_headers=None, raw=False, **operation_config):

client_request_id = None<EOL>if search_management_request_options is not None:<EOL><INDENT>client_request_id = search_management_request_options.client_request_id<EOL><DEDENT>url = self.regenerate.metadata['<STR_LIT:url>']<EOL>path_format_arguments = {<EOL>'<STR_LIT>': self._serialize.url("<STR_LIT>", resource_group_name, '<STR_LIT:str>'),<EOL>'<STR_LIT>': self._serialize.url("<STR_LIT>", search_service_name, '<STR_LIT:str>'),<EOL>'<STR_LIT>': self._serialize.url("<STR_LIT>", key_kind, '<STR_LIT>'),<EOL>'<STR_LIT>': self._serialize.url("<STR_LIT>", self.config.subscription_id, '<STR_LIT:str>')<EOL>}<EOL>url = self._client.format_url(url, **path_format_arguments)<EOL>query_parameters = {}<EOL>query_parameters['<STR_LIT>'] = self._serialize.query("<STR_LIT>", self.api_version, '<STR_LIT:str>')<EOL>header_parameters = {}<EOL>header_parameters['<STR_LIT:Content-Type>'] = '<STR_LIT>'<EOL>if self.config.generate_client_request_id:<EOL><INDENT>header_parameters['<STR_LIT>'] = str(uuid.uuid1())<EOL><DEDENT>if custom_headers:<EOL><INDENT>header_parameters.update(custom_headers)<EOL><DEDENT>if self.config.accept_language is not None:<EOL><INDENT>header_parameters['<STR_LIT>'] = self._serialize.header("<STR_LIT>", self.config.accept_language, '<STR_LIT:str>')<EOL><DEDENT>if client_request_id is not None:<EOL><INDENT>header_parameters['<STR_LIT>'] = self._serialize.header("<STR_LIT>", client_request_id, '<STR_LIT:str>')<EOL><DEDENT>request = self._client.post(url, query_parameters)<EOL>response = self._client.send(request, header_parameters, stream=False, **operation_config)<EOL>if response.status_code not in [<NUM_LIT:200>]:<EOL><INDENT>exp = CloudError(response)<EOL>exp.request_id = response.headers.get('<STR_LIT>')<EOL>raise exp<EOL><DEDENT>deserialized = None<EOL>if response.status_code == <NUM_LIT:200>:<EOL><INDENT>deserialized = self._deserialize('<STR_LIT>', response)<EOL><DEDENT>if raw:<EOL><INDENT>client_raw_response = ClientRawResponse(deserialized, response)<EOL>return client_raw_response<EOL><DEDENT>return deserialized<EOL>

Regenerates either the primary or secondary admin API key. You can only
        regenerate one key at a time.

        :param resource_group_name: The name of the resource group within the
         current subscription. You can obtain this value from the Azure
         Resource Manager API or the portal.
        :type resource_group_name: str
        :param search_service_name: The name of the Azure Search service
         associated with the specified resource group.
        :type search_service_name: str
        :param key_kind: Specifies which key to regenerate. Valid values
         include 'primary' and 'secondary'. Possible values include: 'primary',
         'secondary'
        :type key_kind: str or ~azure.mgmt.search.models.AdminKeyKind
        :param search_management_request_options: Additional parameters for
         the operation
        :type search_management_request_options:
         ~azure.mgmt.search.models.SearchManagementRequestOptions
        :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: AdminKeyResult or ClientRawResponse if raw=true
        :rtype: ~azure.mgmt.search.models.AdminKeyResult or
         ~msrest.pipeline.ClientRawResponse
        :raises: :class:`CloudError<msrestazure.azure_exceptions.CloudError>`


def create(<EOL>self, resource_group_name, search_service_name, name, search_management_request_options=None, custom_headers=None, raw=False, **operation_config):

client_request_id = None<EOL>if search_management_request_options is not None:<EOL><INDENT>client_request_id = search_management_request_options.client_request_id<EOL><DEDENT>url = self.create.metadata['<STR_LIT:url>']<EOL>path_format_arguments = {<EOL>'<STR_LIT>': self._serialize.url("<STR_LIT>", resource_group_name, '<STR_LIT:str>'),<EOL>'<STR_LIT>': self._serialize.url("<STR_LIT>", search_service_name, '<STR_LIT:str>'),<EOL>'<STR_LIT:name>': self._serialize.url("<STR_LIT:name>", name, '<STR_LIT:str>'),<EOL>'<STR_LIT>': self._serialize.url("<STR_LIT>", self.config.subscription_id, '<STR_LIT:str>')<EOL>}<EOL>url = self._client.format_url(url, **path_format_arguments)<EOL>query_parameters = {}<EOL>query_parameters['<STR_LIT>'] = self._serialize.query("<STR_LIT>", self.api_version, '<STR_LIT:str>')<EOL>header_parameters = {}<EOL>header_parameters['<STR_LIT:Content-Type>'] = '<STR_LIT>'<EOL>if self.config.generate_client_request_id:<EOL><INDENT>header_parameters['<STR_LIT>'] = str(uuid.uuid1())<EOL><DEDENT>if custom_headers:<EOL><INDENT>header_parameters.update(custom_headers)<EOL><DEDENT>if self.config.accept_language is not None:<EOL><INDENT>header_parameters['<STR_LIT>'] = self._serialize.header("<STR_LIT>", self.config.accept_language, '<STR_LIT:str>')<EOL><DEDENT>if client_request_id is not None:<EOL><INDENT>header_parameters['<STR_LIT>'] = self._serialize.header("<STR_LIT>", client_request_id, '<STR_LIT:str>')<EOL><DEDENT>request = self._client.post(url, query_parameters)<EOL>response = self._client.send(request, header_parameters, stream=False, **operation_config)<EOL>if response.status_code not in [<NUM_LIT:200>]:<EOL><INDENT>exp = CloudError(response)<EOL>exp.request_id = response.headers.get('<STR_LIT>')<EOL>raise exp<EOL><DEDENT>deserialized = None<EOL>if response.status_code == <NUM_LIT:200>:<EOL><INDENT>deserialized = self._deserialize('<STR_LIT>', response)<EOL><DEDENT>if raw:<EOL><INDENT>client_raw_response = ClientRawResponse(deserialized, response)<EOL>return client_raw_response<EOL><DEDENT>return deserialized<EOL>

Generates a new query key for the specified Search service. You can
        create up to 50 query keys per service.

        :param resource_group_name: The name of the resource group within the
         current subscription. You can obtain this value from the Azure
         Resource Manager API or the portal.
        :type resource_group_name: str
        :param search_service_name: The name of the Azure Search service
         associated with the specified resource group.
        :type search_service_name: str
        :param name: The name of the new query API key.
        :type name: str
        :param search_management_request_options: Additional parameters for
         the operation
        :type search_management_request_options:
         ~azure.mgmt.search.models.SearchManagementRequestOptions
        :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: QueryKey or ClientRawResponse if raw=true
        :rtype: ~azure.mgmt.search.models.QueryKey or
         ~msrest.pipeline.ClientRawResponse
        :raises: :class:`CloudError<msrestazure.azure_exceptions.CloudError>`


def list_by_search_service(<EOL>self, resource_group_name, search_service_name, search_management_request_options=None, custom_headers=None, raw=False, **operation_config):

client_request_id = None<EOL>if search_management_request_options is not None:<EOL><INDENT>client_request_id = search_management_request_options.client_request_id<EOL><DEDENT>def internal_paging(next_link=None, raw=False):<EOL><INDENT>if not next_link:<EOL><INDENT>url = self.list_by_search_service.metadata['<STR_LIT:url>']<EOL>path_format_arguments = {<EOL>'<STR_LIT>': self._serialize.url("<STR_LIT>", resource_group_name, '<STR_LIT:str>'),<EOL>'<STR_LIT>': self._serialize.url("<STR_LIT>", search_service_name, '<STR_LIT:str>'),<EOL>'<STR_LIT>': self._serialize.url("<STR_LIT>", self.config.subscription_id, '<STR_LIT:str>')<EOL>}<EOL>url = self._client.format_url(url, **path_format_arguments)<EOL>query_parameters = {}<EOL>query_parameters['<STR_LIT>'] = self._serialize.query("<STR_LIT>", self.api_version, '<STR_LIT:str>')<EOL><DEDENT>else:<EOL><INDENT>url = next_link<EOL>query_parameters = {}<EOL><DEDENT>header_parameters = {}<EOL>header_parameters['<STR_LIT:Content-Type>'] = '<STR_LIT>'<EOL>if self.config.generate_client_request_id:<EOL><INDENT>header_parameters['<STR_LIT>'] = str(uuid.uuid1())<EOL><DEDENT>if custom_headers:<EOL><INDENT>header_parameters.update(custom_headers)<EOL><DEDENT>if self.config.accept_language is not None:<EOL><INDENT>header_parameters['<STR_LIT>'] = self._serialize.header("<STR_LIT>", self.config.accept_language, '<STR_LIT:str>')<EOL><DEDENT>if client_request_id is not None:<EOL><INDENT>header_parameters['<STR_LIT>'] = self._serialize.header("<STR_LIT>", client_request_id, '<STR_LIT:str>')<EOL><DEDENT>request = self._client.get(url, query_parameters)<EOL>response = self._client.send(<EOL>request, header_parameters, stream=False, **operation_config)<EOL>if response.status_code not in [<NUM_LIT:200>]:<EOL><INDENT>exp = CloudError(response)<EOL>exp.request_id = response.headers.get('<STR_LIT>')<EOL>raise exp<EOL><DEDENT>return response<EOL><DEDENT>deserialized = models.QueryKeyPaged(internal_paging, self._deserialize.dependencies)<EOL>if raw:<EOL><INDENT>header_dict = {}<EOL>client_raw_response = models.QueryKeyPaged(internal_paging, self._deserialize.dependencies, header_dict)<EOL>return client_raw_response<EOL><DEDENT>return deserialized<EOL>

Returns the list of query API keys for the given Azure Search service.

        :param resource_group_name: The name of the resource group within the
         current subscription. You can obtain this value from the Azure
         Resource Manager API or the portal.
        :type resource_group_name: str
        :param search_service_name: The name of the Azure Search service
         associated with the specified resource group.
        :type search_service_name: str
        :param search_management_request_options: Additional parameters for
         the operation
        :type search_management_request_options:
         ~azure.mgmt.search.models.SearchManagementRequestOptions
        :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: An iterator like instance of QueryKey
        :rtype:
         ~azure.mgmt.search.models.QueryKeyPaged[~azure.mgmt.search.models.QueryKey]
        :raises: :class:`CloudError<msrestazure.azure_exceptions.CloudError>`


def delete(<EOL>self, resource_group_name, search_service_name, key, search_management_request_options=None, custom_headers=None, raw=False, **operation_config):

client_request_id = None<EOL>if search_management_request_options is not None:<EOL><INDENT>client_request_id = search_management_request_options.client_request_id<EOL><DEDENT>url = self.delete.metadata['<STR_LIT:url>']<EOL>path_format_arguments = {<EOL>'<STR_LIT>': self._serialize.url("<STR_LIT>", resource_group_name, '<STR_LIT:str>'),<EOL>'<STR_LIT>': self._serialize.url("<STR_LIT>", search_service_name, '<STR_LIT:str>'),<EOL>'<STR_LIT:key>': self._serialize.url("<STR_LIT:key>", key, '<STR_LIT:str>'),<EOL>'<STR_LIT>': self._serialize.url("<STR_LIT>", self.config.subscription_id, '<STR_LIT:str>')<EOL>}<EOL>url = self._client.format_url(url, **path_format_arguments)<EOL>query_parameters = {}<EOL>query_parameters['<STR_LIT>'] = self._serialize.query("<STR_LIT>", self.api_version, '<STR_LIT:str>')<EOL>header_parameters = {}<EOL>header_parameters['<STR_LIT:Content-Type>'] = '<STR_LIT>'<EOL>if self.config.generate_client_request_id:<EOL><INDENT>header_parameters['<STR_LIT>'] = str(uuid.uuid1())<EOL><DEDENT>if custom_headers:<EOL><INDENT>header_parameters.update(custom_headers)<EOL><DEDENT>if self.config.accept_language is not None:<EOL><INDENT>header_parameters['<STR_LIT>'] = self._serialize.header("<STR_LIT>", self.config.accept_language, '<STR_LIT:str>')<EOL><DEDENT>if client_request_id is not None:<EOL><INDENT>header_parameters['<STR_LIT>'] = self._serialize.header("<STR_LIT>", client_request_id, '<STR_LIT:str>')<EOL><DEDENT>request = self._client.delete(url, query_parameters)<EOL>response = self._client.send(request, header_parameters, stream=False, **operation_config)<EOL>if response.status_code not in [<NUM_LIT:200>, <NUM_LIT>, <NUM_LIT>]:<EOL><INDENT>exp = CloudError(response)<EOL>exp.request_id = response.headers.get('<STR_LIT>')<EOL>raise exp<EOL><DEDENT>if raw:<EOL><INDENT>client_raw_response = ClientRawResponse(None, response)<EOL>return client_raw_response<EOL><DEDENT>

Deletes the specified query key. Unlike admin keys, query keys are not
        regenerated. The process for regenerating a query key is to delete and
        then recreate it.

        :param resource_group_name: The name of the resource group within the
         current subscription. You can obtain this value from the Azure
         Resource Manager API or the portal.
        :type resource_group_name: str
        :param search_service_name: The name of the Azure Search service
         associated with the specified resource group.
        :type search_service_name: str
        :param key: The query key to be deleted. Query keys are identified by
         value, not by name.
        :type key: str
        :param search_management_request_options: Additional parameters for
         the operation
        :type search_management_request_options:
         ~azure.mgmt.search.models.SearchManagementRequestOptions
        :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: None or ClientRawResponse if raw=true
        :rtype: None or ~msrest.pipeline.ClientRawResponse
        :raises: :class:`CloudError<msrestazure.azure_exceptions.CloudError>`


return self.create_random_name(name)<EOL>

Alias to create_random_name for back compatibility.


return self.get_resource_name(prefix or self.qualified_test_name.replace('<STR_LIT:.>', '<STR_LIT:_>'))<EOL>

Random name generation for use by preparers.

        If prefix is a blank string, use the fully qualified test name instead.
        This is what legacy tests do for resource groups.


if not self.resource_moniker:<EOL><INDENT>self.resource_moniker = self.random_name<EOL><DEDENT>return self.resource_moniker<EOL>

Override moniker generation for backwards compatibility.

        azure-devtools preparers, by default, generate "monikers" which replace
        resource names in request URIs by tacking on a resource count to
        name_prefix. By contrast, SDK tests used the fully qualified (module + method)
        test name and the hashing process in get_resource_name.

        This property override implements the SDK test name generation so that
        the URIs don't change and tests don't need to be re-recorded.


split_package_name = input_parameter.split('<STR_LIT:#>')<EOL>package_name = split_package_name[<NUM_LIT:0>]<EOL>module_name = package_name.replace("<STR_LIT:->", "<STR_LIT:.>")<EOL>if len(split_package_name) >= <NUM_LIT:2>:<EOL><INDENT>module_name = "<STR_LIT:.>".join([module_name, split_package_name[<NUM_LIT:1>]])<EOL><DEDENT>return package_name, module_name<EOL>

From a syntax like package_name#submodule, build a package name
    and complete module name.


_LOGGER.info(f"<STR_LIT>")<EOL>if module_prefix in ["<STR_LIT>", "<STR_LIT>", "<STR_LIT>", "<STR_LIT>"]:<EOL><INDENT>_LOGGER.info(f"<STR_LIT>")<EOL>return []<EOL><DEDENT>result = []<EOL>try:<EOL><INDENT>_LOGGER.debug(f"<STR_LIT>")<EOL>model_module = importlib.import_module("<STR_LIT>", module_prefix)<EOL>model_module.__path__<EOL>_LOGGER.info(f"<STR_LIT>")<EOL>result.append(module_prefix)<EOL><DEDENT>except (ModuleNotFoundError, AttributeError):<EOL><INDENT>prefix_module = importlib.import_module(module_prefix)<EOL>for _, sub_package, ispkg in pkgutil.iter_modules(prefix_module.__path__, module_prefix+"<STR_LIT:.>"):<EOL><INDENT>if ispkg:<EOL><INDENT>result += find_autorest_generated_folder(sub_package)<EOL><DEDENT><DEDENT><DEDENT>return result<EOL>

Find all Autorest generated code in that module prefix.
    This actually looks for a "models" package only (not file). We could be smarter if necessary.


sub_module_from_package = package_name.replace("<STR_LIT:->", "<STR_LIT:.>")<EOL>if not module_name.startswith(sub_module_from_package):<EOL><INDENT>_LOGGER.warning(f"<STR_LIT>")<EOL>return<EOL><DEDENT>return module_name[len(sub_module_from_package)+<NUM_LIT:1>:]<EOL>

Assuming package is azure-mgmt-compute and module name is azure.mgmt.compute.v2018-08-01
    will return v2018-08-01


def create(env_dir, system_site_packages=False, clear=False,<EOL>symlinks=False, with_pip=False, prompt=None):

builder = ExtendedEnvBuilder(system_site_packages=system_site_packages,<EOL>clear=clear, symlinks=symlinks, with_pip=with_pip,<EOL>prompt=prompt)<EOL>builder.create(env_dir)<EOL>return builder.context<EOL>

Create a virtual environment in a directory.


with tempfile.TemporaryDirectory() as tempdir:<EOL><INDENT>myenv = create(tempdir, with_pip=True)<EOL>pip_call = [<EOL>myenv.env_exe,<EOL>"<STR_LIT>",<EOL>"<STR_LIT>",<EOL>"<STR_LIT>",<EOL>]<EOL>subprocess.check_call(pip_call + ['<STR_LIT>', '<STR_LIT>'])<EOL>if packages:<EOL><INDENT>subprocess.check_call(pip_call + packages)<EOL><DEDENT>yield myenv<EOL><DEDENT>

Create a venv with these packages in a temp dir and yielf the env.

    packages should be an iterable of pip version instructio (e.g. package~=1.2.3)


def build_package_from_pr_number(gh_token, sdk_id, pr_number, output_folder, *, with_comment=False):

con = Github(gh_token)<EOL>repo = con.get_repo(sdk_id)<EOL>sdk_pr = repo.get_pull(pr_number)<EOL>package_names = {f.filename.split('<STR_LIT:/>')[<NUM_LIT:0>] for f in sdk_pr.get_files() if f.filename.startswith("<STR_LIT>")}<EOL>absolute_output_folder = Path(output_folder).resolve()<EOL>with tempfile.TemporaryDirectory() as temp_dir,manage_git_folder(gh_token, Path(temp_dir) / Path("<STR_LIT>"), sdk_id, pr_number=pr_number) as sdk_folder:<EOL><INDENT>for package_name in package_names:<EOL><INDENT>_LOGGER.debug("<STR_LIT>".format(package_name))<EOL>execute_simple_command(<EOL>["<STR_LIT>", "<STR_LIT>", "<STR_LIT>", str(absolute_output_folder), package_name],<EOL>cwd=sdk_folder<EOL>)<EOL>_LOGGER.debug("<STR_LIT>".format(package_name))<EOL><DEDENT><DEDENT>if with_comment:<EOL><INDENT>files = [f.name for f in absolute_output_folder.iterdir()]<EOL>comment_message = None<EOL>dashboard = DashboardCommentableObject(sdk_pr, "<STR_LIT>")<EOL>try:<EOL><INDENT>installation_message = build_installation_message(sdk_pr)<EOL>download_message = build_download_message(sdk_pr, files)<EOL>comment_message = installation_message + "<STR_LIT>" + download_message<EOL>dashboard.create_comment(comment_message)<EOL><DEDENT>except Exception:<EOL><INDENT>_LOGGER.critical("<STR_LIT>", comment_message)<EOL><DEDENT><DEDENT>

Will clone the given PR branch and vuild the package with the given name.


parser = argparse.ArgumentParser(<EOL>description='<STR_LIT>',<EOL>formatter_class=argparse.RawTextHelpFormatter)<EOL>parser.add_argument('<STR_LIT>', '<STR_LIT>',<EOL>dest='<STR_LIT>', type=int, required=True,<EOL>help='<STR_LIT>')<EOL>parser.add_argument('<STR_LIT>', '<STR_LIT>',<EOL>dest='<STR_LIT>', default="<STR_LIT>",<EOL>help='<STR_LIT>')<EOL>parser.add_argument("<STR_LIT>",<EOL>dest="<STR_LIT>", action="<STR_LIT:store_true>",<EOL>help="<STR_LIT>")<EOL>parser.add_argument("<STR_LIT>", "<STR_LIT>",<EOL>dest="<STR_LIT>", action="<STR_LIT:store_true>",<EOL>help="<STR_LIT>")<EOL>parser.add_argument("<STR_LIT>",<EOL>dest="<STR_LIT>", action="<STR_LIT:store_true>",<EOL>help="<STR_LIT>")<EOL>parser.add_argument('<STR_LIT>', '<STR_LIT>',<EOL>dest='<STR_LIT>', default='<STR_LIT:.>',<EOL>help='<STR_LIT>')<EOL>args = parser.parse_args()<EOL>main_logger = logging.getLogger()<EOL>if args.verbose or args.debug:<EOL><INDENT>logging.basicConfig()<EOL>main_logger.setLevel(logging.DEBUG if args.debug else logging.INFO)<EOL><DEDENT>build_package_from_pr_number(<EOL>os.environ.get("<STR_LIT>", None),<EOL>args.repo_id,<EOL>args.pr_number,<EOL>args.output_folder,<EOL>with_comment=args.with_comment<EOL>)<EOL>


def build_config(config : Dict[str, Any]) -> Dict[str, str]:

result = config.copy()<EOL>is_stable = result.pop("<STR_LIT>", False)<EOL>if is_stable:<EOL><INDENT>result["<STR_LIT>"] = "<STR_LIT>"<EOL><DEDENT>else:<EOL><INDENT>result["<STR_LIT>"] = "<STR_LIT>"<EOL><DEDENT>package_name = result["<STR_LIT>"]<EOL>result["<STR_LIT>"] = result.pop(<EOL>"<STR_LIT>",<EOL>package_name[:package_name.rindex('<STR_LIT:->')]+"<STR_LIT>"<EOL>)<EOL>result['<STR_LIT>'] = result.pop("<STR_LIT>", True)<EOL>result['<STR_LIT>'] = result.pop("<STR_LIT>", True)<EOL>package_parts = result["<STR_LIT>"][:-len('<STR_LIT>')].split('<STR_LIT:->')<EOL>result['<STR_LIT>'] = [<EOL>"<STR_LIT:.>".join(package_parts[:i+<NUM_LIT:1>])<EOL>for i in range(len(package_parts))<EOL>]<EOL>result['<STR_LIT>'] = [<EOL>"<STR_LIT:/>".join(package_parts[:i+<NUM_LIT:1>])+"<STR_LIT>"<EOL>for i in range(len(package_parts))<EOL>]<EOL>return result<EOL>

Will build the actual config for Jinja2, based on SDK config.


parser = argparse.ArgumentParser(<EOL>description='<STR_LIT>',<EOL>formatter_class=argparse.RawTextHelpFormatter)<EOL>parser.add_argument('<STR_LIT>', '<STR_LIT>',<EOL>dest='<STR_LIT>', type=int, required=True,<EOL>help='<STR_LIT>')<EOL>parser.add_argument('<STR_LIT>', '<STR_LIT>',<EOL>dest='<STR_LIT>', default="<STR_LIT>",<EOL>help='<STR_LIT>')<EOL>parser.add_argument("<STR_LIT>", "<STR_LIT>",<EOL>dest="<STR_LIT>", action="<STR_LIT:store_true>",<EOL>help="<STR_LIT>")<EOL>parser.add_argument("<STR_LIT>",<EOL>dest="<STR_LIT>", action="<STR_LIT:store_true>",<EOL>help="<STR_LIT>")<EOL>args = parser.parse_args()<EOL>main_logger = logging.getLogger()<EOL>if args.verbose or args.debug:<EOL><INDENT>logging.basicConfig()<EOL>main_logger.setLevel(logging.DEBUG if args.debug else logging.INFO)<EOL><DEDENT>update_pr(<EOL>os.environ.get("<STR_LIT>", None),<EOL>args.repo_id,<EOL>int(args.pr_number),<EOL>)<EOL>


import xmlrpc.client<EOL>return xmlrpc.client.ServerProxy("<STR_LIT>", use_datetime=True)<EOL>


def get_relevant_versions(self, package_name: str):

versions = self.get_ordered_versions(package_name)<EOL>pre_releases = [version for version in versions if not version.is_prerelease]<EOL>return (<EOL>versions[-<NUM_LIT:1>],<EOL>pre_releases[-<NUM_LIT:1>]<EOL>)<EOL>

Return a tuple: (latest release, latest stable)
        If there are different, it means the latest is not a stable


results = []<EOL>while results_queue:<EOL><INDENT>queue_item = results_queue.pop()<EOL>results.append(queue_item)<EOL><DEDENT>return results<EOL>

Scan output for exceptions

    If there is an output from an add task collection call add it to the results.

    :param results_queue: Queue containing results of attempted add_collection's
    :type results_queue: collections.deque
    :return: list of TaskAddResults
    :rtype: list[~TaskAddResult]