def update(<EOL>self, job_id, job_update_parameter, job_update_options=None, custom_headers=None, raw=False, **operation_config):

timeout = None<EOL>if job_update_options is not None:<EOL><INDENT>timeout = job_update_options.timeout<EOL><DEDENT>client_request_id = None<EOL>if job_update_options is not None:<EOL><INDENT>client_request_id = job_update_options.client_request_id<EOL><DEDENT>return_client_request_id = None<EOL>if job_update_options is not None:<EOL><INDENT>return_client_request_id = job_update_options.return_client_request_id<EOL><DEDENT>ocp_date = None<EOL>if job_update_options is not None:<EOL><INDENT>ocp_date = job_update_options.ocp_date<EOL><DEDENT>if_match = None<EOL>if job_update_options is not None:<EOL><INDENT>if_match = job_update_options.if_match<EOL><DEDENT>if_none_match = None<EOL>if job_update_options is not None:<EOL><INDENT>if_none_match = job_update_options.if_none_match<EOL><DEDENT>if_modified_since = None<EOL>if job_update_options is not None:<EOL><INDENT>if_modified_since = job_update_options.if_modified_since<EOL><DEDENT>if_unmodified_since = None<EOL>if job_update_options is not None:<EOL><INDENT>if_unmodified_since = job_update_options.if_unmodified_since<EOL><DEDENT>url = self.update.metadata['<STR_LIT:url>']<EOL>path_format_arguments = {<EOL>'<STR_LIT>': self._serialize.url("<STR_LIT>", self.config.batch_url, '<STR_LIT:str>', skip_quote=True),<EOL>'<STR_LIT>': self._serialize.url("<STR_LIT>", job_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>if timeout is not None:<EOL><INDENT>query_parameters['<STR_LIT>'] = self._serialize.query("<STR_LIT>", timeout, '<STR_LIT:int>')<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>if return_client_request_id is not None:<EOL><INDENT>header_parameters['<STR_LIT>'] = self._serialize.header("<STR_LIT>", return_client_request_id, '<STR_LIT:bool>')<EOL><DEDENT>if ocp_date is not None:<EOL><INDENT>header_parameters['<STR_LIT>'] = self._serialize.header("<STR_LIT>", ocp_date, '<STR_LIT>')<EOL><DEDENT>if if_match is not None:<EOL><INDENT>header_parameters['<STR_LIT>'] = self._serialize.header("<STR_LIT>", if_match, '<STR_LIT:str>')<EOL><DEDENT>if if_none_match is not None:<EOL><INDENT>header_parameters['<STR_LIT>'] = self._serialize.header("<STR_LIT>", if_none_match, '<STR_LIT:str>')<EOL><DEDENT>if if_modified_since is not None:<EOL><INDENT>header_parameters['<STR_LIT>'] = self._serialize.header("<STR_LIT>", if_modified_since, '<STR_LIT>')<EOL><DEDENT>if if_unmodified_since is not None:<EOL><INDENT>header_parameters['<STR_LIT>'] = self._serialize.header("<STR_LIT>", if_unmodified_since, '<STR_LIT>')<EOL><DEDENT>body_content = self._serialize.body(job_update_parameter, '<STR_LIT>')<EOL>request = self._client.put(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.BatchErrorException(self._deserialize, response)<EOL><DEDENT>if raw:<EOL><INDENT>client_raw_response = ClientRawResponse(None, response)<EOL>client_raw_response.add_headers({<EOL>'<STR_LIT>': '<STR_LIT:str>',<EOL>'<STR_LIT>': '<STR_LIT:str>',<EOL>'<STR_LIT>': '<STR_LIT:str>',<EOL>'<STR_LIT>': '<STR_LIT>',<EOL>'<STR_LIT>': '<STR_LIT:str>',<EOL>})<EOL>return client_raw_response<EOL><DEDENT>

Updates the properties of the specified job.

        This fully replaces all the updateable properties of the job. For
        example, if the job has constraints associated with it and if
        constraints is not specified with this request, then the Batch service
        will remove the existing constraints.

        :param job_id: The ID of the job whose properties you want to update.
        :type job_id: str
        :param job_update_parameter: The parameters for the request.
        :type job_update_parameter: ~azure.batch.models.JobUpdateParameter
        :param job_update_options: Additional parameters for the operation
        :type job_update_options: ~azure.batch.models.JobUpdateOptions
        :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:`BatchErrorException<azure.batch.models.BatchErrorException>`


def disable(<EOL>self, job_id, disable_tasks, job_disable_options=None, custom_headers=None, raw=False, **operation_config):

timeout = None<EOL>if job_disable_options is not None:<EOL><INDENT>timeout = job_disable_options.timeout<EOL><DEDENT>client_request_id = None<EOL>if job_disable_options is not None:<EOL><INDENT>client_request_id = job_disable_options.client_request_id<EOL><DEDENT>return_client_request_id = None<EOL>if job_disable_options is not None:<EOL><INDENT>return_client_request_id = job_disable_options.return_client_request_id<EOL><DEDENT>ocp_date = None<EOL>if job_disable_options is not None:<EOL><INDENT>ocp_date = job_disable_options.ocp_date<EOL><DEDENT>if_match = None<EOL>if job_disable_options is not None:<EOL><INDENT>if_match = job_disable_options.if_match<EOL><DEDENT>if_none_match = None<EOL>if job_disable_options is not None:<EOL><INDENT>if_none_match = job_disable_options.if_none_match<EOL><DEDENT>if_modified_since = None<EOL>if job_disable_options is not None:<EOL><INDENT>if_modified_since = job_disable_options.if_modified_since<EOL><DEDENT>if_unmodified_since = None<EOL>if job_disable_options is not None:<EOL><INDENT>if_unmodified_since = job_disable_options.if_unmodified_since<EOL><DEDENT>job_disable_parameter = models.JobDisableParameter(disable_tasks=disable_tasks)<EOL>url = self.disable.metadata['<STR_LIT:url>']<EOL>path_format_arguments = {<EOL>'<STR_LIT>': self._serialize.url("<STR_LIT>", self.config.batch_url, '<STR_LIT:str>', skip_quote=True),<EOL>'<STR_LIT>': self._serialize.url("<STR_LIT>", job_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>if timeout is not None:<EOL><INDENT>query_parameters['<STR_LIT>'] = self._serialize.query("<STR_LIT>", timeout, '<STR_LIT:int>')<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>if return_client_request_id is not None:<EOL><INDENT>header_parameters['<STR_LIT>'] = self._serialize.header("<STR_LIT>", return_client_request_id, '<STR_LIT:bool>')<EOL><DEDENT>if ocp_date is not None:<EOL><INDENT>header_parameters['<STR_LIT>'] = self._serialize.header("<STR_LIT>", ocp_date, '<STR_LIT>')<EOL><DEDENT>if if_match is not None:<EOL><INDENT>header_parameters['<STR_LIT>'] = self._serialize.header("<STR_LIT>", if_match, '<STR_LIT:str>')<EOL><DEDENT>if if_none_match is not None:<EOL><INDENT>header_parameters['<STR_LIT>'] = self._serialize.header("<STR_LIT>", if_none_match, '<STR_LIT:str>')<EOL><DEDENT>if if_modified_since is not None:<EOL><INDENT>header_parameters['<STR_LIT>'] = self._serialize.header("<STR_LIT>", if_modified_since, '<STR_LIT>')<EOL><DEDENT>if if_unmodified_since is not None:<EOL><INDENT>header_parameters['<STR_LIT>'] = self._serialize.header("<STR_LIT>", if_unmodified_since, '<STR_LIT>')<EOL><DEDENT>body_content = self._serialize.body(job_disable_parameter, '<STR_LIT>')<EOL>request = self._client.post(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>]:<EOL><INDENT>raise models.BatchErrorException(self._deserialize, response)<EOL><DEDENT>if raw:<EOL><INDENT>client_raw_response = ClientRawResponse(None, response)<EOL>client_raw_response.add_headers({<EOL>'<STR_LIT>': '<STR_LIT:str>',<EOL>'<STR_LIT>': '<STR_LIT:str>',<EOL>'<STR_LIT>': '<STR_LIT:str>',<EOL>'<STR_LIT>': '<STR_LIT>',<EOL>'<STR_LIT>': '<STR_LIT:str>',<EOL>})<EOL>return client_raw_response<EOL><DEDENT>

Disables the specified job, preventing new tasks from running.

        The Batch Service immediately moves the job to the disabling state.
        Batch then uses the disableTasks parameter to determine what to do with
        the currently running tasks of the job. The job remains in the
        disabling state until the disable operation is completed and all tasks
        have been dealt with according to the disableTasks option; the job then
        moves to the disabled state. No new tasks are started under the job
        until it moves back to active state. If you try to disable a job that
        is in any state other than active, disabling, or disabled, the request
        fails with status code 409.

        :param job_id: The ID of the job to disable.
        :type job_id: str
        :param disable_tasks: What to do with active tasks associated with the
         job. Possible values include: 'requeue', 'terminate', 'wait'
        :type disable_tasks: str or ~azure.batch.models.DisableJobOption
        :param job_disable_options: Additional parameters for the operation
        :type job_disable_options: ~azure.batch.models.JobDisableOptions
        :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:`BatchErrorException<azure.batch.models.BatchErrorException>`


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

timeout = None<EOL>if job_enable_options is not None:<EOL><INDENT>timeout = job_enable_options.timeout<EOL><DEDENT>client_request_id = None<EOL>if job_enable_options is not None:<EOL><INDENT>client_request_id = job_enable_options.client_request_id<EOL><DEDENT>return_client_request_id = None<EOL>if job_enable_options is not None:<EOL><INDENT>return_client_request_id = job_enable_options.return_client_request_id<EOL><DEDENT>ocp_date = None<EOL>if job_enable_options is not None:<EOL><INDENT>ocp_date = job_enable_options.ocp_date<EOL><DEDENT>if_match = None<EOL>if job_enable_options is not None:<EOL><INDENT>if_match = job_enable_options.if_match<EOL><DEDENT>if_none_match = None<EOL>if job_enable_options is not None:<EOL><INDENT>if_none_match = job_enable_options.if_none_match<EOL><DEDENT>if_modified_since = None<EOL>if job_enable_options is not None:<EOL><INDENT>if_modified_since = job_enable_options.if_modified_since<EOL><DEDENT>if_unmodified_since = None<EOL>if job_enable_options is not None:<EOL><INDENT>if_unmodified_since = job_enable_options.if_unmodified_since<EOL><DEDENT>url = self.enable.metadata['<STR_LIT:url>']<EOL>path_format_arguments = {<EOL>'<STR_LIT>': self._serialize.url("<STR_LIT>", self.config.batch_url, '<STR_LIT:str>', skip_quote=True),<EOL>'<STR_LIT>': self._serialize.url("<STR_LIT>", job_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>if timeout is not None:<EOL><INDENT>query_parameters['<STR_LIT>'] = self._serialize.query("<STR_LIT>", timeout, '<STR_LIT:int>')<EOL><DEDENT>header_parameters = {}<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>if return_client_request_id is not None:<EOL><INDENT>header_parameters['<STR_LIT>'] = self._serialize.header("<STR_LIT>", return_client_request_id, '<STR_LIT:bool>')<EOL><DEDENT>if ocp_date is not None:<EOL><INDENT>header_parameters['<STR_LIT>'] = self._serialize.header("<STR_LIT>", ocp_date, '<STR_LIT>')<EOL><DEDENT>if if_match is not None:<EOL><INDENT>header_parameters['<STR_LIT>'] = self._serialize.header("<STR_LIT>", if_match, '<STR_LIT:str>')<EOL><DEDENT>if if_none_match is not None:<EOL><INDENT>header_parameters['<STR_LIT>'] = self._serialize.header("<STR_LIT>", if_none_match, '<STR_LIT:str>')<EOL><DEDENT>if if_modified_since is not None:<EOL><INDENT>header_parameters['<STR_LIT>'] = self._serialize.header("<STR_LIT>", if_modified_since, '<STR_LIT>')<EOL><DEDENT>if if_unmodified_since is not None:<EOL><INDENT>header_parameters['<STR_LIT>'] = self._serialize.header("<STR_LIT>", if_unmodified_since, '<STR_LIT>')<EOL><DEDENT>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>]:<EOL><INDENT>raise models.BatchErrorException(self._deserialize, response)<EOL><DEDENT>if raw:<EOL><INDENT>client_raw_response = ClientRawResponse(None, response)<EOL>client_raw_response.add_headers({<EOL>'<STR_LIT>': '<STR_LIT:str>',<EOL>'<STR_LIT>': '<STR_LIT:str>',<EOL>'<STR_LIT>': '<STR_LIT:str>',<EOL>'<STR_LIT>': '<STR_LIT>',<EOL>'<STR_LIT>': '<STR_LIT:str>',<EOL>})<EOL>return client_raw_response<EOL><DEDENT>

Enables the specified job, allowing new tasks to run.

        When you call this API, the Batch service sets a disabled job to the
        enabling state. After the this operation is completed, the job moves to
        the active state, and scheduling of new tasks under the job resumes.
        The Batch service does not allow a task to remain in the active state
        for more than 180 days. Therefore, if you enable a job containing
        active tasks which were added more than 180 days ago, those tasks will
        not run.

        :param job_id: The ID of the job to enable.
        :type job_id: str
        :param job_enable_options: Additional parameters for the operation
        :type job_enable_options: ~azure.batch.models.JobEnableOptions
        :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:`BatchErrorException<azure.batch.models.BatchErrorException>`


def terminate(<EOL>self, job_id, terminate_reason=None, job_terminate_options=None, custom_headers=None, raw=False, **operation_config):

timeout = None<EOL>if job_terminate_options is not None:<EOL><INDENT>timeout = job_terminate_options.timeout<EOL><DEDENT>client_request_id = None<EOL>if job_terminate_options is not None:<EOL><INDENT>client_request_id = job_terminate_options.client_request_id<EOL><DEDENT>return_client_request_id = None<EOL>if job_terminate_options is not None:<EOL><INDENT>return_client_request_id = job_terminate_options.return_client_request_id<EOL><DEDENT>ocp_date = None<EOL>if job_terminate_options is not None:<EOL><INDENT>ocp_date = job_terminate_options.ocp_date<EOL><DEDENT>if_match = None<EOL>if job_terminate_options is not None:<EOL><INDENT>if_match = job_terminate_options.if_match<EOL><DEDENT>if_none_match = None<EOL>if job_terminate_options is not None:<EOL><INDENT>if_none_match = job_terminate_options.if_none_match<EOL><DEDENT>if_modified_since = None<EOL>if job_terminate_options is not None:<EOL><INDENT>if_modified_since = job_terminate_options.if_modified_since<EOL><DEDENT>if_unmodified_since = None<EOL>if job_terminate_options is not None:<EOL><INDENT>if_unmodified_since = job_terminate_options.if_unmodified_since<EOL><DEDENT>job_terminate_parameter = None<EOL>if terminate_reason is not None:<EOL><INDENT>job_terminate_parameter = models.JobTerminateParameter(terminate_reason=terminate_reason)<EOL><DEDENT>url = self.terminate.metadata['<STR_LIT:url>']<EOL>path_format_arguments = {<EOL>'<STR_LIT>': self._serialize.url("<STR_LIT>", self.config.batch_url, '<STR_LIT:str>', skip_quote=True),<EOL>'<STR_LIT>': self._serialize.url("<STR_LIT>", job_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>if timeout is not None:<EOL><INDENT>query_parameters['<STR_LIT>'] = self._serialize.query("<STR_LIT>", timeout, '<STR_LIT:int>')<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>if return_client_request_id is not None:<EOL><INDENT>header_parameters['<STR_LIT>'] = self._serialize.header("<STR_LIT>", return_client_request_id, '<STR_LIT:bool>')<EOL><DEDENT>if ocp_date is not None:<EOL><INDENT>header_parameters['<STR_LIT>'] = self._serialize.header("<STR_LIT>", ocp_date, '<STR_LIT>')<EOL><DEDENT>if if_match is not None:<EOL><INDENT>header_parameters['<STR_LIT>'] = self._serialize.header("<STR_LIT>", if_match, '<STR_LIT:str>')<EOL><DEDENT>if if_none_match is not None:<EOL><INDENT>header_parameters['<STR_LIT>'] = self._serialize.header("<STR_LIT>", if_none_match, '<STR_LIT:str>')<EOL><DEDENT>if if_modified_since is not None:<EOL><INDENT>header_parameters['<STR_LIT>'] = self._serialize.header("<STR_LIT>", if_modified_since, '<STR_LIT>')<EOL><DEDENT>if if_unmodified_since is not None:<EOL><INDENT>header_parameters['<STR_LIT>'] = self._serialize.header("<STR_LIT>", if_unmodified_since, '<STR_LIT>')<EOL><DEDENT>if job_terminate_parameter is not None:<EOL><INDENT>body_content = self._serialize.body(job_terminate_parameter, '<STR_LIT>')<EOL><DEDENT>else:<EOL><INDENT>body_content = None<EOL><DEDENT>request = self._client.post(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>]:<EOL><INDENT>raise models.BatchErrorException(self._deserialize, response)<EOL><DEDENT>if raw:<EOL><INDENT>client_raw_response = ClientRawResponse(None, response)<EOL>client_raw_response.add_headers({<EOL>'<STR_LIT>': '<STR_LIT:str>',<EOL>'<STR_LIT>': '<STR_LIT:str>',<EOL>'<STR_LIT>': '<STR_LIT:str>',<EOL>'<STR_LIT>': '<STR_LIT>',<EOL>'<STR_LIT>': '<STR_LIT:str>',<EOL>})<EOL>return client_raw_response<EOL><DEDENT>

Terminates the specified job, marking it as completed.

        When a Terminate Job request is received, the Batch service sets the
        job to the terminating state. The Batch service then terminates any
        running tasks associated with the job and runs any required job release
        tasks. Then the job moves into the completed state. If there are any
        tasks in the job in the active state, they will remain in the active
        state. Once a job is terminated, new tasks cannot be added and any
        remaining active tasks will not be scheduled.

        :param job_id: The ID of the job to terminate.
        :type job_id: str
        :param terminate_reason: The text you want to appear as the job's
         TerminateReason. The default is 'UserTerminate'.
        :type terminate_reason: str
        :param job_terminate_options: Additional parameters for the operation
        :type job_terminate_options: ~azure.batch.models.JobTerminateOptions
        :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:`BatchErrorException<azure.batch.models.BatchErrorException>`


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

timeout = None<EOL>if job_add_options is not None:<EOL><INDENT>timeout = job_add_options.timeout<EOL><DEDENT>client_request_id = None<EOL>if job_add_options is not None:<EOL><INDENT>client_request_id = job_add_options.client_request_id<EOL><DEDENT>return_client_request_id = None<EOL>if job_add_options is not None:<EOL><INDENT>return_client_request_id = job_add_options.return_client_request_id<EOL><DEDENT>ocp_date = None<EOL>if job_add_options is not None:<EOL><INDENT>ocp_date = job_add_options.ocp_date<EOL><DEDENT>url = self.add.metadata['<STR_LIT:url>']<EOL>path_format_arguments = {<EOL>'<STR_LIT>': self._serialize.url("<STR_LIT>", self.config.batch_url, '<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>'] = self._serialize.query("<STR_LIT>", self.api_version, '<STR_LIT:str>')<EOL>if timeout is not None:<EOL><INDENT>query_parameters['<STR_LIT>'] = self._serialize.query("<STR_LIT>", timeout, '<STR_LIT:int>')<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>if return_client_request_id is not None:<EOL><INDENT>header_parameters['<STR_LIT>'] = self._serialize.header("<STR_LIT>", return_client_request_id, '<STR_LIT:bool>')<EOL><DEDENT>if ocp_date is not None:<EOL><INDENT>header_parameters['<STR_LIT>'] = self._serialize.header("<STR_LIT>", ocp_date, '<STR_LIT>')<EOL><DEDENT>body_content = self._serialize.body(job, '<STR_LIT>')<EOL>request = self._client.post(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>]:<EOL><INDENT>raise models.BatchErrorException(self._deserialize, response)<EOL><DEDENT>if raw:<EOL><INDENT>client_raw_response = ClientRawResponse(None, response)<EOL>client_raw_response.add_headers({<EOL>'<STR_LIT>': '<STR_LIT:str>',<EOL>'<STR_LIT>': '<STR_LIT:str>',<EOL>'<STR_LIT>': '<STR_LIT:str>',<EOL>'<STR_LIT>': '<STR_LIT>',<EOL>'<STR_LIT>': '<STR_LIT:str>',<EOL>})<EOL>return client_raw_response<EOL><DEDENT>

Adds a job to the specified account.

        The Batch service supports two ways to control the work done as part of
        a job. In the first approach, the user specifies a Job Manager task.
        The Batch service launches this task when it is ready to start the job.
        The Job Manager task controls all other tasks that run under this job,
        by using the Task APIs. In the second approach, the user directly
        controls the execution of tasks under an active job, by using the Task
        APIs. Also note: when naming jobs, avoid including sensitive
        information such as user names or secret project names. This
        information may appear in telemetry logs accessible to Microsoft
        Support engineers.

        :param job: The job to be added.
        :type job: ~azure.batch.models.JobAddParameter
        :param job_add_options: Additional parameters for the operation
        :type job_add_options: ~azure.batch.models.JobAddOptions
        :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:`BatchErrorException<azure.batch.models.BatchErrorException>`


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

filter = None<EOL>if job_list_options is not None:<EOL><INDENT>filter = job_list_options.filter<EOL><DEDENT>select = None<EOL>if job_list_options is not None:<EOL><INDENT>select = job_list_options.select<EOL><DEDENT>expand = None<EOL>if job_list_options is not None:<EOL><INDENT>expand = job_list_options.expand<EOL><DEDENT>max_results = None<EOL>if job_list_options is not None:<EOL><INDENT>max_results = job_list_options.max_results<EOL><DEDENT>timeout = None<EOL>if job_list_options is not None:<EOL><INDENT>timeout = job_list_options.timeout<EOL><DEDENT>client_request_id = None<EOL>if job_list_options is not None:<EOL><INDENT>client_request_id = job_list_options.client_request_id<EOL><DEDENT>return_client_request_id = None<EOL>if job_list_options is not None:<EOL><INDENT>return_client_request_id = job_list_options.return_client_request_id<EOL><DEDENT>ocp_date = None<EOL>if job_list_options is not None:<EOL><INDENT>ocp_date = job_list_options.ocp_date<EOL><DEDENT>def internal_paging(next_link=None, raw=False):<EOL><INDENT>if not next_link:<EOL><INDENT>url = self.list.metadata['<STR_LIT:url>']<EOL>path_format_arguments = {<EOL>'<STR_LIT>': self._serialize.url("<STR_LIT>", self.config.batch_url, '<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>'] = self._serialize.query("<STR_LIT>", self.api_version, '<STR_LIT:str>')<EOL>if filter is not None:<EOL><INDENT>query_parameters['<STR_LIT>'] = self._serialize.query("<STR_LIT>", filter, '<STR_LIT:str>')<EOL><DEDENT>if select is not None:<EOL><INDENT>query_parameters['<STR_LIT>'] = self._serialize.query("<STR_LIT>", select, '<STR_LIT:str>')<EOL><DEDENT>if expand is not None:<EOL><INDENT>query_parameters['<STR_LIT>'] = self._serialize.query("<STR_LIT>", expand, '<STR_LIT:str>')<EOL><DEDENT>if max_results is not None:<EOL><INDENT>query_parameters['<STR_LIT>'] = self._serialize.query("<STR_LIT>", max_results, '<STR_LIT:int>', maximum=<NUM_LIT:1000>, minimum=<NUM_LIT:1>)<EOL><DEDENT>if timeout is not None:<EOL><INDENT>query_parameters['<STR_LIT>'] = self._serialize.query("<STR_LIT>", timeout, '<STR_LIT:int>')<EOL><DEDENT><DEDENT>else:<EOL><INDENT>url = next_link<EOL>query_parameters = {}<EOL><DEDENT>header_parameters = {}<EOL>header_parameters['<STR_LIT>'] = '<STR_LIT:application/json>'<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>if return_client_request_id is not None:<EOL><INDENT>header_parameters['<STR_LIT>'] = self._serialize.header("<STR_LIT>", return_client_request_id, '<STR_LIT:bool>')<EOL><DEDENT>if ocp_date is not None:<EOL><INDENT>header_parameters['<STR_LIT>'] = self._serialize.header("<STR_LIT>", ocp_date, '<STR_LIT>')<EOL><DEDENT>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.BatchErrorException(self._deserialize, response)<EOL><DEDENT>return response<EOL><DEDENT>deserialized = models.CloudJobPaged(internal_paging, self._deserialize.dependencies)<EOL>if raw:<EOL><INDENT>header_dict = {}<EOL>client_raw_response = models.CloudJobPaged(internal_paging, self._deserialize.dependencies, header_dict)<EOL>return client_raw_response<EOL><DEDENT>return deserialized<EOL>

Lists all of the jobs in the specified account.

        :param job_list_options: Additional parameters for the operation
        :type job_list_options: ~azure.batch.models.JobListOptions
        :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 CloudJob
        :rtype:
         ~azure.batch.models.CloudJobPaged[~azure.batch.models.CloudJob]
        :raises:
         :class:`BatchErrorException<azure.batch.models.BatchErrorException>`


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

filter = None<EOL>if job_list_from_job_schedule_options is not None:<EOL><INDENT>filter = job_list_from_job_schedule_options.filter<EOL><DEDENT>select = None<EOL>if job_list_from_job_schedule_options is not None:<EOL><INDENT>select = job_list_from_job_schedule_options.select<EOL><DEDENT>expand = None<EOL>if job_list_from_job_schedule_options is not None:<EOL><INDENT>expand = job_list_from_job_schedule_options.expand<EOL><DEDENT>max_results = None<EOL>if job_list_from_job_schedule_options is not None:<EOL><INDENT>max_results = job_list_from_job_schedule_options.max_results<EOL><DEDENT>timeout = None<EOL>if job_list_from_job_schedule_options is not None:<EOL><INDENT>timeout = job_list_from_job_schedule_options.timeout<EOL><DEDENT>client_request_id = None<EOL>if job_list_from_job_schedule_options is not None:<EOL><INDENT>client_request_id = job_list_from_job_schedule_options.client_request_id<EOL><DEDENT>return_client_request_id = None<EOL>if job_list_from_job_schedule_options is not None:<EOL><INDENT>return_client_request_id = job_list_from_job_schedule_options.return_client_request_id<EOL><DEDENT>ocp_date = None<EOL>if job_list_from_job_schedule_options is not None:<EOL><INDENT>ocp_date = job_list_from_job_schedule_options.ocp_date<EOL><DEDENT>def internal_paging(next_link=None, raw=False):<EOL><INDENT>if not next_link:<EOL><INDENT>url = self.list_from_job_schedule.metadata['<STR_LIT:url>']<EOL>path_format_arguments = {<EOL>'<STR_LIT>': self._serialize.url("<STR_LIT>", self.config.batch_url, '<STR_LIT:str>', skip_quote=True),<EOL>'<STR_LIT>': self._serialize.url("<STR_LIT>", job_schedule_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>if filter is not None:<EOL><INDENT>query_parameters['<STR_LIT>'] = self._serialize.query("<STR_LIT>", filter, '<STR_LIT:str>')<EOL><DEDENT>if select is not None:<EOL><INDENT>query_parameters['<STR_LIT>'] = self._serialize.query("<STR_LIT>", select, '<STR_LIT:str>')<EOL><DEDENT>if expand is not None:<EOL><INDENT>query_parameters['<STR_LIT>'] = self._serialize.query("<STR_LIT>", expand, '<STR_LIT:str>')<EOL><DEDENT>if max_results is not None:<EOL><INDENT>query_parameters['<STR_LIT>'] = self._serialize.query("<STR_LIT>", max_results, '<STR_LIT:int>', maximum=<NUM_LIT:1000>, minimum=<NUM_LIT:1>)<EOL><DEDENT>if timeout is not None:<EOL><INDENT>query_parameters['<STR_LIT>'] = self._serialize.query("<STR_LIT>", timeout, '<STR_LIT:int>')<EOL><DEDENT><DEDENT>else:<EOL><INDENT>url = next_link<EOL>query_parameters = {}<EOL><DEDENT>header_parameters = {}<EOL>header_parameters['<STR_LIT>'] = '<STR_LIT:application/json>'<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>if return_client_request_id is not None:<EOL><INDENT>header_parameters['<STR_LIT>'] = self._serialize.header("<STR_LIT>", return_client_request_id, '<STR_LIT:bool>')<EOL><DEDENT>if ocp_date is not None:<EOL><INDENT>header_parameters['<STR_LIT>'] = self._serialize.header("<STR_LIT>", ocp_date, '<STR_LIT>')<EOL><DEDENT>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.BatchErrorException(self._deserialize, response)<EOL><DEDENT>return response<EOL><DEDENT>deserialized = models.CloudJobPaged(internal_paging, self._deserialize.dependencies)<EOL>if raw:<EOL><INDENT>header_dict = {}<EOL>client_raw_response = models.CloudJobPaged(internal_paging, self._deserialize.dependencies, header_dict)<EOL>return client_raw_response<EOL><DEDENT>return deserialized<EOL>

Lists the jobs that have been created under the specified job schedule.

        :param job_schedule_id: The ID of the job schedule from which you want
         to get a list of jobs.
        :type job_schedule_id: str
        :param job_list_from_job_schedule_options: Additional parameters for
         the operation
        :type job_list_from_job_schedule_options:
         ~azure.batch.models.JobListFromJobScheduleOptions
        :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 CloudJob
        :rtype:
         ~azure.batch.models.CloudJobPaged[~azure.batch.models.CloudJob]
        :raises:
         :class:`BatchErrorException<azure.batch.models.BatchErrorException>`


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

filter = None<EOL>if job_list_preparation_and_release_task_status_options is not None:<EOL><INDENT>filter = job_list_preparation_and_release_task_status_options.filter<EOL><DEDENT>select = None<EOL>if job_list_preparation_and_release_task_status_options is not None:<EOL><INDENT>select = job_list_preparation_and_release_task_status_options.select<EOL><DEDENT>max_results = None<EOL>if job_list_preparation_and_release_task_status_options is not None:<EOL><INDENT>max_results = job_list_preparation_and_release_task_status_options.max_results<EOL><DEDENT>timeout = None<EOL>if job_list_preparation_and_release_task_status_options is not None:<EOL><INDENT>timeout = job_list_preparation_and_release_task_status_options.timeout<EOL><DEDENT>client_request_id = None<EOL>if job_list_preparation_and_release_task_status_options is not None:<EOL><INDENT>client_request_id = job_list_preparation_and_release_task_status_options.client_request_id<EOL><DEDENT>return_client_request_id = None<EOL>if job_list_preparation_and_release_task_status_options is not None:<EOL><INDENT>return_client_request_id = job_list_preparation_and_release_task_status_options.return_client_request_id<EOL><DEDENT>ocp_date = None<EOL>if job_list_preparation_and_release_task_status_options is not None:<EOL><INDENT>ocp_date = job_list_preparation_and_release_task_status_options.ocp_date<EOL><DEDENT>def internal_paging(next_link=None, raw=False):<EOL><INDENT>if not next_link:<EOL><INDENT>url = self.list_preparation_and_release_task_status.metadata['<STR_LIT:url>']<EOL>path_format_arguments = {<EOL>'<STR_LIT>': self._serialize.url("<STR_LIT>", self.config.batch_url, '<STR_LIT:str>', skip_quote=True),<EOL>'<STR_LIT>': self._serialize.url("<STR_LIT>", job_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>if filter is not None:<EOL><INDENT>query_parameters['<STR_LIT>'] = self._serialize.query("<STR_LIT>", filter, '<STR_LIT:str>')<EOL><DEDENT>if select is not None:<EOL><INDENT>query_parameters['<STR_LIT>'] = self._serialize.query("<STR_LIT>", select, '<STR_LIT:str>')<EOL><DEDENT>if max_results is not None:<EOL><INDENT>query_parameters['<STR_LIT>'] = self._serialize.query("<STR_LIT>", max_results, '<STR_LIT:int>', maximum=<NUM_LIT:1000>, minimum=<NUM_LIT:1>)<EOL><DEDENT>if timeout is not None:<EOL><INDENT>query_parameters['<STR_LIT>'] = self._serialize.query("<STR_LIT>", timeout, '<STR_LIT:int>')<EOL><DEDENT><DEDENT>else:<EOL><INDENT>url = next_link<EOL>query_parameters = {}<EOL><DEDENT>header_parameters = {}<EOL>header_parameters['<STR_LIT>'] = '<STR_LIT:application/json>'<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>if return_client_request_id is not None:<EOL><INDENT>header_parameters['<STR_LIT>'] = self._serialize.header("<STR_LIT>", return_client_request_id, '<STR_LIT:bool>')<EOL><DEDENT>if ocp_date is not None:<EOL><INDENT>header_parameters['<STR_LIT>'] = self._serialize.header("<STR_LIT>", ocp_date, '<STR_LIT>')<EOL><DEDENT>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.BatchErrorException(self._deserialize, response)<EOL><DEDENT>return response<EOL><DEDENT>deserialized = models.JobPreparationAndReleaseTaskExecutionInformationPaged(internal_paging, self._deserialize.dependencies)<EOL>if raw:<EOL><INDENT>header_dict = {}<EOL>client_raw_response = models.JobPreparationAndReleaseTaskExecutionInformationPaged(internal_paging, self._deserialize.dependencies, header_dict)<EOL>return client_raw_response<EOL><DEDENT>return deserialized<EOL>

Lists the execution status of the Job Preparation and Job Release task
        for the specified job across the compute nodes where the job has run.

        This API returns the Job Preparation and Job Release task status on all
        compute nodes that have run the Job Preparation or Job Release task.
        This includes nodes which have since been removed from the pool. If
        this API is invoked on a job which has no Job Preparation or Job
        Release task, the Batch service returns HTTP status code 409 (Conflict)
        with an error code of JobPreparationTaskNotSpecified.

        :param job_id: The ID of the job.
        :type job_id: str
        :param job_list_preparation_and_release_task_status_options:
         Additional parameters for the operation
        :type job_list_preparation_and_release_task_status_options:
         ~azure.batch.models.JobListPreparationAndReleaseTaskStatusOptions
        :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
         JobPreparationAndReleaseTaskExecutionInformation
        :rtype:
         ~azure.batch.models.JobPreparationAndReleaseTaskExecutionInformationPaged[~azure.batch.models.JobPreparationAndReleaseTaskExecutionInformation]
        :raises:
         :class:`BatchErrorException<azure.batch.models.BatchErrorException>`


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

timeout = None<EOL>if job_get_task_counts_options is not None:<EOL><INDENT>timeout = job_get_task_counts_options.timeout<EOL><DEDENT>client_request_id = None<EOL>if job_get_task_counts_options is not None:<EOL><INDENT>client_request_id = job_get_task_counts_options.client_request_id<EOL><DEDENT>return_client_request_id = None<EOL>if job_get_task_counts_options is not None:<EOL><INDENT>return_client_request_id = job_get_task_counts_options.return_client_request_id<EOL><DEDENT>ocp_date = None<EOL>if job_get_task_counts_options is not None:<EOL><INDENT>ocp_date = job_get_task_counts_options.ocp_date<EOL><DEDENT>url = self.get_task_counts.metadata['<STR_LIT:url>']<EOL>path_format_arguments = {<EOL>'<STR_LIT>': self._serialize.url("<STR_LIT>", self.config.batch_url, '<STR_LIT:str>', skip_quote=True),<EOL>'<STR_LIT>': self._serialize.url("<STR_LIT>", job_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>if timeout is not None:<EOL><INDENT>query_parameters['<STR_LIT>'] = self._serialize.query("<STR_LIT>", timeout, '<STR_LIT:int>')<EOL><DEDENT>header_parameters = {}<EOL>header_parameters['<STR_LIT>'] = '<STR_LIT:application/json>'<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>if return_client_request_id is not None:<EOL><INDENT>header_parameters['<STR_LIT>'] = self._serialize.header("<STR_LIT>", return_client_request_id, '<STR_LIT:bool>')<EOL><DEDENT>if ocp_date is not None:<EOL><INDENT>header_parameters['<STR_LIT>'] = self._serialize.header("<STR_LIT>", ocp_date, '<STR_LIT>')<EOL><DEDENT>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.BatchErrorException(self._deserialize, response)<EOL><DEDENT>deserialized = None<EOL>header_dict = {}<EOL>if response.status_code == <NUM_LIT:200>:<EOL><INDENT>deserialized = self._deserialize('<STR_LIT>', response)<EOL>header_dict = {<EOL>'<STR_LIT>': '<STR_LIT:str>',<EOL>'<STR_LIT>': '<STR_LIT:str>',<EOL>}<EOL><DEDENT>if raw:<EOL><INDENT>client_raw_response = ClientRawResponse(deserialized, response)<EOL>client_raw_response.add_headers(header_dict)<EOL>return client_raw_response<EOL><DEDENT>return deserialized<EOL>

Gets the task counts for the specified job.

        Task counts provide a count of the tasks by active, running or
        completed task state, and a count of tasks which succeeded or failed.
        Tasks in the preparing state are counted as running.

        :param job_id: The ID of the job.
        :type job_id: str
        :param job_get_task_counts_options: Additional parameters for the
         operation
        :type job_get_task_counts_options:
         ~azure.batch.models.JobGetTaskCountsOptions
        :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: TaskCounts or ClientRawResponse if raw=true
        :rtype: ~azure.batch.models.TaskCounts or
         ~msrest.pipeline.ClientRawResponse
        :raises:
         :class:`BatchErrorException<azure.batch.models.BatchErrorException>`


def add(<EOL>self, job_id, task, task_add_options=None, custom_headers=None, raw=False, **operation_config):

timeout = None<EOL>if task_add_options is not None:<EOL><INDENT>timeout = task_add_options.timeout<EOL><DEDENT>client_request_id = None<EOL>if task_add_options is not None:<EOL><INDENT>client_request_id = task_add_options.client_request_id<EOL><DEDENT>return_client_request_id = None<EOL>if task_add_options is not None:<EOL><INDENT>return_client_request_id = task_add_options.return_client_request_id<EOL><DEDENT>ocp_date = None<EOL>if task_add_options is not None:<EOL><INDENT>ocp_date = task_add_options.ocp_date<EOL><DEDENT>url = self.add.metadata['<STR_LIT:url>']<EOL>path_format_arguments = {<EOL>'<STR_LIT>': self._serialize.url("<STR_LIT>", self.config.batch_url, '<STR_LIT:str>', skip_quote=True),<EOL>'<STR_LIT>': self._serialize.url("<STR_LIT>", job_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>if timeout is not None:<EOL><INDENT>query_parameters['<STR_LIT>'] = self._serialize.query("<STR_LIT>", timeout, '<STR_LIT:int>')<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>if return_client_request_id is not None:<EOL><INDENT>header_parameters['<STR_LIT>'] = self._serialize.header("<STR_LIT>", return_client_request_id, '<STR_LIT:bool>')<EOL><DEDENT>if ocp_date is not None:<EOL><INDENT>header_parameters['<STR_LIT>'] = self._serialize.header("<STR_LIT>", ocp_date, '<STR_LIT>')<EOL><DEDENT>body_content = self._serialize.body(task, '<STR_LIT>')<EOL>request = self._client.post(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>]:<EOL><INDENT>raise models.BatchErrorException(self._deserialize, response)<EOL><DEDENT>if raw:<EOL><INDENT>client_raw_response = ClientRawResponse(None, response)<EOL>client_raw_response.add_headers({<EOL>'<STR_LIT>': '<STR_LIT:str>',<EOL>'<STR_LIT>': '<STR_LIT:str>',<EOL>'<STR_LIT>': '<STR_LIT:str>',<EOL>'<STR_LIT>': '<STR_LIT>',<EOL>'<STR_LIT>': '<STR_LIT:str>',<EOL>})<EOL>return client_raw_response<EOL><DEDENT>

Adds a task to the specified job.

        The maximum lifetime of a task from addition to completion is 180 days.
        If a task has not completed within 180 days of being added it will be
        terminated by the Batch service and left in whatever state it was in at
        that time.

        :param job_id: The ID of the job to which the task is to be added.
        :type job_id: str
        :param task: The task to be added.
        :type task: ~azure.batch.models.TaskAddParameter
        :param task_add_options: Additional parameters for the operation
        :type task_add_options: ~azure.batch.models.TaskAddOptions
        :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:`BatchErrorException<azure.batch.models.BatchErrorException>`


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

filter = None<EOL>if task_list_options is not None:<EOL><INDENT>filter = task_list_options.filter<EOL><DEDENT>select = None<EOL>if task_list_options is not None:<EOL><INDENT>select = task_list_options.select<EOL><DEDENT>expand = None<EOL>if task_list_options is not None:<EOL><INDENT>expand = task_list_options.expand<EOL><DEDENT>max_results = None<EOL>if task_list_options is not None:<EOL><INDENT>max_results = task_list_options.max_results<EOL><DEDENT>timeout = None<EOL>if task_list_options is not None:<EOL><INDENT>timeout = task_list_options.timeout<EOL><DEDENT>client_request_id = None<EOL>if task_list_options is not None:<EOL><INDENT>client_request_id = task_list_options.client_request_id<EOL><DEDENT>return_client_request_id = None<EOL>if task_list_options is not None:<EOL><INDENT>return_client_request_id = task_list_options.return_client_request_id<EOL><DEDENT>ocp_date = None<EOL>if task_list_options is not None:<EOL><INDENT>ocp_date = task_list_options.ocp_date<EOL><DEDENT>def internal_paging(next_link=None, raw=False):<EOL><INDENT>if not next_link:<EOL><INDENT>url = self.list.metadata['<STR_LIT:url>']<EOL>path_format_arguments = {<EOL>'<STR_LIT>': self._serialize.url("<STR_LIT>", self.config.batch_url, '<STR_LIT:str>', skip_quote=True),<EOL>'<STR_LIT>': self._serialize.url("<STR_LIT>", job_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>if filter is not None:<EOL><INDENT>query_parameters['<STR_LIT>'] = self._serialize.query("<STR_LIT>", filter, '<STR_LIT:str>')<EOL><DEDENT>if select is not None:<EOL><INDENT>query_parameters['<STR_LIT>'] = self._serialize.query("<STR_LIT>", select, '<STR_LIT:str>')<EOL><DEDENT>if expand is not None:<EOL><INDENT>query_parameters['<STR_LIT>'] = self._serialize.query("<STR_LIT>", expand, '<STR_LIT:str>')<EOL><DEDENT>if max_results is not None:<EOL><INDENT>query_parameters['<STR_LIT>'] = self._serialize.query("<STR_LIT>", max_results, '<STR_LIT:int>', maximum=<NUM_LIT:1000>, minimum=<NUM_LIT:1>)<EOL><DEDENT>if timeout is not None:<EOL><INDENT>query_parameters['<STR_LIT>'] = self._serialize.query("<STR_LIT>", timeout, '<STR_LIT:int>')<EOL><DEDENT><DEDENT>else:<EOL><INDENT>url = next_link<EOL>query_parameters = {}<EOL><DEDENT>header_parameters = {}<EOL>header_parameters['<STR_LIT>'] = '<STR_LIT:application/json>'<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>if return_client_request_id is not None:<EOL><INDENT>header_parameters['<STR_LIT>'] = self._serialize.header("<STR_LIT>", return_client_request_id, '<STR_LIT:bool>')<EOL><DEDENT>if ocp_date is not None:<EOL><INDENT>header_parameters['<STR_LIT>'] = self._serialize.header("<STR_LIT>", ocp_date, '<STR_LIT>')<EOL><DEDENT>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.BatchErrorException(self._deserialize, response)<EOL><DEDENT>return response<EOL><DEDENT>deserialized = models.CloudTaskPaged(internal_paging, self._deserialize.dependencies)<EOL>if raw:<EOL><INDENT>header_dict = {}<EOL>client_raw_response = models.CloudTaskPaged(internal_paging, self._deserialize.dependencies, header_dict)<EOL>return client_raw_response<EOL><DEDENT>return deserialized<EOL>

Lists all of the tasks that are associated with the specified job.

        For multi-instance tasks, information such as affinityId, executionInfo
        and nodeInfo refer to the primary task. Use the list subtasks API to
        retrieve information about subtasks.

        :param job_id: The ID of the job.
        :type job_id: str
        :param task_list_options: Additional parameters for the operation
        :type task_list_options: ~azure.batch.models.TaskListOptions
        :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 CloudTask
        :rtype:
         ~azure.batch.models.CloudTaskPaged[~azure.batch.models.CloudTask]
        :raises:
         :class:`BatchErrorException<azure.batch.models.BatchErrorException>`


def add_collection(<EOL>self, job_id, value, task_add_collection_options=None, custom_headers=None, raw=False, **operation_config):

timeout = None<EOL>if task_add_collection_options is not None:<EOL><INDENT>timeout = task_add_collection_options.timeout<EOL><DEDENT>client_request_id = None<EOL>if task_add_collection_options is not None:<EOL><INDENT>client_request_id = task_add_collection_options.client_request_id<EOL><DEDENT>return_client_request_id = None<EOL>if task_add_collection_options is not None:<EOL><INDENT>return_client_request_id = task_add_collection_options.return_client_request_id<EOL><DEDENT>ocp_date = None<EOL>if task_add_collection_options is not None:<EOL><INDENT>ocp_date = task_add_collection_options.ocp_date<EOL><DEDENT>task_collection = models.TaskAddCollectionParameter(value=value)<EOL>url = self.add_collection.metadata['<STR_LIT:url>']<EOL>path_format_arguments = {<EOL>'<STR_LIT>': self._serialize.url("<STR_LIT>", self.config.batch_url, '<STR_LIT:str>', skip_quote=True),<EOL>'<STR_LIT>': self._serialize.url("<STR_LIT>", job_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>if timeout is not None:<EOL><INDENT>query_parameters['<STR_LIT>'] = self._serialize.query("<STR_LIT>", timeout, '<STR_LIT:int>')<EOL><DEDENT>header_parameters = {}<EOL>header_parameters['<STR_LIT>'] = '<STR_LIT:application/json>'<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>if return_client_request_id is not None:<EOL><INDENT>header_parameters['<STR_LIT>'] = self._serialize.header("<STR_LIT>", return_client_request_id, '<STR_LIT:bool>')<EOL><DEDENT>if ocp_date is not None:<EOL><INDENT>header_parameters['<STR_LIT>'] = self._serialize.header("<STR_LIT>", ocp_date, '<STR_LIT>')<EOL><DEDENT>body_content = self._serialize.body(task_collection, '<STR_LIT>')<EOL>request = self._client.post(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.BatchErrorException(self._deserialize, response)<EOL><DEDENT>deserialized = None<EOL>header_dict = {}<EOL>if response.status_code == <NUM_LIT:200>:<EOL><INDENT>deserialized = self._deserialize('<STR_LIT>', response)<EOL>header_dict = {<EOL>'<STR_LIT>': '<STR_LIT:str>',<EOL>'<STR_LIT>': '<STR_LIT:str>',<EOL>}<EOL><DEDENT>if raw:<EOL><INDENT>client_raw_response = ClientRawResponse(deserialized, response)<EOL>client_raw_response.add_headers(header_dict)<EOL>return client_raw_response<EOL><DEDENT>return deserialized<EOL>

Adds a collection of tasks to the specified job.

        Note that each task must have a unique ID. The Batch service may not
        return the results for each task in the same order the tasks were
        submitted in this request. If the server times out or the connection is
        closed during the request, the request may have been partially or fully
        processed, or not at all. In such cases, the user should re-issue the
        request. Note that it is up to the user to correctly handle failures
        when re-issuing a request. For example, you should use the same task
        IDs during a retry so that if the prior operation succeeded, the retry
        will not create extra tasks unexpectedly. If the response contains any
        tasks which failed to add, a client can retry the request. In a retry,
        it is most efficient to resubmit only tasks that failed to add, and to
        omit tasks that were successfully added on the first attempt. The
        maximum lifetime of a task from addition to completion is 180 days. If
        a task has not completed within 180 days of being added it will be
        terminated by the Batch service and left in whatever state it was in at
        that time.

        :param job_id: The ID of the job to which the task collection is to be
         added.
        :type job_id: str
        :param value: The collection of tasks to add. The maximum count of
         tasks is 100. The total serialized size of this collection must be
         less than 1MB. If it is greater than 1MB (for example if each task has
         100's of resource files or environment variables), the request will
         fail with code 'RequestBodyTooLarge' and should be retried again with
         fewer tasks.
        :type value: list[~azure.batch.models.TaskAddParameter]
        :param task_add_collection_options: Additional parameters for the
         operation
        :type task_add_collection_options:
         ~azure.batch.models.TaskAddCollectionOptions
        :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: TaskAddCollectionResult or ClientRawResponse if raw=true
        :rtype: ~azure.batch.models.TaskAddCollectionResult or
         ~msrest.pipeline.ClientRawResponse
        :raises:
         :class:`BatchErrorException<azure.batch.models.BatchErrorException>`


def delete(<EOL>self, job_id, task_id, task_delete_options=None, custom_headers=None, raw=False, **operation_config):

timeout = None<EOL>if task_delete_options is not None:<EOL><INDENT>timeout = task_delete_options.timeout<EOL><DEDENT>client_request_id = None<EOL>if task_delete_options is not None:<EOL><INDENT>client_request_id = task_delete_options.client_request_id<EOL><DEDENT>return_client_request_id = None<EOL>if task_delete_options is not None:<EOL><INDENT>return_client_request_id = task_delete_options.return_client_request_id<EOL><DEDENT>ocp_date = None<EOL>if task_delete_options is not None:<EOL><INDENT>ocp_date = task_delete_options.ocp_date<EOL><DEDENT>if_match = None<EOL>if task_delete_options is not None:<EOL><INDENT>if_match = task_delete_options.if_match<EOL><DEDENT>if_none_match = None<EOL>if task_delete_options is not None:<EOL><INDENT>if_none_match = task_delete_options.if_none_match<EOL><DEDENT>if_modified_since = None<EOL>if task_delete_options is not None:<EOL><INDENT>if_modified_since = task_delete_options.if_modified_since<EOL><DEDENT>if_unmodified_since = None<EOL>if task_delete_options is not None:<EOL><INDENT>if_unmodified_since = task_delete_options.if_unmodified_since<EOL><DEDENT>url = self.delete.metadata['<STR_LIT:url>']<EOL>path_format_arguments = {<EOL>'<STR_LIT>': self._serialize.url("<STR_LIT>", self.config.batch_url, '<STR_LIT:str>', skip_quote=True),<EOL>'<STR_LIT>': self._serialize.url("<STR_LIT>", job_id, '<STR_LIT:str>'),<EOL>'<STR_LIT>': self._serialize.url("<STR_LIT>", task_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>if timeout is not None:<EOL><INDENT>query_parameters['<STR_LIT>'] = self._serialize.query("<STR_LIT>", timeout, '<STR_LIT:int>')<EOL><DEDENT>header_parameters = {}<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>if return_client_request_id is not None:<EOL><INDENT>header_parameters['<STR_LIT>'] = self._serialize.header("<STR_LIT>", return_client_request_id, '<STR_LIT:bool>')<EOL><DEDENT>if ocp_date is not None:<EOL><INDENT>header_parameters['<STR_LIT>'] = self._serialize.header("<STR_LIT>", ocp_date, '<STR_LIT>')<EOL><DEDENT>if if_match is not None:<EOL><INDENT>header_parameters['<STR_LIT>'] = self._serialize.header("<STR_LIT>", if_match, '<STR_LIT:str>')<EOL><DEDENT>if if_none_match is not None:<EOL><INDENT>header_parameters['<STR_LIT>'] = self._serialize.header("<STR_LIT>", if_none_match, '<STR_LIT:str>')<EOL><DEDENT>if if_modified_since is not None:<EOL><INDENT>header_parameters['<STR_LIT>'] = self._serialize.header("<STR_LIT>", if_modified_since, '<STR_LIT>')<EOL><DEDENT>if if_unmodified_since is not None:<EOL><INDENT>header_parameters['<STR_LIT>'] = self._serialize.header("<STR_LIT>", if_unmodified_since, '<STR_LIT>')<EOL><DEDENT>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:200>]:<EOL><INDENT>raise models.BatchErrorException(self._deserialize, response)<EOL><DEDENT>if raw:<EOL><INDENT>client_raw_response = ClientRawResponse(None, response)<EOL>client_raw_response.add_headers({<EOL>'<STR_LIT>': '<STR_LIT:str>',<EOL>'<STR_LIT>': '<STR_LIT:str>',<EOL>})<EOL>return client_raw_response<EOL><DEDENT>

Deletes a task from the specified job.

        When a task is deleted, all of the files in its directory on the
        compute node where it ran are also deleted (regardless of the retention
        time). For multi-instance tasks, the delete task operation applies
        synchronously to the primary task; subtasks and their files are then
        deleted asynchronously in the background.

        :param job_id: The ID of the job from which to delete the task.
        :type job_id: str
        :param task_id: The ID of the task to delete.
        :type task_id: str
        :param task_delete_options: Additional parameters for the operation
        :type task_delete_options: ~azure.batch.models.TaskDeleteOptions
        :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:`BatchErrorException<azure.batch.models.BatchErrorException>`


def get(<EOL>self, job_id, task_id, task_get_options=None, custom_headers=None, raw=False, **operation_config):

select = None<EOL>if task_get_options is not None:<EOL><INDENT>select = task_get_options.select<EOL><DEDENT>expand = None<EOL>if task_get_options is not None:<EOL><INDENT>expand = task_get_options.expand<EOL><DEDENT>timeout = None<EOL>if task_get_options is not None:<EOL><INDENT>timeout = task_get_options.timeout<EOL><DEDENT>client_request_id = None<EOL>if task_get_options is not None:<EOL><INDENT>client_request_id = task_get_options.client_request_id<EOL><DEDENT>return_client_request_id = None<EOL>if task_get_options is not None:<EOL><INDENT>return_client_request_id = task_get_options.return_client_request_id<EOL><DEDENT>ocp_date = None<EOL>if task_get_options is not None:<EOL><INDENT>ocp_date = task_get_options.ocp_date<EOL><DEDENT>if_match = None<EOL>if task_get_options is not None:<EOL><INDENT>if_match = task_get_options.if_match<EOL><DEDENT>if_none_match = None<EOL>if task_get_options is not None:<EOL><INDENT>if_none_match = task_get_options.if_none_match<EOL><DEDENT>if_modified_since = None<EOL>if task_get_options is not None:<EOL><INDENT>if_modified_since = task_get_options.if_modified_since<EOL><DEDENT>if_unmodified_since = None<EOL>if task_get_options is not None:<EOL><INDENT>if_unmodified_since = task_get_options.if_unmodified_since<EOL><DEDENT>url = self.get.metadata['<STR_LIT:url>']<EOL>path_format_arguments = {<EOL>'<STR_LIT>': self._serialize.url("<STR_LIT>", self.config.batch_url, '<STR_LIT:str>', skip_quote=True),<EOL>'<STR_LIT>': self._serialize.url("<STR_LIT>", job_id, '<STR_LIT:str>'),<EOL>'<STR_LIT>': self._serialize.url("<STR_LIT>", task_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>if select is not None:<EOL><INDENT>query_parameters['<STR_LIT>'] = self._serialize.query("<STR_LIT>", select, '<STR_LIT:str>')<EOL><DEDENT>if expand is not None:<EOL><INDENT>query_parameters['<STR_LIT>'] = self._serialize.query("<STR_LIT>", expand, '<STR_LIT:str>')<EOL><DEDENT>if timeout is not None:<EOL><INDENT>query_parameters['<STR_LIT>'] = self._serialize.query("<STR_LIT>", timeout, '<STR_LIT:int>')<EOL><DEDENT>header_parameters = {}<EOL>header_parameters['<STR_LIT>'] = '<STR_LIT:application/json>'<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>if return_client_request_id is not None:<EOL><INDENT>header_parameters['<STR_LIT>'] = self._serialize.header("<STR_LIT>", return_client_request_id, '<STR_LIT:bool>')<EOL><DEDENT>if ocp_date is not None:<EOL><INDENT>header_parameters['<STR_LIT>'] = self._serialize.header("<STR_LIT>", ocp_date, '<STR_LIT>')<EOL><DEDENT>if if_match is not None:<EOL><INDENT>header_parameters['<STR_LIT>'] = self._serialize.header("<STR_LIT>", if_match, '<STR_LIT:str>')<EOL><DEDENT>if if_none_match is not None:<EOL><INDENT>header_parameters['<STR_LIT>'] = self._serialize.header("<STR_LIT>", if_none_match, '<STR_LIT:str>')<EOL><DEDENT>if if_modified_since is not None:<EOL><INDENT>header_parameters['<STR_LIT>'] = self._serialize.header("<STR_LIT>", if_modified_since, '<STR_LIT>')<EOL><DEDENT>if if_unmodified_since is not None:<EOL><INDENT>header_parameters['<STR_LIT>'] = self._serialize.header("<STR_LIT>", if_unmodified_since, '<STR_LIT>')<EOL><DEDENT>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.BatchErrorException(self._deserialize, response)<EOL><DEDENT>deserialized = None<EOL>header_dict = {}<EOL>if response.status_code == <NUM_LIT:200>:<EOL><INDENT>deserialized = self._deserialize('<STR_LIT>', response)<EOL>header_dict = {<EOL>'<STR_LIT>': '<STR_LIT:str>',<EOL>'<STR_LIT>': '<STR_LIT:str>',<EOL>'<STR_LIT>': '<STR_LIT:str>',<EOL>'<STR_LIT>': '<STR_LIT>',<EOL>'<STR_LIT>': '<STR_LIT:str>',<EOL>}<EOL><DEDENT>if raw:<EOL><INDENT>client_raw_response = ClientRawResponse(deserialized, response)<EOL>client_raw_response.add_headers(header_dict)<EOL>return client_raw_response<EOL><DEDENT>return deserialized<EOL>

Gets information about the specified task.

        For multi-instance tasks, information such as affinityId, executionInfo
        and nodeInfo refer to the primary task. Use the list subtasks API to
        retrieve information about subtasks.

        :param job_id: The ID of the job that contains the task.
        :type job_id: str
        :param task_id: The ID of the task to get information about.
        :type task_id: str
        :param task_get_options: Additional parameters for the operation
        :type task_get_options: ~azure.batch.models.TaskGetOptions
        :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: CloudTask or ClientRawResponse if raw=true
        :rtype: ~azure.batch.models.CloudTask or
         ~msrest.pipeline.ClientRawResponse
        :raises:
         :class:`BatchErrorException<azure.batch.models.BatchErrorException>`


def update(<EOL>self, job_id, task_id, constraints=None, task_update_options=None, custom_headers=None, raw=False, **operation_config):

timeout = None<EOL>if task_update_options is not None:<EOL><INDENT>timeout = task_update_options.timeout<EOL><DEDENT>client_request_id = None<EOL>if task_update_options is not None:<EOL><INDENT>client_request_id = task_update_options.client_request_id<EOL><DEDENT>return_client_request_id = None<EOL>if task_update_options is not None:<EOL><INDENT>return_client_request_id = task_update_options.return_client_request_id<EOL><DEDENT>ocp_date = None<EOL>if task_update_options is not None:<EOL><INDENT>ocp_date = task_update_options.ocp_date<EOL><DEDENT>if_match = None<EOL>if task_update_options is not None:<EOL><INDENT>if_match = task_update_options.if_match<EOL><DEDENT>if_none_match = None<EOL>if task_update_options is not None:<EOL><INDENT>if_none_match = task_update_options.if_none_match<EOL><DEDENT>if_modified_since = None<EOL>if task_update_options is not None:<EOL><INDENT>if_modified_since = task_update_options.if_modified_since<EOL><DEDENT>if_unmodified_since = None<EOL>if task_update_options is not None:<EOL><INDENT>if_unmodified_since = task_update_options.if_unmodified_since<EOL><DEDENT>task_update_parameter = models.TaskUpdateParameter(constraints=constraints)<EOL>url = self.update.metadata['<STR_LIT:url>']<EOL>path_format_arguments = {<EOL>'<STR_LIT>': self._serialize.url("<STR_LIT>", self.config.batch_url, '<STR_LIT:str>', skip_quote=True),<EOL>'<STR_LIT>': self._serialize.url("<STR_LIT>", job_id, '<STR_LIT:str>'),<EOL>'<STR_LIT>': self._serialize.url("<STR_LIT>", task_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>if timeout is not None:<EOL><INDENT>query_parameters['<STR_LIT>'] = self._serialize.query("<STR_LIT>", timeout, '<STR_LIT:int>')<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>if return_client_request_id is not None:<EOL><INDENT>header_parameters['<STR_LIT>'] = self._serialize.header("<STR_LIT>", return_client_request_id, '<STR_LIT:bool>')<EOL><DEDENT>if ocp_date is not None:<EOL><INDENT>header_parameters['<STR_LIT>'] = self._serialize.header("<STR_LIT>", ocp_date, '<STR_LIT>')<EOL><DEDENT>if if_match is not None:<EOL><INDENT>header_parameters['<STR_LIT>'] = self._serialize.header("<STR_LIT>", if_match, '<STR_LIT:str>')<EOL><DEDENT>if if_none_match is not None:<EOL><INDENT>header_parameters['<STR_LIT>'] = self._serialize.header("<STR_LIT>", if_none_match, '<STR_LIT:str>')<EOL><DEDENT>if if_modified_since is not None:<EOL><INDENT>header_parameters['<STR_LIT>'] = self._serialize.header("<STR_LIT>", if_modified_since, '<STR_LIT>')<EOL><DEDENT>if if_unmodified_since is not None:<EOL><INDENT>header_parameters['<STR_LIT>'] = self._serialize.header("<STR_LIT>", if_unmodified_since, '<STR_LIT>')<EOL><DEDENT>body_content = self._serialize.body(task_update_parameter, '<STR_LIT>')<EOL>request = self._client.put(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.BatchErrorException(self._deserialize, response)<EOL><DEDENT>if raw:<EOL><INDENT>client_raw_response = ClientRawResponse(None, response)<EOL>client_raw_response.add_headers({<EOL>'<STR_LIT>': '<STR_LIT:str>',<EOL>'<STR_LIT>': '<STR_LIT:str>',<EOL>'<STR_LIT>': '<STR_LIT:str>',<EOL>'<STR_LIT>': '<STR_LIT>',<EOL>'<STR_LIT>': '<STR_LIT:str>',<EOL>})<EOL>return client_raw_response<EOL><DEDENT>

Updates the properties of the specified task.

        :param job_id: The ID of the job containing the task.
        :type job_id: str
        :param task_id: The ID of the task to update.
        :type task_id: str
        :param constraints: Constraints that apply to this task. If omitted,
         the task is given the default constraints. For multi-instance tasks,
         updating the retention time applies only to the primary task and not
         subtasks.
        :type constraints: ~azure.batch.models.TaskConstraints
        :param task_update_options: Additional parameters for the operation
        :type task_update_options: ~azure.batch.models.TaskUpdateOptions
        :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:`BatchErrorException<azure.batch.models.BatchErrorException>`


def list_subtasks(<EOL>self, job_id, task_id, task_list_subtasks_options=None, custom_headers=None, raw=False, **operation_config):

select = None<EOL>if task_list_subtasks_options is not None:<EOL><INDENT>select = task_list_subtasks_options.select<EOL><DEDENT>timeout = None<EOL>if task_list_subtasks_options is not None:<EOL><INDENT>timeout = task_list_subtasks_options.timeout<EOL><DEDENT>client_request_id = None<EOL>if task_list_subtasks_options is not None:<EOL><INDENT>client_request_id = task_list_subtasks_options.client_request_id<EOL><DEDENT>return_client_request_id = None<EOL>if task_list_subtasks_options is not None:<EOL><INDENT>return_client_request_id = task_list_subtasks_options.return_client_request_id<EOL><DEDENT>ocp_date = None<EOL>if task_list_subtasks_options is not None:<EOL><INDENT>ocp_date = task_list_subtasks_options.ocp_date<EOL><DEDENT>url = self.list_subtasks.metadata['<STR_LIT:url>']<EOL>path_format_arguments = {<EOL>'<STR_LIT>': self._serialize.url("<STR_LIT>", self.config.batch_url, '<STR_LIT:str>', skip_quote=True),<EOL>'<STR_LIT>': self._serialize.url("<STR_LIT>", job_id, '<STR_LIT:str>'),<EOL>'<STR_LIT>': self._serialize.url("<STR_LIT>", task_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>if select is not None:<EOL><INDENT>query_parameters['<STR_LIT>'] = self._serialize.query("<STR_LIT>", select, '<STR_LIT:str>')<EOL><DEDENT>if timeout is not None:<EOL><INDENT>query_parameters['<STR_LIT>'] = self._serialize.query("<STR_LIT>", timeout, '<STR_LIT:int>')<EOL><DEDENT>header_parameters = {}<EOL>header_parameters['<STR_LIT>'] = '<STR_LIT:application/json>'<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>if return_client_request_id is not None:<EOL><INDENT>header_parameters['<STR_LIT>'] = self._serialize.header("<STR_LIT>", return_client_request_id, '<STR_LIT:bool>')<EOL><DEDENT>if ocp_date is not None:<EOL><INDENT>header_parameters['<STR_LIT>'] = self._serialize.header("<STR_LIT>", ocp_date, '<STR_LIT>')<EOL><DEDENT>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.BatchErrorException(self._deserialize, response)<EOL><DEDENT>deserialized = None<EOL>header_dict = {}<EOL>if response.status_code == <NUM_LIT:200>:<EOL><INDENT>deserialized = self._deserialize('<STR_LIT>', response)<EOL>header_dict = {<EOL>'<STR_LIT>': '<STR_LIT:str>',<EOL>'<STR_LIT>': '<STR_LIT:str>',<EOL>'<STR_LIT>': '<STR_LIT:str>',<EOL>'<STR_LIT>': '<STR_LIT>',<EOL>}<EOL><DEDENT>if raw:<EOL><INDENT>client_raw_response = ClientRawResponse(deserialized, response)<EOL>client_raw_response.add_headers(header_dict)<EOL>return client_raw_response<EOL><DEDENT>return deserialized<EOL>

Lists all of the subtasks that are associated with the specified
        multi-instance task.

        If the task is not a multi-instance task then this returns an empty
        collection.

        :param job_id: The ID of the job.
        :type job_id: str
        :param task_id: The ID of the task.
        :type task_id: str
        :param task_list_subtasks_options: Additional parameters for the
         operation
        :type task_list_subtasks_options:
         ~azure.batch.models.TaskListSubtasksOptions
        :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: CloudTaskListSubtasksResult or ClientRawResponse if raw=true
        :rtype: ~azure.batch.models.CloudTaskListSubtasksResult or
         ~msrest.pipeline.ClientRawResponse
        :raises:
         :class:`BatchErrorException<azure.batch.models.BatchErrorException>`


def terminate(<EOL>self, job_id, task_id, task_terminate_options=None, custom_headers=None, raw=False, **operation_config):

timeout = None<EOL>if task_terminate_options is not None:<EOL><INDENT>timeout = task_terminate_options.timeout<EOL><DEDENT>client_request_id = None<EOL>if task_terminate_options is not None:<EOL><INDENT>client_request_id = task_terminate_options.client_request_id<EOL><DEDENT>return_client_request_id = None<EOL>if task_terminate_options is not None:<EOL><INDENT>return_client_request_id = task_terminate_options.return_client_request_id<EOL><DEDENT>ocp_date = None<EOL>if task_terminate_options is not None:<EOL><INDENT>ocp_date = task_terminate_options.ocp_date<EOL><DEDENT>if_match = None<EOL>if task_terminate_options is not None:<EOL><INDENT>if_match = task_terminate_options.if_match<EOL><DEDENT>if_none_match = None<EOL>if task_terminate_options is not None:<EOL><INDENT>if_none_match = task_terminate_options.if_none_match<EOL><DEDENT>if_modified_since = None<EOL>if task_terminate_options is not None:<EOL><INDENT>if_modified_since = task_terminate_options.if_modified_since<EOL><DEDENT>if_unmodified_since = None<EOL>if task_terminate_options is not None:<EOL><INDENT>if_unmodified_since = task_terminate_options.if_unmodified_since<EOL><DEDENT>url = self.terminate.metadata['<STR_LIT:url>']<EOL>path_format_arguments = {<EOL>'<STR_LIT>': self._serialize.url("<STR_LIT>", self.config.batch_url, '<STR_LIT:str>', skip_quote=True),<EOL>'<STR_LIT>': self._serialize.url("<STR_LIT>", job_id, '<STR_LIT:str>'),<EOL>'<STR_LIT>': self._serialize.url("<STR_LIT>", task_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>if timeout is not None:<EOL><INDENT>query_parameters['<STR_LIT>'] = self._serialize.query("<STR_LIT>", timeout, '<STR_LIT:int>')<EOL><DEDENT>header_parameters = {}<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>if return_client_request_id is not None:<EOL><INDENT>header_parameters['<STR_LIT>'] = self._serialize.header("<STR_LIT>", return_client_request_id, '<STR_LIT:bool>')<EOL><DEDENT>if ocp_date is not None:<EOL><INDENT>header_parameters['<STR_LIT>'] = self._serialize.header("<STR_LIT>", ocp_date, '<STR_LIT>')<EOL><DEDENT>if if_match is not None:<EOL><INDENT>header_parameters['<STR_LIT>'] = self._serialize.header("<STR_LIT>", if_match, '<STR_LIT:str>')<EOL><DEDENT>if if_none_match is not None:<EOL><INDENT>header_parameters['<STR_LIT>'] = self._serialize.header("<STR_LIT>", if_none_match, '<STR_LIT:str>')<EOL><DEDENT>if if_modified_since is not None:<EOL><INDENT>header_parameters['<STR_LIT>'] = self._serialize.header("<STR_LIT>", if_modified_since, '<STR_LIT>')<EOL><DEDENT>if if_unmodified_since is not None:<EOL><INDENT>header_parameters['<STR_LIT>'] = self._serialize.header("<STR_LIT>", if_unmodified_since, '<STR_LIT>')<EOL><DEDENT>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>]:<EOL><INDENT>raise models.BatchErrorException(self._deserialize, response)<EOL><DEDENT>if raw:<EOL><INDENT>client_raw_response = ClientRawResponse(None, response)<EOL>client_raw_response.add_headers({<EOL>'<STR_LIT>': '<STR_LIT:str>',<EOL>'<STR_LIT>': '<STR_LIT:str>',<EOL>'<STR_LIT>': '<STR_LIT:str>',<EOL>'<STR_LIT>': '<STR_LIT>',<EOL>'<STR_LIT>': '<STR_LIT:str>',<EOL>})<EOL>return client_raw_response<EOL><DEDENT>

Terminates the specified task.

        When the task has been terminated, it moves to the completed state. For
        multi-instance tasks, the terminate task operation applies
        synchronously to the primary task; subtasks are then terminated
        asynchronously in the background.

        :param job_id: The ID of the job containing the task.
        :type job_id: str
        :param task_id: The ID of the task to terminate.
        :type task_id: str
        :param task_terminate_options: Additional parameters for the operation
        :type task_terminate_options: ~azure.batch.models.TaskTerminateOptions
        :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:`BatchErrorException<azure.batch.models.BatchErrorException>`


def reactivate(<EOL>self, job_id, task_id, task_reactivate_options=None, custom_headers=None, raw=False, **operation_config):

timeout = None<EOL>if task_reactivate_options is not None:<EOL><INDENT>timeout = task_reactivate_options.timeout<EOL><DEDENT>client_request_id = None<EOL>if task_reactivate_options is not None:<EOL><INDENT>client_request_id = task_reactivate_options.client_request_id<EOL><DEDENT>return_client_request_id = None<EOL>if task_reactivate_options is not None:<EOL><INDENT>return_client_request_id = task_reactivate_options.return_client_request_id<EOL><DEDENT>ocp_date = None<EOL>if task_reactivate_options is not None:<EOL><INDENT>ocp_date = task_reactivate_options.ocp_date<EOL><DEDENT>if_match = None<EOL>if task_reactivate_options is not None:<EOL><INDENT>if_match = task_reactivate_options.if_match<EOL><DEDENT>if_none_match = None<EOL>if task_reactivate_options is not None:<EOL><INDENT>if_none_match = task_reactivate_options.if_none_match<EOL><DEDENT>if_modified_since = None<EOL>if task_reactivate_options is not None:<EOL><INDENT>if_modified_since = task_reactivate_options.if_modified_since<EOL><DEDENT>if_unmodified_since = None<EOL>if task_reactivate_options is not None:<EOL><INDENT>if_unmodified_since = task_reactivate_options.if_unmodified_since<EOL><DEDENT>url = self.reactivate.metadata['<STR_LIT:url>']<EOL>path_format_arguments = {<EOL>'<STR_LIT>': self._serialize.url("<STR_LIT>", self.config.batch_url, '<STR_LIT:str>', skip_quote=True),<EOL>'<STR_LIT>': self._serialize.url("<STR_LIT>", job_id, '<STR_LIT:str>'),<EOL>'<STR_LIT>': self._serialize.url("<STR_LIT>", task_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>if timeout is not None:<EOL><INDENT>query_parameters['<STR_LIT>'] = self._serialize.query("<STR_LIT>", timeout, '<STR_LIT:int>')<EOL><DEDENT>header_parameters = {}<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>if return_client_request_id is not None:<EOL><INDENT>header_parameters['<STR_LIT>'] = self._serialize.header("<STR_LIT>", return_client_request_id, '<STR_LIT:bool>')<EOL><DEDENT>if ocp_date is not None:<EOL><INDENT>header_parameters['<STR_LIT>'] = self._serialize.header("<STR_LIT>", ocp_date, '<STR_LIT>')<EOL><DEDENT>if if_match is not None:<EOL><INDENT>header_parameters['<STR_LIT>'] = self._serialize.header("<STR_LIT>", if_match, '<STR_LIT:str>')<EOL><DEDENT>if if_none_match is not None:<EOL><INDENT>header_parameters['<STR_LIT>'] = self._serialize.header("<STR_LIT>", if_none_match, '<STR_LIT:str>')<EOL><DEDENT>if if_modified_since is not None:<EOL><INDENT>header_parameters['<STR_LIT>'] = self._serialize.header("<STR_LIT>", if_modified_since, '<STR_LIT>')<EOL><DEDENT>if if_unmodified_since is not None:<EOL><INDENT>header_parameters['<STR_LIT>'] = self._serialize.header("<STR_LIT>", if_unmodified_since, '<STR_LIT>')<EOL><DEDENT>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>]:<EOL><INDENT>raise models.BatchErrorException(self._deserialize, response)<EOL><DEDENT>if raw:<EOL><INDENT>client_raw_response = ClientRawResponse(None, response)<EOL>client_raw_response.add_headers({<EOL>'<STR_LIT>': '<STR_LIT:str>',<EOL>'<STR_LIT>': '<STR_LIT:str>',<EOL>'<STR_LIT>': '<STR_LIT:str>',<EOL>'<STR_LIT>': '<STR_LIT>',<EOL>'<STR_LIT>': '<STR_LIT:str>',<EOL>})<EOL>return client_raw_response<EOL><DEDENT>

Reactivates a task, allowing it to run again even if its retry count
        has been exhausted.

        Reactivation makes a task eligible to be retried again up to its
        maximum retry count. The task's state is changed to active. As the task
        is no longer in the completed state, any previous exit code or failure
        information is no longer available after reactivation. Each time a task
        is reactivated, its retry count is reset to 0. Reactivation will fail
        for tasks that are not completed or that previously completed
        successfully (with an exit code of 0). Additionally, it will fail if
        the job has completed (or is terminating or deleting).

        :param job_id: The ID of the job containing the task.
        :type job_id: str
        :param task_id: The ID of the task to reactivate.
        :type task_id: str
        :param task_reactivate_options: Additional parameters for the
         operation
        :type task_reactivate_options:
         ~azure.batch.models.TaskReactivateOptions
        :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:`BatchErrorException<azure.batch.models.BatchErrorException>`


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

api_version = "<STR_LIT>"<EOL>url = self.check_dns_name_availability.metadata['<STR_LIT:url>']<EOL>path_format_arguments = {<EOL>'<STR_LIT:location>': self._serialize.url("<STR_LIT:location>", location, '<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>", domain_name_label, '<STR_LIT:str>')<EOL>query_parameters['<STR_LIT>'] = self._serialize.query("<STR_LIT>", api_version, '<STR_LIT:str>')<EOL>header_parameters = {}<EOL>header_parameters['<STR_LIT>'] = '<STR_LIT:application/json>'<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, header_parameters)<EOL>response = self._client.send(request, 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 a domain name in the cloudapp.azure.com zone is
        available for use.

        :param location: The location of the domain name.
        :type location: str
        :param domain_name_label: The domain name to be verified. It must
         conform to the following regular expression:
         ^[a-z][a-z0-9-]{1,61}[a-z0-9]$.
        :type domain_name_label: 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: DnsNameAvailabilityResult or ClientRawResponse if raw=true
        :rtype:
         ~azure.mgmt.network.v2017_11_01.models.DnsNameAvailabilityResult or
         ~msrest.pipeline.ClientRawResponse
        :raises: :class:`CloudError<msrestazure.azure_exceptions.CloudError>`


def list(<EOL>self, resource_group_name, load_balancer_name, 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>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>", load_balancer_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>'] = '<STR_LIT:application/json>'<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, header_parameters)<EOL>response = self._client.send(request, 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.BackendAddressPoolPaged(internal_paging, self._deserialize.dependencies)<EOL>if raw:<EOL><INDENT>header_dict = {}<EOL>client_raw_response = models.BackendAddressPoolPaged(internal_paging, self._deserialize.dependencies, header_dict)<EOL>return client_raw_response<EOL><DEDENT>return deserialized<EOL>

Gets all the load balancer backed address pools.

        :param resource_group_name: The name of the resource group.
        :type resource_group_name: str
        :param load_balancer_name: The name of the load balancer.
        :type load_balancer_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: An iterator like instance of BackendAddressPool
        :rtype:
         ~azure.mgmt.network.v2017_11_01.models.BackendAddressPoolPaged[~azure.mgmt.network.v2017_11_01.models.BackendAddressPool]
        :raises: :class:`CloudError<msrestazure.azure_exceptions.CloudError>`