# coding: utf-8

"""
    Selling Partner API for Services

    With the Services API, you can build applications that help service providers get and modify their service orders and manage their resources.

    The version of the OpenAPI document: v1
    Generated by OpenAPI Generator (https://openapi-generator.tech)

    Do not edit the class manually.
"""  # noqa: E501


from __future__ import absolute_import

import re  # noqa: F401

# python 2 and python 3 compatibility library
import six

from spapi.api_client import ApiClient


class ServiceApi(object):
    """NOTE: This class is auto generated by the openapi generator.

    Do not edit the class manually.
    """

    api_models_module = "spapi.models.services_v1"

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

    def add_appointment_for_service_job_by_service_job_id(self, service_job_id, body, **kwargs):  # noqa: E501
        """add_appointment_for_service_job_by_service_job_id  # noqa: E501

        Adds an appointment to the service job indicated by the service job identifier specified.  **Usage Plan:**  | Rate (requests per second) | Burst | | ---- | ---- | | 5 | 20 |  The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](doc:usage-plans-and-rate-limits-in-the-sp-api).  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.add_appointment_for_service_job_by_service_job_id(service_job_id, body, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str service_job_id: An Amazon defined service job identifier. (required)
        :param AddAppointmentRequest body: Add appointment operation input details. (required)
        :return: SetAppointmentResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.add_appointment_for_service_job_by_service_job_id_with_http_info(service_job_id, body, **kwargs)  # noqa: E501
        else:
            (data) = self.add_appointment_for_service_job_by_service_job_id_with_http_info(service_job_id, body, **kwargs)  # noqa: E501
            return data

    def add_appointment_for_service_job_by_service_job_id_with_http_info(self, service_job_id, body, **kwargs):  # noqa: E501
        """add_appointment_for_service_job_by_service_job_id  # noqa: E501

        Adds an appointment to the service job indicated by the service job identifier specified.  **Usage Plan:**  | Rate (requests per second) | Burst | | ---- | ---- | | 5 | 20 |  The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](doc:usage-plans-and-rate-limits-in-the-sp-api).  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.add_appointment_for_service_job_by_service_job_id_with_http_info(service_job_id, body, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str service_job_id: An Amazon defined service job identifier. (required)
        :param AddAppointmentRequest body: Add appointment operation input details. (required)
        :return: SetAppointmentResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['service_job_id', 'body']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        params = locals()
        for key, val in six.iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method add_appointment_for_service_job_by_service_job_id" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'service_job_id' is set
        if self.api_client.client_side_validation and ('service_job_id' not in params or
                                                       params['service_job_id'] is None):  # noqa: E501
            raise ValueError("Missing the required parameter `service_job_id` when calling `add_appointment_for_service_job_by_service_job_id`")  # noqa: E501
        # verify the required parameter 'body' is set
        if self.api_client.client_side_validation and ('body' not in params or
                                                       params['body'] is None):  # noqa: E501
            raise ValueError("Missing the required parameter `body` when calling `add_appointment_for_service_job_by_service_job_id`")  # noqa: E501

        if self.api_client.client_side_validation and ('service_job_id' in params and
                                                       len(params['service_job_id']) > 100):
            raise ValueError("Invalid value for parameter `service_job_id` when calling `add_appointment_for_service_job_by_service_job_id`, length must be less than or equal to `100`")  # noqa: E501
        if self.api_client.client_side_validation and ('service_job_id' in params and
                                                       len(params['service_job_id']) < 1):
            raise ValueError("Invalid value for parameter `service_job_id` when calling `add_appointment_for_service_job_by_service_job_id`, length must be greater than or equal to `1`")  # noqa: E501
        collection_formats = {}

        path_params = {}
        if 'service_job_id' in params:
            path_params['serviceJobId'] = params['service_job_id']  # noqa: E501

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        if 'body' in params:
            body_params = params['body']
        # 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

        return self.api_client.call_api(
            '/service/v1/serviceJobs/{serviceJobId}/appointments', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='SetAppointmentResponse',  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get('async_req'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats, api_models_module=self.api_models_module)

    def assign_appointment_resources(self, service_job_id, appointment_id, body, **kwargs):  # noqa: E501
        """assign_appointment_resources  # noqa: E501

        Assigns new resource(s) or overwrite/update the existing one(s) to a service job appointment.  **Usage Plan:**  | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 2 |  The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](doc:usage-plans-and-rate-limits-in-the-sp-api).  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.assign_appointment_resources(service_job_id, appointment_id, body, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str service_job_id: An Amazon-defined service job identifier. Get this value by calling the `getServiceJobs` operation of the Services API. (required)
        :param str appointment_id: An Amazon-defined identifier of active service job appointment. (required)
        :param AssignAppointmentResourcesRequest body: (required)
        :return: AssignAppointmentResourcesResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.assign_appointment_resources_with_http_info(service_job_id, appointment_id, body, **kwargs)  # noqa: E501
        else:
            (data) = self.assign_appointment_resources_with_http_info(service_job_id, appointment_id, body, **kwargs)  # noqa: E501
            return data

    def assign_appointment_resources_with_http_info(self, service_job_id, appointment_id, body, **kwargs):  # noqa: E501
        """assign_appointment_resources  # noqa: E501

        Assigns new resource(s) or overwrite/update the existing one(s) to a service job appointment.  **Usage Plan:**  | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 2 |  The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](doc:usage-plans-and-rate-limits-in-the-sp-api).  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.assign_appointment_resources_with_http_info(service_job_id, appointment_id, body, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str service_job_id: An Amazon-defined service job identifier. Get this value by calling the `getServiceJobs` operation of the Services API. (required)
        :param str appointment_id: An Amazon-defined identifier of active service job appointment. (required)
        :param AssignAppointmentResourcesRequest body: (required)
        :return: AssignAppointmentResourcesResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['service_job_id', 'appointment_id', 'body']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        params = locals()
        for key, val in six.iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method assign_appointment_resources" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'service_job_id' is set
        if self.api_client.client_side_validation and ('service_job_id' not in params or
                                                       params['service_job_id'] is None):  # noqa: E501
            raise ValueError("Missing the required parameter `service_job_id` when calling `assign_appointment_resources`")  # noqa: E501
        # verify the required parameter 'appointment_id' is set
        if self.api_client.client_side_validation and ('appointment_id' not in params or
                                                       params['appointment_id'] is None):  # noqa: E501
            raise ValueError("Missing the required parameter `appointment_id` when calling `assign_appointment_resources`")  # noqa: E501
        # verify the required parameter 'body' is set
        if self.api_client.client_side_validation and ('body' not in params or
                                                       params['body'] is None):  # noqa: E501
            raise ValueError("Missing the required parameter `body` when calling `assign_appointment_resources`")  # noqa: E501

        if self.api_client.client_side_validation and ('service_job_id' in params and
                                                       len(params['service_job_id']) > 100):
            raise ValueError("Invalid value for parameter `service_job_id` when calling `assign_appointment_resources`, length must be less than or equal to `100`")  # noqa: E501
        if self.api_client.client_side_validation and ('service_job_id' in params and
                                                       len(params['service_job_id']) < 1):
            raise ValueError("Invalid value for parameter `service_job_id` when calling `assign_appointment_resources`, length must be greater than or equal to `1`")  # noqa: E501
        if self.api_client.client_side_validation and ('appointment_id' in params and
                                                       len(params['appointment_id']) > 100):
            raise ValueError("Invalid value for parameter `appointment_id` when calling `assign_appointment_resources`, length must be less than or equal to `100`")  # noqa: E501
        if self.api_client.client_side_validation and ('appointment_id' in params and
                                                       len(params['appointment_id']) < 1):
            raise ValueError("Invalid value for parameter `appointment_id` when calling `assign_appointment_resources`, length must be greater than or equal to `1`")  # noqa: E501
        collection_formats = {}

        path_params = {}
        if 'service_job_id' in params:
            path_params['serviceJobId'] = params['service_job_id']  # noqa: E501
        if 'appointment_id' in params:
            path_params['appointmentId'] = params['appointment_id']  # noqa: E501

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        if 'body' in params:
            body_params = params['body']
        # 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

        return self.api_client.call_api(
            '/service/v1/serviceJobs/{serviceJobId}/appointments/{appointmentId}/resources', 'PUT',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='AssignAppointmentResourcesResponse',  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get('async_req'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats, api_models_module=self.api_models_module)

    def cancel_reservation(self, reservation_id, marketplace_ids, **kwargs):  # noqa: E501
        """cancel_reservation  # noqa: E501

        Cancel a reservation.   **Usage Plan:**  | Rate (requests per second) | Burst | | ---- | ---- | | 5 | 20 |  The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](doc:usage-plans-and-rate-limits-in-the-sp-api).  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.cancel_reservation(reservation_id, marketplace_ids, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str reservation_id: Reservation Identifier (required)
        :param List[str] marketplace_ids: An identifier for the marketplace in which the resource operates. (required)
        :return: CancelReservationResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.cancel_reservation_with_http_info(reservation_id, marketplace_ids, **kwargs)  # noqa: E501
        else:
            (data) = self.cancel_reservation_with_http_info(reservation_id, marketplace_ids, **kwargs)  # noqa: E501
            return data

    def cancel_reservation_with_http_info(self, reservation_id, marketplace_ids, **kwargs):  # noqa: E501
        """cancel_reservation  # noqa: E501

        Cancel a reservation.   **Usage Plan:**  | Rate (requests per second) | Burst | | ---- | ---- | | 5 | 20 |  The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](doc:usage-plans-and-rate-limits-in-the-sp-api).  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.cancel_reservation_with_http_info(reservation_id, marketplace_ids, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str reservation_id: Reservation Identifier (required)
        :param List[str] marketplace_ids: An identifier for the marketplace in which the resource operates. (required)
        :return: CancelReservationResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['reservation_id', 'marketplace_ids']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        params = locals()
        for key, val in six.iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method cancel_reservation" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'reservation_id' is set
        if self.api_client.client_side_validation and ('reservation_id' not in params or
                                                       params['reservation_id'] is None):  # noqa: E501
            raise ValueError("Missing the required parameter `reservation_id` when calling `cancel_reservation`")  # noqa: E501
        # verify the required parameter 'marketplace_ids' is set
        if self.api_client.client_side_validation and ('marketplace_ids' not in params or
                                                       params['marketplace_ids'] is None):  # noqa: E501
            raise ValueError("Missing the required parameter `marketplace_ids` when calling `cancel_reservation`")  # noqa: E501

        if self.api_client.client_side_validation and ('reservation_id' in params and
                                                       len(params['reservation_id']) > 100):
            raise ValueError("Invalid value for parameter `reservation_id` when calling `cancel_reservation`, length must be less than or equal to `100`")  # noqa: E501
        if self.api_client.client_side_validation and ('reservation_id' in params and
                                                       len(params['reservation_id']) < 1):
            raise ValueError("Invalid value for parameter `reservation_id` when calling `cancel_reservation`, length must be greater than or equal to `1`")  # noqa: E501
        if self.api_client.client_side_validation and ('marketplace_ids' in params and
                                            len(params['marketplace_ids']) > 1):
            raise ValueError("Invalid value for parameter `marketplace_ids` when calling `cancel_reservation`, number of items must be less than or equal to `1`")  # noqa: E501
        collection_formats = {}

        path_params = {}
        if 'reservation_id' in params:
            path_params['reservationId'] = params['reservation_id']  # noqa: E501

        query_params = []
        if 'marketplace_ids' in params:
            query_params.append(('marketplaceIds', params['marketplace_ids']))  # noqa: E501
            collection_formats['marketplaceIds'] = 'csv'  # 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

        return self.api_client.call_api(
            '/service/v1/reservation/{reservationId}', 'DELETE',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='CancelReservationResponse',  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get('async_req'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats, api_models_module=self.api_models_module)

    def cancel_service_job_by_service_job_id(self, service_job_id, cancellation_reason_code, **kwargs):  # noqa: E501
        """cancel_service_job_by_service_job_id  # noqa: E501

        Cancels the service job indicated by the service job identifier specified.  **Usage Plan:**  | Rate (requests per second) | Burst | | ---- | ---- | | 5 | 20 |  The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](doc:usage-plans-and-rate-limits-in-the-sp-api).  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.cancel_service_job_by_service_job_id(service_job_id, cancellation_reason_code, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str service_job_id: An Amazon defined service job identifier. (required)
        :param str cancellation_reason_code: A cancel reason code that specifies the reason for cancelling a service job. (required)
        :return: CancelServiceJobByServiceJobIdResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.cancel_service_job_by_service_job_id_with_http_info(service_job_id, cancellation_reason_code, **kwargs)  # noqa: E501
        else:
            (data) = self.cancel_service_job_by_service_job_id_with_http_info(service_job_id, cancellation_reason_code, **kwargs)  # noqa: E501
            return data

    def cancel_service_job_by_service_job_id_with_http_info(self, service_job_id, cancellation_reason_code, **kwargs):  # noqa: E501
        """cancel_service_job_by_service_job_id  # noqa: E501

        Cancels the service job indicated by the service job identifier specified.  **Usage Plan:**  | Rate (requests per second) | Burst | | ---- | ---- | | 5 | 20 |  The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](doc:usage-plans-and-rate-limits-in-the-sp-api).  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.cancel_service_job_by_service_job_id_with_http_info(service_job_id, cancellation_reason_code, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str service_job_id: An Amazon defined service job identifier. (required)
        :param str cancellation_reason_code: A cancel reason code that specifies the reason for cancelling a service job. (required)
        :return: CancelServiceJobByServiceJobIdResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['service_job_id', 'cancellation_reason_code']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        params = locals()
        for key, val in six.iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method cancel_service_job_by_service_job_id" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'service_job_id' is set
        if self.api_client.client_side_validation and ('service_job_id' not in params or
                                                       params['service_job_id'] is None):  # noqa: E501
            raise ValueError("Missing the required parameter `service_job_id` when calling `cancel_service_job_by_service_job_id`")  # noqa: E501
        # verify the required parameter 'cancellation_reason_code' is set
        if self.api_client.client_side_validation and ('cancellation_reason_code' not in params or
                                                       params['cancellation_reason_code'] is None):  # noqa: E501
            raise ValueError("Missing the required parameter `cancellation_reason_code` when calling `cancel_service_job_by_service_job_id`")  # noqa: E501

        if self.api_client.client_side_validation and ('service_job_id' in params and
                                                       len(params['service_job_id']) > 100):
            raise ValueError("Invalid value for parameter `service_job_id` when calling `cancel_service_job_by_service_job_id`, length must be less than or equal to `100`")  # noqa: E501
        if self.api_client.client_side_validation and ('service_job_id' in params and
                                                       len(params['service_job_id']) < 1):
            raise ValueError("Invalid value for parameter `service_job_id` when calling `cancel_service_job_by_service_job_id`, length must be greater than or equal to `1`")  # noqa: E501
        if self.api_client.client_side_validation and ('cancellation_reason_code' in params and
                                                       len(params['cancellation_reason_code']) > 100):
            raise ValueError("Invalid value for parameter `cancellation_reason_code` when calling `cancel_service_job_by_service_job_id`, length must be less than or equal to `100`")  # noqa: E501
        if self.api_client.client_side_validation and ('cancellation_reason_code' in params and
                                                       len(params['cancellation_reason_code']) < 1):
            raise ValueError("Invalid value for parameter `cancellation_reason_code` when calling `cancel_service_job_by_service_job_id`, length must be greater than or equal to `1`")  # noqa: E501
        if self.api_client.client_side_validation and ('cancellation_reason_code' in params and not re.search(r'^[A-Z0-9_]*$', params['cancellation_reason_code'])):  # noqa: E501
            raise ValueError("Invalid value for parameter `cancellation_reason_code` when calling `cancel_service_job_by_service_job_id`, must conform to the pattern `/^[A-Z0-9_]*$/`")  # noqa: E501
        collection_formats = {}

        path_params = {}
        if 'service_job_id' in params:
            path_params['serviceJobId'] = params['service_job_id']  # noqa: E501

        query_params = []
        if 'cancellation_reason_code' in params:
            query_params.append(('cancellationReasonCode', params['cancellation_reason_code']))  # 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

        return self.api_client.call_api(
            '/service/v1/serviceJobs/{serviceJobId}/cancellations', 'PUT',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='CancelServiceJobByServiceJobIdResponse',  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get('async_req'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats, api_models_module=self.api_models_module)

    def complete_service_job_by_service_job_id(self, service_job_id, **kwargs):  # noqa: E501
        """complete_service_job_by_service_job_id  # noqa: E501

        Completes the service job indicated by the service job identifier specified.  **Usage Plan:**  | Rate (requests per second) | Burst | | ---- | ---- | | 5 | 20 |  The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](doc:usage-plans-and-rate-limits-in-the-sp-api).  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.complete_service_job_by_service_job_id(service_job_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str service_job_id: An Amazon defined service job identifier. (required)
        :return: CompleteServiceJobByServiceJobIdResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.complete_service_job_by_service_job_id_with_http_info(service_job_id, **kwargs)  # noqa: E501
        else:
            (data) = self.complete_service_job_by_service_job_id_with_http_info(service_job_id, **kwargs)  # noqa: E501
            return data

    def complete_service_job_by_service_job_id_with_http_info(self, service_job_id, **kwargs):  # noqa: E501
        """complete_service_job_by_service_job_id  # noqa: E501

        Completes the service job indicated by the service job identifier specified.  **Usage Plan:**  | Rate (requests per second) | Burst | | ---- | ---- | | 5 | 20 |  The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](doc:usage-plans-and-rate-limits-in-the-sp-api).  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.complete_service_job_by_service_job_id_with_http_info(service_job_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str service_job_id: An Amazon defined service job identifier. (required)
        :return: CompleteServiceJobByServiceJobIdResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['service_job_id']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

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

        if self.api_client.client_side_validation and ('service_job_id' in params and
                                                       len(params['service_job_id']) > 100):
            raise ValueError("Invalid value for parameter `service_job_id` when calling `complete_service_job_by_service_job_id`, length must be less than or equal to `100`")  # noqa: E501
        if self.api_client.client_side_validation and ('service_job_id' in params and
                                                       len(params['service_job_id']) < 1):
            raise ValueError("Invalid value for parameter `service_job_id` when calling `complete_service_job_by_service_job_id`, length must be greater than or equal to `1`")  # noqa: E501
        collection_formats = {}

        path_params = {}
        if 'service_job_id' in params:
            path_params['serviceJobId'] = params['service_job_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

        return self.api_client.call_api(
            '/service/v1/serviceJobs/{serviceJobId}/completions', 'PUT',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='CompleteServiceJobByServiceJobIdResponse',  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get('async_req'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats, api_models_module=self.api_models_module)

    def create_reservation(self, marketplace_ids, body, **kwargs):  # noqa: E501
        """create_reservation  # noqa: E501

        Create a reservation.  **Usage Plan:**  | Rate (requests per second) | Burst | | ---- | ---- | | 5 | 20 |  The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](doc:usage-plans-and-rate-limits-in-the-sp-api).  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.create_reservation(marketplace_ids, body, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param List[str] marketplace_ids: An identifier for the marketplace in which the resource operates. (required)
        :param CreateReservationRequest body: Reservation details (required)
        :return: CreateReservationResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.create_reservation_with_http_info(marketplace_ids, body, **kwargs)  # noqa: E501
        else:
            (data) = self.create_reservation_with_http_info(marketplace_ids, body, **kwargs)  # noqa: E501
            return data

    def create_reservation_with_http_info(self, marketplace_ids, body, **kwargs):  # noqa: E501
        """create_reservation  # noqa: E501

        Create a reservation.  **Usage Plan:**  | Rate (requests per second) | Burst | | ---- | ---- | | 5 | 20 |  The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](doc:usage-plans-and-rate-limits-in-the-sp-api).  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.create_reservation_with_http_info(marketplace_ids, body, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param List[str] marketplace_ids: An identifier for the marketplace in which the resource operates. (required)
        :param CreateReservationRequest body: Reservation details (required)
        :return: CreateReservationResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['marketplace_ids', 'body']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        params = locals()
        for key, val in six.iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method create_reservation" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'marketplace_ids' is set
        if self.api_client.client_side_validation and ('marketplace_ids' not in params or
                                                       params['marketplace_ids'] is None):  # noqa: E501
            raise ValueError("Missing the required parameter `marketplace_ids` when calling `create_reservation`")  # noqa: E501
        # verify the required parameter 'body' is set
        if self.api_client.client_side_validation and ('body' not in params or
                                                       params['body'] is None):  # noqa: E501
            raise ValueError("Missing the required parameter `body` when calling `create_reservation`")  # noqa: E501

        if self.api_client.client_side_validation and ('marketplace_ids' in params and
                                            len(params['marketplace_ids']) > 1):
            raise ValueError("Invalid value for parameter `marketplace_ids` when calling `create_reservation`, number of items must be less than or equal to `1`")  # noqa: E501
        collection_formats = {}

        path_params = {}

        query_params = []
        if 'marketplace_ids' in params:
            query_params.append(('marketplaceIds', params['marketplace_ids']))  # noqa: E501
            collection_formats['marketplaceIds'] = 'csv'  # noqa: E501

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        if 'body' in params:
            body_params = params['body']
        # 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

        return self.api_client.call_api(
            '/service/v1/reservation', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='CreateReservationResponse',  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get('async_req'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats, api_models_module=self.api_models_module)

    def create_service_document_upload_destination(self, body, **kwargs):  # noqa: E501
        """create_service_document_upload_destination  # noqa: E501

        Creates an upload destination.  **Usage Plan:**  | Rate (requests per second) | Burst | | ---- | ---- | | 5 | 20 |  The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](doc:usage-plans-and-rate-limits-in-the-sp-api).  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.create_service_document_upload_destination(body, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param ServiceUploadDocument body: Upload document operation input details. (required)
        :return: CreateServiceDocumentUploadDestination
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.create_service_document_upload_destination_with_http_info(body, **kwargs)  # noqa: E501
        else:
            (data) = self.create_service_document_upload_destination_with_http_info(body, **kwargs)  # noqa: E501
            return data

    def create_service_document_upload_destination_with_http_info(self, body, **kwargs):  # noqa: E501
        """create_service_document_upload_destination  # noqa: E501

        Creates an upload destination.  **Usage Plan:**  | Rate (requests per second) | Burst | | ---- | ---- | | 5 | 20 |  The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](doc:usage-plans-and-rate-limits-in-the-sp-api).  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.create_service_document_upload_destination_with_http_info(body, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param ServiceUploadDocument body: Upload document operation input details. (required)
        :return: CreateServiceDocumentUploadDestination
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['body']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

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

        collection_formats = {}

        path_params = {}

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        if 'body' in params:
            body_params = params['body']
        # 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

        return self.api_client.call_api(
            '/service/v1/documents', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='CreateServiceDocumentUploadDestination',  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get('async_req'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats, api_models_module=self.api_models_module)

    def get_appointment_slots(self, asin, store_id, marketplace_ids, **kwargs):  # noqa: E501
        """get_appointment_slots  # noqa: E501

        Gets appointment slots as per the service context specified.  **Usage Plan:**  | Rate (requests per second) | Burst | | ---- | ---- | | 20 | 40 |  The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](doc:usage-plans-and-rate-limits-in-the-sp-api).  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.get_appointment_slots(asin, store_id, marketplace_ids, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str asin: ASIN associated with the service. (required)
        :param str store_id: Store identifier defining the region scope to retrive appointment slots. (required)
        :param List[str] marketplace_ids: An identifier for the marketplace for which appointment slots are queried (required)
        :param str start_time: A time from which the appointment slots will be retrieved. The specified time must be in ISO 8601 format. If `startTime` is provided, `endTime` should also be provided. Default value is as per business configuration.
        :param str end_time: A time up to which the appointment slots will be retrieved. The specified time must be in ISO 8601 format. If `endTime` is provided, `startTime` should also be provided. Default value is as per business configuration. Maximum range of appointment slots can be 90 days.
        :return: GetAppointmentSlotsResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.get_appointment_slots_with_http_info(asin, store_id, marketplace_ids, **kwargs)  # noqa: E501
        else:
            (data) = self.get_appointment_slots_with_http_info(asin, store_id, marketplace_ids, **kwargs)  # noqa: E501
            return data

    def get_appointment_slots_with_http_info(self, asin, store_id, marketplace_ids, **kwargs):  # noqa: E501
        """get_appointment_slots  # noqa: E501

        Gets appointment slots as per the service context specified.  **Usage Plan:**  | Rate (requests per second) | Burst | | ---- | ---- | | 20 | 40 |  The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](doc:usage-plans-and-rate-limits-in-the-sp-api).  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.get_appointment_slots_with_http_info(asin, store_id, marketplace_ids, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str asin: ASIN associated with the service. (required)
        :param str store_id: Store identifier defining the region scope to retrive appointment slots. (required)
        :param List[str] marketplace_ids: An identifier for the marketplace for which appointment slots are queried (required)
        :param str start_time: A time from which the appointment slots will be retrieved. The specified time must be in ISO 8601 format. If `startTime` is provided, `endTime` should also be provided. Default value is as per business configuration.
        :param str end_time: A time up to which the appointment slots will be retrieved. The specified time must be in ISO 8601 format. If `endTime` is provided, `startTime` should also be provided. Default value is as per business configuration. Maximum range of appointment slots can be 90 days.
        :return: GetAppointmentSlotsResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['asin', 'store_id', 'marketplace_ids', 'start_time', 'end_time']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        params = locals()
        for key, val in six.iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method get_appointment_slots" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'asin' is set
        if self.api_client.client_side_validation and ('asin' not in params or
                                                       params['asin'] is None):  # noqa: E501
            raise ValueError("Missing the required parameter `asin` when calling `get_appointment_slots`")  # noqa: E501
        # verify the required parameter 'store_id' is set
        if self.api_client.client_side_validation and ('store_id' not in params or
                                                       params['store_id'] is None):  # noqa: E501
            raise ValueError("Missing the required parameter `store_id` when calling `get_appointment_slots`")  # noqa: E501
        # verify the required parameter 'marketplace_ids' is set
        if self.api_client.client_side_validation and ('marketplace_ids' not in params or
                                                       params['marketplace_ids'] is None):  # noqa: E501
            raise ValueError("Missing the required parameter `marketplace_ids` when calling `get_appointment_slots`")  # noqa: E501

        if self.api_client.client_side_validation and ('store_id' in params and
                                                       len(params['store_id']) > 100):
            raise ValueError("Invalid value for parameter `store_id` when calling `get_appointment_slots`, length must be less than or equal to `100`")  # noqa: E501
        if self.api_client.client_side_validation and ('store_id' in params and
                                                       len(params['store_id']) < 1):
            raise ValueError("Invalid value for parameter `store_id` when calling `get_appointment_slots`, length must be greater than or equal to `1`")  # noqa: E501
        if self.api_client.client_side_validation and ('marketplace_ids' in params and
                                            len(params['marketplace_ids']) > 1):
            raise ValueError("Invalid value for parameter `marketplace_ids` when calling `get_appointment_slots`, number of items must be less than or equal to `1`")  # noqa: E501
        collection_formats = {}

        path_params = {}

        query_params = []
        if 'asin' in params:
            query_params.append(('asin', params['asin']))  # noqa: E501
        if 'store_id' in params:
            query_params.append(('storeId', params['store_id']))  # noqa: E501
        if 'marketplace_ids' in params:
            query_params.append(('marketplaceIds', params['marketplace_ids']))  # noqa: E501
            collection_formats['marketplaceIds'] = 'csv'  # noqa: E501
        if 'start_time' in params:
            query_params.append(('startTime', params['start_time']))  # noqa: E501
        if 'end_time' in params:
            query_params.append(('endTime', params['end_time']))  # 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

        return self.api_client.call_api(
            '/service/v1/appointmentSlots', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='GetAppointmentSlotsResponse',  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get('async_req'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats, api_models_module=self.api_models_module)

    def get_appointmment_slots_by_job_id(self, service_job_id, marketplace_ids, **kwargs):  # noqa: E501
        """get_appointmment_slots_by_job_id  # noqa: E501

        Gets appointment slots for the service associated with the service job id specified.  **Usage Plan:**  | Rate (requests per second) | Burst | | ---- | ---- | | 5 | 20 |  The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](doc:usage-plans-and-rate-limits-in-the-sp-api).  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.get_appointmment_slots_by_job_id(service_job_id, marketplace_ids, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str service_job_id: A service job identifier to retrive appointment slots for associated service. (required)
        :param List[str] marketplace_ids: An identifier for the marketplace in which the resource operates. (required)
        :param str start_time: A time from which the appointment slots will be retrieved. The specified time must be in ISO 8601 format. If `startTime` is provided, `endTime` should also be provided. Default value is as per business configuration.
        :param str end_time: A time up to which the appointment slots will be retrieved. The specified time must be in ISO 8601 format. If `endTime` is provided, `startTime` should also be provided. Default value is as per business configuration. Maximum range of appointment slots can be 90 days.
        :return: GetAppointmentSlotsResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.get_appointmment_slots_by_job_id_with_http_info(service_job_id, marketplace_ids, **kwargs)  # noqa: E501
        else:
            (data) = self.get_appointmment_slots_by_job_id_with_http_info(service_job_id, marketplace_ids, **kwargs)  # noqa: E501
            return data

    def get_appointmment_slots_by_job_id_with_http_info(self, service_job_id, marketplace_ids, **kwargs):  # noqa: E501
        """get_appointmment_slots_by_job_id  # noqa: E501

        Gets appointment slots for the service associated with the service job id specified.  **Usage Plan:**  | Rate (requests per second) | Burst | | ---- | ---- | | 5 | 20 |  The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](doc:usage-plans-and-rate-limits-in-the-sp-api).  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.get_appointmment_slots_by_job_id_with_http_info(service_job_id, marketplace_ids, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str service_job_id: A service job identifier to retrive appointment slots for associated service. (required)
        :param List[str] marketplace_ids: An identifier for the marketplace in which the resource operates. (required)
        :param str start_time: A time from which the appointment slots will be retrieved. The specified time must be in ISO 8601 format. If `startTime` is provided, `endTime` should also be provided. Default value is as per business configuration.
        :param str end_time: A time up to which the appointment slots will be retrieved. The specified time must be in ISO 8601 format. If `endTime` is provided, `startTime` should also be provided. Default value is as per business configuration. Maximum range of appointment slots can be 90 days.
        :return: GetAppointmentSlotsResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['service_job_id', 'marketplace_ids', 'start_time', 'end_time']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        params = locals()
        for key, val in six.iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method get_appointmment_slots_by_job_id" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'service_job_id' is set
        if self.api_client.client_side_validation and ('service_job_id' not in params or
                                                       params['service_job_id'] is None):  # noqa: E501
            raise ValueError("Missing the required parameter `service_job_id` when calling `get_appointmment_slots_by_job_id`")  # noqa: E501
        # verify the required parameter 'marketplace_ids' is set
        if self.api_client.client_side_validation and ('marketplace_ids' not in params or
                                                       params['marketplace_ids'] is None):  # noqa: E501
            raise ValueError("Missing the required parameter `marketplace_ids` when calling `get_appointmment_slots_by_job_id`")  # noqa: E501

        if self.api_client.client_side_validation and ('service_job_id' in params and
                                                       len(params['service_job_id']) > 100):
            raise ValueError("Invalid value for parameter `service_job_id` when calling `get_appointmment_slots_by_job_id`, length must be less than or equal to `100`")  # noqa: E501
        if self.api_client.client_side_validation and ('service_job_id' in params and
                                                       len(params['service_job_id']) < 1):
            raise ValueError("Invalid value for parameter `service_job_id` when calling `get_appointmment_slots_by_job_id`, length must be greater than or equal to `1`")  # noqa: E501
        if self.api_client.client_side_validation and ('marketplace_ids' in params and
                                            len(params['marketplace_ids']) > 1):
            raise ValueError("Invalid value for parameter `marketplace_ids` when calling `get_appointmment_slots_by_job_id`, number of items must be less than or equal to `1`")  # noqa: E501
        collection_formats = {}

        path_params = {}
        if 'service_job_id' in params:
            path_params['serviceJobId'] = params['service_job_id']  # noqa: E501

        query_params = []
        if 'marketplace_ids' in params:
            query_params.append(('marketplaceIds', params['marketplace_ids']))  # noqa: E501
            collection_formats['marketplaceIds'] = 'csv'  # noqa: E501
        if 'start_time' in params:
            query_params.append(('startTime', params['start_time']))  # noqa: E501
        if 'end_time' in params:
            query_params.append(('endTime', params['end_time']))  # 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

        return self.api_client.call_api(
            '/service/v1/serviceJobs/{serviceJobId}/appointmentSlots', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='GetAppointmentSlotsResponse',  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get('async_req'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats, api_models_module=self.api_models_module)

    def get_fixed_slot_capacity(self, resource_id, marketplace_ids, body, **kwargs):  # noqa: E501
        """get_fixed_slot_capacity  # noqa: E501

        Provides capacity in fixed-size slots.   **Usage Plan:**  | Rate (requests per second) | Burst | | ---- | ---- | | 5 | 20 |  The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](doc:usage-plans-and-rate-limits-in-the-sp-api).  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.get_fixed_slot_capacity(resource_id, marketplace_ids, body, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str resource_id: Resource Identifier. (required)
        :param List[str] marketplace_ids: An identifier for the marketplace in which the resource operates. (required)
        :param FixedSlotCapacityQuery body: Request body. (required)
        :param str next_page_token: Next page token returned in the response of your previous request.
        :return: FixedSlotCapacity
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.get_fixed_slot_capacity_with_http_info(resource_id, marketplace_ids, body, **kwargs)  # noqa: E501
        else:
            (data) = self.get_fixed_slot_capacity_with_http_info(resource_id, marketplace_ids, body, **kwargs)  # noqa: E501
            return data

    def get_fixed_slot_capacity_with_http_info(self, resource_id, marketplace_ids, body, **kwargs):  # noqa: E501
        """get_fixed_slot_capacity  # noqa: E501

        Provides capacity in fixed-size slots.   **Usage Plan:**  | Rate (requests per second) | Burst | | ---- | ---- | | 5 | 20 |  The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](doc:usage-plans-and-rate-limits-in-the-sp-api).  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.get_fixed_slot_capacity_with_http_info(resource_id, marketplace_ids, body, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str resource_id: Resource Identifier. (required)
        :param List[str] marketplace_ids: An identifier for the marketplace in which the resource operates. (required)
        :param FixedSlotCapacityQuery body: Request body. (required)
        :param str next_page_token: Next page token returned in the response of your previous request.
        :return: FixedSlotCapacity
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['resource_id', 'marketplace_ids', 'body', 'next_page_token']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        params = locals()
        for key, val in six.iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method get_fixed_slot_capacity" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'resource_id' is set
        if self.api_client.client_side_validation and ('resource_id' not in params or
                                                       params['resource_id'] is None):  # noqa: E501
            raise ValueError("Missing the required parameter `resource_id` when calling `get_fixed_slot_capacity`")  # noqa: E501
        # verify the required parameter 'marketplace_ids' is set
        if self.api_client.client_side_validation and ('marketplace_ids' not in params or
                                                       params['marketplace_ids'] is None):  # noqa: E501
            raise ValueError("Missing the required parameter `marketplace_ids` when calling `get_fixed_slot_capacity`")  # noqa: E501
        # verify the required parameter 'body' is set
        if self.api_client.client_side_validation and ('body' not in params or
                                                       params['body'] is None):  # noqa: E501
            raise ValueError("Missing the required parameter `body` when calling `get_fixed_slot_capacity`")  # noqa: E501

        if self.api_client.client_side_validation and ('resource_id' in params and
                                                       len(params['resource_id']) > 100):
            raise ValueError("Invalid value for parameter `resource_id` when calling `get_fixed_slot_capacity`, length must be less than or equal to `100`")  # noqa: E501
        if self.api_client.client_side_validation and ('resource_id' in params and
                                                       len(params['resource_id']) < 1):
            raise ValueError("Invalid value for parameter `resource_id` when calling `get_fixed_slot_capacity`, length must be greater than or equal to `1`")  # noqa: E501
        if self.api_client.client_side_validation and ('marketplace_ids' in params and
                                            len(params['marketplace_ids']) > 1):
            raise ValueError("Invalid value for parameter `marketplace_ids` when calling `get_fixed_slot_capacity`, number of items must be less than or equal to `1`")  # noqa: E501
        collection_formats = {}

        path_params = {}
        if 'resource_id' in params:
            path_params['resourceId'] = params['resource_id']  # noqa: E501

        query_params = []
        if 'marketplace_ids' in params:
            query_params.append(('marketplaceIds', params['marketplace_ids']))  # noqa: E501
            collection_formats['marketplaceIds'] = 'csv'  # noqa: E501
        if 'next_page_token' in params:
            query_params.append(('nextPageToken', params['next_page_token']))  # noqa: E501

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        if 'body' in params:
            body_params = params['body']
        # 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

        return self.api_client.call_api(
            '/service/v1/serviceResources/{resourceId}/capacity/fixed', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='FixedSlotCapacity',  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get('async_req'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats, api_models_module=self.api_models_module)

    def get_range_slot_capacity(self, resource_id, marketplace_ids, body, **kwargs):  # noqa: E501
        """get_range_slot_capacity  # noqa: E501

        Provides capacity slots in a format similar to availability records.  **Usage Plan:**  | Rate (requests per second) | Burst | | ---- | ---- | | 5 | 20 |  The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](doc:usage-plans-and-rate-limits-in-the-sp-api).  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.get_range_slot_capacity(resource_id, marketplace_ids, body, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str resource_id: Resource Identifier. (required)
        :param List[str] marketplace_ids: An identifier for the marketplace in which the resource operates. (required)
        :param RangeSlotCapacityQuery body: Request body. (required)
        :param str next_page_token: Next page token returned in the response of your previous request.
        :return: RangeSlotCapacity
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.get_range_slot_capacity_with_http_info(resource_id, marketplace_ids, body, **kwargs)  # noqa: E501
        else:
            (data) = self.get_range_slot_capacity_with_http_info(resource_id, marketplace_ids, body, **kwargs)  # noqa: E501
            return data

    def get_range_slot_capacity_with_http_info(self, resource_id, marketplace_ids, body, **kwargs):  # noqa: E501
        """get_range_slot_capacity  # noqa: E501

        Provides capacity slots in a format similar to availability records.  **Usage Plan:**  | Rate (requests per second) | Burst | | ---- | ---- | | 5 | 20 |  The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](doc:usage-plans-and-rate-limits-in-the-sp-api).  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.get_range_slot_capacity_with_http_info(resource_id, marketplace_ids, body, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str resource_id: Resource Identifier. (required)
        :param List[str] marketplace_ids: An identifier for the marketplace in which the resource operates. (required)
        :param RangeSlotCapacityQuery body: Request body. (required)
        :param str next_page_token: Next page token returned in the response of your previous request.
        :return: RangeSlotCapacity
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['resource_id', 'marketplace_ids', 'body', 'next_page_token']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        params = locals()
        for key, val in six.iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method get_range_slot_capacity" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'resource_id' is set
        if self.api_client.client_side_validation and ('resource_id' not in params or
                                                       params['resource_id'] is None):  # noqa: E501
            raise ValueError("Missing the required parameter `resource_id` when calling `get_range_slot_capacity`")  # noqa: E501
        # verify the required parameter 'marketplace_ids' is set
        if self.api_client.client_side_validation and ('marketplace_ids' not in params or
                                                       params['marketplace_ids'] is None):  # noqa: E501
            raise ValueError("Missing the required parameter `marketplace_ids` when calling `get_range_slot_capacity`")  # noqa: E501
        # verify the required parameter 'body' is set
        if self.api_client.client_side_validation and ('body' not in params or
                                                       params['body'] is None):  # noqa: E501
            raise ValueError("Missing the required parameter `body` when calling `get_range_slot_capacity`")  # noqa: E501

        if self.api_client.client_side_validation and ('resource_id' in params and
                                                       len(params['resource_id']) > 100):
            raise ValueError("Invalid value for parameter `resource_id` when calling `get_range_slot_capacity`, length must be less than or equal to `100`")  # noqa: E501
        if self.api_client.client_side_validation and ('resource_id' in params and
                                                       len(params['resource_id']) < 1):
            raise ValueError("Invalid value for parameter `resource_id` when calling `get_range_slot_capacity`, length must be greater than or equal to `1`")  # noqa: E501
        if self.api_client.client_side_validation and ('marketplace_ids' in params and
                                            len(params['marketplace_ids']) > 1):
            raise ValueError("Invalid value for parameter `marketplace_ids` when calling `get_range_slot_capacity`, number of items must be less than or equal to `1`")  # noqa: E501
        collection_formats = {}

        path_params = {}
        if 'resource_id' in params:
            path_params['resourceId'] = params['resource_id']  # noqa: E501

        query_params = []
        if 'marketplace_ids' in params:
            query_params.append(('marketplaceIds', params['marketplace_ids']))  # noqa: E501
            collection_formats['marketplaceIds'] = 'csv'  # noqa: E501
        if 'next_page_token' in params:
            query_params.append(('nextPageToken', params['next_page_token']))  # noqa: E501

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        if 'body' in params:
            body_params = params['body']
        # 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

        return self.api_client.call_api(
            '/service/v1/serviceResources/{resourceId}/capacity/range', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='RangeSlotCapacity',  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get('async_req'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats, api_models_module=self.api_models_module)

    def get_service_job_by_service_job_id(self, service_job_id, **kwargs):  # noqa: E501
        """get_service_job_by_service_job_id  # noqa: E501

        Gets details of service job indicated by the provided `serviceJobID`.  **Usage Plan:**  | Rate (requests per second) | Burst | | ---- | ---- | | 20 | 40 |  The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](doc:usage-plans-and-rate-limits-in-the-sp-api).  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.get_service_job_by_service_job_id(service_job_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str service_job_id: A service job identifier. (required)
        :return: GetServiceJobByServiceJobIdResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.get_service_job_by_service_job_id_with_http_info(service_job_id, **kwargs)  # noqa: E501
        else:
            (data) = self.get_service_job_by_service_job_id_with_http_info(service_job_id, **kwargs)  # noqa: E501
            return data

    def get_service_job_by_service_job_id_with_http_info(self, service_job_id, **kwargs):  # noqa: E501
        """get_service_job_by_service_job_id  # noqa: E501

        Gets details of service job indicated by the provided `serviceJobID`.  **Usage Plan:**  | Rate (requests per second) | Burst | | ---- | ---- | | 20 | 40 |  The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](doc:usage-plans-and-rate-limits-in-the-sp-api).  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.get_service_job_by_service_job_id_with_http_info(service_job_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str service_job_id: A service job identifier. (required)
        :return: GetServiceJobByServiceJobIdResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['service_job_id']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

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

        if self.api_client.client_side_validation and ('service_job_id' in params and
                                                       len(params['service_job_id']) > 100):
            raise ValueError("Invalid value for parameter `service_job_id` when calling `get_service_job_by_service_job_id`, length must be less than or equal to `100`")  # noqa: E501
        if self.api_client.client_side_validation and ('service_job_id' in params and
                                                       len(params['service_job_id']) < 1):
            raise ValueError("Invalid value for parameter `service_job_id` when calling `get_service_job_by_service_job_id`, length must be greater than or equal to `1`")  # noqa: E501
        collection_formats = {}

        path_params = {}
        if 'service_job_id' in params:
            path_params['serviceJobId'] = params['service_job_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

        return self.api_client.call_api(
            '/service/v1/serviceJobs/{serviceJobId}', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='GetServiceJobByServiceJobIdResponse',  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get('async_req'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats, api_models_module=self.api_models_module)

    def get_service_jobs(self, marketplace_ids, **kwargs):  # noqa: E501
        """get_service_jobs  # noqa: E501

        Gets service job details for the specified filter query.  **Usage Plan:**  | Rate (requests per second) | Burst | | ---- | ---- | | 10 | 40 |  The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](doc:usage-plans-and-rate-limits-in-the-sp-api).  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.get_service_jobs(marketplace_ids, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param List[str] marketplace_ids: Used to select jobs that were placed in the specified marketplaces. (required)
        :param List[str] service_order_ids: List of service order ids for the query you want to perform.Max values supported 20.
        :param List[str] service_job_status: A list of one or more job status by which to filter the list of jobs.
        :param str page_token: String returned in the response of your previous request.
        :param int page_size: A non-negative integer that indicates the maximum number of jobs to return in the list, Value must be 1 - 20. Default 20.
        :param str sort_field: Sort fields on which you want to sort the output.
        :param str sort_order: Sort order for the query you want to perform.
        :param str created_after: A date used for selecting jobs created at or after a specified time. Must be in ISO 8601 format. Required if `LastUpdatedAfter` is not specified. Specifying both `CreatedAfter` and `LastUpdatedAfter` returns an error.
        :param str created_before: A date used for selecting jobs created at or before a specified time. Must be in ISO 8601 format.
        :param str last_updated_after: A date used for selecting jobs updated at or after a specified time. Must be in ISO 8601 format. Required if `createdAfter` is not specified. Specifying both `CreatedAfter` and `LastUpdatedAfter` returns an error.
        :param str last_updated_before: A date used for selecting jobs updated at or before a specified time. Must be in ISO 8601 format.
        :param str schedule_start_date: A date used for filtering jobs schedules at or after a specified time. Must be in ISO 8601 format. Schedule end date should not be earlier than schedule start date.
        :param str schedule_end_date: A date used for filtering jobs schedules at or before a specified time. Must be in ISO 8601 format. Schedule end date should not be earlier than schedule start date.
        :param List[str] asins: List of Amazon Standard Identification Numbers (ASIN) of the items. Max values supported is 20.
        :param List[str] required_skills: A defined set of related knowledge, skills, experience, tools, materials, and work processes common to service delivery for a set of products and/or service scenarios. Max values supported is 20.
        :param List[str] store_ids: List of Amazon-defined identifiers for the region scope. Max values supported is 50.
        :return: GetServiceJobsResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.get_service_jobs_with_http_info(marketplace_ids, **kwargs)  # noqa: E501
        else:
            (data) = self.get_service_jobs_with_http_info(marketplace_ids, **kwargs)  # noqa: E501
            return data

    def get_service_jobs_with_http_info(self, marketplace_ids, **kwargs):  # noqa: E501
        """get_service_jobs  # noqa: E501

        Gets service job details for the specified filter query.  **Usage Plan:**  | Rate (requests per second) | Burst | | ---- | ---- | | 10 | 40 |  The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](doc:usage-plans-and-rate-limits-in-the-sp-api).  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.get_service_jobs_with_http_info(marketplace_ids, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param List[str] marketplace_ids: Used to select jobs that were placed in the specified marketplaces. (required)
        :param List[str] service_order_ids: List of service order ids for the query you want to perform.Max values supported 20.
        :param List[str] service_job_status: A list of one or more job status by which to filter the list of jobs.
        :param str page_token: String returned in the response of your previous request.
        :param int page_size: A non-negative integer that indicates the maximum number of jobs to return in the list, Value must be 1 - 20. Default 20.
        :param str sort_field: Sort fields on which you want to sort the output.
        :param str sort_order: Sort order for the query you want to perform.
        :param str created_after: A date used for selecting jobs created at or after a specified time. Must be in ISO 8601 format. Required if `LastUpdatedAfter` is not specified. Specifying both `CreatedAfter` and `LastUpdatedAfter` returns an error.
        :param str created_before: A date used for selecting jobs created at or before a specified time. Must be in ISO 8601 format.
        :param str last_updated_after: A date used for selecting jobs updated at or after a specified time. Must be in ISO 8601 format. Required if `createdAfter` is not specified. Specifying both `CreatedAfter` and `LastUpdatedAfter` returns an error.
        :param str last_updated_before: A date used for selecting jobs updated at or before a specified time. Must be in ISO 8601 format.
        :param str schedule_start_date: A date used for filtering jobs schedules at or after a specified time. Must be in ISO 8601 format. Schedule end date should not be earlier than schedule start date.
        :param str schedule_end_date: A date used for filtering jobs schedules at or before a specified time. Must be in ISO 8601 format. Schedule end date should not be earlier than schedule start date.
        :param List[str] asins: List of Amazon Standard Identification Numbers (ASIN) of the items. Max values supported is 20.
        :param List[str] required_skills: A defined set of related knowledge, skills, experience, tools, materials, and work processes common to service delivery for a set of products and/or service scenarios. Max values supported is 20.
        :param List[str] store_ids: List of Amazon-defined identifiers for the region scope. Max values supported is 50.
        :return: GetServiceJobsResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['marketplace_ids', 'service_order_ids', 'service_job_status', 'page_token', 'page_size', 'sort_field', 'sort_order', 'created_after', 'created_before', 'last_updated_after', 'last_updated_before', 'schedule_start_date', 'schedule_end_date', 'asins', 'required_skills', 'store_ids']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

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

        if self.api_client.client_side_validation and ('marketplace_ids' in params and
                                            len(params['marketplace_ids']) > 1):
            raise ValueError("Invalid value for parameter `marketplace_ids` when calling `get_service_jobs`, number of items must be less than or equal to `1`")  # noqa: E501
        if self.api_client.client_side_validation and ('service_order_ids' in params and
                                            len(params['service_order_ids']) > 20):
            raise ValueError("Invalid value for parameter `service_order_ids` when calling `get_service_jobs`, number of items must be less than or equal to `20`")  # noqa: E501
        if self.api_client.client_side_validation and ('service_order_ids' in params and
                                            len(params['service_order_ids']) < 1):
            raise ValueError("Invalid value for parameter `service_order_ids` when calling `get_service_jobs`, number of items must be greater than or equal to `1`")  # noqa: E501
        if self.api_client.client_side_validation and ('page_size' in params and params['page_size'] > 20):  # noqa: E501
            raise ValueError("Invalid value for parameter `page_size` when calling `get_service_jobs`, must be a value less than or equal to `20`")  # noqa: E501
        if self.api_client.client_side_validation and ('page_size' in params and params['page_size'] < 1):  # noqa: E501
            raise ValueError("Invalid value for parameter `page_size` when calling `get_service_jobs`, must be a value greater than or equal to `1`")  # noqa: E501
        if self.api_client.client_side_validation and ('asins' in params and
                                            len(params['asins']) > 20):
            raise ValueError("Invalid value for parameter `asins` when calling `get_service_jobs`, number of items must be less than or equal to `20`")  # noqa: E501
        if self.api_client.client_side_validation and ('asins' in params and
                                            len(params['asins']) < 1):
            raise ValueError("Invalid value for parameter `asins` when calling `get_service_jobs`, number of items must be greater than or equal to `1`")  # noqa: E501
        if self.api_client.client_side_validation and ('required_skills' in params and
                                            len(params['required_skills']) > 20):
            raise ValueError("Invalid value for parameter `required_skills` when calling `get_service_jobs`, number of items must be less than or equal to `20`")  # noqa: E501
        if self.api_client.client_side_validation and ('required_skills' in params and
                                            len(params['required_skills']) < 1):
            raise ValueError("Invalid value for parameter `required_skills` when calling `get_service_jobs`, number of items must be greater than or equal to `1`")  # noqa: E501
        if self.api_client.client_side_validation and ('store_ids' in params and
                                            len(params['store_ids']) > 50):
            raise ValueError("Invalid value for parameter `store_ids` when calling `get_service_jobs`, number of items must be less than or equal to `50`")  # noqa: E501
        if self.api_client.client_side_validation and ('store_ids' in params and
                                            len(params['store_ids']) < 1):
            raise ValueError("Invalid value for parameter `store_ids` when calling `get_service_jobs`, number of items must be greater than or equal to `1`")  # noqa: E501
        collection_formats = {}

        path_params = {}

        query_params = []
        if 'service_order_ids' in params:
            query_params.append(('serviceOrderIds', params['service_order_ids']))  # noqa: E501
            collection_formats['serviceOrderIds'] = 'csv'  # noqa: E501
        if 'service_job_status' in params:
            query_params.append(('serviceJobStatus', params['service_job_status']))  # noqa: E501
            collection_formats['serviceJobStatus'] = 'csv'  # noqa: E501
        if 'page_token' in params:
            query_params.append(('pageToken', params['page_token']))  # noqa: E501
        if 'page_size' in params:
            query_params.append(('pageSize', params['page_size']))  # noqa: E501
        if 'sort_field' in params:
            query_params.append(('sortField', params['sort_field']))  # noqa: E501
        if 'sort_order' in params:
            query_params.append(('sortOrder', params['sort_order']))  # noqa: E501
        if 'created_after' in params:
            query_params.append(('createdAfter', params['created_after']))  # noqa: E501
        if 'created_before' in params:
            query_params.append(('createdBefore', params['created_before']))  # noqa: E501
        if 'last_updated_after' in params:
            query_params.append(('lastUpdatedAfter', params['last_updated_after']))  # noqa: E501
        if 'last_updated_before' in params:
            query_params.append(('lastUpdatedBefore', params['last_updated_before']))  # noqa: E501
        if 'schedule_start_date' in params:
            query_params.append(('scheduleStartDate', params['schedule_start_date']))  # noqa: E501
        if 'schedule_end_date' in params:
            query_params.append(('scheduleEndDate', params['schedule_end_date']))  # noqa: E501
        if 'marketplace_ids' in params:
            query_params.append(('marketplaceIds', params['marketplace_ids']))  # noqa: E501
            collection_formats['marketplaceIds'] = 'csv'  # noqa: E501
        if 'asins' in params:
            query_params.append(('asins', params['asins']))  # noqa: E501
            collection_formats['asins'] = 'csv'  # noqa: E501
        if 'required_skills' in params:
            query_params.append(('requiredSkills', params['required_skills']))  # noqa: E501
            collection_formats['requiredSkills'] = 'csv'  # noqa: E501
        if 'store_ids' in params:
            query_params.append(('storeIds', params['store_ids']))  # noqa: E501
            collection_formats['storeIds'] = 'csv'  # 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

        return self.api_client.call_api(
            '/service/v1/serviceJobs', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='GetServiceJobsResponse',  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get('async_req'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats, api_models_module=self.api_models_module)

    def reschedule_appointment_for_service_job_by_service_job_id(self, service_job_id, appointment_id, body, **kwargs):  # noqa: E501
        """reschedule_appointment_for_service_job_by_service_job_id  # noqa: E501

        Reschedules an appointment for the service job indicated by the service job identifier specified.  **Usage Plan:**  | Rate (requests per second) | Burst | | ---- | ---- | | 5 | 20 |  The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](doc:usage-plans-and-rate-limits-in-the-sp-api).  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.reschedule_appointment_for_service_job_by_service_job_id(service_job_id, appointment_id, body, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str service_job_id: An Amazon defined service job identifier. (required)
        :param str appointment_id: An existing appointment identifier for the Service Job. (required)
        :param RescheduleAppointmentRequest body: Reschedule appointment operation input details. (required)
        :return: SetAppointmentResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.reschedule_appointment_for_service_job_by_service_job_id_with_http_info(service_job_id, appointment_id, body, **kwargs)  # noqa: E501
        else:
            (data) = self.reschedule_appointment_for_service_job_by_service_job_id_with_http_info(service_job_id, appointment_id, body, **kwargs)  # noqa: E501
            return data

    def reschedule_appointment_for_service_job_by_service_job_id_with_http_info(self, service_job_id, appointment_id, body, **kwargs):  # noqa: E501
        """reschedule_appointment_for_service_job_by_service_job_id  # noqa: E501

        Reschedules an appointment for the service job indicated by the service job identifier specified.  **Usage Plan:**  | Rate (requests per second) | Burst | | ---- | ---- | | 5 | 20 |  The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](doc:usage-plans-and-rate-limits-in-the-sp-api).  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.reschedule_appointment_for_service_job_by_service_job_id_with_http_info(service_job_id, appointment_id, body, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str service_job_id: An Amazon defined service job identifier. (required)
        :param str appointment_id: An existing appointment identifier for the Service Job. (required)
        :param RescheduleAppointmentRequest body: Reschedule appointment operation input details. (required)
        :return: SetAppointmentResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['service_job_id', 'appointment_id', 'body']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        params = locals()
        for key, val in six.iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method reschedule_appointment_for_service_job_by_service_job_id" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'service_job_id' is set
        if self.api_client.client_side_validation and ('service_job_id' not in params or
                                                       params['service_job_id'] is None):  # noqa: E501
            raise ValueError("Missing the required parameter `service_job_id` when calling `reschedule_appointment_for_service_job_by_service_job_id`")  # noqa: E501
        # verify the required parameter 'appointment_id' is set
        if self.api_client.client_side_validation and ('appointment_id' not in params or
                                                       params['appointment_id'] is None):  # noqa: E501
            raise ValueError("Missing the required parameter `appointment_id` when calling `reschedule_appointment_for_service_job_by_service_job_id`")  # noqa: E501
        # verify the required parameter 'body' is set
        if self.api_client.client_side_validation and ('body' not in params or
                                                       params['body'] is None):  # noqa: E501
            raise ValueError("Missing the required parameter `body` when calling `reschedule_appointment_for_service_job_by_service_job_id`")  # noqa: E501

        if self.api_client.client_side_validation and ('service_job_id' in params and
                                                       len(params['service_job_id']) > 100):
            raise ValueError("Invalid value for parameter `service_job_id` when calling `reschedule_appointment_for_service_job_by_service_job_id`, length must be less than or equal to `100`")  # noqa: E501
        if self.api_client.client_side_validation and ('service_job_id' in params and
                                                       len(params['service_job_id']) < 1):
            raise ValueError("Invalid value for parameter `service_job_id` when calling `reschedule_appointment_for_service_job_by_service_job_id`, length must be greater than or equal to `1`")  # noqa: E501
        if self.api_client.client_side_validation and ('appointment_id' in params and
                                                       len(params['appointment_id']) > 100):
            raise ValueError("Invalid value for parameter `appointment_id` when calling `reschedule_appointment_for_service_job_by_service_job_id`, length must be less than or equal to `100`")  # noqa: E501
        if self.api_client.client_side_validation and ('appointment_id' in params and
                                                       len(params['appointment_id']) < 1):
            raise ValueError("Invalid value for parameter `appointment_id` when calling `reschedule_appointment_for_service_job_by_service_job_id`, length must be greater than or equal to `1`")  # noqa: E501
        collection_formats = {}

        path_params = {}
        if 'service_job_id' in params:
            path_params['serviceJobId'] = params['service_job_id']  # noqa: E501
        if 'appointment_id' in params:
            path_params['appointmentId'] = params['appointment_id']  # noqa: E501

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        if 'body' in params:
            body_params = params['body']
        # 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

        return self.api_client.call_api(
            '/service/v1/serviceJobs/{serviceJobId}/appointments/{appointmentId}', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='SetAppointmentResponse',  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get('async_req'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats, api_models_module=self.api_models_module)

    def set_appointment_fulfillment_data(self, service_job_id, appointment_id, body, **kwargs):  # noqa: E501
        """set_appointment_fulfillment_data  # noqa: E501

        Updates the appointment fulfillment data related to a given `jobID` and `appointmentID`.  **Usage Plan:**  | Rate (requests per second) | Burst | | ---- | ---- | | 5 | 20 |  The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](doc:usage-plans-and-rate-limits-in-the-sp-api).  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.set_appointment_fulfillment_data(service_job_id, appointment_id, body, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str service_job_id: An Amazon-defined service job identifier. Get this value by calling the `getServiceJobs` operation of the Services API. (required)
        :param str appointment_id: An Amazon-defined identifier of active service job appointment. (required)
        :param SetAppointmentFulfillmentDataRequest body: Appointment fulfillment data collection details. (required)
        :return: str
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.set_appointment_fulfillment_data_with_http_info(service_job_id, appointment_id, body, **kwargs)  # noqa: E501
        else:
            (data) = self.set_appointment_fulfillment_data_with_http_info(service_job_id, appointment_id, body, **kwargs)  # noqa: E501
            return data

    def set_appointment_fulfillment_data_with_http_info(self, service_job_id, appointment_id, body, **kwargs):  # noqa: E501
        """set_appointment_fulfillment_data  # noqa: E501

        Updates the appointment fulfillment data related to a given `jobID` and `appointmentID`.  **Usage Plan:**  | Rate (requests per second) | Burst | | ---- | ---- | | 5 | 20 |  The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](doc:usage-plans-and-rate-limits-in-the-sp-api).  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.set_appointment_fulfillment_data_with_http_info(service_job_id, appointment_id, body, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str service_job_id: An Amazon-defined service job identifier. Get this value by calling the `getServiceJobs` operation of the Services API. (required)
        :param str appointment_id: An Amazon-defined identifier of active service job appointment. (required)
        :param SetAppointmentFulfillmentDataRequest body: Appointment fulfillment data collection details. (required)
        :return: str
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['service_job_id', 'appointment_id', 'body']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        params = locals()
        for key, val in six.iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method set_appointment_fulfillment_data" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'service_job_id' is set
        if self.api_client.client_side_validation and ('service_job_id' not in params or
                                                       params['service_job_id'] is None):  # noqa: E501
            raise ValueError("Missing the required parameter `service_job_id` when calling `set_appointment_fulfillment_data`")  # noqa: E501
        # verify the required parameter 'appointment_id' is set
        if self.api_client.client_side_validation and ('appointment_id' not in params or
                                                       params['appointment_id'] is None):  # noqa: E501
            raise ValueError("Missing the required parameter `appointment_id` when calling `set_appointment_fulfillment_data`")  # noqa: E501
        # verify the required parameter 'body' is set
        if self.api_client.client_side_validation and ('body' not in params or
                                                       params['body'] is None):  # noqa: E501
            raise ValueError("Missing the required parameter `body` when calling `set_appointment_fulfillment_data`")  # noqa: E501

        if self.api_client.client_side_validation and ('service_job_id' in params and
                                                       len(params['service_job_id']) > 100):
            raise ValueError("Invalid value for parameter `service_job_id` when calling `set_appointment_fulfillment_data`, length must be less than or equal to `100`")  # noqa: E501
        if self.api_client.client_side_validation and ('service_job_id' in params and
                                                       len(params['service_job_id']) < 1):
            raise ValueError("Invalid value for parameter `service_job_id` when calling `set_appointment_fulfillment_data`, length must be greater than or equal to `1`")  # noqa: E501
        if self.api_client.client_side_validation and ('appointment_id' in params and
                                                       len(params['appointment_id']) > 100):
            raise ValueError("Invalid value for parameter `appointment_id` when calling `set_appointment_fulfillment_data`, length must be less than or equal to `100`")  # noqa: E501
        if self.api_client.client_side_validation and ('appointment_id' in params and
                                                       len(params['appointment_id']) < 1):
            raise ValueError("Invalid value for parameter `appointment_id` when calling `set_appointment_fulfillment_data`, length must be greater than or equal to `1`")  # noqa: E501
        collection_formats = {}

        path_params = {}
        if 'service_job_id' in params:
            path_params['serviceJobId'] = params['service_job_id']  # noqa: E501
        if 'appointment_id' in params:
            path_params['appointmentId'] = params['appointment_id']  # noqa: E501

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        if 'body' in params:
            body_params = params['body']
        # 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

        return self.api_client.call_api(
            '/service/v1/serviceJobs/{serviceJobId}/appointments/{appointmentId}/fulfillment', 'PUT',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='str',  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get('async_req'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats, api_models_module=self.api_models_module)

    def update_reservation(self, reservation_id, marketplace_ids, body, **kwargs):  # noqa: E501
        """update_reservation  # noqa: E501

        Update a reservation.  **Usage Plan:**  | Rate (requests per second) | Burst | | ---- | ---- | | 5 | 20 |  The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](doc:usage-plans-and-rate-limits-in-the-sp-api).  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.update_reservation(reservation_id, marketplace_ids, body, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str reservation_id: Reservation Identifier (required)
        :param List[str] marketplace_ids: An identifier for the marketplace in which the resource operates. (required)
        :param UpdateReservationRequest body: Reservation details (required)
        :return: UpdateReservationResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.update_reservation_with_http_info(reservation_id, marketplace_ids, body, **kwargs)  # noqa: E501
        else:
            (data) = self.update_reservation_with_http_info(reservation_id, marketplace_ids, body, **kwargs)  # noqa: E501
            return data

    def update_reservation_with_http_info(self, reservation_id, marketplace_ids, body, **kwargs):  # noqa: E501
        """update_reservation  # noqa: E501

        Update a reservation.  **Usage Plan:**  | Rate (requests per second) | Burst | | ---- | ---- | | 5 | 20 |  The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](doc:usage-plans-and-rate-limits-in-the-sp-api).  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.update_reservation_with_http_info(reservation_id, marketplace_ids, body, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str reservation_id: Reservation Identifier (required)
        :param List[str] marketplace_ids: An identifier for the marketplace in which the resource operates. (required)
        :param UpdateReservationRequest body: Reservation details (required)
        :return: UpdateReservationResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['reservation_id', 'marketplace_ids', 'body']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        params = locals()
        for key, val in six.iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method update_reservation" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'reservation_id' is set
        if self.api_client.client_side_validation and ('reservation_id' not in params or
                                                       params['reservation_id'] is None):  # noqa: E501
            raise ValueError("Missing the required parameter `reservation_id` when calling `update_reservation`")  # noqa: E501
        # verify the required parameter 'marketplace_ids' is set
        if self.api_client.client_side_validation and ('marketplace_ids' not in params or
                                                       params['marketplace_ids'] is None):  # noqa: E501
            raise ValueError("Missing the required parameter `marketplace_ids` when calling `update_reservation`")  # noqa: E501
        # verify the required parameter 'body' is set
        if self.api_client.client_side_validation and ('body' not in params or
                                                       params['body'] is None):  # noqa: E501
            raise ValueError("Missing the required parameter `body` when calling `update_reservation`")  # noqa: E501

        if self.api_client.client_side_validation and ('reservation_id' in params and
                                                       len(params['reservation_id']) > 100):
            raise ValueError("Invalid value for parameter `reservation_id` when calling `update_reservation`, length must be less than or equal to `100`")  # noqa: E501
        if self.api_client.client_side_validation and ('reservation_id' in params and
                                                       len(params['reservation_id']) < 1):
            raise ValueError("Invalid value for parameter `reservation_id` when calling `update_reservation`, length must be greater than or equal to `1`")  # noqa: E501
        if self.api_client.client_side_validation and ('marketplace_ids' in params and
                                            len(params['marketplace_ids']) > 1):
            raise ValueError("Invalid value for parameter `marketplace_ids` when calling `update_reservation`, number of items must be less than or equal to `1`")  # noqa: E501
        collection_formats = {}

        path_params = {}
        if 'reservation_id' in params:
            path_params['reservationId'] = params['reservation_id']  # noqa: E501

        query_params = []
        if 'marketplace_ids' in params:
            query_params.append(('marketplaceIds', params['marketplace_ids']))  # noqa: E501
            collection_formats['marketplaceIds'] = 'csv'  # noqa: E501

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        if 'body' in params:
            body_params = params['body']
        # 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

        return self.api_client.call_api(
            '/service/v1/reservation/{reservationId}', 'PUT',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='UpdateReservationResponse',  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get('async_req'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats, api_models_module=self.api_models_module)

    def update_schedule(self, resource_id, marketplace_ids, body, **kwargs):  # noqa: E501
        """update_schedule  # noqa: E501

        Update the schedule of the given resource.  **Usage Plan:**  | Rate (requests per second) | Burst | | ---- | ---- | | 5 | 20 |  The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](doc:usage-plans-and-rate-limits-in-the-sp-api).  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.update_schedule(resource_id, marketplace_ids, body, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str resource_id: Resource (store) Identifier (required)
        :param List[str] marketplace_ids: An identifier for the marketplace in which the resource operates. (required)
        :param UpdateScheduleRequest body: Schedule details (required)
        :return: UpdateScheduleResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.update_schedule_with_http_info(resource_id, marketplace_ids, body, **kwargs)  # noqa: E501
        else:
            (data) = self.update_schedule_with_http_info(resource_id, marketplace_ids, body, **kwargs)  # noqa: E501
            return data

    def update_schedule_with_http_info(self, resource_id, marketplace_ids, body, **kwargs):  # noqa: E501
        """update_schedule  # noqa: E501

        Update the schedule of the given resource.  **Usage Plan:**  | Rate (requests per second) | Burst | | ---- | ---- | | 5 | 20 |  The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](doc:usage-plans-and-rate-limits-in-the-sp-api).  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.update_schedule_with_http_info(resource_id, marketplace_ids, body, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str resource_id: Resource (store) Identifier (required)
        :param List[str] marketplace_ids: An identifier for the marketplace in which the resource operates. (required)
        :param UpdateScheduleRequest body: Schedule details (required)
        :return: UpdateScheduleResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['resource_id', 'marketplace_ids', 'body']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        params = locals()
        for key, val in six.iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method update_schedule" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'resource_id' is set
        if self.api_client.client_side_validation and ('resource_id' not in params or
                                                       params['resource_id'] is None):  # noqa: E501
            raise ValueError("Missing the required parameter `resource_id` when calling `update_schedule`")  # noqa: E501
        # verify the required parameter 'marketplace_ids' is set
        if self.api_client.client_side_validation and ('marketplace_ids' not in params or
                                                       params['marketplace_ids'] is None):  # noqa: E501
            raise ValueError("Missing the required parameter `marketplace_ids` when calling `update_schedule`")  # noqa: E501
        # verify the required parameter 'body' is set
        if self.api_client.client_side_validation and ('body' not in params or
                                                       params['body'] is None):  # noqa: E501
            raise ValueError("Missing the required parameter `body` when calling `update_schedule`")  # noqa: E501

        if self.api_client.client_side_validation and ('resource_id' in params and
                                                       len(params['resource_id']) > 100):
            raise ValueError("Invalid value for parameter `resource_id` when calling `update_schedule`, length must be less than or equal to `100`")  # noqa: E501
        if self.api_client.client_side_validation and ('resource_id' in params and
                                                       len(params['resource_id']) < 1):
            raise ValueError("Invalid value for parameter `resource_id` when calling `update_schedule`, length must be greater than or equal to `1`")  # noqa: E501
        if self.api_client.client_side_validation and ('marketplace_ids' in params and
                                            len(params['marketplace_ids']) > 1):
            raise ValueError("Invalid value for parameter `marketplace_ids` when calling `update_schedule`, number of items must be less than or equal to `1`")  # noqa: E501
        collection_formats = {}

        path_params = {}
        if 'resource_id' in params:
            path_params['resourceId'] = params['resource_id']  # noqa: E501

        query_params = []
        if 'marketplace_ids' in params:
            query_params.append(('marketplaceIds', params['marketplace_ids']))  # noqa: E501
            collection_formats['marketplaceIds'] = 'csv'  # noqa: E501

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        if 'body' in params:
            body_params = params['body']
        # 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

        return self.api_client.call_api(
            '/service/v1/serviceResources/{resourceId}/schedules', 'PUT',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='UpdateScheduleResponse',  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get('async_req'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats, api_models_module=self.api_models_module)
