# coding: utf-8

"""
    Taurus Data Jobs

    The Taurus Data Jobs internal and Control Plane API. Data Jobs allows Data Engineers to implement automated pull ingestion (E in ELT) and batch data transformation into Data Warehouse (T in ELT). See also https://github.com/vmware/versatile-data-kit/wiki/Introduction  The API has resource-oriented URLs, JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs. The API enables creating, deploying, managing and executing Data Jobs in runtime environment.<br> <br> The API reflects the usual Data Job Development lifecycle:<br> <li> Create a new data job (webhook to further configure job -e.g authorize its createion, setup permissions, etc). <li> Download keytab. Develop and run the data job locally. <li> Deploy data job in cloud runtime enviornment to run on scheduled basis. <br><br> If Authentication is required pass OAuth2 access token in http header 'Authorization: Bearer [access-token-here]'  The API promotes some best practices (inspired by https://12factor.net ): <li> Explicitly declare and isolate dependencies <li> Strict separation of config from code. Config varies substantially across deploys, code does not. <li> Separation between the build, release/deploy, and run stages <li> Data Jobs are stateless and share-nothing processes. Any data that needs to persist must be stored in a stateful backing service (e.g IProperties). <li> Implementation is assumed to be be atomic and idempotent - should be OK for a job to fail somewhere in the middle; subsequent restart should not cause data corruption. <li> Keep development, staging, and production as similar as possible <br><br> <b>API Evolution</b><br> In the following sections, there are some terms that have a special meaning in the context of the APIs. <br><br> <li> <i>Stable</i> - The implementation of API has been battle-tested (has been in production for some time - probably at least a month)                      API is subject to the semantic versioning model and will follow                      deprecation policy <li> <i>Experimental</i> - May disappear without notice and is not subject to semantic versioning                            Implementation of the API is not considered stable nor well tested.                            Generally this is given to clients to experiment within testing environment. Must not be used in Production. <li> <i>Deprecated</i> - API is expected to be removed within next one or two major version upgrade.                          The deprecation notice/comment will say when the API will be removed and what alternatives should be used instead.   # noqa: E501

    The version of the OpenAPI document: 1.0
    Generated by: https://openapi-generator.tech
"""


from __future__ import absolute_import

import re  # noqa: F401

# python 2 and python 3 compatibility library
import six

from taurus_datajob_api.api_client import ApiClient
from taurus_datajob_api.exceptions import (  # noqa: F401
    ApiTypeError,
    ApiValueError
)


class DataJobsDeploymentApi(object):
    """NOTE: This class is auto generated by OpenAPI Generator
    Ref: https://openapi-generator.tech

    Do not edit the class manually.
    """

    def __init__(self, api_client=None):
        if api_client is None:
            api_client = ApiClient()
        self.api_client = api_client

    def deployment_delete(self, team_name, job_name, deployment_id, **kwargs):  # noqa: E501
        """Delete Deployment of a Data Job. Currently executing Data Job will be left to finish.  | (Stable)   # noqa: E501

        <i>(Introduced in v1.0)</i>  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.deployment_delete(team_name, job_name, deployment_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param str team_name: Team Name (required)
        :param str job_name: Data job Name. (required)
        :param str deployment_id: Data job deployment id. (required)
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :return: None
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        return self.deployment_delete_with_http_info(team_name, job_name, deployment_id, **kwargs)  # noqa: E501

    def deployment_delete_with_http_info(self, team_name, job_name, deployment_id, **kwargs):  # noqa: E501
        """Delete Deployment of a Data Job. Currently executing Data Job will be left to finish.  | (Stable)   # noqa: E501

        <i>(Introduced in v1.0)</i>  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.deployment_delete_with_http_info(team_name, job_name, deployment_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param str team_name: Team Name (required)
        :param str job_name: Data job Name. (required)
        :param str deployment_id: Data job deployment id. (required)
        :param _return_http_data_only: response data without head status code
                                       and headers
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :return: None
                 If the method is called asynchronously,
                 returns the request thread.
        """

        local_var_params = locals()

        all_params = [
            'team_name',
            'job_name',
            'deployment_id'
        ]
        all_params.extend(
            [
                'async_req',
                '_return_http_data_only',
                '_preload_content',
                '_request_timeout'
            ]
        )

        for key, val in six.iteritems(local_var_params['kwargs']):
            if key not in all_params:
                raise ApiTypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method deployment_delete" % key
                )
            local_var_params[key] = val
        del local_var_params['kwargs']
        # verify the required parameter 'team_name' is set
        if self.api_client.client_side_validation and ('team_name' not in local_var_params or  # noqa: E501
                                                        local_var_params['team_name'] is None):  # noqa: E501
            raise ApiValueError("Missing the required parameter `team_name` when calling `deployment_delete`")  # noqa: E501
        # verify the required parameter 'job_name' is set
        if self.api_client.client_side_validation and ('job_name' not in local_var_params or  # noqa: E501
                                                        local_var_params['job_name'] is None):  # noqa: E501
            raise ApiValueError("Missing the required parameter `job_name` when calling `deployment_delete`")  # noqa: E501
        # verify the required parameter 'deployment_id' is set
        if self.api_client.client_side_validation and ('deployment_id' not in local_var_params or  # noqa: E501
                                                        local_var_params['deployment_id'] is None):  # noqa: E501
            raise ApiValueError("Missing the required parameter `deployment_id` when calling `deployment_delete`")  # noqa: E501

        collection_formats = {}

        path_params = {}
        if 'team_name' in local_var_params:
            path_params['team_name'] = local_var_params['team_name']  # noqa: E501
        if 'job_name' in local_var_params:
            path_params['job_name'] = local_var_params['job_name']  # noqa: E501
        if 'deployment_id' in local_var_params:
            path_params['deployment_id'] = local_var_params['deployment_id']  # noqa: E501

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json'])  # noqa: E501

        # Authentication setting
        auth_settings = ['bearerAuth']  # noqa: E501

        return self.api_client.call_api(
            '/data-jobs/for-team/{team_name}/jobs/{job_name}/deployments/{deployment_id}', 'DELETE',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type=None,  # noqa: E501
            auth_settings=auth_settings,
            async_req=local_var_params.get('async_req'),
            _return_http_data_only=local_var_params.get('_return_http_data_only'),  # noqa: E501
            _preload_content=local_var_params.get('_preload_content', True),
            _request_timeout=local_var_params.get('_request_timeout'),
            collection_formats=collection_formats)

    def deployment_delete_deprecated(self, team_name, job_name, deployment_id, **kwargs):  # noqa: E501
        """Delete Deployment of a Data Job. Currently executing Data Job will be left to finish.  | (Stable)   # noqa: E501

        <i>(Introduced in v1.0)</i>  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.deployment_delete_deprecated(team_name, job_name, deployment_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param str team_name: Team Name (required)
        :param str job_name: Data job Name. (required)
        :param str deployment_id: Data job deployment id. (required)
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :return: None
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        return self.deployment_delete_deprecated_with_http_info(team_name, job_name, deployment_id, **kwargs)  # noqa: E501

    def deployment_delete_deprecated_with_http_info(self, team_name, job_name, deployment_id, **kwargs):  # noqa: E501
        """Delete Deployment of a Data Job. Currently executing Data Job will be left to finish.  | (Stable)   # noqa: E501

        <i>(Introduced in v1.0)</i>  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.deployment_delete_deprecated_with_http_info(team_name, job_name, deployment_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param str team_name: Team Name (required)
        :param str job_name: Data job Name. (required)
        :param str deployment_id: Data job deployment id. (required)
        :param _return_http_data_only: response data without head status code
                                       and headers
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :return: None
                 If the method is called asynchronously,
                 returns the request thread.
        """

        local_var_params = locals()

        all_params = [
            'team_name',
            'job_name',
            'deployment_id'
        ]
        all_params.extend(
            [
                'async_req',
                '_return_http_data_only',
                '_preload_content',
                '_request_timeout'
            ]
        )

        for key, val in six.iteritems(local_var_params['kwargs']):
            if key not in all_params:
                raise ApiTypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method deployment_delete_deprecated" % key
                )
            local_var_params[key] = val
        del local_var_params['kwargs']
        # verify the required parameter 'team_name' is set
        if self.api_client.client_side_validation and ('team_name' not in local_var_params or  # noqa: E501
                                                        local_var_params['team_name'] is None):  # noqa: E501
            raise ApiValueError("Missing the required parameter `team_name` when calling `deployment_delete_deprecated`")  # noqa: E501
        # verify the required parameter 'job_name' is set
        if self.api_client.client_side_validation and ('job_name' not in local_var_params or  # noqa: E501
                                                        local_var_params['job_name'] is None):  # noqa: E501
            raise ApiValueError("Missing the required parameter `job_name` when calling `deployment_delete_deprecated`")  # noqa: E501
        # verify the required parameter 'deployment_id' is set
        if self.api_client.client_side_validation and ('deployment_id' not in local_var_params or  # noqa: E501
                                                        local_var_params['deployment_id'] is None):  # noqa: E501
            raise ApiValueError("Missing the required parameter `deployment_id` when calling `deployment_delete_deprecated`")  # noqa: E501

        collection_formats = {}

        path_params = {}
        if 'team_name' in local_var_params:
            path_params['team_name'] = local_var_params['team_name']  # noqa: E501
        if 'job_name' in local_var_params:
            path_params['job_name'] = local_var_params['job_name']  # noqa: E501
        if 'deployment_id' in local_var_params:
            path_params['deployment_id'] = local_var_params['deployment_id']  # noqa: E501

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json'])  # noqa: E501

        # Authentication setting
        auth_settings = ['bearerAuth']  # noqa: E501

        return self.api_client.call_api(
            '/data-jobs/for-team/{team_name}/name/{job_name}/deployments/{deployment_id}', 'DELETE',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type=None,  # noqa: E501
            auth_settings=auth_settings,
            async_req=local_var_params.get('async_req'),
            _return_http_data_only=local_var_params.get('_return_http_data_only'),  # noqa: E501
            _preload_content=local_var_params.get('_preload_content', True),
            _request_timeout=local_var_params.get('_request_timeout'),
            collection_formats=collection_formats)

    def deployment_enable(self, team_name, job_name, deployment_id, enable, **kwargs):  # noqa: E501
        """Enable/disable the deployment of a Data Job. When disabled Data Job will not be executed. | (Stable)  # noqa: E501

        <i>(Introduced in v1.0)</i>  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.deployment_enable(team_name, job_name, deployment_id, enable, async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param str team_name: Team Name (required)
        :param str job_name: Data job Name. (required)
        :param str deployment_id: Data job deployment id. (required)
        :param Enable enable: (required)
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :return: None
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        return self.deployment_enable_with_http_info(team_name, job_name, deployment_id, enable, **kwargs)  # noqa: E501

    def deployment_enable_with_http_info(self, team_name, job_name, deployment_id, enable, **kwargs):  # noqa: E501
        """Enable/disable the deployment of a Data Job. When disabled Data Job will not be executed. | (Stable)  # noqa: E501

        <i>(Introduced in v1.0)</i>  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.deployment_enable_with_http_info(team_name, job_name, deployment_id, enable, async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param str team_name: Team Name (required)
        :param str job_name: Data job Name. (required)
        :param str deployment_id: Data job deployment id. (required)
        :param Enable enable: (required)
        :param _return_http_data_only: response data without head status code
                                       and headers
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :return: None
                 If the method is called asynchronously,
                 returns the request thread.
        """

        local_var_params = locals()

        all_params = [
            'team_name',
            'job_name',
            'deployment_id',
            'enable'
        ]
        all_params.extend(
            [
                'async_req',
                '_return_http_data_only',
                '_preload_content',
                '_request_timeout'
            ]
        )

        for key, val in six.iteritems(local_var_params['kwargs']):
            if key not in all_params:
                raise ApiTypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method deployment_enable" % key
                )
            local_var_params[key] = val
        del local_var_params['kwargs']
        # verify the required parameter 'team_name' is set
        if self.api_client.client_side_validation and ('team_name' not in local_var_params or  # noqa: E501
                                                        local_var_params['team_name'] is None):  # noqa: E501
            raise ApiValueError("Missing the required parameter `team_name` when calling `deployment_enable`")  # noqa: E501
        # verify the required parameter 'job_name' is set
        if self.api_client.client_side_validation and ('job_name' not in local_var_params or  # noqa: E501
                                                        local_var_params['job_name'] is None):  # noqa: E501
            raise ApiValueError("Missing the required parameter `job_name` when calling `deployment_enable`")  # noqa: E501
        # verify the required parameter 'deployment_id' is set
        if self.api_client.client_side_validation and ('deployment_id' not in local_var_params or  # noqa: E501
                                                        local_var_params['deployment_id'] is None):  # noqa: E501
            raise ApiValueError("Missing the required parameter `deployment_id` when calling `deployment_enable`")  # noqa: E501
        # verify the required parameter 'enable' is set
        if self.api_client.client_side_validation and ('enable' not in local_var_params or  # noqa: E501
                                                        local_var_params['enable'] is None):  # noqa: E501
            raise ApiValueError("Missing the required parameter `enable` when calling `deployment_enable`")  # noqa: E501

        collection_formats = {}

        path_params = {}
        if 'team_name' in local_var_params:
            path_params['team_name'] = local_var_params['team_name']  # noqa: E501
        if 'job_name' in local_var_params:
            path_params['job_name'] = local_var_params['job_name']  # noqa: E501
        if 'deployment_id' in local_var_params:
            path_params['deployment_id'] = local_var_params['deployment_id']  # noqa: E501

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        if 'enable' in local_var_params:
            body_params = local_var_params['enable']
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json'])  # noqa: E501

        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client.select_header_content_type(  # noqa: E501
            ['application/json'])  # noqa: E501

        # Authentication setting
        auth_settings = ['bearerAuth']  # noqa: E501

        return self.api_client.call_api(
            '/data-jobs/for-team/{team_name}/jobs/{job_name}/deployments/{deployment_id}', 'PATCH',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type=None,  # noqa: E501
            auth_settings=auth_settings,
            async_req=local_var_params.get('async_req'),
            _return_http_data_only=local_var_params.get('_return_http_data_only'),  # noqa: E501
            _preload_content=local_var_params.get('_preload_content', True),
            _request_timeout=local_var_params.get('_request_timeout'),
            collection_formats=collection_formats)

    def deployment_enable_deprecated(self, team_name, job_name, deployment_id, enable, **kwargs):  # noqa: E501
        """Enable/disable the deployment of a Data Job. When disabled Data Job will not be executed. | (Stable)  # noqa: E501

        <i>(Introduced in v1.0)</i>  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.deployment_enable_deprecated(team_name, job_name, deployment_id, enable, async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param str team_name: Team Name (required)
        :param str job_name: Data job Name. (required)
        :param str deployment_id: Data job deployment id. (required)
        :param Enable enable: (required)
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :return: None
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        return self.deployment_enable_deprecated_with_http_info(team_name, job_name, deployment_id, enable, **kwargs)  # noqa: E501

    def deployment_enable_deprecated_with_http_info(self, team_name, job_name, deployment_id, enable, **kwargs):  # noqa: E501
        """Enable/disable the deployment of a Data Job. When disabled Data Job will not be executed. | (Stable)  # noqa: E501

        <i>(Introduced in v1.0)</i>  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.deployment_enable_deprecated_with_http_info(team_name, job_name, deployment_id, enable, async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param str team_name: Team Name (required)
        :param str job_name: Data job Name. (required)
        :param str deployment_id: Data job deployment id. (required)
        :param Enable enable: (required)
        :param _return_http_data_only: response data without head status code
                                       and headers
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :return: None
                 If the method is called asynchronously,
                 returns the request thread.
        """

        local_var_params = locals()

        all_params = [
            'team_name',
            'job_name',
            'deployment_id',
            'enable'
        ]
        all_params.extend(
            [
                'async_req',
                '_return_http_data_only',
                '_preload_content',
                '_request_timeout'
            ]
        )

        for key, val in six.iteritems(local_var_params['kwargs']):
            if key not in all_params:
                raise ApiTypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method deployment_enable_deprecated" % key
                )
            local_var_params[key] = val
        del local_var_params['kwargs']
        # verify the required parameter 'team_name' is set
        if self.api_client.client_side_validation and ('team_name' not in local_var_params or  # noqa: E501
                                                        local_var_params['team_name'] is None):  # noqa: E501
            raise ApiValueError("Missing the required parameter `team_name` when calling `deployment_enable_deprecated`")  # noqa: E501
        # verify the required parameter 'job_name' is set
        if self.api_client.client_side_validation and ('job_name' not in local_var_params or  # noqa: E501
                                                        local_var_params['job_name'] is None):  # noqa: E501
            raise ApiValueError("Missing the required parameter `job_name` when calling `deployment_enable_deprecated`")  # noqa: E501
        # verify the required parameter 'deployment_id' is set
        if self.api_client.client_side_validation and ('deployment_id' not in local_var_params or  # noqa: E501
                                                        local_var_params['deployment_id'] is None):  # noqa: E501
            raise ApiValueError("Missing the required parameter `deployment_id` when calling `deployment_enable_deprecated`")  # noqa: E501
        # verify the required parameter 'enable' is set
        if self.api_client.client_side_validation and ('enable' not in local_var_params or  # noqa: E501
                                                        local_var_params['enable'] is None):  # noqa: E501
            raise ApiValueError("Missing the required parameter `enable` when calling `deployment_enable_deprecated`")  # noqa: E501

        collection_formats = {}

        path_params = {}
        if 'team_name' in local_var_params:
            path_params['team_name'] = local_var_params['team_name']  # noqa: E501
        if 'job_name' in local_var_params:
            path_params['job_name'] = local_var_params['job_name']  # noqa: E501
        if 'deployment_id' in local_var_params:
            path_params['deployment_id'] = local_var_params['deployment_id']  # noqa: E501

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        if 'enable' in local_var_params:
            body_params = local_var_params['enable']
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json'])  # noqa: E501

        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client.select_header_content_type(  # noqa: E501
            ['application/json'])  # noqa: E501

        # Authentication setting
        auth_settings = ['bearerAuth']  # noqa: E501

        return self.api_client.call_api(
            '/data-jobs/for-team/{team_name}/name/{job_name}/deployments/{deployment_id}', 'PATCH',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type=None,  # noqa: E501
            auth_settings=auth_settings,
            async_req=local_var_params.get('async_req'),
            _return_http_data_only=local_var_params.get('_return_http_data_only'),  # noqa: E501
            _preload_content=local_var_params.get('_preload_content', True),
            _request_timeout=local_var_params.get('_request_timeout'),
            collection_formats=collection_formats)

    def deployment_list(self, team_name, job_name, **kwargs):  # noqa: E501
        """Get Data Job deployments. | (Stable)  # noqa: E501

        <i>(Introduced in v1.0)</i>  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.deployment_list(team_name, job_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param str team_name: Team Name (required)
        :param str job_name: DataJob Name. (required)
        :param str deployment_id: Get the Deployment with this id (e.g production, staging, dev)
        :param DataJobMode mode: Get Deployments only for this mode.
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :return: list[DataJobDeploymentStatus]
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        return self.deployment_list_with_http_info(team_name, job_name, **kwargs)  # noqa: E501

    def deployment_list_with_http_info(self, team_name, job_name, **kwargs):  # noqa: E501
        """Get Data Job deployments. | (Stable)  # noqa: E501

        <i>(Introduced in v1.0)</i>  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.deployment_list_with_http_info(team_name, job_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param str team_name: Team Name (required)
        :param str job_name: DataJob Name. (required)
        :param str deployment_id: Get the Deployment with this id (e.g production, staging, dev)
        :param DataJobMode mode: Get Deployments only for this mode.
        :param _return_http_data_only: response data without head status code
                                       and headers
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :return: tuple(list[DataJobDeploymentStatus], status_code(int), headers(HTTPHeaderDict))
                 If the method is called asynchronously,
                 returns the request thread.
        """

        local_var_params = locals()

        all_params = [
            'team_name',
            'job_name',
            'deployment_id',
            'mode'
        ]
        all_params.extend(
            [
                'async_req',
                '_return_http_data_only',
                '_preload_content',
                '_request_timeout'
            ]
        )

        for key, val in six.iteritems(local_var_params['kwargs']):
            if key not in all_params:
                raise ApiTypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method deployment_list" % key
                )
            local_var_params[key] = val
        del local_var_params['kwargs']
        # verify the required parameter 'team_name' is set
        if self.api_client.client_side_validation and ('team_name' not in local_var_params or  # noqa: E501
                                                        local_var_params['team_name'] is None):  # noqa: E501
            raise ApiValueError("Missing the required parameter `team_name` when calling `deployment_list`")  # noqa: E501
        # verify the required parameter 'job_name' is set
        if self.api_client.client_side_validation and ('job_name' not in local_var_params or  # noqa: E501
                                                        local_var_params['job_name'] is None):  # noqa: E501
            raise ApiValueError("Missing the required parameter `job_name` when calling `deployment_list`")  # noqa: E501

        collection_formats = {}

        path_params = {}
        if 'team_name' in local_var_params:
            path_params['team_name'] = local_var_params['team_name']  # noqa: E501
        if 'job_name' in local_var_params:
            path_params['job_name'] = local_var_params['job_name']  # noqa: E501

        query_params = []
        if 'deployment_id' in local_var_params and local_var_params['deployment_id'] is not None:  # noqa: E501
            query_params.append(('deployment_id', local_var_params['deployment_id']))  # noqa: E501
        if 'mode' in local_var_params and local_var_params['mode'] is not None:  # noqa: E501
            query_params.append(('mode', local_var_params['mode']))  # noqa: E501

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json'])  # noqa: E501

        # Authentication setting
        auth_settings = ['bearerAuth']  # noqa: E501

        return self.api_client.call_api(
            '/data-jobs/for-team/{team_name}/jobs/{job_name}/deployments', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='list[DataJobDeploymentStatus]',  # noqa: E501
            auth_settings=auth_settings,
            async_req=local_var_params.get('async_req'),
            _return_http_data_only=local_var_params.get('_return_http_data_only'),  # noqa: E501
            _preload_content=local_var_params.get('_preload_content', True),
            _request_timeout=local_var_params.get('_request_timeout'),
            collection_formats=collection_formats)

    def deployment_list_deprecated(self, team_name, job_name, **kwargs):  # noqa: E501
        """Get Data Job deployments. | (Stable)  # noqa: E501

        <i>(Introduced in v1.0)</i>  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.deployment_list_deprecated(team_name, job_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param str team_name: Team Name (required)
        :param str job_name: DataJob Name. (required)
        :param str deployment_id: Get the Deployment with this id (e.g production, staging, dev)
        :param DataJobMode mode: Get Deployments only for this mode.
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :return: list[DataJobDeploymentStatus]
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        return self.deployment_list_deprecated_with_http_info(team_name, job_name, **kwargs)  # noqa: E501

    def deployment_list_deprecated_with_http_info(self, team_name, job_name, **kwargs):  # noqa: E501
        """Get Data Job deployments. | (Stable)  # noqa: E501

        <i>(Introduced in v1.0)</i>  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.deployment_list_deprecated_with_http_info(team_name, job_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param str team_name: Team Name (required)
        :param str job_name: DataJob Name. (required)
        :param str deployment_id: Get the Deployment with this id (e.g production, staging, dev)
        :param DataJobMode mode: Get Deployments only for this mode.
        :param _return_http_data_only: response data without head status code
                                       and headers
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :return: tuple(list[DataJobDeploymentStatus], status_code(int), headers(HTTPHeaderDict))
                 If the method is called asynchronously,
                 returns the request thread.
        """

        local_var_params = locals()

        all_params = [
            'team_name',
            'job_name',
            'deployment_id',
            'mode'
        ]
        all_params.extend(
            [
                'async_req',
                '_return_http_data_only',
                '_preload_content',
                '_request_timeout'
            ]
        )

        for key, val in six.iteritems(local_var_params['kwargs']):
            if key not in all_params:
                raise ApiTypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method deployment_list_deprecated" % key
                )
            local_var_params[key] = val
        del local_var_params['kwargs']
        # verify the required parameter 'team_name' is set
        if self.api_client.client_side_validation and ('team_name' not in local_var_params or  # noqa: E501
                                                        local_var_params['team_name'] is None):  # noqa: E501
            raise ApiValueError("Missing the required parameter `team_name` when calling `deployment_list_deprecated`")  # noqa: E501
        # verify the required parameter 'job_name' is set
        if self.api_client.client_side_validation and ('job_name' not in local_var_params or  # noqa: E501
                                                        local_var_params['job_name'] is None):  # noqa: E501
            raise ApiValueError("Missing the required parameter `job_name` when calling `deployment_list_deprecated`")  # noqa: E501

        collection_formats = {}

        path_params = {}
        if 'team_name' in local_var_params:
            path_params['team_name'] = local_var_params['team_name']  # noqa: E501
        if 'job_name' in local_var_params:
            path_params['job_name'] = local_var_params['job_name']  # noqa: E501

        query_params = []
        if 'deployment_id' in local_var_params and local_var_params['deployment_id'] is not None:  # noqa: E501
            query_params.append(('deployment_id', local_var_params['deployment_id']))  # noqa: E501
        if 'mode' in local_var_params and local_var_params['mode'] is not None:  # noqa: E501
            query_params.append(('mode', local_var_params['mode']))  # noqa: E501

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json'])  # noqa: E501

        # Authentication setting
        auth_settings = ['bearerAuth']  # noqa: E501

        return self.api_client.call_api(
            '/data-jobs/for-team/{team_name}/name/{job_name}/deployments', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='list[DataJobDeploymentStatus]',  # noqa: E501
            auth_settings=auth_settings,
            async_req=local_var_params.get('async_req'),
            _return_http_data_only=local_var_params.get('_return_http_data_only'),  # noqa: E501
            _preload_content=local_var_params.get('_preload_content', True),
            _request_timeout=local_var_params.get('_request_timeout'),
            collection_formats=collection_formats)

    def deployment_read(self, team_name, job_name, deployment_id, **kwargs):  # noqa: E501
        """Get Data Job deployments. | (Stable)  # noqa: E501

        <i>(Introduced in v1.0)</i>  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.deployment_read(team_name, job_name, deployment_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param str team_name: Team Name (required)
        :param str job_name: Data job Name. (required)
        :param str deployment_id: Data job deployment id. (required)
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :return: DataJobDeploymentStatus
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        return self.deployment_read_with_http_info(team_name, job_name, deployment_id, **kwargs)  # noqa: E501

    def deployment_read_with_http_info(self, team_name, job_name, deployment_id, **kwargs):  # noqa: E501
        """Get Data Job deployments. | (Stable)  # noqa: E501

        <i>(Introduced in v1.0)</i>  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.deployment_read_with_http_info(team_name, job_name, deployment_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param str team_name: Team Name (required)
        :param str job_name: Data job Name. (required)
        :param str deployment_id: Data job deployment id. (required)
        :param _return_http_data_only: response data without head status code
                                       and headers
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :return: tuple(DataJobDeploymentStatus, status_code(int), headers(HTTPHeaderDict))
                 If the method is called asynchronously,
                 returns the request thread.
        """

        local_var_params = locals()

        all_params = [
            'team_name',
            'job_name',
            'deployment_id'
        ]
        all_params.extend(
            [
                'async_req',
                '_return_http_data_only',
                '_preload_content',
                '_request_timeout'
            ]
        )

        for key, val in six.iteritems(local_var_params['kwargs']):
            if key not in all_params:
                raise ApiTypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method deployment_read" % key
                )
            local_var_params[key] = val
        del local_var_params['kwargs']
        # verify the required parameter 'team_name' is set
        if self.api_client.client_side_validation and ('team_name' not in local_var_params or  # noqa: E501
                                                        local_var_params['team_name'] is None):  # noqa: E501
            raise ApiValueError("Missing the required parameter `team_name` when calling `deployment_read`")  # noqa: E501
        # verify the required parameter 'job_name' is set
        if self.api_client.client_side_validation and ('job_name' not in local_var_params or  # noqa: E501
                                                        local_var_params['job_name'] is None):  # noqa: E501
            raise ApiValueError("Missing the required parameter `job_name` when calling `deployment_read`")  # noqa: E501
        # verify the required parameter 'deployment_id' is set
        if self.api_client.client_side_validation and ('deployment_id' not in local_var_params or  # noqa: E501
                                                        local_var_params['deployment_id'] is None):  # noqa: E501
            raise ApiValueError("Missing the required parameter `deployment_id` when calling `deployment_read`")  # noqa: E501

        collection_formats = {}

        path_params = {}
        if 'team_name' in local_var_params:
            path_params['team_name'] = local_var_params['team_name']  # noqa: E501
        if 'job_name' in local_var_params:
            path_params['job_name'] = local_var_params['job_name']  # noqa: E501
        if 'deployment_id' in local_var_params:
            path_params['deployment_id'] = local_var_params['deployment_id']  # noqa: E501

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json'])  # noqa: E501

        # Authentication setting
        auth_settings = ['bearerAuth']  # noqa: E501

        return self.api_client.call_api(
            '/data-jobs/for-team/{team_name}/jobs/{job_name}/deployments/{deployment_id}', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='DataJobDeploymentStatus',  # noqa: E501
            auth_settings=auth_settings,
            async_req=local_var_params.get('async_req'),
            _return_http_data_only=local_var_params.get('_return_http_data_only'),  # noqa: E501
            _preload_content=local_var_params.get('_preload_content', True),
            _request_timeout=local_var_params.get('_request_timeout'),
            collection_formats=collection_formats)

    def deployment_read_deprecated(self, team_name, job_name, deployment_id, **kwargs):  # noqa: E501
        """Get Data Job deployments. | (Stable)  # noqa: E501

        <i>(Introduced in v1.0)</i>  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.deployment_read_deprecated(team_name, job_name, deployment_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param str team_name: Team Name (required)
        :param str job_name: Data job Name. (required)
        :param str deployment_id: Data job deployment id. (required)
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :return: DataJobDeploymentStatus
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        return self.deployment_read_deprecated_with_http_info(team_name, job_name, deployment_id, **kwargs)  # noqa: E501

    def deployment_read_deprecated_with_http_info(self, team_name, job_name, deployment_id, **kwargs):  # noqa: E501
        """Get Data Job deployments. | (Stable)  # noqa: E501

        <i>(Introduced in v1.0)</i>  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.deployment_read_deprecated_with_http_info(team_name, job_name, deployment_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param str team_name: Team Name (required)
        :param str job_name: Data job Name. (required)
        :param str deployment_id: Data job deployment id. (required)
        :param _return_http_data_only: response data without head status code
                                       and headers
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :return: tuple(DataJobDeploymentStatus, status_code(int), headers(HTTPHeaderDict))
                 If the method is called asynchronously,
                 returns the request thread.
        """

        local_var_params = locals()

        all_params = [
            'team_name',
            'job_name',
            'deployment_id'
        ]
        all_params.extend(
            [
                'async_req',
                '_return_http_data_only',
                '_preload_content',
                '_request_timeout'
            ]
        )

        for key, val in six.iteritems(local_var_params['kwargs']):
            if key not in all_params:
                raise ApiTypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method deployment_read_deprecated" % key
                )
            local_var_params[key] = val
        del local_var_params['kwargs']
        # verify the required parameter 'team_name' is set
        if self.api_client.client_side_validation and ('team_name' not in local_var_params or  # noqa: E501
                                                        local_var_params['team_name'] is None):  # noqa: E501
            raise ApiValueError("Missing the required parameter `team_name` when calling `deployment_read_deprecated`")  # noqa: E501
        # verify the required parameter 'job_name' is set
        if self.api_client.client_side_validation and ('job_name' not in local_var_params or  # noqa: E501
                                                        local_var_params['job_name'] is None):  # noqa: E501
            raise ApiValueError("Missing the required parameter `job_name` when calling `deployment_read_deprecated`")  # noqa: E501
        # verify the required parameter 'deployment_id' is set
        if self.api_client.client_side_validation and ('deployment_id' not in local_var_params or  # noqa: E501
                                                        local_var_params['deployment_id'] is None):  # noqa: E501
            raise ApiValueError("Missing the required parameter `deployment_id` when calling `deployment_read_deprecated`")  # noqa: E501

        collection_formats = {}

        path_params = {}
        if 'team_name' in local_var_params:
            path_params['team_name'] = local_var_params['team_name']  # noqa: E501
        if 'job_name' in local_var_params:
            path_params['job_name'] = local_var_params['job_name']  # noqa: E501
        if 'deployment_id' in local_var_params:
            path_params['deployment_id'] = local_var_params['deployment_id']  # noqa: E501

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json'])  # noqa: E501

        # Authentication setting
        auth_settings = ['bearerAuth']  # noqa: E501

        return self.api_client.call_api(
            '/data-jobs/for-team/{team_name}/name/{job_name}/deployments/{deployment_id}', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='DataJobDeploymentStatus',  # noqa: E501
            auth_settings=auth_settings,
            async_req=local_var_params.get('async_req'),
            _return_http_data_only=local_var_params.get('_return_http_data_only'),  # noqa: E501
            _preload_content=local_var_params.get('_preload_content', True),
            _request_timeout=local_var_params.get('_request_timeout'),
            collection_formats=collection_formats)

    def deployment_update(self, team_name, job_name, **kwargs):  # noqa: E501
        """Creates or updates a deployment of a Data Job. | (Stable)  # noqa: E501

        <i>(Introduced in v1.0)</i> | Creates or updates a deployment of a Data Job. The API returns before the actual Job is deployed. Depending on settings specified during Data Job creation clients will get an mail in case of success or failure of the deployment.   # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.deployment_update(team_name, job_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param str team_name: Team Name (required)
        :param str job_name: DataJob Name. (required)
        :param bool send_notification: Allows administrators to disable sending notification during maintance window for platfrom errors - e.g if all jobs are being re-deployed due to migration or after recovering from an outage. Monitoring data will still be popoulated so deployment status can be monitored by admins. 
        :param DataJobDeployment data_job_deployment:
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :return: None
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        return self.deployment_update_with_http_info(team_name, job_name, **kwargs)  # noqa: E501

    def deployment_update_with_http_info(self, team_name, job_name, **kwargs):  # noqa: E501
        """Creates or updates a deployment of a Data Job. | (Stable)  # noqa: E501

        <i>(Introduced in v1.0)</i> | Creates or updates a deployment of a Data Job. The API returns before the actual Job is deployed. Depending on settings specified during Data Job creation clients will get an mail in case of success or failure of the deployment.   # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.deployment_update_with_http_info(team_name, job_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param str team_name: Team Name (required)
        :param str job_name: DataJob Name. (required)
        :param bool send_notification: Allows administrators to disable sending notification during maintance window for platfrom errors - e.g if all jobs are being re-deployed due to migration or after recovering from an outage. Monitoring data will still be popoulated so deployment status can be monitored by admins. 
        :param DataJobDeployment data_job_deployment:
        :param _return_http_data_only: response data without head status code
                                       and headers
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :return: None
                 If the method is called asynchronously,
                 returns the request thread.
        """

        local_var_params = locals()

        all_params = [
            'team_name',
            'job_name',
            'send_notification',
            'data_job_deployment'
        ]
        all_params.extend(
            [
                'async_req',
                '_return_http_data_only',
                '_preload_content',
                '_request_timeout'
            ]
        )

        for key, val in six.iteritems(local_var_params['kwargs']):
            if key not in all_params:
                raise ApiTypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method deployment_update" % key
                )
            local_var_params[key] = val
        del local_var_params['kwargs']
        # verify the required parameter 'team_name' is set
        if self.api_client.client_side_validation and ('team_name' not in local_var_params or  # noqa: E501
                                                        local_var_params['team_name'] is None):  # noqa: E501
            raise ApiValueError("Missing the required parameter `team_name` when calling `deployment_update`")  # noqa: E501
        # verify the required parameter 'job_name' is set
        if self.api_client.client_side_validation and ('job_name' not in local_var_params or  # noqa: E501
                                                        local_var_params['job_name'] is None):  # noqa: E501
            raise ApiValueError("Missing the required parameter `job_name` when calling `deployment_update`")  # noqa: E501

        collection_formats = {}

        path_params = {}
        if 'team_name' in local_var_params:
            path_params['team_name'] = local_var_params['team_name']  # noqa: E501
        if 'job_name' in local_var_params:
            path_params['job_name'] = local_var_params['job_name']  # noqa: E501

        query_params = []
        if 'send_notification' in local_var_params and local_var_params['send_notification'] is not None:  # noqa: E501
            query_params.append(('send_notification', local_var_params['send_notification']))  # noqa: E501

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        if 'data_job_deployment' in local_var_params:
            body_params = local_var_params['data_job_deployment']
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json'])  # noqa: E501

        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client.select_header_content_type(  # noqa: E501
            ['application/json'])  # noqa: E501

        # Authentication setting
        auth_settings = ['bearerAuth']  # noqa: E501

        return self.api_client.call_api(
            '/data-jobs/for-team/{team_name}/jobs/{job_name}/deployments', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type=None,  # noqa: E501
            auth_settings=auth_settings,
            async_req=local_var_params.get('async_req'),
            _return_http_data_only=local_var_params.get('_return_http_data_only'),  # noqa: E501
            _preload_content=local_var_params.get('_preload_content', True),
            _request_timeout=local_var_params.get('_request_timeout'),
            collection_formats=collection_formats)

    def deployment_update_deprecated(self, team_name, job_name, **kwargs):  # noqa: E501
        """Creates or updates a deployment of a Data Job. | (Stable)  # noqa: E501

        <i>(Introduced in v1.0)</i> | Creates or updates a deployment of a Data Job. The API returns before the actual Job is deployed. Depending on settings specified during Data Job creation clients will get an mail in case of success or failure of the deployment.   # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.deployment_update_deprecated(team_name, job_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param str team_name: Team Name (required)
        :param str job_name: DataJob Name. (required)
        :param bool send_notification: Allows administrators to disable sending notification during maintance window for platfrom errors - e.g if all jobs are being re-deployed due to migration or after recovering from an outage. Monitoring data will still be popoulated so deployment status can be monitored by admins. 
        :param DataJobDeployment data_job_deployment:
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :return: None
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        return self.deployment_update_deprecated_with_http_info(team_name, job_name, **kwargs)  # noqa: E501

    def deployment_update_deprecated_with_http_info(self, team_name, job_name, **kwargs):  # noqa: E501
        """Creates or updates a deployment of a Data Job. | (Stable)  # noqa: E501

        <i>(Introduced in v1.0)</i> | Creates or updates a deployment of a Data Job. The API returns before the actual Job is deployed. Depending on settings specified during Data Job creation clients will get an mail in case of success or failure of the deployment.   # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.deployment_update_deprecated_with_http_info(team_name, job_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param str team_name: Team Name (required)
        :param str job_name: DataJob Name. (required)
        :param bool send_notification: Allows administrators to disable sending notification during maintance window for platfrom errors - e.g if all jobs are being re-deployed due to migration or after recovering from an outage. Monitoring data will still be popoulated so deployment status can be monitored by admins. 
        :param DataJobDeployment data_job_deployment:
        :param _return_http_data_only: response data without head status code
                                       and headers
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :return: None
                 If the method is called asynchronously,
                 returns the request thread.
        """

        local_var_params = locals()

        all_params = [
            'team_name',
            'job_name',
            'send_notification',
            'data_job_deployment'
        ]
        all_params.extend(
            [
                'async_req',
                '_return_http_data_only',
                '_preload_content',
                '_request_timeout'
            ]
        )

        for key, val in six.iteritems(local_var_params['kwargs']):
            if key not in all_params:
                raise ApiTypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method deployment_update_deprecated" % key
                )
            local_var_params[key] = val
        del local_var_params['kwargs']
        # verify the required parameter 'team_name' is set
        if self.api_client.client_side_validation and ('team_name' not in local_var_params or  # noqa: E501
                                                        local_var_params['team_name'] is None):  # noqa: E501
            raise ApiValueError("Missing the required parameter `team_name` when calling `deployment_update_deprecated`")  # noqa: E501
        # verify the required parameter 'job_name' is set
        if self.api_client.client_side_validation and ('job_name' not in local_var_params or  # noqa: E501
                                                        local_var_params['job_name'] is None):  # noqa: E501
            raise ApiValueError("Missing the required parameter `job_name` when calling `deployment_update_deprecated`")  # noqa: E501

        collection_formats = {}

        path_params = {}
        if 'team_name' in local_var_params:
            path_params['team_name'] = local_var_params['team_name']  # noqa: E501
        if 'job_name' in local_var_params:
            path_params['job_name'] = local_var_params['job_name']  # noqa: E501

        query_params = []
        if 'send_notification' in local_var_params and local_var_params['send_notification'] is not None:  # noqa: E501
            query_params.append(('send_notification', local_var_params['send_notification']))  # noqa: E501

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        if 'data_job_deployment' in local_var_params:
            body_params = local_var_params['data_job_deployment']
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json'])  # noqa: E501

        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client.select_header_content_type(  # noqa: E501
            ['application/json'])  # noqa: E501

        # Authentication setting
        auth_settings = ['bearerAuth']  # noqa: E501

        return self.api_client.call_api(
            '/data-jobs/for-team/{team_name}/name/{job_name}/deployments', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type=None,  # noqa: E501
            auth_settings=auth_settings,
            async_req=local_var_params.get('async_req'),
            _return_http_data_only=local_var_params.get('_return_http_data_only'),  # noqa: E501
            _preload_content=local_var_params.get('_preload_content', True),
            _request_timeout=local_var_params.get('_request_timeout'),
            collection_formats=collection_formats)
