# coding: utf-8

"""
    Selling Partner API for A+ Content Management

    Use the A+ Content API to build applications that help selling partners add rich marketing content to their Amazon product detail pages. Selling partners can use A+ content to share their brand and product story, which helps buyers make informed purchasing decisions. Selling partners use content modules to add images and text.

    The version of the OpenAPI document: 2020-11-01
    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 AplusContentApi(object):
    """NOTE: This class is auto generated by the openapi generator.

    Do not edit the class manually.
    """

    api_models_module = "spapi.models.apluscontent_v2020_11_01"

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

    def create_content_document(self, marketplace_id, post_content_document_request, **kwargs):  # noqa: E501
        """create_content_document  # noqa: E501

        Creates a new A+ Content document.  **Usage Plan:**  | Rate (requests per second) | Burst | | ---- | ---- | | 10 | 10 |  The `x-amzn-RateLimit-Limit` response header contains the usage plan rate limits for the operation, when available. The preceding table contains the default rate and burst values for this operation. Selling partners whose business demands require higher throughput might have higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits](https://developer-docs.amazon.com/sp-api/docs/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_content_document(marketplace_id, post_content_document_request, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str marketplace_id: The marketplace ID is the globally unique identifier of a marketplace. To find the ID for your marketplace, refer to [Marketplace IDs](https://developer-docs.amazon.com/sp-api/docs/marketplace-ids). (required)
        :param PostContentDocumentRequest post_content_document_request: The content document request details. (required)
        :return: PostContentDocumentResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.create_content_document_with_http_info(marketplace_id, post_content_document_request, **kwargs)  # noqa: E501
        else:
            (data) = self.create_content_document_with_http_info(marketplace_id, post_content_document_request, **kwargs)  # noqa: E501
            return data

    def create_content_document_with_http_info(self, marketplace_id, post_content_document_request, **kwargs):  # noqa: E501
        """create_content_document  # noqa: E501

        Creates a new A+ Content document.  **Usage Plan:**  | Rate (requests per second) | Burst | | ---- | ---- | | 10 | 10 |  The `x-amzn-RateLimit-Limit` response header contains the usage plan rate limits for the operation, when available. The preceding table contains the default rate and burst values for this operation. Selling partners whose business demands require higher throughput might have higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits](https://developer-docs.amazon.com/sp-api/docs/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_content_document_with_http_info(marketplace_id, post_content_document_request, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str marketplace_id: The marketplace ID is the globally unique identifier of a marketplace. To find the ID for your marketplace, refer to [Marketplace IDs](https://developer-docs.amazon.com/sp-api/docs/marketplace-ids). (required)
        :param PostContentDocumentRequest post_content_document_request: The content document request details. (required)
        :return: PostContentDocumentResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['marketplace_id', 'post_content_document_request']  # 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_content_document" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'marketplace_id' is set
        if self.api_client.client_side_validation and ('marketplace_id' not in params or
                                                       params['marketplace_id'] is None):  # noqa: E501
            raise ValueError("Missing the required parameter `marketplace_id` when calling `create_content_document`")  # noqa: E501
        # verify the required parameter 'post_content_document_request' is set
        if self.api_client.client_side_validation and ('post_content_document_request' not in params or
                                                       params['post_content_document_request'] is None):  # noqa: E501
            raise ValueError("Missing the required parameter `post_content_document_request` when calling `create_content_document`")  # noqa: E501

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

        path_params = {}

        query_params = []
        if 'marketplace_id' in params:
            query_params.append(('marketplaceId', params['marketplace_id']))  # noqa: E501

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        if 'post_content_document_request' in params:
            body_params = params['post_content_document_request']
        # 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(
            '/aplus/2020-11-01/contentDocuments', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='PostContentDocumentResponse',  # 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_content_document(self, content_reference_key, marketplace_id, included_data_set, **kwargs):  # noqa: E501
        """get_content_document  # noqa: E501

        Returns an A+ Content document, if available.  **Usage Plan:**  | Rate (requests per second) | Burst | | ---- | ---- | | 10 | 10 |  The `x-amzn-RateLimit-Limit` response header contains the usage plan rate limits for the operation, when available. The preceding table contains the default rate and burst values for this operation. Selling partners whose business demands require higher throughput might have higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits](https://developer-docs.amazon.com/sp-api/docs/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_content_document(content_reference_key, marketplace_id, included_data_set, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str content_reference_key: The unique reference key for the A+ Content document. A content reference key cannot form a permalink and might change in the future. A content reference key is not guaranteed to match any A+ Content identifier. (required)
        :param str marketplace_id: The marketplace ID is the globally unique identifier of a marketplace. To find the ID for your marketplace, refer to [Marketplace IDs](https://developer-docs.amazon.com/sp-api/docs/marketplace-ids). (required)
        :param List[str] included_data_set: The set of A+ Content data types to include in the response. (required)
        :return: GetContentDocumentResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.get_content_document_with_http_info(content_reference_key, marketplace_id, included_data_set, **kwargs)  # noqa: E501
        else:
            (data) = self.get_content_document_with_http_info(content_reference_key, marketplace_id, included_data_set, **kwargs)  # noqa: E501
            return data

    def get_content_document_with_http_info(self, content_reference_key, marketplace_id, included_data_set, **kwargs):  # noqa: E501
        """get_content_document  # noqa: E501

        Returns an A+ Content document, if available.  **Usage Plan:**  | Rate (requests per second) | Burst | | ---- | ---- | | 10 | 10 |  The `x-amzn-RateLimit-Limit` response header contains the usage plan rate limits for the operation, when available. The preceding table contains the default rate and burst values for this operation. Selling partners whose business demands require higher throughput might have higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits](https://developer-docs.amazon.com/sp-api/docs/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_content_document_with_http_info(content_reference_key, marketplace_id, included_data_set, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str content_reference_key: The unique reference key for the A+ Content document. A content reference key cannot form a permalink and might change in the future. A content reference key is not guaranteed to match any A+ Content identifier. (required)
        :param str marketplace_id: The marketplace ID is the globally unique identifier of a marketplace. To find the ID for your marketplace, refer to [Marketplace IDs](https://developer-docs.amazon.com/sp-api/docs/marketplace-ids). (required)
        :param List[str] included_data_set: The set of A+ Content data types to include in the response. (required)
        :return: GetContentDocumentResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['content_reference_key', 'marketplace_id', 'included_data_set']  # 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_content_document" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'content_reference_key' is set
        if self.api_client.client_side_validation and ('content_reference_key' not in params or
                                                       params['content_reference_key'] is None):  # noqa: E501
            raise ValueError("Missing the required parameter `content_reference_key` when calling `get_content_document`")  # noqa: E501
        # verify the required parameter 'marketplace_id' is set
        if self.api_client.client_side_validation and ('marketplace_id' not in params or
                                                       params['marketplace_id'] is None):  # noqa: E501
            raise ValueError("Missing the required parameter `marketplace_id` when calling `get_content_document`")  # noqa: E501
        # verify the required parameter 'included_data_set' is set
        if self.api_client.client_side_validation and ('included_data_set' not in params or
                                                       params['included_data_set'] is None):  # noqa: E501
            raise ValueError("Missing the required parameter `included_data_set` when calling `get_content_document`")  # noqa: E501

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

        path_params = {}
        if 'content_reference_key' in params:
            path_params['contentReferenceKey'] = params['content_reference_key']  # noqa: E501

        query_params = []
        if 'marketplace_id' in params:
            query_params.append(('marketplaceId', params['marketplace_id']))  # noqa: E501
        if 'included_data_set' in params:
            query_params.append(('includedDataSet', params['included_data_set']))  # noqa: E501
            collection_formats['includedDataSet'] = '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(
            '/aplus/2020-11-01/contentDocuments/{contentReferenceKey}', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='GetContentDocumentResponse',  # 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 list_content_document_asin_relations(self, content_reference_key, marketplace_id, **kwargs):  # noqa: E501
        """list_content_document_asin_relations  # noqa: E501

        Returns a list of ASINs that are related to the specified A+ Content document, if available. If you don't include the `asinSet` parameter, this operation returns all ASINs related to the content document.  **Usage Plan:**  | Rate (requests per second) | Burst | | ---- | ---- | | 10 | 10 |  The `x-amzn-RateLimit-Limit` response header contains the usage plan rate limits for the operation, when available. The preceding table contains the default rate and burst values for this operation. Selling partners whose business demands require higher throughput might have higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits](https://developer-docs.amazon.com/sp-api/docs/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.list_content_document_asin_relations(content_reference_key, marketplace_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str content_reference_key: The unique reference key for the A+ Content document. A content reference key cannot form a permalink and might change in the future. A content reference key is not guaranteed to match any A+ Content identifier. (required)
        :param str marketplace_id: The marketplace ID is the globally unique identifier of a marketplace. To find the ID for your marketplace, refer to [Marketplace IDs](https://developer-docs.amazon.com/sp-api/docs/marketplace-ids). (required)
        :param List[str] included_data_set: The set of A+ Content data types to include in the response. If you don't include this parameter, the operation returns the related ASINs without metadata.
        :param List[str] asin_set: The set of ASINs.
        :param str page_token: A token that you use to fetch a specific page when there are multiple pages of results.
        :return: ListContentDocumentAsinRelationsResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.list_content_document_asin_relations_with_http_info(content_reference_key, marketplace_id, **kwargs)  # noqa: E501
        else:
            (data) = self.list_content_document_asin_relations_with_http_info(content_reference_key, marketplace_id, **kwargs)  # noqa: E501
            return data

    def list_content_document_asin_relations_with_http_info(self, content_reference_key, marketplace_id, **kwargs):  # noqa: E501
        """list_content_document_asin_relations  # noqa: E501

        Returns a list of ASINs that are related to the specified A+ Content document, if available. If you don't include the `asinSet` parameter, this operation returns all ASINs related to the content document.  **Usage Plan:**  | Rate (requests per second) | Burst | | ---- | ---- | | 10 | 10 |  The `x-amzn-RateLimit-Limit` response header contains the usage plan rate limits for the operation, when available. The preceding table contains the default rate and burst values for this operation. Selling partners whose business demands require higher throughput might have higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits](https://developer-docs.amazon.com/sp-api/docs/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.list_content_document_asin_relations_with_http_info(content_reference_key, marketplace_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str content_reference_key: The unique reference key for the A+ Content document. A content reference key cannot form a permalink and might change in the future. A content reference key is not guaranteed to match any A+ Content identifier. (required)
        :param str marketplace_id: The marketplace ID is the globally unique identifier of a marketplace. To find the ID for your marketplace, refer to [Marketplace IDs](https://developer-docs.amazon.com/sp-api/docs/marketplace-ids). (required)
        :param List[str] included_data_set: The set of A+ Content data types to include in the response. If you don't include this parameter, the operation returns the related ASINs without metadata.
        :param List[str] asin_set: The set of ASINs.
        :param str page_token: A token that you use to fetch a specific page when there are multiple pages of results.
        :return: ListContentDocumentAsinRelationsResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['content_reference_key', 'marketplace_id', 'included_data_set', 'asin_set', '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 list_content_document_asin_relations" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'content_reference_key' is set
        if self.api_client.client_side_validation and ('content_reference_key' not in params or
                                                       params['content_reference_key'] is None):  # noqa: E501
            raise ValueError("Missing the required parameter `content_reference_key` when calling `list_content_document_asin_relations`")  # noqa: E501
        # verify the required parameter 'marketplace_id' is set
        if self.api_client.client_side_validation and ('marketplace_id' not in params or
                                                       params['marketplace_id'] is None):  # noqa: E501
            raise ValueError("Missing the required parameter `marketplace_id` when calling `list_content_document_asin_relations`")  # noqa: E501

        if self.api_client.client_side_validation and ('content_reference_key' in params and
                                                       len(params['content_reference_key']) < 1):
            raise ValueError("Invalid value for parameter `content_reference_key` when calling `list_content_document_asin_relations`, length must be greater than or equal to `1`")  # noqa: E501
        if self.api_client.client_side_validation and ('marketplace_id' in params and
                                                       len(params['marketplace_id']) < 1):
            raise ValueError("Invalid value for parameter `marketplace_id` when calling `list_content_document_asin_relations`, length must be greater than or equal to `1`")  # noqa: E501
        if self.api_client.client_side_validation and ('included_data_set' in params and
                                            len(params['included_data_set']) < 0):
            raise ValueError("Invalid value for parameter `included_data_set` when calling `list_content_document_asin_relations`, number of items must be greater than or equal to `0`")  # noqa: E501
        if self.api_client.client_side_validation and ('page_token' in params and
                                                       len(params['page_token']) < 1):
            raise ValueError("Invalid value for parameter `page_token` when calling `list_content_document_asin_relations`, length must be greater than or equal to `1`")  # noqa: E501
        collection_formats = {}

        path_params = {}
        if 'content_reference_key' in params:
            path_params['contentReferenceKey'] = params['content_reference_key']  # noqa: E501

        query_params = []
        if 'marketplace_id' in params:
            query_params.append(('marketplaceId', params['marketplace_id']))  # noqa: E501
        if 'included_data_set' in params:
            query_params.append(('includedDataSet', params['included_data_set']))  # noqa: E501
            collection_formats['includedDataSet'] = 'csv'  # noqa: E501
        if 'asin_set' in params:
            query_params.append(('asinSet', params['asin_set']))  # noqa: E501
            collection_formats['asinSet'] = 'csv'  # noqa: E501
        if 'page_token' in params:
            query_params.append(('pageToken', params['page_token']))  # 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(
            '/aplus/2020-11-01/contentDocuments/{contentReferenceKey}/asins', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='ListContentDocumentAsinRelationsResponse',  # 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 post_content_document_approval_submission(self, content_reference_key, marketplace_id, **kwargs):  # noqa: E501
        """post_content_document_approval_submission  # noqa: E501

        Submits an A+ Content document for review, approval, and publishing.  **Usage Plan:**  | Rate (requests per second) | Burst | | ---- | ---- | | 10 | 10 |  The `x-amzn-RateLimit-Limit` response header contains the usage plan rate limits for the operation, when available. The preceding table contains the default rate and burst values for this operation. Selling partners whose business demands require higher throughput might have higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits](https://developer-docs.amazon.com/sp-api/docs/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.post_content_document_approval_submission(content_reference_key, marketplace_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str content_reference_key: The unique reference key for the A+ Content document. A content reference key cannot form a permalink and might change in the future. A content reference key is not guaranteed to match any A+ content identifier. (required)
        :param str marketplace_id: The marketplace ID is the globally unique identifier of a marketplace. To find the ID for your marketplace, refer to [Marketplace IDs](https://developer-docs.amazon.com/sp-api/docs/marketplace-ids). (required)
        :return: PostContentDocumentApprovalSubmissionResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.post_content_document_approval_submission_with_http_info(content_reference_key, marketplace_id, **kwargs)  # noqa: E501
        else:
            (data) = self.post_content_document_approval_submission_with_http_info(content_reference_key, marketplace_id, **kwargs)  # noqa: E501
            return data

    def post_content_document_approval_submission_with_http_info(self, content_reference_key, marketplace_id, **kwargs):  # noqa: E501
        """post_content_document_approval_submission  # noqa: E501

        Submits an A+ Content document for review, approval, and publishing.  **Usage Plan:**  | Rate (requests per second) | Burst | | ---- | ---- | | 10 | 10 |  The `x-amzn-RateLimit-Limit` response header contains the usage plan rate limits for the operation, when available. The preceding table contains the default rate and burst values for this operation. Selling partners whose business demands require higher throughput might have higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits](https://developer-docs.amazon.com/sp-api/docs/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.post_content_document_approval_submission_with_http_info(content_reference_key, marketplace_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str content_reference_key: The unique reference key for the A+ Content document. A content reference key cannot form a permalink and might change in the future. A content reference key is not guaranteed to match any A+ content identifier. (required)
        :param str marketplace_id: The marketplace ID is the globally unique identifier of a marketplace. To find the ID for your marketplace, refer to [Marketplace IDs](https://developer-docs.amazon.com/sp-api/docs/marketplace-ids). (required)
        :return: PostContentDocumentApprovalSubmissionResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['content_reference_key', 'marketplace_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 post_content_document_approval_submission" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'content_reference_key' is set
        if self.api_client.client_side_validation and ('content_reference_key' not in params or
                                                       params['content_reference_key'] is None):  # noqa: E501
            raise ValueError("Missing the required parameter `content_reference_key` when calling `post_content_document_approval_submission`")  # noqa: E501
        # verify the required parameter 'marketplace_id' is set
        if self.api_client.client_side_validation and ('marketplace_id' not in params or
                                                       params['marketplace_id'] is None):  # noqa: E501
            raise ValueError("Missing the required parameter `marketplace_id` when calling `post_content_document_approval_submission`")  # noqa: E501

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

        path_params = {}
        if 'content_reference_key' in params:
            path_params['contentReferenceKey'] = params['content_reference_key']  # noqa: E501

        query_params = []
        if 'marketplace_id' in params:
            query_params.append(('marketplaceId', params['marketplace_id']))  # 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(
            '/aplus/2020-11-01/contentDocuments/{contentReferenceKey}/approvalSubmissions', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='PostContentDocumentApprovalSubmissionResponse',  # 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 post_content_document_asin_relations(self, content_reference_key, marketplace_id, post_content_document_asin_relations_request, **kwargs):  # noqa: E501
        """post_content_document_asin_relations  # noqa: E501

        Replaces all ASINs related to the specified A+ Content document, if available. This operation can add or remove ASINs, depending on the current set of related ASINs. Removing an ASIN will suspend the content document from that ASIN.  **Usage Plan:**  | Rate (requests per second) | Burst | | ---- | ---- | | 10 | 10 |  The `x-amzn-RateLimit-Limit` response header contains the usage plan rate limits for the operation, when available. The preceding table contains the default rate and burst values for this operation. Selling partners whose business demands require higher throughput might have higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits](https://developer-docs.amazon.com/sp-api/docs/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.post_content_document_asin_relations(content_reference_key, marketplace_id, post_content_document_asin_relations_request, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str content_reference_key: The unique reference key for the A+ Content document. A content reference key cannot form a permalink and might change in the future. A content reference key is not guaranteed to match any A+ content identifier. (required)
        :param str marketplace_id: The marketplace ID is the globally unique identifier of a marketplace. To find the ID for your marketplace, refer to [Marketplace IDs](https://developer-docs.amazon.com/sp-api/docs/marketplace-ids). (required)
        :param PostContentDocumentAsinRelationsRequest post_content_document_asin_relations_request: The request details for the content document ASIN relations. (required)
        :return: PostContentDocumentAsinRelationsResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.post_content_document_asin_relations_with_http_info(content_reference_key, marketplace_id, post_content_document_asin_relations_request, **kwargs)  # noqa: E501
        else:
            (data) = self.post_content_document_asin_relations_with_http_info(content_reference_key, marketplace_id, post_content_document_asin_relations_request, **kwargs)  # noqa: E501
            return data

    def post_content_document_asin_relations_with_http_info(self, content_reference_key, marketplace_id, post_content_document_asin_relations_request, **kwargs):  # noqa: E501
        """post_content_document_asin_relations  # noqa: E501

        Replaces all ASINs related to the specified A+ Content document, if available. This operation can add or remove ASINs, depending on the current set of related ASINs. Removing an ASIN will suspend the content document from that ASIN.  **Usage Plan:**  | Rate (requests per second) | Burst | | ---- | ---- | | 10 | 10 |  The `x-amzn-RateLimit-Limit` response header contains the usage plan rate limits for the operation, when available. The preceding table contains the default rate and burst values for this operation. Selling partners whose business demands require higher throughput might have higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits](https://developer-docs.amazon.com/sp-api/docs/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.post_content_document_asin_relations_with_http_info(content_reference_key, marketplace_id, post_content_document_asin_relations_request, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str content_reference_key: The unique reference key for the A+ Content document. A content reference key cannot form a permalink and might change in the future. A content reference key is not guaranteed to match any A+ content identifier. (required)
        :param str marketplace_id: The marketplace ID is the globally unique identifier of a marketplace. To find the ID for your marketplace, refer to [Marketplace IDs](https://developer-docs.amazon.com/sp-api/docs/marketplace-ids). (required)
        :param PostContentDocumentAsinRelationsRequest post_content_document_asin_relations_request: The request details for the content document ASIN relations. (required)
        :return: PostContentDocumentAsinRelationsResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['content_reference_key', 'marketplace_id', 'post_content_document_asin_relations_request']  # 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 post_content_document_asin_relations" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'content_reference_key' is set
        if self.api_client.client_side_validation and ('content_reference_key' not in params or
                                                       params['content_reference_key'] is None):  # noqa: E501
            raise ValueError("Missing the required parameter `content_reference_key` when calling `post_content_document_asin_relations`")  # noqa: E501
        # verify the required parameter 'marketplace_id' is set
        if self.api_client.client_side_validation and ('marketplace_id' not in params or
                                                       params['marketplace_id'] is None):  # noqa: E501
            raise ValueError("Missing the required parameter `marketplace_id` when calling `post_content_document_asin_relations`")  # noqa: E501
        # verify the required parameter 'post_content_document_asin_relations_request' is set
        if self.api_client.client_side_validation and ('post_content_document_asin_relations_request' not in params or
                                                       params['post_content_document_asin_relations_request'] is None):  # noqa: E501
            raise ValueError("Missing the required parameter `post_content_document_asin_relations_request` when calling `post_content_document_asin_relations`")  # noqa: E501

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

        path_params = {}
        if 'content_reference_key' in params:
            path_params['contentReferenceKey'] = params['content_reference_key']  # noqa: E501

        query_params = []
        if 'marketplace_id' in params:
            query_params.append(('marketplaceId', params['marketplace_id']))  # noqa: E501

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        if 'post_content_document_asin_relations_request' in params:
            body_params = params['post_content_document_asin_relations_request']
        # 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(
            '/aplus/2020-11-01/contentDocuments/{contentReferenceKey}/asins', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='PostContentDocumentAsinRelationsResponse',  # 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 post_content_document_suspend_submission(self, content_reference_key, marketplace_id, **kwargs):  # noqa: E501
        """post_content_document_suspend_submission  # noqa: E501

        Submits a request to suspend visible A+ Content. This doesn't delete the content document or the ASIN relations.  **Usage Plan:**  | Rate (requests per second) | Burst | | ---- | ---- | | 10 | 10 |  The `x-amzn-RateLimit-Limit` response header contains the usage plan rate limits for the operation, when available. The preceding table contains the default rate and burst values for this operation. Selling partners whose business demands require higher throughput might have higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits](https://developer-docs.amazon.com/sp-api/docs/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.post_content_document_suspend_submission(content_reference_key, marketplace_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str content_reference_key: The unique reference key for the A+ Content document. A content reference key cannot form a permalink and might change in the future. A content reference key is not guaranteed to match any A+ content identifier. (required)
        :param str marketplace_id: The marketplace ID is the globally unique identifier of a marketplace. To find the ID for your marketplace, refer to [Marketplace IDs](https://developer-docs.amazon.com/sp-api/docs/marketplace-ids). (required)
        :return: PostContentDocumentSuspendSubmissionResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.post_content_document_suspend_submission_with_http_info(content_reference_key, marketplace_id, **kwargs)  # noqa: E501
        else:
            (data) = self.post_content_document_suspend_submission_with_http_info(content_reference_key, marketplace_id, **kwargs)  # noqa: E501
            return data

    def post_content_document_suspend_submission_with_http_info(self, content_reference_key, marketplace_id, **kwargs):  # noqa: E501
        """post_content_document_suspend_submission  # noqa: E501

        Submits a request to suspend visible A+ Content. This doesn't delete the content document or the ASIN relations.  **Usage Plan:**  | Rate (requests per second) | Burst | | ---- | ---- | | 10 | 10 |  The `x-amzn-RateLimit-Limit` response header contains the usage plan rate limits for the operation, when available. The preceding table contains the default rate and burst values for this operation. Selling partners whose business demands require higher throughput might have higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits](https://developer-docs.amazon.com/sp-api/docs/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.post_content_document_suspend_submission_with_http_info(content_reference_key, marketplace_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str content_reference_key: The unique reference key for the A+ Content document. A content reference key cannot form a permalink and might change in the future. A content reference key is not guaranteed to match any A+ content identifier. (required)
        :param str marketplace_id: The marketplace ID is the globally unique identifier of a marketplace. To find the ID for your marketplace, refer to [Marketplace IDs](https://developer-docs.amazon.com/sp-api/docs/marketplace-ids). (required)
        :return: PostContentDocumentSuspendSubmissionResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['content_reference_key', 'marketplace_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 post_content_document_suspend_submission" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'content_reference_key' is set
        if self.api_client.client_side_validation and ('content_reference_key' not in params or
                                                       params['content_reference_key'] is None):  # noqa: E501
            raise ValueError("Missing the required parameter `content_reference_key` when calling `post_content_document_suspend_submission`")  # noqa: E501
        # verify the required parameter 'marketplace_id' is set
        if self.api_client.client_side_validation and ('marketplace_id' not in params or
                                                       params['marketplace_id'] is None):  # noqa: E501
            raise ValueError("Missing the required parameter `marketplace_id` when calling `post_content_document_suspend_submission`")  # noqa: E501

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

        path_params = {}
        if 'content_reference_key' in params:
            path_params['contentReferenceKey'] = params['content_reference_key']  # noqa: E501

        query_params = []
        if 'marketplace_id' in params:
            query_params.append(('marketplaceId', params['marketplace_id']))  # 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(
            '/aplus/2020-11-01/contentDocuments/{contentReferenceKey}/suspendSubmissions', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='PostContentDocumentSuspendSubmissionResponse',  # 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 search_content_documents(self, marketplace_id, **kwargs):  # noqa: E501
        """search_content_documents  # noqa: E501

        Returns a list of all A+ Content documents, including metadata, that are assigned to a selling partner. To get the actual contents of the A+ Content documents, call the `getContentDocument` operation.  **Usage Plan:**  | Rate (requests per second) | Burst | | ---- | ---- | | 10 | 10 |  The `x-amzn-RateLimit-Limit` response header contains the usage plan rate limits for the operation, when available. The preceding table contains the default rate and burst values for this operation. Selling partners whose business demands require higher throughput might have higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits](https://developer-docs.amazon.com/sp-api/docs/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.search_content_documents(marketplace_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str marketplace_id: The marketplace ID is the globally unique identifier of a marketplace. To find the ID for your marketplace, refer to [Marketplace IDs](https://developer-docs.amazon.com/sp-api/docs/marketplace-ids). (required)
        :param str page_token: A token that you use to fetch a specific page when there are multiple pages of results.
        :return: SearchContentDocumentsResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.search_content_documents_with_http_info(marketplace_id, **kwargs)  # noqa: E501
        else:
            (data) = self.search_content_documents_with_http_info(marketplace_id, **kwargs)  # noqa: E501
            return data

    def search_content_documents_with_http_info(self, marketplace_id, **kwargs):  # noqa: E501
        """search_content_documents  # noqa: E501

        Returns a list of all A+ Content documents, including metadata, that are assigned to a selling partner. To get the actual contents of the A+ Content documents, call the `getContentDocument` operation.  **Usage Plan:**  | Rate (requests per second) | Burst | | ---- | ---- | | 10 | 10 |  The `x-amzn-RateLimit-Limit` response header contains the usage plan rate limits for the operation, when available. The preceding table contains the default rate and burst values for this operation. Selling partners whose business demands require higher throughput might have higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits](https://developer-docs.amazon.com/sp-api/docs/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.search_content_documents_with_http_info(marketplace_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str marketplace_id: The marketplace ID is the globally unique identifier of a marketplace. To find the ID for your marketplace, refer to [Marketplace IDs](https://developer-docs.amazon.com/sp-api/docs/marketplace-ids). (required)
        :param str page_token: A token that you use to fetch a specific page when there are multiple pages of results.
        :return: SearchContentDocumentsResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

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

        path_params = {}

        query_params = []
        if 'marketplace_id' in params:
            query_params.append(('marketplaceId', params['marketplace_id']))  # noqa: E501
        if 'page_token' in params:
            query_params.append(('pageToken', params['page_token']))  # 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(
            '/aplus/2020-11-01/contentDocuments', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='SearchContentDocumentsResponse',  # 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 search_content_publish_records(self, marketplace_id, asin, **kwargs):  # noqa: E501
        """search_content_publish_records  # noqa: E501

        Searches for A+ Content publishing records, if available.  **Usage Plan:**  | Rate (requests per second) | Burst | | ---- | ---- | | 10 | 10 |  The `x-amzn-RateLimit-Limit` response header contains the usage plan rate limits for the operation, when available. The preceding table contains the default rate and burst values for this operation. Selling partners whose business demands require higher throughput might have higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits](https://developer-docs.amazon.com/sp-api/docs/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.search_content_publish_records(marketplace_id, asin, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str marketplace_id: The marketplace ID is the globally unique identifier of a marketplace. To find the ID for your marketplace, refer to [Marketplace IDs](https://developer-docs.amazon.com/sp-api/docs/marketplace-ids). (required)
        :param str asin: The Amazon Standard Identification Number (ASIN) is the unique identifier of a product within a marketplace. (required)
        :param str page_token: A token that you use to fetch a specific page when there are multiple pages of results.
        :return: SearchContentPublishRecordsResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.search_content_publish_records_with_http_info(marketplace_id, asin, **kwargs)  # noqa: E501
        else:
            (data) = self.search_content_publish_records_with_http_info(marketplace_id, asin, **kwargs)  # noqa: E501
            return data

    def search_content_publish_records_with_http_info(self, marketplace_id, asin, **kwargs):  # noqa: E501
        """search_content_publish_records  # noqa: E501

        Searches for A+ Content publishing records, if available.  **Usage Plan:**  | Rate (requests per second) | Burst | | ---- | ---- | | 10 | 10 |  The `x-amzn-RateLimit-Limit` response header contains the usage plan rate limits for the operation, when available. The preceding table contains the default rate and burst values for this operation. Selling partners whose business demands require higher throughput might have higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits](https://developer-docs.amazon.com/sp-api/docs/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.search_content_publish_records_with_http_info(marketplace_id, asin, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str marketplace_id: The marketplace ID is the globally unique identifier of a marketplace. To find the ID for your marketplace, refer to [Marketplace IDs](https://developer-docs.amazon.com/sp-api/docs/marketplace-ids). (required)
        :param str asin: The Amazon Standard Identification Number (ASIN) is the unique identifier of a product within a marketplace. (required)
        :param str page_token: A token that you use to fetch a specific page when there are multiple pages of results.
        :return: SearchContentPublishRecordsResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

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

        path_params = {}

        query_params = []
        if 'marketplace_id' in params:
            query_params.append(('marketplaceId', params['marketplace_id']))  # noqa: E501
        if 'asin' in params:
            query_params.append(('asin', params['asin']))  # noqa: E501
        if 'page_token' in params:
            query_params.append(('pageToken', params['page_token']))  # 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(
            '/aplus/2020-11-01/contentPublishRecords', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='SearchContentPublishRecordsResponse',  # 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_content_document(self, content_reference_key, marketplace_id, post_content_document_request, **kwargs):  # noqa: E501
        """update_content_document  # noqa: E501

        Updates an existing A+ Content document.  **Usage Plan:**  | Rate (requests per second) | Burst | | ---- | ---- | | 10 | 10 |  The `x-amzn-RateLimit-Limit` response header contains the usage plan rate limits for the operation, when available. The preceding table contains the default rate and burst values for this operation. Selling partners whose business demands require higher throughput might have higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits](https://developer-docs.amazon.com/sp-api/docs/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_content_document(content_reference_key, marketplace_id, post_content_document_request, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str content_reference_key: The unique reference key for the A+ Content document. A content reference key cannot form a permalink and might change in the future. A content reference key is not guaranteed to match any A+ Content identifier. (required)
        :param str marketplace_id: The marketplace ID is the globally unique identifier of a marketplace. To find the ID for your marketplace, refer to [Marketplace IDs](https://developer-docs.amazon.com/sp-api/docs/marketplace-ids). (required)
        :param PostContentDocumentRequest post_content_document_request: The content document request details. (required)
        :return: PostContentDocumentResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.update_content_document_with_http_info(content_reference_key, marketplace_id, post_content_document_request, **kwargs)  # noqa: E501
        else:
            (data) = self.update_content_document_with_http_info(content_reference_key, marketplace_id, post_content_document_request, **kwargs)  # noqa: E501
            return data

    def update_content_document_with_http_info(self, content_reference_key, marketplace_id, post_content_document_request, **kwargs):  # noqa: E501
        """update_content_document  # noqa: E501

        Updates an existing A+ Content document.  **Usage Plan:**  | Rate (requests per second) | Burst | | ---- | ---- | | 10 | 10 |  The `x-amzn-RateLimit-Limit` response header contains the usage plan rate limits for the operation, when available. The preceding table contains the default rate and burst values for this operation. Selling partners whose business demands require higher throughput might have higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits](https://developer-docs.amazon.com/sp-api/docs/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_content_document_with_http_info(content_reference_key, marketplace_id, post_content_document_request, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str content_reference_key: The unique reference key for the A+ Content document. A content reference key cannot form a permalink and might change in the future. A content reference key is not guaranteed to match any A+ Content identifier. (required)
        :param str marketplace_id: The marketplace ID is the globally unique identifier of a marketplace. To find the ID for your marketplace, refer to [Marketplace IDs](https://developer-docs.amazon.com/sp-api/docs/marketplace-ids). (required)
        :param PostContentDocumentRequest post_content_document_request: The content document request details. (required)
        :return: PostContentDocumentResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['content_reference_key', 'marketplace_id', 'post_content_document_request']  # 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_content_document" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'content_reference_key' is set
        if self.api_client.client_side_validation and ('content_reference_key' not in params or
                                                       params['content_reference_key'] is None):  # noqa: E501
            raise ValueError("Missing the required parameter `content_reference_key` when calling `update_content_document`")  # noqa: E501
        # verify the required parameter 'marketplace_id' is set
        if self.api_client.client_side_validation and ('marketplace_id' not in params or
                                                       params['marketplace_id'] is None):  # noqa: E501
            raise ValueError("Missing the required parameter `marketplace_id` when calling `update_content_document`")  # noqa: E501
        # verify the required parameter 'post_content_document_request' is set
        if self.api_client.client_side_validation and ('post_content_document_request' not in params or
                                                       params['post_content_document_request'] is None):  # noqa: E501
            raise ValueError("Missing the required parameter `post_content_document_request` when calling `update_content_document`")  # noqa: E501

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

        path_params = {}
        if 'content_reference_key' in params:
            path_params['contentReferenceKey'] = params['content_reference_key']  # noqa: E501

        query_params = []
        if 'marketplace_id' in params:
            query_params.append(('marketplaceId', params['marketplace_id']))  # noqa: E501

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        if 'post_content_document_request' in params:
            body_params = params['post_content_document_request']
        # 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(
            '/aplus/2020-11-01/contentDocuments/{contentReferenceKey}', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='PostContentDocumentResponse',  # 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 validate_content_document_asin_relations(self, marketplace_id, post_content_document_request, **kwargs):  # noqa: E501
        """validate_content_document_asin_relations  # noqa: E501

        Checks if the A+ Content document is valid for use on a set of ASINs.  **Usage Plan:**  | Rate (requests per second) | Burst | | ---- | ---- | | 10 | 10 |  The `x-amzn-RateLimit-Limit` response header contains the usage plan rate limits for the operation, when available. The preceding table contains the default rate and burst values for this operation. Selling partners whose business demands require higher throughput might have higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits](https://developer-docs.amazon.com/sp-api/docs/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.validate_content_document_asin_relations(marketplace_id, post_content_document_request, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str marketplace_id: The marketplace ID is the globally unique identifier of a marketplace. To find the ID for your marketplace, refer to [Marketplace IDs](https://developer-docs.amazon.com/sp-api/docs/marketplace-ids). (required)
        :param PostContentDocumentRequest post_content_document_request: The content document request details. (required)
        :param List[str] asin_set: The set of ASINs.
        :return: ValidateContentDocumentAsinRelationsResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.validate_content_document_asin_relations_with_http_info(marketplace_id, post_content_document_request, **kwargs)  # noqa: E501
        else:
            (data) = self.validate_content_document_asin_relations_with_http_info(marketplace_id, post_content_document_request, **kwargs)  # noqa: E501
            return data

    def validate_content_document_asin_relations_with_http_info(self, marketplace_id, post_content_document_request, **kwargs):  # noqa: E501
        """validate_content_document_asin_relations  # noqa: E501

        Checks if the A+ Content document is valid for use on a set of ASINs.  **Usage Plan:**  | Rate (requests per second) | Burst | | ---- | ---- | | 10 | 10 |  The `x-amzn-RateLimit-Limit` response header contains the usage plan rate limits for the operation, when available. The preceding table contains the default rate and burst values for this operation. Selling partners whose business demands require higher throughput might have higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits](https://developer-docs.amazon.com/sp-api/docs/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.validate_content_document_asin_relations_with_http_info(marketplace_id, post_content_document_request, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str marketplace_id: The marketplace ID is the globally unique identifier of a marketplace. To find the ID for your marketplace, refer to [Marketplace IDs](https://developer-docs.amazon.com/sp-api/docs/marketplace-ids). (required)
        :param PostContentDocumentRequest post_content_document_request: The content document request details. (required)
        :param List[str] asin_set: The set of ASINs.
        :return: ValidateContentDocumentAsinRelationsResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['marketplace_id', 'post_content_document_request', 'asin_set']  # 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 validate_content_document_asin_relations" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'marketplace_id' is set
        if self.api_client.client_side_validation and ('marketplace_id' not in params or
                                                       params['marketplace_id'] is None):  # noqa: E501
            raise ValueError("Missing the required parameter `marketplace_id` when calling `validate_content_document_asin_relations`")  # noqa: E501
        # verify the required parameter 'post_content_document_request' is set
        if self.api_client.client_side_validation and ('post_content_document_request' not in params or
                                                       params['post_content_document_request'] is None):  # noqa: E501
            raise ValueError("Missing the required parameter `post_content_document_request` when calling `validate_content_document_asin_relations`")  # noqa: E501

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

        path_params = {}

        query_params = []
        if 'marketplace_id' in params:
            query_params.append(('marketplaceId', params['marketplace_id']))  # noqa: E501
        if 'asin_set' in params:
            query_params.append(('asinSet', params['asin_set']))  # noqa: E501
            collection_formats['asinSet'] = 'csv'  # noqa: E501

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        if 'post_content_document_request' in params:
            body_params = params['post_content_document_request']
        # 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(
            '/aplus/2020-11-01/contentAsinValidations', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='ValidateContentDocumentAsinRelationsResponse',  # 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)
