# coding: utf-8

"""
    Jamf Pro API

    ## Overview This is a sample Jamf Pro server which allows for usage without any authentication. The Jamf Pro environment which supports the Try it Out functionality does not run the current beta version of Jamf Pro, thus any newly added endpoints will result in an error and should be used soley for documentation purposes.   # noqa: E501

    The version of the OpenAPI document: 10.25.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 jamf.api_client import ApiClient
from jamf.exceptions import (  # noqa: F401
    ApiTypeError,
    ApiValueError
)


class ScriptsApi(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 v1_scripts_get(self, **kwargs):  # noqa: E501
        """Search for sorted and paged Scripts   # noqa: E501

        Search for sorted and paged scripts  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True

        >>> thread = api.v1_scripts_get(async_req=True)
        >>> result = thread.get()

        :param page:
        :type page: int
        :param page_size:
        :type page_size: int
        :param sort: Sorting criteria in the format: property:asc/desc. Default sort is name:asc. Multiple sort criteria are supported and must be separated with a comma. Fields allowed in the query: `id`, `name`, `info`, `notes`, `priority`, `categoryId`, `categoryName`, `parameter4` up to `parameter11`, `osRequirements`, `scriptContents`. Example: sort=date:desc,name:asc 
        :type sort: list[str]
        :param filter: Query in the RSQL format, allowing to filter scripts collection. Default search is empty query - returning all results for the requested page. Fields allowed in the query: `id`, `name`, `info`, `notes`, `priority`, `categoryId`, `categoryName`, `parameter4` up to `parameter11`, `osRequirements`, `scriptContents`. This param can be combined with paging and sorting. Example: filter=categoryName==\"Category\" and name==\"*script name*\"
        :type filter: str
        :param async_req: Whether to execute the request asynchronously.
        :type async_req: bool, optional
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :type _preload_content: bool, optional
        :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: Returns the result object.
                 If the method is called asynchronously,
                 returns the request thread.
        :rtype: ScriptsSearchResults
        """
        kwargs['_return_http_data_only'] = True
        return self.v1_scripts_get_with_http_info(**kwargs)  # noqa: E501

    def v1_scripts_get_with_http_info(self, **kwargs):  # noqa: E501
        """Search for sorted and paged Scripts   # noqa: E501

        Search for sorted and paged scripts  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True

        >>> thread = api.v1_scripts_get_with_http_info(async_req=True)
        >>> result = thread.get()

        :param page:
        :type page: int
        :param page_size:
        :type page_size: int
        :param sort: Sorting criteria in the format: property:asc/desc. Default sort is name:asc. Multiple sort criteria are supported and must be separated with a comma. Fields allowed in the query: `id`, `name`, `info`, `notes`, `priority`, `categoryId`, `categoryName`, `parameter4` up to `parameter11`, `osRequirements`, `scriptContents`. Example: sort=date:desc,name:asc 
        :type sort: list[str]
        :param filter: Query in the RSQL format, allowing to filter scripts collection. Default search is empty query - returning all results for the requested page. Fields allowed in the query: `id`, `name`, `info`, `notes`, `priority`, `categoryId`, `categoryName`, `parameter4` up to `parameter11`, `osRequirements`, `scriptContents`. This param can be combined with paging and sorting. Example: filter=categoryName==\"Category\" and name==\"*script name*\"
        :type filter: str
        :param async_req: Whether to execute the request asynchronously.
        :type async_req: bool, optional
        :param _return_http_data_only: response data without head status code
                                       and headers
        :type _return_http_data_only: bool, optional
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :type _preload_content: bool, optional
        :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.
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the authentication
                              in the spec for a single request.
        :type _request_auth: dict, optional
        :return: Returns the result object.
                 If the method is called asynchronously,
                 returns the request thread.
        :rtype: tuple(ScriptsSearchResults, status_code(int), headers(HTTPHeaderDict))
        """

        local_var_params = locals()

        all_params = [
            'page',
            'page_size',
            'sort',
            'filter'
        ]
        all_params.extend(
            [
                'async_req',
                '_return_http_data_only',
                '_preload_content',
                '_request_timeout',
                '_request_auth'
            ]
        )

        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 v1_scripts_get" % key
                )
            local_var_params[key] = val
        del local_var_params['kwargs']

        collection_formats = {}

        path_params = {}

        query_params = []
        if 'page' in local_var_params and local_var_params['page'] is not None:  # noqa: E501
            query_params.append(('page', local_var_params['page']))  # noqa: E501
        if 'page_size' in local_var_params and local_var_params['page_size'] is not None:  # noqa: E501
            query_params.append(('page-size', local_var_params['page_size']))  # noqa: E501
        if 'sort' in local_var_params and local_var_params['sort'] is not None:  # noqa: E501
            query_params.append(('sort', local_var_params['sort']))  # noqa: E501
            collection_formats['sort'] = 'multi'  # noqa: E501
        if 'filter' in local_var_params and local_var_params['filter'] is not None:  # noqa: E501
            query_params.append(('filter', local_var_params['filter']))  # 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 = []  # noqa: E501
        
        response_types_map = {
            200: "ScriptsSearchResults",
        }

        return self.api_client.call_api(
            '/v1/scripts', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_types_map=response_types_map,
            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,
            _request_auth=local_var_params.get('_request_auth'))

    def v1_scripts_id_delete(self, id, **kwargs):  # noqa: E501
        """Delete a Script at the specified id   # noqa: E501

        Deletes a script at the specified id  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True

        >>> thread = api.v1_scripts_id_delete(id, async_req=True)
        >>> result = thread.get()

        :param id: Script object identifier (required)
        :type id: str
        :param async_req: Whether to execute the request asynchronously.
        :type async_req: bool, optional
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :type _preload_content: bool, optional
        :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: Returns the result object.
                 If the method is called asynchronously,
                 returns the request thread.
        :rtype: None
        """
        kwargs['_return_http_data_only'] = True
        return self.v1_scripts_id_delete_with_http_info(id, **kwargs)  # noqa: E501

    def v1_scripts_id_delete_with_http_info(self, id, **kwargs):  # noqa: E501
        """Delete a Script at the specified id   # noqa: E501

        Deletes a script at the specified id  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True

        >>> thread = api.v1_scripts_id_delete_with_http_info(id, async_req=True)
        >>> result = thread.get()

        :param id: Script object identifier (required)
        :type id: str
        :param async_req: Whether to execute the request asynchronously.
        :type async_req: bool, optional
        :param _return_http_data_only: response data without head status code
                                       and headers
        :type _return_http_data_only: bool, optional
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :type _preload_content: bool, optional
        :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.
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the authentication
                              in the spec for a single request.
        :type _request_auth: dict, optional
        :return: Returns the result object.
                 If the method is called asynchronously,
                 returns the request thread.
        :rtype: None
        """

        local_var_params = locals()

        all_params = [
            'id'
        ]
        all_params.extend(
            [
                'async_req',
                '_return_http_data_only',
                '_preload_content',
                '_request_timeout',
                '_request_auth'
            ]
        )

        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 v1_scripts_id_delete" % key
                )
            local_var_params[key] = val
        del local_var_params['kwargs']
        # verify the required parameter 'id' is set
        if self.api_client.client_side_validation and ('id' not in local_var_params or  # noqa: E501
                                                        local_var_params['id'] is None):  # noqa: E501
            raise ApiValueError("Missing the required parameter `id` when calling `v1_scripts_id_delete`")  # noqa: E501

        collection_formats = {}

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

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        # Authentication setting
        auth_settings = []  # noqa: E501
        
        response_types_map = {}

        return self.api_client.call_api(
            '/v1/scripts/{id}', 'DELETE',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_types_map=response_types_map,
            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,
            _request_auth=local_var_params.get('_request_auth'))

    def v1_scripts_id_download_get(self, id, **kwargs):  # noqa: E501
        """Download a text file of the Script contents   # noqa: E501

        Download a text file of the script contents  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True

        >>> thread = api.v1_scripts_id_download_get(id, async_req=True)
        >>> result = thread.get()

        :param id: id of the script to be downloaded (required)
        :type id: str
        :param async_req: Whether to execute the request asynchronously.
        :type async_req: bool, optional
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :type _preload_content: bool, optional
        :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: Returns the result object.
                 If the method is called asynchronously,
                 returns the request thread.
        :rtype: file
        """
        kwargs['_return_http_data_only'] = True
        return self.v1_scripts_id_download_get_with_http_info(id, **kwargs)  # noqa: E501

    def v1_scripts_id_download_get_with_http_info(self, id, **kwargs):  # noqa: E501
        """Download a text file of the Script contents   # noqa: E501

        Download a text file of the script contents  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True

        >>> thread = api.v1_scripts_id_download_get_with_http_info(id, async_req=True)
        >>> result = thread.get()

        :param id: id of the script to be downloaded (required)
        :type id: str
        :param async_req: Whether to execute the request asynchronously.
        :type async_req: bool, optional
        :param _return_http_data_only: response data without head status code
                                       and headers
        :type _return_http_data_only: bool, optional
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :type _preload_content: bool, optional
        :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.
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the authentication
                              in the spec for a single request.
        :type _request_auth: dict, optional
        :return: Returns the result object.
                 If the method is called asynchronously,
                 returns the request thread.
        :rtype: tuple(file, status_code(int), headers(HTTPHeaderDict))
        """

        local_var_params = locals()

        all_params = [
            'id'
        ]
        all_params.extend(
            [
                'async_req',
                '_return_http_data_only',
                '_preload_content',
                '_request_timeout',
                '_request_auth'
            ]
        )

        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 v1_scripts_id_download_get" % key
                )
            local_var_params[key] = val
        del local_var_params['kwargs']
        # verify the required parameter 'id' is set
        if self.api_client.client_side_validation and ('id' not in local_var_params or  # noqa: E501
                                                        local_var_params['id'] is None):  # noqa: E501
            raise ApiValueError("Missing the required parameter `id` when calling `v1_scripts_id_download_get`")  # noqa: E501

        collection_formats = {}

        path_params = {}
        if 'id' in local_var_params:
            path_params['id'] = local_var_params['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(
            ['text/plain', 'application/json'])  # noqa: E501

        # Authentication setting
        auth_settings = []  # noqa: E501
        
        response_types_map = {
            200: "file",
            404: "ApiError",
        }

        return self.api_client.call_api(
            '/v1/scripts/{id}/download', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_types_map=response_types_map,
            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,
            _request_auth=local_var_params.get('_request_auth'))

    def v1_scripts_id_get(self, id, **kwargs):  # noqa: E501
        """Retrieve a full script object   # noqa: E501

        Retrieves a full script object  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True

        >>> thread = api.v1_scripts_id_get(id, async_req=True)
        >>> result = thread.get()

        :param id: Script object identifier (required)
        :type id: str
        :param async_req: Whether to execute the request asynchronously.
        :type async_req: bool, optional
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :type _preload_content: bool, optional
        :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: Returns the result object.
                 If the method is called asynchronously,
                 returns the request thread.
        :rtype: Script
        """
        kwargs['_return_http_data_only'] = True
        return self.v1_scripts_id_get_with_http_info(id, **kwargs)  # noqa: E501

    def v1_scripts_id_get_with_http_info(self, id, **kwargs):  # noqa: E501
        """Retrieve a full script object   # noqa: E501

        Retrieves a full script object  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True

        >>> thread = api.v1_scripts_id_get_with_http_info(id, async_req=True)
        >>> result = thread.get()

        :param id: Script object identifier (required)
        :type id: str
        :param async_req: Whether to execute the request asynchronously.
        :type async_req: bool, optional
        :param _return_http_data_only: response data without head status code
                                       and headers
        :type _return_http_data_only: bool, optional
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :type _preload_content: bool, optional
        :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.
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the authentication
                              in the spec for a single request.
        :type _request_auth: dict, optional
        :return: Returns the result object.
                 If the method is called asynchronously,
                 returns the request thread.
        :rtype: tuple(Script, status_code(int), headers(HTTPHeaderDict))
        """

        local_var_params = locals()

        all_params = [
            'id'
        ]
        all_params.extend(
            [
                'async_req',
                '_return_http_data_only',
                '_preload_content',
                '_request_timeout',
                '_request_auth'
            ]
        )

        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 v1_scripts_id_get" % key
                )
            local_var_params[key] = val
        del local_var_params['kwargs']
        # verify the required parameter 'id' is set
        if self.api_client.client_side_validation and ('id' not in local_var_params or  # noqa: E501
                                                        local_var_params['id'] is None):  # noqa: E501
            raise ApiValueError("Missing the required parameter `id` when calling `v1_scripts_id_get`")  # noqa: E501

        collection_formats = {}

        path_params = {}
        if 'id' in local_var_params:
            path_params['id'] = local_var_params['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 = []  # noqa: E501
        
        response_types_map = {
            200: "Script",
            404: "ApiError",
        }

        return self.api_client.call_api(
            '/v1/scripts/{id}', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_types_map=response_types_map,
            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,
            _request_auth=local_var_params.get('_request_auth'))

    def v1_scripts_id_history_get(self, id, **kwargs):  # noqa: E501
        """Get specified Script history object   # noqa: E501

        Gets specified Script history object   # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True

        >>> thread = api.v1_scripts_id_history_get(id, async_req=True)
        >>> result = thread.get()

        :param id: id of script history record (required)
        :type id: str
        :param page:
        :type page: int
        :param page_size:
        :type page_size: int
        :param sort: Sorting criteria in the format: property:asc/desc. Default sort is date:desc. Multiple sort criteria are supported and must be separated with a comma. Example: sort=date:desc,name:asc 
        :type sort: list[str]
        :param filter: Query in the RSQL format, allowing to filter history notes collection. Default filter is empty query - returning all results for the requested page. Fields allowed in the query: username, date, note, details. This param can be combined with paging and sorting. Example: filter=username!=admin and details==*disabled* and date<2019-12-15
        :type filter: str
        :param async_req: Whether to execute the request asynchronously.
        :type async_req: bool, optional
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :type _preload_content: bool, optional
        :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: Returns the result object.
                 If the method is called asynchronously,
                 returns the request thread.
        :rtype: HistorySearchResults
        """
        kwargs['_return_http_data_only'] = True
        return self.v1_scripts_id_history_get_with_http_info(id, **kwargs)  # noqa: E501

    def v1_scripts_id_history_get_with_http_info(self, id, **kwargs):  # noqa: E501
        """Get specified Script history object   # noqa: E501

        Gets specified Script history object   # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True

        >>> thread = api.v1_scripts_id_history_get_with_http_info(id, async_req=True)
        >>> result = thread.get()

        :param id: id of script history record (required)
        :type id: str
        :param page:
        :type page: int
        :param page_size:
        :type page_size: int
        :param sort: Sorting criteria in the format: property:asc/desc. Default sort is date:desc. Multiple sort criteria are supported and must be separated with a comma. Example: sort=date:desc,name:asc 
        :type sort: list[str]
        :param filter: Query in the RSQL format, allowing to filter history notes collection. Default filter is empty query - returning all results for the requested page. Fields allowed in the query: username, date, note, details. This param can be combined with paging and sorting. Example: filter=username!=admin and details==*disabled* and date<2019-12-15
        :type filter: str
        :param async_req: Whether to execute the request asynchronously.
        :type async_req: bool, optional
        :param _return_http_data_only: response data without head status code
                                       and headers
        :type _return_http_data_only: bool, optional
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :type _preload_content: bool, optional
        :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.
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the authentication
                              in the spec for a single request.
        :type _request_auth: dict, optional
        :return: Returns the result object.
                 If the method is called asynchronously,
                 returns the request thread.
        :rtype: tuple(HistorySearchResults, status_code(int), headers(HTTPHeaderDict))
        """

        local_var_params = locals()

        all_params = [
            'id',
            'page',
            'page_size',
            'sort',
            'filter'
        ]
        all_params.extend(
            [
                'async_req',
                '_return_http_data_only',
                '_preload_content',
                '_request_timeout',
                '_request_auth'
            ]
        )

        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 v1_scripts_id_history_get" % key
                )
            local_var_params[key] = val
        del local_var_params['kwargs']
        # verify the required parameter 'id' is set
        if self.api_client.client_side_validation and ('id' not in local_var_params or  # noqa: E501
                                                        local_var_params['id'] is None):  # noqa: E501
            raise ApiValueError("Missing the required parameter `id` when calling `v1_scripts_id_history_get`")  # noqa: E501

        collection_formats = {}

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

        query_params = []
        if 'page' in local_var_params and local_var_params['page'] is not None:  # noqa: E501
            query_params.append(('page', local_var_params['page']))  # noqa: E501
        if 'page_size' in local_var_params and local_var_params['page_size'] is not None:  # noqa: E501
            query_params.append(('page-size', local_var_params['page_size']))  # noqa: E501
        if 'sort' in local_var_params and local_var_params['sort'] is not None:  # noqa: E501
            query_params.append(('sort', local_var_params['sort']))  # noqa: E501
            collection_formats['sort'] = 'multi'  # noqa: E501
        if 'filter' in local_var_params and local_var_params['filter'] is not None:  # noqa: E501
            query_params.append(('filter', local_var_params['filter']))  # 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 = []  # noqa: E501
        
        response_types_map = {
            200: "HistorySearchResults",
            404: "ApiError",
        }

        return self.api_client.call_api(
            '/v1/scripts/{id}/history', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_types_map=response_types_map,
            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,
            _request_auth=local_var_params.get('_request_auth'))

    def v1_scripts_id_history_post(self, id, object_history_note, **kwargs):  # noqa: E501
        """Add specified Script history object notes   # noqa: E501

        Adds specified Script history object notes   # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True

        >>> thread = api.v1_scripts_id_history_post(id, object_history_note, async_req=True)
        >>> result = thread.get()

        :param id: instance id of script history record (required)
        :type id: str
        :param object_history_note: history notes to create (required)
        :type object_history_note: ObjectHistoryNote
        :param async_req: Whether to execute the request asynchronously.
        :type async_req: bool, optional
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :type _preload_content: bool, optional
        :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: Returns the result object.
                 If the method is called asynchronously,
                 returns the request thread.
        :rtype: ObjectHistory
        """
        kwargs['_return_http_data_only'] = True
        return self.v1_scripts_id_history_post_with_http_info(id, object_history_note, **kwargs)  # noqa: E501

    def v1_scripts_id_history_post_with_http_info(self, id, object_history_note, **kwargs):  # noqa: E501
        """Add specified Script history object notes   # noqa: E501

        Adds specified Script history object notes   # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True

        >>> thread = api.v1_scripts_id_history_post_with_http_info(id, object_history_note, async_req=True)
        >>> result = thread.get()

        :param id: instance id of script history record (required)
        :type id: str
        :param object_history_note: history notes to create (required)
        :type object_history_note: ObjectHistoryNote
        :param async_req: Whether to execute the request asynchronously.
        :type async_req: bool, optional
        :param _return_http_data_only: response data without head status code
                                       and headers
        :type _return_http_data_only: bool, optional
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :type _preload_content: bool, optional
        :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.
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the authentication
                              in the spec for a single request.
        :type _request_auth: dict, optional
        :return: Returns the result object.
                 If the method is called asynchronously,
                 returns the request thread.
        :rtype: tuple(ObjectHistory, status_code(int), headers(HTTPHeaderDict))
        """

        local_var_params = locals()

        all_params = [
            'id',
            'object_history_note'
        ]
        all_params.extend(
            [
                'async_req',
                '_return_http_data_only',
                '_preload_content',
                '_request_timeout',
                '_request_auth'
            ]
        )

        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 v1_scripts_id_history_post" % key
                )
            local_var_params[key] = val
        del local_var_params['kwargs']
        # verify the required parameter 'id' is set
        if self.api_client.client_side_validation and ('id' not in local_var_params or  # noqa: E501
                                                        local_var_params['id'] is None):  # noqa: E501
            raise ApiValueError("Missing the required parameter `id` when calling `v1_scripts_id_history_post`")  # noqa: E501
        # verify the required parameter 'object_history_note' is set
        if self.api_client.client_side_validation and ('object_history_note' not in local_var_params or  # noqa: E501
                                                        local_var_params['object_history_note'] is None):  # noqa: E501
            raise ApiValueError("Missing the required parameter `object_history_note` when calling `v1_scripts_id_history_post`")  # noqa: E501

        collection_formats = {}

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

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        if 'object_history_note' in local_var_params:
            body_params = local_var_params['object_history_note']
        # 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 = []  # noqa: E501
        
        response_types_map = {
            201: "ObjectHistory",
            404: "ApiError",
            503: "ApiError",
        }

        return self.api_client.call_api(
            '/v1/scripts/{id}/history', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_types_map=response_types_map,
            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,
            _request_auth=local_var_params.get('_request_auth'))

    def v1_scripts_id_put(self, id, script, **kwargs):  # noqa: E501
        """Replace the script at the id with the supplied information   # noqa: E501

        Replaces the script at the id with the supplied information  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True

        >>> thread = api.v1_scripts_id_put(id, script, async_req=True)
        >>> result = thread.get()

        :param id: Script object identifier (required)
        :type id: str
        :param script: new script to upload to existing id. ids defined in this body will be ignored (required)
        :type script: Script
        :param async_req: Whether to execute the request asynchronously.
        :type async_req: bool, optional
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :type _preload_content: bool, optional
        :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: Returns the result object.
                 If the method is called asynchronously,
                 returns the request thread.
        :rtype: Script
        """
        kwargs['_return_http_data_only'] = True
        return self.v1_scripts_id_put_with_http_info(id, script, **kwargs)  # noqa: E501

    def v1_scripts_id_put_with_http_info(self, id, script, **kwargs):  # noqa: E501
        """Replace the script at the id with the supplied information   # noqa: E501

        Replaces the script at the id with the supplied information  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True

        >>> thread = api.v1_scripts_id_put_with_http_info(id, script, async_req=True)
        >>> result = thread.get()

        :param id: Script object identifier (required)
        :type id: str
        :param script: new script to upload to existing id. ids defined in this body will be ignored (required)
        :type script: Script
        :param async_req: Whether to execute the request asynchronously.
        :type async_req: bool, optional
        :param _return_http_data_only: response data without head status code
                                       and headers
        :type _return_http_data_only: bool, optional
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :type _preload_content: bool, optional
        :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.
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the authentication
                              in the spec for a single request.
        :type _request_auth: dict, optional
        :return: Returns the result object.
                 If the method is called asynchronously,
                 returns the request thread.
        :rtype: tuple(Script, status_code(int), headers(HTTPHeaderDict))
        """

        local_var_params = locals()

        all_params = [
            'id',
            'script'
        ]
        all_params.extend(
            [
                'async_req',
                '_return_http_data_only',
                '_preload_content',
                '_request_timeout',
                '_request_auth'
            ]
        )

        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 v1_scripts_id_put" % key
                )
            local_var_params[key] = val
        del local_var_params['kwargs']
        # verify the required parameter 'id' is set
        if self.api_client.client_side_validation and ('id' not in local_var_params or  # noqa: E501
                                                        local_var_params['id'] is None):  # noqa: E501
            raise ApiValueError("Missing the required parameter `id` when calling `v1_scripts_id_put`")  # noqa: E501
        # verify the required parameter 'script' is set
        if self.api_client.client_side_validation and ('script' not in local_var_params or  # noqa: E501
                                                        local_var_params['script'] is None):  # noqa: E501
            raise ApiValueError("Missing the required parameter `script` when calling `v1_scripts_id_put`")  # noqa: E501

        collection_formats = {}

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

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        if 'script' in local_var_params:
            body_params = local_var_params['script']
        # 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 = []  # noqa: E501
        
        response_types_map = {
            200: "Script",
            404: "ApiError",
        }

        return self.api_client.call_api(
            '/v1/scripts/{id}', 'PUT',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_types_map=response_types_map,
            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,
            _request_auth=local_var_params.get('_request_auth'))

    def v1_scripts_post(self, script, **kwargs):  # noqa: E501
        """Create a Script   # noqa: E501

        Creates a script  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True

        >>> thread = api.v1_scripts_post(script, async_req=True)
        >>> result = thread.get()

        :param script: new script to create. ids defined in this body will be ignored (required)
        :type script: Script
        :param async_req: Whether to execute the request asynchronously.
        :type async_req: bool, optional
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :type _preload_content: bool, optional
        :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: Returns the result object.
                 If the method is called asynchronously,
                 returns the request thread.
        :rtype: HrefResponse
        """
        kwargs['_return_http_data_only'] = True
        return self.v1_scripts_post_with_http_info(script, **kwargs)  # noqa: E501

    def v1_scripts_post_with_http_info(self, script, **kwargs):  # noqa: E501
        """Create a Script   # noqa: E501

        Creates a script  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True

        >>> thread = api.v1_scripts_post_with_http_info(script, async_req=True)
        >>> result = thread.get()

        :param script: new script to create. ids defined in this body will be ignored (required)
        :type script: Script
        :param async_req: Whether to execute the request asynchronously.
        :type async_req: bool, optional
        :param _return_http_data_only: response data without head status code
                                       and headers
        :type _return_http_data_only: bool, optional
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :type _preload_content: bool, optional
        :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.
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the authentication
                              in the spec for a single request.
        :type _request_auth: dict, optional
        :return: Returns the result object.
                 If the method is called asynchronously,
                 returns the request thread.
        :rtype: tuple(HrefResponse, status_code(int), headers(HTTPHeaderDict))
        """

        local_var_params = locals()

        all_params = [
            'script'
        ]
        all_params.extend(
            [
                'async_req',
                '_return_http_data_only',
                '_preload_content',
                '_request_timeout',
                '_request_auth'
            ]
        )

        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 v1_scripts_post" % key
                )
            local_var_params[key] = val
        del local_var_params['kwargs']
        # verify the required parameter 'script' is set
        if self.api_client.client_side_validation and ('script' not in local_var_params or  # noqa: E501
                                                        local_var_params['script'] is None):  # noqa: E501
            raise ApiValueError("Missing the required parameter `script` when calling `v1_scripts_post`")  # noqa: E501

        collection_formats = {}

        path_params = {}

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        if 'script' in local_var_params:
            body_params = local_var_params['script']
        # 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 = []  # noqa: E501
        
        response_types_map = {
            201: "HrefResponse",
        }

        return self.api_client.call_api(
            '/v1/scripts', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_types_map=response_types_map,
            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,
            _request_auth=local_var_params.get('_request_auth'))

# coding: utf-8

"""
    Jamf Pro API

    ## Overview This is a sample Jamf Pro server which allows for usage without any authentication. The Jamf Pro environment which supports the Try it Out functionality does not run the current beta version of Jamf Pro, thus any newly added endpoints will result in an error and should be used soley for documentation purposes.   # noqa: E501

    The version of the OpenAPI document: 10.25.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 jamf.api_client import ApiClient
from jamf.exceptions import (  # noqa: F401
    ApiTypeError,
    ApiValueError
)


class ScriptsApi(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 v1_scripts_get(self, **kwargs):  # noqa: E501
        """Search for sorted and paged Scripts   # noqa: E501

        Search for sorted and paged scripts  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True

        >>> thread = api.v1_scripts_get(async_req=True)
        >>> result = thread.get()

        :param page:
        :type page: int
        :param page_size:
        :type page_size: int
        :param sort: Sorting criteria in the format: property:asc/desc. Default sort is name:asc. Multiple sort criteria are supported and must be separated with a comma. Fields allowed in the query: `id`, `name`, `info`, `notes`, `priority`, `categoryId`, `categoryName`, `parameter4` up to `parameter11`, `osRequirements`, `scriptContents`. Example: sort=date:desc,name:asc 
        :type sort: list[str]
        :param filter: Query in the RSQL format, allowing to filter scripts collection. Default search is empty query - returning all results for the requested page. Fields allowed in the query: `id`, `name`, `info`, `notes`, `priority`, `categoryId`, `categoryName`, `parameter4` up to `parameter11`, `osRequirements`, `scriptContents`. This param can be combined with paging and sorting. Example: filter=categoryName==\"Category\" and name==\"*script name*\"
        :type filter: str
        :param async_req: Whether to execute the request asynchronously.
        :type async_req: bool, optional
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :type _preload_content: bool, optional
        :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: Returns the result object.
                 If the method is called asynchronously,
                 returns the request thread.
        :rtype: ScriptsSearchResults
        """
        kwargs['_return_http_data_only'] = True
        return self.v1_scripts_get_with_http_info(**kwargs)  # noqa: E501

    def v1_scripts_get_with_http_info(self, **kwargs):  # noqa: E501
        """Search for sorted and paged Scripts   # noqa: E501

        Search for sorted and paged scripts  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True

        >>> thread = api.v1_scripts_get_with_http_info(async_req=True)
        >>> result = thread.get()

        :param page:
        :type page: int
        :param page_size:
        :type page_size: int
        :param sort: Sorting criteria in the format: property:asc/desc. Default sort is name:asc. Multiple sort criteria are supported and must be separated with a comma. Fields allowed in the query: `id`, `name`, `info`, `notes`, `priority`, `categoryId`, `categoryName`, `parameter4` up to `parameter11`, `osRequirements`, `scriptContents`. Example: sort=date:desc,name:asc 
        :type sort: list[str]
        :param filter: Query in the RSQL format, allowing to filter scripts collection. Default search is empty query - returning all results for the requested page. Fields allowed in the query: `id`, `name`, `info`, `notes`, `priority`, `categoryId`, `categoryName`, `parameter4` up to `parameter11`, `osRequirements`, `scriptContents`. This param can be combined with paging and sorting. Example: filter=categoryName==\"Category\" and name==\"*script name*\"
        :type filter: str
        :param async_req: Whether to execute the request asynchronously.
        :type async_req: bool, optional
        :param _return_http_data_only: response data without head status code
                                       and headers
        :type _return_http_data_only: bool, optional
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :type _preload_content: bool, optional
        :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.
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the authentication
                              in the spec for a single request.
        :type _request_auth: dict, optional
        :return: Returns the result object.
                 If the method is called asynchronously,
                 returns the request thread.
        :rtype: tuple(ScriptsSearchResults, status_code(int), headers(HTTPHeaderDict))
        """

        local_var_params = locals()

        all_params = [
            'page',
            'page_size',
            'sort',
            'filter'
        ]
        all_params.extend(
            [
                'async_req',
                '_return_http_data_only',
                '_preload_content',
                '_request_timeout',
                '_request_auth'
            ]
        )

        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 v1_scripts_get" % key
                )
            local_var_params[key] = val
        del local_var_params['kwargs']

        collection_formats = {}

        path_params = {}

        query_params = []
        if 'page' in local_var_params and local_var_params['page'] is not None:  # noqa: E501
            query_params.append(('page', local_var_params['page']))  # noqa: E501
        if 'page_size' in local_var_params and local_var_params['page_size'] is not None:  # noqa: E501
            query_params.append(('page-size', local_var_params['page_size']))  # noqa: E501
        if 'sort' in local_var_params and local_var_params['sort'] is not None:  # noqa: E501
            query_params.append(('sort', local_var_params['sort']))  # noqa: E501
            collection_formats['sort'] = 'multi'  # noqa: E501
        if 'filter' in local_var_params and local_var_params['filter'] is not None:  # noqa: E501
            query_params.append(('filter', local_var_params['filter']))  # 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 = []  # noqa: E501
        
        response_types_map = {
            200: "ScriptsSearchResults",
        }

        return self.api_client.call_api(
            '/v1/scripts', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_types_map=response_types_map,
            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,
            _request_auth=local_var_params.get('_request_auth'))

    def v1_scripts_id_delete(self, id, **kwargs):  # noqa: E501
        """Delete a Script at the specified id   # noqa: E501

        Deletes a script at the specified id  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True

        >>> thread = api.v1_scripts_id_delete(id, async_req=True)
        >>> result = thread.get()

        :param id: Script object identifier (required)
        :type id: str
        :param async_req: Whether to execute the request asynchronously.
        :type async_req: bool, optional
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :type _preload_content: bool, optional
        :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: Returns the result object.
                 If the method is called asynchronously,
                 returns the request thread.
        :rtype: None
        """
        kwargs['_return_http_data_only'] = True
        return self.v1_scripts_id_delete_with_http_info(id, **kwargs)  # noqa: E501

    def v1_scripts_id_delete_with_http_info(self, id, **kwargs):  # noqa: E501
        """Delete a Script at the specified id   # noqa: E501

        Deletes a script at the specified id  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True

        >>> thread = api.v1_scripts_id_delete_with_http_info(id, async_req=True)
        >>> result = thread.get()

        :param id: Script object identifier (required)
        :type id: str
        :param async_req: Whether to execute the request asynchronously.
        :type async_req: bool, optional
        :param _return_http_data_only: response data without head status code
                                       and headers
        :type _return_http_data_only: bool, optional
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :type _preload_content: bool, optional
        :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.
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the authentication
                              in the spec for a single request.
        :type _request_auth: dict, optional
        :return: Returns the result object.
                 If the method is called asynchronously,
                 returns the request thread.
        :rtype: None
        """

        local_var_params = locals()

        all_params = [
            'id'
        ]
        all_params.extend(
            [
                'async_req',
                '_return_http_data_only',
                '_preload_content',
                '_request_timeout',
                '_request_auth'
            ]
        )

        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 v1_scripts_id_delete" % key
                )
            local_var_params[key] = val
        del local_var_params['kwargs']
        # verify the required parameter 'id' is set
        if self.api_client.client_side_validation and ('id' not in local_var_params or  # noqa: E501
                                                        local_var_params['id'] is None):  # noqa: E501
            raise ApiValueError("Missing the required parameter `id` when calling `v1_scripts_id_delete`")  # noqa: E501

        collection_formats = {}

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

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        # Authentication setting
        auth_settings = []  # noqa: E501
        
        response_types_map = {}

        return self.api_client.call_api(
            '/v1/scripts/{id}', 'DELETE',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_types_map=response_types_map,
            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,
            _request_auth=local_var_params.get('_request_auth'))

    def v1_scripts_id_download_get(self, id, **kwargs):  # noqa: E501
        """Download a text file of the Script contents   # noqa: E501

        Download a text file of the script contents  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True

        >>> thread = api.v1_scripts_id_download_get(id, async_req=True)
        >>> result = thread.get()

        :param id: id of the script to be downloaded (required)
        :type id: str
        :param async_req: Whether to execute the request asynchronously.
        :type async_req: bool, optional
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :type _preload_content: bool, optional
        :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: Returns the result object.
                 If the method is called asynchronously,
                 returns the request thread.
        :rtype: file
        """
        kwargs['_return_http_data_only'] = True
        return self.v1_scripts_id_download_get_with_http_info(id, **kwargs)  # noqa: E501

    def v1_scripts_id_download_get_with_http_info(self, id, **kwargs):  # noqa: E501
        """Download a text file of the Script contents   # noqa: E501

        Download a text file of the script contents  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True

        >>> thread = api.v1_scripts_id_download_get_with_http_info(id, async_req=True)
        >>> result = thread.get()

        :param id: id of the script to be downloaded (required)
        :type id: str
        :param async_req: Whether to execute the request asynchronously.
        :type async_req: bool, optional
        :param _return_http_data_only: response data without head status code
                                       and headers
        :type _return_http_data_only: bool, optional
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :type _preload_content: bool, optional
        :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.
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the authentication
                              in the spec for a single request.
        :type _request_auth: dict, optional
        :return: Returns the result object.
                 If the method is called asynchronously,
                 returns the request thread.
        :rtype: tuple(file, status_code(int), headers(HTTPHeaderDict))
        """

        local_var_params = locals()

        all_params = [
            'id'
        ]
        all_params.extend(
            [
                'async_req',
                '_return_http_data_only',
                '_preload_content',
                '_request_timeout',
                '_request_auth'
            ]
        )

        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 v1_scripts_id_download_get" % key
                )
            local_var_params[key] = val
        del local_var_params['kwargs']
        # verify the required parameter 'id' is set
        if self.api_client.client_side_validation and ('id' not in local_var_params or  # noqa: E501
                                                        local_var_params['id'] is None):  # noqa: E501
            raise ApiValueError("Missing the required parameter `id` when calling `v1_scripts_id_download_get`")  # noqa: E501

        collection_formats = {}

        path_params = {}
        if 'id' in local_var_params:
            path_params['id'] = local_var_params['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(
            ['text/plain', 'application/json'])  # noqa: E501

        # Authentication setting
        auth_settings = []  # noqa: E501
        
        response_types_map = {
            200: "file",
            404: "ApiError",
        }

        return self.api_client.call_api(
            '/v1/scripts/{id}/download', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_types_map=response_types_map,
            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,
            _request_auth=local_var_params.get('_request_auth'))

    def v1_scripts_id_get(self, id, **kwargs):  # noqa: E501
        """Retrieve a full script object   # noqa: E501

        Retrieves a full script object  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True

        >>> thread = api.v1_scripts_id_get(id, async_req=True)
        >>> result = thread.get()

        :param id: Script object identifier (required)
        :type id: str
        :param async_req: Whether to execute the request asynchronously.
        :type async_req: bool, optional
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :type _preload_content: bool, optional
        :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: Returns the result object.
                 If the method is called asynchronously,
                 returns the request thread.
        :rtype: Script
        """
        kwargs['_return_http_data_only'] = True
        return self.v1_scripts_id_get_with_http_info(id, **kwargs)  # noqa: E501

    def v1_scripts_id_get_with_http_info(self, id, **kwargs):  # noqa: E501
        """Retrieve a full script object   # noqa: E501

        Retrieves a full script object  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True

        >>> thread = api.v1_scripts_id_get_with_http_info(id, async_req=True)
        >>> result = thread.get()

        :param id: Script object identifier (required)
        :type id: str
        :param async_req: Whether to execute the request asynchronously.
        :type async_req: bool, optional
        :param _return_http_data_only: response data without head status code
                                       and headers
        :type _return_http_data_only: bool, optional
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :type _preload_content: bool, optional
        :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.
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the authentication
                              in the spec for a single request.
        :type _request_auth: dict, optional
        :return: Returns the result object.
                 If the method is called asynchronously,
                 returns the request thread.
        :rtype: tuple(Script, status_code(int), headers(HTTPHeaderDict))
        """

        local_var_params = locals()

        all_params = [
            'id'
        ]
        all_params.extend(
            [
                'async_req',
                '_return_http_data_only',
                '_preload_content',
                '_request_timeout',
                '_request_auth'
            ]
        )

        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 v1_scripts_id_get" % key
                )
            local_var_params[key] = val
        del local_var_params['kwargs']
        # verify the required parameter 'id' is set
        if self.api_client.client_side_validation and ('id' not in local_var_params or  # noqa: E501
                                                        local_var_params['id'] is None):  # noqa: E501
            raise ApiValueError("Missing the required parameter `id` when calling `v1_scripts_id_get`")  # noqa: E501

        collection_formats = {}

        path_params = {}
        if 'id' in local_var_params:
            path_params['id'] = local_var_params['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 = []  # noqa: E501
        
        response_types_map = {
            200: "Script",
            404: "ApiError",
        }

        return self.api_client.call_api(
            '/v1/scripts/{id}', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_types_map=response_types_map,
            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,
            _request_auth=local_var_params.get('_request_auth'))

    def v1_scripts_id_history_get(self, id, **kwargs):  # noqa: E501
        """Get specified Script history object   # noqa: E501

        Gets specified Script history object   # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True

        >>> thread = api.v1_scripts_id_history_get(id, async_req=True)
        >>> result = thread.get()

        :param id: id of script history record (required)
        :type id: str
        :param page:
        :type page: int
        :param page_size:
        :type page_size: int
        :param sort: Sorting criteria in the format: property:asc/desc. Default sort is date:desc. Multiple sort criteria are supported and must be separated with a comma. Example: sort=date:desc,name:asc 
        :type sort: list[str]
        :param filter: Query in the RSQL format, allowing to filter history notes collection. Default filter is empty query - returning all results for the requested page. Fields allowed in the query: username, date, note, details. This param can be combined with paging and sorting. Example: filter=username!=admin and details==*disabled* and date<2019-12-15
        :type filter: str
        :param async_req: Whether to execute the request asynchronously.
        :type async_req: bool, optional
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :type _preload_content: bool, optional
        :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: Returns the result object.
                 If the method is called asynchronously,
                 returns the request thread.
        :rtype: HistorySearchResults
        """
        kwargs['_return_http_data_only'] = True
        return self.v1_scripts_id_history_get_with_http_info(id, **kwargs)  # noqa: E501

    def v1_scripts_id_history_get_with_http_info(self, id, **kwargs):  # noqa: E501
        """Get specified Script history object   # noqa: E501

        Gets specified Script history object   # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True

        >>> thread = api.v1_scripts_id_history_get_with_http_info(id, async_req=True)
        >>> result = thread.get()

        :param id: id of script history record (required)
        :type id: str
        :param page:
        :type page: int
        :param page_size:
        :type page_size: int
        :param sort: Sorting criteria in the format: property:asc/desc. Default sort is date:desc. Multiple sort criteria are supported and must be separated with a comma. Example: sort=date:desc,name:asc 
        :type sort: list[str]
        :param filter: Query in the RSQL format, allowing to filter history notes collection. Default filter is empty query - returning all results for the requested page. Fields allowed in the query: username, date, note, details. This param can be combined with paging and sorting. Example: filter=username!=admin and details==*disabled* and date<2019-12-15
        :type filter: str
        :param async_req: Whether to execute the request asynchronously.
        :type async_req: bool, optional
        :param _return_http_data_only: response data without head status code
                                       and headers
        :type _return_http_data_only: bool, optional
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :type _preload_content: bool, optional
        :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.
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the authentication
                              in the spec for a single request.
        :type _request_auth: dict, optional
        :return: Returns the result object.
                 If the method is called asynchronously,
                 returns the request thread.
        :rtype: tuple(HistorySearchResults, status_code(int), headers(HTTPHeaderDict))
        """

        local_var_params = locals()

        all_params = [
            'id',
            'page',
            'page_size',
            'sort',
            'filter'
        ]
        all_params.extend(
            [
                'async_req',
                '_return_http_data_only',
                '_preload_content',
                '_request_timeout',
                '_request_auth'
            ]
        )

        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 v1_scripts_id_history_get" % key
                )
            local_var_params[key] = val
        del local_var_params['kwargs']
        # verify the required parameter 'id' is set
        if self.api_client.client_side_validation and ('id' not in local_var_params or  # noqa: E501
                                                        local_var_params['id'] is None):  # noqa: E501
            raise ApiValueError("Missing the required parameter `id` when calling `v1_scripts_id_history_get`")  # noqa: E501

        collection_formats = {}

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

        query_params = []
        if 'page' in local_var_params and local_var_params['page'] is not None:  # noqa: E501
            query_params.append(('page', local_var_params['page']))  # noqa: E501
        if 'page_size' in local_var_params and local_var_params['page_size'] is not None:  # noqa: E501
            query_params.append(('page-size', local_var_params['page_size']))  # noqa: E501
        if 'sort' in local_var_params and local_var_params['sort'] is not None:  # noqa: E501
            query_params.append(('sort', local_var_params['sort']))  # noqa: E501
            collection_formats['sort'] = 'multi'  # noqa: E501
        if 'filter' in local_var_params and local_var_params['filter'] is not None:  # noqa: E501
            query_params.append(('filter', local_var_params['filter']))  # 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 = []  # noqa: E501
        
        response_types_map = {
            200: "HistorySearchResults",
            404: "ApiError",
        }

        return self.api_client.call_api(
            '/v1/scripts/{id}/history', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_types_map=response_types_map,
            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,
            _request_auth=local_var_params.get('_request_auth'))

    def v1_scripts_id_history_post(self, id, object_history_note, **kwargs):  # noqa: E501
        """Add specified Script history object notes   # noqa: E501

        Adds specified Script history object notes   # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True

        >>> thread = api.v1_scripts_id_history_post(id, object_history_note, async_req=True)
        >>> result = thread.get()

        :param id: instance id of script history record (required)
        :type id: str
        :param object_history_note: history notes to create (required)
        :type object_history_note: ObjectHistoryNote
        :param async_req: Whether to execute the request asynchronously.
        :type async_req: bool, optional
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :type _preload_content: bool, optional
        :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: Returns the result object.
                 If the method is called asynchronously,
                 returns the request thread.
        :rtype: ObjectHistory
        """
        kwargs['_return_http_data_only'] = True
        return self.v1_scripts_id_history_post_with_http_info(id, object_history_note, **kwargs)  # noqa: E501

    def v1_scripts_id_history_post_with_http_info(self, id, object_history_note, **kwargs):  # noqa: E501
        """Add specified Script history object notes   # noqa: E501

        Adds specified Script history object notes   # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True

        >>> thread = api.v1_scripts_id_history_post_with_http_info(id, object_history_note, async_req=True)
        >>> result = thread.get()

        :param id: instance id of script history record (required)
        :type id: str
        :param object_history_note: history notes to create (required)
        :type object_history_note: ObjectHistoryNote
        :param async_req: Whether to execute the request asynchronously.
        :type async_req: bool, optional
        :param _return_http_data_only: response data without head status code
                                       and headers
        :type _return_http_data_only: bool, optional
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :type _preload_content: bool, optional
        :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.
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the authentication
                              in the spec for a single request.
        :type _request_auth: dict, optional
        :return: Returns the result object.
                 If the method is called asynchronously,
                 returns the request thread.
        :rtype: tuple(ObjectHistory, status_code(int), headers(HTTPHeaderDict))
        """

        local_var_params = locals()

        all_params = [
            'id',
            'object_history_note'
        ]
        all_params.extend(
            [
                'async_req',
                '_return_http_data_only',
                '_preload_content',
                '_request_timeout',
                '_request_auth'
            ]
        )

        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 v1_scripts_id_history_post" % key
                )
            local_var_params[key] = val
        del local_var_params['kwargs']
        # verify the required parameter 'id' is set
        if self.api_client.client_side_validation and ('id' not in local_var_params or  # noqa: E501
                                                        local_var_params['id'] is None):  # noqa: E501
            raise ApiValueError("Missing the required parameter `id` when calling `v1_scripts_id_history_post`")  # noqa: E501
        # verify the required parameter 'object_history_note' is set
        if self.api_client.client_side_validation and ('object_history_note' not in local_var_params or  # noqa: E501
                                                        local_var_params['object_history_note'] is None):  # noqa: E501
            raise ApiValueError("Missing the required parameter `object_history_note` when calling `v1_scripts_id_history_post`")  # noqa: E501

        collection_formats = {}

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

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        if 'object_history_note' in local_var_params:
            body_params = local_var_params['object_history_note']
        # 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 = []  # noqa: E501
        
        response_types_map = {
            201: "ObjectHistory",
            404: "ApiError",
            503: "ApiError",
        }

        return self.api_client.call_api(
            '/v1/scripts/{id}/history', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_types_map=response_types_map,
            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,
            _request_auth=local_var_params.get('_request_auth'))

    def v1_scripts_id_put(self, id, script, **kwargs):  # noqa: E501
        """Replace the script at the id with the supplied information   # noqa: E501

        Replaces the script at the id with the supplied information  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True

        >>> thread = api.v1_scripts_id_put(id, script, async_req=True)
        >>> result = thread.get()

        :param id: Script object identifier (required)
        :type id: str
        :param script: new script to upload to existing id. ids defined in this body will be ignored (required)
        :type script: Script
        :param async_req: Whether to execute the request asynchronously.
        :type async_req: bool, optional
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :type _preload_content: bool, optional
        :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: Returns the result object.
                 If the method is called asynchronously,
                 returns the request thread.
        :rtype: Script
        """
        kwargs['_return_http_data_only'] = True
        return self.v1_scripts_id_put_with_http_info(id, script, **kwargs)  # noqa: E501

    def v1_scripts_id_put_with_http_info(self, id, script, **kwargs):  # noqa: E501
        """Replace the script at the id with the supplied information   # noqa: E501

        Replaces the script at the id with the supplied information  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True

        >>> thread = api.v1_scripts_id_put_with_http_info(id, script, async_req=True)
        >>> result = thread.get()

        :param id: Script object identifier (required)
        :type id: str
        :param script: new script to upload to existing id. ids defined in this body will be ignored (required)
        :type script: Script
        :param async_req: Whether to execute the request asynchronously.
        :type async_req: bool, optional
        :param _return_http_data_only: response data without head status code
                                       and headers
        :type _return_http_data_only: bool, optional
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :type _preload_content: bool, optional
        :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.
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the authentication
                              in the spec for a single request.
        :type _request_auth: dict, optional
        :return: Returns the result object.
                 If the method is called asynchronously,
                 returns the request thread.
        :rtype: tuple(Script, status_code(int), headers(HTTPHeaderDict))
        """

        local_var_params = locals()

        all_params = [
            'id',
            'script'
        ]
        all_params.extend(
            [
                'async_req',
                '_return_http_data_only',
                '_preload_content',
                '_request_timeout',
                '_request_auth'
            ]
        )

        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 v1_scripts_id_put" % key
                )
            local_var_params[key] = val
        del local_var_params['kwargs']
        # verify the required parameter 'id' is set
        if self.api_client.client_side_validation and ('id' not in local_var_params or  # noqa: E501
                                                        local_var_params['id'] is None):  # noqa: E501
            raise ApiValueError("Missing the required parameter `id` when calling `v1_scripts_id_put`")  # noqa: E501
        # verify the required parameter 'script' is set
        if self.api_client.client_side_validation and ('script' not in local_var_params or  # noqa: E501
                                                        local_var_params['script'] is None):  # noqa: E501
            raise ApiValueError("Missing the required parameter `script` when calling `v1_scripts_id_put`")  # noqa: E501

        collection_formats = {}

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

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        if 'script' in local_var_params:
            body_params = local_var_params['script']
        # 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 = []  # noqa: E501
        
        response_types_map = {
            200: "Script",
            404: "ApiError",
        }

        return self.api_client.call_api(
            '/v1/scripts/{id}', 'PUT',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_types_map=response_types_map,
            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,
            _request_auth=local_var_params.get('_request_auth'))

    def v1_scripts_post(self, script, **kwargs):  # noqa: E501
        """Create a Script   # noqa: E501

        Creates a script  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True

        >>> thread = api.v1_scripts_post(script, async_req=True)
        >>> result = thread.get()

        :param script: new script to create. ids defined in this body will be ignored (required)
        :type script: Script
        :param async_req: Whether to execute the request asynchronously.
        :type async_req: bool, optional
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :type _preload_content: bool, optional
        :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: Returns the result object.
                 If the method is called asynchronously,
                 returns the request thread.
        :rtype: HrefResponse
        """
        kwargs['_return_http_data_only'] = True
        return self.v1_scripts_post_with_http_info(script, **kwargs)  # noqa: E501

    def v1_scripts_post_with_http_info(self, script, **kwargs):  # noqa: E501
        """Create a Script   # noqa: E501

        Creates a script  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True

        >>> thread = api.v1_scripts_post_with_http_info(script, async_req=True)
        >>> result = thread.get()

        :param script: new script to create. ids defined in this body will be ignored (required)
        :type script: Script
        :param async_req: Whether to execute the request asynchronously.
        :type async_req: bool, optional
        :param _return_http_data_only: response data without head status code
                                       and headers
        :type _return_http_data_only: bool, optional
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :type _preload_content: bool, optional
        :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.
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the authentication
                              in the spec for a single request.
        :type _request_auth: dict, optional
        :return: Returns the result object.
                 If the method is called asynchronously,
                 returns the request thread.
        :rtype: tuple(HrefResponse, status_code(int), headers(HTTPHeaderDict))
        """

        local_var_params = locals()

        all_params = [
            'script'
        ]
        all_params.extend(
            [
                'async_req',
                '_return_http_data_only',
                '_preload_content',
                '_request_timeout',
                '_request_auth'
            ]
        )

        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 v1_scripts_post" % key
                )
            local_var_params[key] = val
        del local_var_params['kwargs']
        # verify the required parameter 'script' is set
        if self.api_client.client_side_validation and ('script' not in local_var_params or  # noqa: E501
                                                        local_var_params['script'] is None):  # noqa: E501
            raise ApiValueError("Missing the required parameter `script` when calling `v1_scripts_post`")  # noqa: E501

        collection_formats = {}

        path_params = {}

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        if 'script' in local_var_params:
            body_params = local_var_params['script']
        # 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 = []  # noqa: E501
        
        response_types_map = {
            201: "HrefResponse",
        }

        return self.api_client.call_api(
            '/v1/scripts', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_types_map=response_types_map,
            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,
            _request_auth=local_var_params.get('_request_auth'))

# coding: utf-8 Jamf Pro API      ## Overview This is a sample Jamf Pro server which allows for usage without any authentication. The Jamf Pro environment which supports the Try it Out functionality does not run the current beta version of Jamf Pro, thus any newly added endpoints will result in an error and should be used soley for documentation purposes.   # noqa: E501      The version of the OpenAPI document: 10.25.0     Generated by: https://openapi-generator.tech # noqa: F401 # python 2 and python 3 compatibility library # noqa: F401 NOTE: This class is auto generated by OpenAPI Generator     Ref: https://openapi-generator.tech      Do not edit the class manually. # noqa: E501 Search for sorted and paged Scripts   # noqa: E501          Search for sorted and paged scripts  # noqa: E501         This method makes a synchronous HTTP request by default. To make an         asynchronous HTTP request, please pass async_req=True          >>> thread = api.v1_scripts_get(async_req=True)         >>> result = thread.get()          :param page:         :type page: int         :param page_size:         :type page_size: int         :param sort: Sorting criteria in the format: property:asc/desc. Default sort is name:asc. Multiple sort criteria are supported and must be separated with a comma. Fields allowed in the query: `id`, `name`, `info`, `notes`, `priority`, `categoryId`, `categoryName`, `parameter4` up to `parameter11`, `osRequirements`, `scriptContents`. Example: sort=date:desc,name:asc          :type sort: list[str]         :param filter: Query in the RSQL format, allowing to filter scripts collection. Default search is empty query - returning all results for the requested page. Fields allowed in the query: `id`, `name`, `info`, `notes`, `priority`, `categoryId`, `categoryName`, `parameter4` up to `parameter11`, `osRequirements`, `scriptContents`. This param can be combined with paging and sorting. Example: filter=categoryName==\"Category\" and name==\"*script name*\"         :type filter: str         :param async_req: Whether to execute the request asynchronously.         :type async_req: bool, optional         :param _preload_content: if False, the urllib3.HTTPResponse object will                                  be returned without reading/decoding response                                  data. Default is True.         :type _preload_content: bool, optional         :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: Returns the result object.                  If the method is called asynchronously,                  returns the request thread.         :rtype: ScriptsSearchResults # noqa: E501 # noqa: E501 Search for sorted and paged Scripts   # noqa: E501          Search for sorted and paged scripts  # noqa: E501         This method makes a synchronous HTTP request by default. To make an         asynchronous HTTP request, please pass async_req=True          >>> thread = api.v1_scripts_get_with_http_info(async_req=True)         >>> result = thread.get()          :param page:         :type page: int         :param page_size:         :type page_size: int         :param sort: Sorting criteria in the format: property:asc/desc. Default sort is name:asc. Multiple sort criteria are supported and must be separated with a comma. Fields allowed in the query: `id`, `name`, `info`, `notes`, `priority`, `categoryId`, `categoryName`, `parameter4` up to `parameter11`, `osRequirements`, `scriptContents`. Example: sort=date:desc,name:asc          :type sort: list[str]         :param filter: Query in the RSQL format, allowing to filter scripts collection. Default search is empty query - returning all results for the requested page. Fields allowed in the query: `id`, `name`, `info`, `notes`, `priority`, `categoryId`, `categoryName`, `parameter4` up to `parameter11`, `osRequirements`, `scriptContents`. This param can be combined with paging and sorting. Example: filter=categoryName==\"Category\" and name==\"*script name*\"         :type filter: str         :param async_req: Whether to execute the request asynchronously.         :type async_req: bool, optional         :param _return_http_data_only: response data without head status code                                        and headers         :type _return_http_data_only: bool, optional         :param _preload_content: if False, the urllib3.HTTPResponse object will                                  be returned without reading/decoding response                                  data. Default is True.         :type _preload_content: bool, optional         :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.         :param _request_auth: set to override the auth_settings for an a single                               request; this effectively ignores the authentication                               in the spec for a single request.         :type _request_auth: dict, optional         :return: Returns the result object.                  If the method is called asynchronously,                  returns the request thread.         :rtype: tuple(ScriptsSearchResults, status_code(int), headers(HTTPHeaderDict)) # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # HTTP header `Accept` # noqa: E501 # Authentication setting # noqa: E501 # noqa: E501 # noqa: E501 Delete a Script at the specified id   # noqa: E501          Deletes a script at the specified id  # noqa: E501         This method makes a synchronous HTTP request by default. To make an         asynchronous HTTP request, please pass async_req=True          >>> thread = api.v1_scripts_id_delete(id, async_req=True)         >>> result = thread.get()          :param id: Script object identifier (required)         :type id: str         :param async_req: Whether to execute the request asynchronously.         :type async_req: bool, optional         :param _preload_content: if False, the urllib3.HTTPResponse object will                                  be returned without reading/decoding response                                  data. Default is True.         :type _preload_content: bool, optional         :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: Returns the result object.                  If the method is called asynchronously,                  returns the request thread.         :rtype: None # noqa: E501 # noqa: E501 Delete a Script at the specified id   # noqa: E501          Deletes a script at the specified id  # noqa: E501         This method makes a synchronous HTTP request by default. To make an         asynchronous HTTP request, please pass async_req=True          >>> thread = api.v1_scripts_id_delete_with_http_info(id, async_req=True)         >>> result = thread.get()          :param id: Script object identifier (required)         :type id: str         :param async_req: Whether to execute the request asynchronously.         :type async_req: bool, optional         :param _return_http_data_only: response data without head status code                                        and headers         :type _return_http_data_only: bool, optional         :param _preload_content: if False, the urllib3.HTTPResponse object will                                  be returned without reading/decoding response                                  data. Default is True.         :type _preload_content: bool, optional         :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.         :param _request_auth: set to override the auth_settings for an a single                               request; this effectively ignores the authentication                               in the spec for a single request.         :type _request_auth: dict, optional         :return: Returns the result object.                  If the method is called asynchronously,                  returns the request thread.         :rtype: None # verify the required parameter 'id' is set # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # Authentication setting # noqa: E501 # noqa: E501 # noqa: E501 Download a text file of the Script contents   # noqa: E501          Download a text file of the script contents  # noqa: E501         This method makes a synchronous HTTP request by default. To make an         asynchronous HTTP request, please pass async_req=True          >>> thread = api.v1_scripts_id_download_get(id, async_req=True)         >>> result = thread.get()          :param id: id of the script to be downloaded (required)         :type id: str         :param async_req: Whether to execute the request asynchronously.         :type async_req: bool, optional         :param _preload_content: if False, the urllib3.HTTPResponse object will                                  be returned without reading/decoding response                                  data. Default is True.         :type _preload_content: bool, optional         :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: Returns the result object.                  If the method is called asynchronously,                  returns the request thread.         :rtype: file # noqa: E501 # noqa: E501 Download a text file of the Script contents   # noqa: E501          Download a text file of the script contents  # noqa: E501         This method makes a synchronous HTTP request by default. To make an         asynchronous HTTP request, please pass async_req=True          >>> thread = api.v1_scripts_id_download_get_with_http_info(id, async_req=True)         >>> result = thread.get()          :param id: id of the script to be downloaded (required)         :type id: str         :param async_req: Whether to execute the request asynchronously.         :type async_req: bool, optional         :param _return_http_data_only: response data without head status code                                        and headers         :type _return_http_data_only: bool, optional         :param _preload_content: if False, the urllib3.HTTPResponse object will                                  be returned without reading/decoding response                                  data. Default is True.         :type _preload_content: bool, optional         :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.         :param _request_auth: set to override the auth_settings for an a single                               request; this effectively ignores the authentication                               in the spec for a single request.         :type _request_auth: dict, optional         :return: Returns the result object.                  If the method is called asynchronously,                  returns the request thread.         :rtype: tuple(file, status_code(int), headers(HTTPHeaderDict)) # verify the required parameter 'id' is set # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # HTTP header `Accept` # noqa: E501 # Authentication setting # noqa: E501 # noqa: E501 # noqa: E501 Retrieve a full script object   # noqa: E501          Retrieves a full script object  # noqa: E501         This method makes a synchronous HTTP request by default. To make an         asynchronous HTTP request, please pass async_req=True          >>> thread = api.v1_scripts_id_get(id, async_req=True)         >>> result = thread.get()          :param id: Script object identifier (required)         :type id: str         :param async_req: Whether to execute the request asynchronously.         :type async_req: bool, optional         :param _preload_content: if False, the urllib3.HTTPResponse object will                                  be returned without reading/decoding response                                  data. Default is True.         :type _preload_content: bool, optional         :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: Returns the result object.                  If the method is called asynchronously,                  returns the request thread.         :rtype: Script # noqa: E501 # noqa: E501 Retrieve a full script object   # noqa: E501          Retrieves a full script object  # noqa: E501         This method makes a synchronous HTTP request by default. To make an         asynchronous HTTP request, please pass async_req=True          >>> thread = api.v1_scripts_id_get_with_http_info(id, async_req=True)         >>> result = thread.get()          :param id: Script object identifier (required)         :type id: str         :param async_req: Whether to execute the request asynchronously.         :type async_req: bool, optional         :param _return_http_data_only: response data without head status code                                        and headers         :type _return_http_data_only: bool, optional         :param _preload_content: if False, the urllib3.HTTPResponse object will                                  be returned without reading/decoding response                                  data. Default is True.         :type _preload_content: bool, optional         :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.         :param _request_auth: set to override the auth_settings for an a single                               request; this effectively ignores the authentication                               in the spec for a single request.         :type _request_auth: dict, optional         :return: Returns the result object.                  If the method is called asynchronously,                  returns the request thread.         :rtype: tuple(Script, status_code(int), headers(HTTPHeaderDict)) # verify the required parameter 'id' is set # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # HTTP header `Accept` # noqa: E501 # Authentication setting # noqa: E501 # noqa: E501 # noqa: E501 Get specified Script history object   # noqa: E501          Gets specified Script history object   # noqa: E501         This method makes a synchronous HTTP request by default. To make an         asynchronous HTTP request, please pass async_req=True          >>> thread = api.v1_scripts_id_history_get(id, async_req=True)         >>> result = thread.get()          :param id: id of script history record (required)         :type id: str         :param page:         :type page: int         :param page_size:         :type page_size: int         :param sort: Sorting criteria in the format: property:asc/desc. Default sort is date:desc. Multiple sort criteria are supported and must be separated with a comma. Example: sort=date:desc,name:asc          :type sort: list[str]         :param filter: Query in the RSQL format, allowing to filter history notes collection. Default filter is empty query - returning all results for the requested page. Fields allowed in the query: username, date, note, details. This param can be combined with paging and sorting. Example: filter=username!=admin and details==*disabled* and date<2019-12-15         :type filter: str         :param async_req: Whether to execute the request asynchronously.         :type async_req: bool, optional         :param _preload_content: if False, the urllib3.HTTPResponse object will                                  be returned without reading/decoding response                                  data. Default is True.         :type _preload_content: bool, optional         :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: Returns the result object.                  If the method is called asynchronously,                  returns the request thread.         :rtype: HistorySearchResults # noqa: E501 # noqa: E501 Get specified Script history object   # noqa: E501          Gets specified Script history object   # noqa: E501         This method makes a synchronous HTTP request by default. To make an         asynchronous HTTP request, please pass async_req=True          >>> thread = api.v1_scripts_id_history_get_with_http_info(id, async_req=True)         >>> result = thread.get()          :param id: id of script history record (required)         :type id: str         :param page:         :type page: int         :param page_size:         :type page_size: int         :param sort: Sorting criteria in the format: property:asc/desc. Default sort is date:desc. Multiple sort criteria are supported and must be separated with a comma. Example: sort=date:desc,name:asc          :type sort: list[str]         :param filter: Query in the RSQL format, allowing to filter history notes collection. Default filter is empty query - returning all results for the requested page. Fields allowed in the query: username, date, note, details. This param can be combined with paging and sorting. Example: filter=username!=admin and details==*disabled* and date<2019-12-15         :type filter: str         :param async_req: Whether to execute the request asynchronously.         :type async_req: bool, optional         :param _return_http_data_only: response data without head status code                                        and headers         :type _return_http_data_only: bool, optional         :param _preload_content: if False, the urllib3.HTTPResponse object will                                  be returned without reading/decoding response                                  data. Default is True.         :type _preload_content: bool, optional         :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.         :param _request_auth: set to override the auth_settings for an a single                               request; this effectively ignores the authentication                               in the spec for a single request.         :type _request_auth: dict, optional         :return: Returns the result object.                  If the method is called asynchronously,                  returns the request thread.         :rtype: tuple(HistorySearchResults, status_code(int), headers(HTTPHeaderDict)) # verify the required parameter 'id' is set # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # HTTP header `Accept` # noqa: E501 # Authentication setting # noqa: E501 # noqa: E501 # noqa: E501 Add specified Script history object notes   # noqa: E501          Adds specified Script history object notes   # noqa: E501         This method makes a synchronous HTTP request by default. To make an         asynchronous HTTP request, please pass async_req=True          >>> thread = api.v1_scripts_id_history_post(id, object_history_note, async_req=True)         >>> result = thread.get()          :param id: instance id of script history record (required)         :type id: str         :param object_history_note: history notes to create (required)         :type object_history_note: ObjectHistoryNote         :param async_req: Whether to execute the request asynchronously.         :type async_req: bool, optional         :param _preload_content: if False, the urllib3.HTTPResponse object will                                  be returned without reading/decoding response                                  data. Default is True.         :type _preload_content: bool, optional         :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: Returns the result object.                  If the method is called asynchronously,                  returns the request thread.         :rtype: ObjectHistory # noqa: E501 # noqa: E501 Add specified Script history object notes   # noqa: E501          Adds specified Script history object notes   # noqa: E501         This method makes a synchronous HTTP request by default. To make an         asynchronous HTTP request, please pass async_req=True          >>> thread = api.v1_scripts_id_history_post_with_http_info(id, object_history_note, async_req=True)         >>> result = thread.get()          :param id: instance id of script history record (required)         :type id: str         :param object_history_note: history notes to create (required)         :type object_history_note: ObjectHistoryNote         :param async_req: Whether to execute the request asynchronously.         :type async_req: bool, optional         :param _return_http_data_only: response data without head status code                                        and headers         :type _return_http_data_only: bool, optional         :param _preload_content: if False, the urllib3.HTTPResponse object will                                  be returned without reading/decoding response                                  data. Default is True.         :type _preload_content: bool, optional         :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.         :param _request_auth: set to override the auth_settings for an a single                               request; this effectively ignores the authentication                               in the spec for a single request.         :type _request_auth: dict, optional         :return: Returns the result object.                  If the method is called asynchronously,                  returns the request thread.         :rtype: tuple(ObjectHistory, status_code(int), headers(HTTPHeaderDict)) # verify the required parameter 'id' is set # noqa: E501 # noqa: E501 # noqa: E501 # verify the required parameter 'object_history_note' is set # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # HTTP header `Accept` # noqa: E501 # HTTP header `Content-Type` # noqa: E501 # noqa: E501 # Authentication setting # noqa: E501 # noqa: E501 # noqa: E501 Replace the script at the id with the supplied information   # noqa: E501          Replaces the script at the id with the supplied information  # noqa: E501         This method makes a synchronous HTTP request by default. To make an         asynchronous HTTP request, please pass async_req=True          >>> thread = api.v1_scripts_id_put(id, script, async_req=True)         >>> result = thread.get()          :param id: Script object identifier (required)         :type id: str         :param script: new script to upload to existing id. ids defined in this body will be ignored (required)         :type script: Script         :param async_req: Whether to execute the request asynchronously.         :type async_req: bool, optional         :param _preload_content: if False, the urllib3.HTTPResponse object will                                  be returned without reading/decoding response                                  data. Default is True.         :type _preload_content: bool, optional         :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: Returns the result object.                  If the method is called asynchronously,                  returns the request thread.         :rtype: Script # noqa: E501 # noqa: E501 Replace the script at the id with the supplied information   # noqa: E501          Replaces the script at the id with the supplied information  # noqa: E501         This method makes a synchronous HTTP request by default. To make an         asynchronous HTTP request, please pass async_req=True          >>> thread = api.v1_scripts_id_put_with_http_info(id, script, async_req=True)         >>> result = thread.get()          :param id: Script object identifier (required)         :type id: str         :param script: new script to upload to existing id. ids defined in this body will be ignored (required)         :type script: Script         :param async_req: Whether to execute the request asynchronously.         :type async_req: bool, optional         :param _return_http_data_only: response data without head status code                                        and headers         :type _return_http_data_only: bool, optional         :param _preload_content: if False, the urllib3.HTTPResponse object will                                  be returned without reading/decoding response                                  data. Default is True.         :type _preload_content: bool, optional         :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.         :param _request_auth: set to override the auth_settings for an a single                               request; this effectively ignores the authentication                               in the spec for a single request.         :type _request_auth: dict, optional         :return: Returns the result object.                  If the method is called asynchronously,                  returns the request thread.         :rtype: tuple(Script, status_code(int), headers(HTTPHeaderDict)) # verify the required parameter 'id' is set # noqa: E501 # noqa: E501 # noqa: E501 # verify the required parameter 'script' is set # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # HTTP header `Accept` # noqa: E501 # HTTP header `Content-Type` # noqa: E501 # noqa: E501 # Authentication setting # noqa: E501 # noqa: E501 # noqa: E501 Create a Script   # noqa: E501          Creates a script  # noqa: E501         This method makes a synchronous HTTP request by default. To make an         asynchronous HTTP request, please pass async_req=True          >>> thread = api.v1_scripts_post(script, async_req=True)         >>> result = thread.get()          :param script: new script to create. ids defined in this body will be ignored (required)         :type script: Script         :param async_req: Whether to execute the request asynchronously.         :type async_req: bool, optional         :param _preload_content: if False, the urllib3.HTTPResponse object will                                  be returned without reading/decoding response                                  data. Default is True.         :type _preload_content: bool, optional         :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: Returns the result object.                  If the method is called asynchronously,                  returns the request thread.         :rtype: HrefResponse # noqa: E501 # noqa: E501 Create a Script   # noqa: E501          Creates a script  # noqa: E501         This method makes a synchronous HTTP request by default. To make an         asynchronous HTTP request, please pass async_req=True          >>> thread = api.v1_scripts_post_with_http_info(script, async_req=True)         >>> result = thread.get()          :param script: new script to create. ids defined in this body will be ignored (required)         :type script: Script         :param async_req: Whether to execute the request asynchronously.         :type async_req: bool, optional         :param _return_http_data_only: response data without head status code                                        and headers         :type _return_http_data_only: bool, optional         :param _preload_content: if False, the urllib3.HTTPResponse object will                                  be returned without reading/decoding response                                  data. Default is True.         :type _preload_content: bool, optional         :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.         :param _request_auth: set to override the auth_settings for an a single                               request; this effectively ignores the authentication                               in the spec for a single request.         :type _request_auth: dict, optional         :return: Returns the result object.                  If the method is called asynchronously,                  returns the request thread.         :rtype: tuple(HrefResponse, status_code(int), headers(HTTPHeaderDict)) # verify the required parameter 'script' is set # noqa: E501 # noqa: E501 # noqa: E501 # HTTP header `Accept` # noqa: E501 # HTTP header `Content-Type` # noqa: E501 # noqa: E501 # Authentication setting # noqa: E501 # noqa: E501