# coding: utf-8

"""
    Posts

    Use these endpoints for interacting with Blog Posts, Blog Authors, and Blog Tags  # noqa: E501

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


from __future__ import absolute_import

import re  # noqa: F401

# python 2 and python 3 compatibility library
import six

from hubspot.cms.blogs.blog_posts.api_client import ApiClient
from hubspot.cms.blogs.blog_posts.exceptions import ApiTypeError, ApiValueError  # noqa: F401


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

    Do not edit the class manually.
    """

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

    def archive(self, object_id, **kwargs):  # noqa: E501
        """Delete a blog post  # noqa: E501

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

        >>> thread = api.archive(object_id, async_req=True)
        >>> result = thread.get()

        :param object_id: The ID of the blog post to delete. (required)
        :type object_id: str
        :param archived: Whether to return only results that have been deleted.
        :type archived: bool
        :param async_req: Whether to execute the request asynchronously.
        :type async_req: bool, optional
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :type _preload_content: bool, optional
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :return: Returns the result object.
                 If the method is called asynchronously,
                 returns the request thread.
        :rtype: None
        """
        kwargs["_return_http_data_only"] = True
        return self.archive_with_http_info(object_id, **kwargs)  # noqa: E501

    def archive_with_http_info(self, object_id, **kwargs):  # noqa: E501
        """Delete a blog post  # noqa: E501

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

        >>> thread = api.archive_with_http_info(object_id, async_req=True)
        >>> result = thread.get()

        :param object_id: The ID of the blog post to delete. (required)
        :type object_id: str
        :param archived: Whether to return only results that have been deleted.
        :type archived: bool
        :param async_req: Whether to execute the request asynchronously.
        :type async_req: bool, optional
        :param _return_http_data_only: response data without head status code
                                       and headers
        :type _return_http_data_only: bool, optional
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :type _preload_content: bool, optional
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the authentication
                              in the spec for a single request.
        :type _request_auth: dict, optional
        :type _content_type: string, optional: force content-type for the request
        :return: Returns the result object.
                 If the method is called asynchronously,
                 returns the request thread.
        :rtype: None
        """

        local_var_params = locals()

        all_params = ["object_id", "archived"]
        all_params.extend(["async_req", "_return_http_data_only", "_preload_content", "_request_timeout", "_request_auth", "_content_type", "_headers"])

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

        collection_formats = {}

        path_params = {}
        if "object_id" in local_var_params:
            path_params["objectId"] = local_var_params["object_id"]  # noqa: E501

        query_params = []
        if local_var_params.get("archived") is not None:  # noqa: E501
            query_params.append(("archived", local_var_params["archived"]))  # noqa: E501

        header_params = dict(local_var_params.get("_headers", {}))

        form_params = []
        local_var_files = {}

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

        # Authentication setting
        auth_settings = ["oauth2"]  # noqa: E501

        response_types_map = {}

        return self.api_client.call_api(
            "/cms/v3/blogs/posts/{objectId}",
            "DELETE",
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_types_map=response_types_map,
            auth_settings=auth_settings,
            async_req=local_var_params.get("async_req"),
            _return_http_data_only=local_var_params.get("_return_http_data_only"),  # noqa: E501
            _preload_content=local_var_params.get("_preload_content", True),
            _request_timeout=local_var_params.get("_request_timeout"),
            collection_formats=collection_formats,
            _request_auth=local_var_params.get("_request_auth"),
        )

    def clone(self, content_clone_request_v_next, **kwargs):  # noqa: E501
        """Clone a blog post  # noqa: E501

        Clone a blog post, making a copy of it in a new blog post.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True

        >>> thread = api.clone(content_clone_request_v_next, async_req=True)
        >>> result = thread.get()

        :param content_clone_request_v_next: The JSON representation of the ContentCloneRequest object. (required)
        :type content_clone_request_v_next: ContentCloneRequestVNext
        :param async_req: Whether to execute the request asynchronously.
        :type async_req: bool, optional
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :type _preload_content: bool, optional
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :return: Returns the result object.
                 If the method is called asynchronously,
                 returns the request thread.
        :rtype: BlogPost
        """
        kwargs["_return_http_data_only"] = True
        return self.clone_with_http_info(content_clone_request_v_next, **kwargs)  # noqa: E501

    def clone_with_http_info(self, content_clone_request_v_next, **kwargs):  # noqa: E501
        """Clone a blog post  # noqa: E501

        Clone a blog post, making a copy of it in a new blog post.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True

        >>> thread = api.clone_with_http_info(content_clone_request_v_next, async_req=True)
        >>> result = thread.get()

        :param content_clone_request_v_next: The JSON representation of the ContentCloneRequest object. (required)
        :type content_clone_request_v_next: ContentCloneRequestVNext
        :param async_req: Whether to execute the request asynchronously.
        :type async_req: bool, optional
        :param _return_http_data_only: response data without head status code
                                       and headers
        :type _return_http_data_only: bool, optional
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :type _preload_content: bool, optional
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the authentication
                              in the spec for a single request.
        :type _request_auth: dict, optional
        :type _content_type: string, optional: force content-type for the request
        :return: Returns the result object.
                 If the method is called asynchronously,
                 returns the request thread.
        :rtype: tuple(BlogPost, status_code(int), headers(HTTPHeaderDict))
        """

        local_var_params = locals()

        all_params = ["content_clone_request_v_next"]
        all_params.extend(["async_req", "_return_http_data_only", "_preload_content", "_request_timeout", "_request_auth", "_content_type", "_headers"])

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

        collection_formats = {}

        path_params = {}

        query_params = []

        header_params = dict(local_var_params.get("_headers", {}))

        form_params = []
        local_var_files = {}

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

        # HTTP header `Content-Type`
        content_types_list = local_var_params.get("_content_type", self.api_client.select_header_content_type(["application/json"], "POST", body_params))  # noqa: E501
        if content_types_list:
            header_params["Content-Type"] = content_types_list

        # Authentication setting
        auth_settings = ["oauth2"]  # noqa: E501

        response_types_map = {
            200: "BlogPost",
        }

        return self.api_client.call_api(
            "/cms/v3/blogs/posts/clone",
            "POST",
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_types_map=response_types_map,
            auth_settings=auth_settings,
            async_req=local_var_params.get("async_req"),
            _return_http_data_only=local_var_params.get("_return_http_data_only"),  # noqa: E501
            _preload_content=local_var_params.get("_preload_content", True),
            _request_timeout=local_var_params.get("_request_timeout"),
            collection_formats=collection_formats,
            _request_auth=local_var_params.get("_request_auth"),
        )

    def create(self, blog_post, **kwargs):  # noqa: E501
        """Create a new post  # noqa: E501

        Create a new blog post, specifying its content in the request body.  # 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(blog_post, async_req=True)
        >>> result = thread.get()

        :param blog_post: The JSON representation of a new Blog Post. (required)
        :type blog_post: BlogPost
        :param async_req: Whether to execute the request asynchronously.
        :type async_req: bool, optional
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :type _preload_content: bool, optional
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :return: Returns the result object.
                 If the method is called asynchronously,
                 returns the request thread.
        :rtype: BlogPost
        """
        kwargs["_return_http_data_only"] = True
        return self.create_with_http_info(blog_post, **kwargs)  # noqa: E501

    def create_with_http_info(self, blog_post, **kwargs):  # noqa: E501
        """Create a new post  # noqa: E501

        Create a new blog post, specifying its content in the request body.  # 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_with_http_info(blog_post, async_req=True)
        >>> result = thread.get()

        :param blog_post: The JSON representation of a new Blog Post. (required)
        :type blog_post: BlogPost
        :param async_req: Whether to execute the request asynchronously.
        :type async_req: bool, optional
        :param _return_http_data_only: response data without head status code
                                       and headers
        :type _return_http_data_only: bool, optional
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :type _preload_content: bool, optional
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the authentication
                              in the spec for a single request.
        :type _request_auth: dict, optional
        :type _content_type: string, optional: force content-type for the request
        :return: Returns the result object.
                 If the method is called asynchronously,
                 returns the request thread.
        :rtype: tuple(BlogPost, status_code(int), headers(HTTPHeaderDict))
        """

        local_var_params = locals()

        all_params = ["blog_post"]
        all_params.extend(["async_req", "_return_http_data_only", "_preload_content", "_request_timeout", "_request_auth", "_content_type", "_headers"])

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

        collection_formats = {}

        path_params = {}

        query_params = []

        header_params = dict(local_var_params.get("_headers", {}))

        form_params = []
        local_var_files = {}

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

        # HTTP header `Content-Type`
        content_types_list = local_var_params.get("_content_type", self.api_client.select_header_content_type(["application/json"], "POST", body_params))  # noqa: E501
        if content_types_list:
            header_params["Content-Type"] = content_types_list

        # Authentication setting
        auth_settings = ["oauth2"]  # noqa: E501

        response_types_map = {
            201: "BlogPost",
        }

        return self.api_client.call_api(
            "/cms/v3/blogs/posts",
            "POST",
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_types_map=response_types_map,
            auth_settings=auth_settings,
            async_req=local_var_params.get("async_req"),
            _return_http_data_only=local_var_params.get("_return_http_data_only"),  # noqa: E501
            _preload_content=local_var_params.get("_preload_content", True),
            _request_timeout=local_var_params.get("_request_timeout"),
            collection_formats=collection_formats,
            _request_auth=local_var_params.get("_request_auth"),
        )

    def get_by_id(self, object_id, **kwargs):  # noqa: E501
        """Retrieve a blog post  # noqa: E501

        Retrieve a blog post by the post ID.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True

        >>> thread = api.get_by_id(object_id, async_req=True)
        >>> result = thread.get()

        :param object_id: The ID of the blog post to retrieve. (required)
        :type object_id: str
        :param archived: Specifies whether to return deleted blog posts. Defaults to `false`.
        :type archived: bool
        :param _property: Specific properties to return.
        :type _property: str
        :param async_req: Whether to execute the request asynchronously.
        :type async_req: bool, optional
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :type _preload_content: bool, optional
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :return: Returns the result object.
                 If the method is called asynchronously,
                 returns the request thread.
        :rtype: BlogPost
        """
        kwargs["_return_http_data_only"] = True
        return self.get_by_id_with_http_info(object_id, **kwargs)  # noqa: E501

    def get_by_id_with_http_info(self, object_id, **kwargs):  # noqa: E501
        """Retrieve a blog post  # noqa: E501

        Retrieve a blog post by the post ID.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True

        >>> thread = api.get_by_id_with_http_info(object_id, async_req=True)
        >>> result = thread.get()

        :param object_id: The ID of the blog post to retrieve. (required)
        :type object_id: str
        :param archived: Specifies whether to return deleted blog posts. Defaults to `false`.
        :type archived: bool
        :param _property: Specific properties to return.
        :type _property: str
        :param async_req: Whether to execute the request asynchronously.
        :type async_req: bool, optional
        :param _return_http_data_only: response data without head status code
                                       and headers
        :type _return_http_data_only: bool, optional
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :type _preload_content: bool, optional
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the authentication
                              in the spec for a single request.
        :type _request_auth: dict, optional
        :type _content_type: string, optional: force content-type for the request
        :return: Returns the result object.
                 If the method is called asynchronously,
                 returns the request thread.
        :rtype: tuple(BlogPost, status_code(int), headers(HTTPHeaderDict))
        """

        local_var_params = locals()

        all_params = ["object_id", "archived", "_property"]
        all_params.extend(["async_req", "_return_http_data_only", "_preload_content", "_request_timeout", "_request_auth", "_content_type", "_headers"])

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

        collection_formats = {}

        path_params = {}
        if "object_id" in local_var_params:
            path_params["objectId"] = local_var_params["object_id"]  # noqa: E501

        query_params = []
        if local_var_params.get("archived") is not None:  # noqa: E501
            query_params.append(("archived", local_var_params["archived"]))  # noqa: E501
        if local_var_params.get("_property") is not None:  # noqa: E501
            query_params.append(("property", local_var_params["_property"]))  # noqa: E501

        header_params = dict(local_var_params.get("_headers", {}))

        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 = ["oauth2"]  # noqa: E501

        response_types_map = {
            200: "BlogPost",
        }

        return self.api_client.call_api(
            "/cms/v3/blogs/posts/{objectId}",
            "GET",
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_types_map=response_types_map,
            auth_settings=auth_settings,
            async_req=local_var_params.get("async_req"),
            _return_http_data_only=local_var_params.get("_return_http_data_only"),  # noqa: E501
            _preload_content=local_var_params.get("_preload_content", True),
            _request_timeout=local_var_params.get("_request_timeout"),
            collection_formats=collection_formats,
            _request_auth=local_var_params.get("_request_auth"),
        )

    def get_draft_by_id(self, object_id, **kwargs):  # noqa: E501
        """Retrieve the full draft version of the Blog Post  # noqa: E501

        Retrieve the full draft version of a blog post.  # 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_draft_by_id(object_id, async_req=True)
        >>> result = thread.get()

        :param object_id: The ID of the blog post to retrieve the draft of. (required)
        :type object_id: str
        :param async_req: Whether to execute the request asynchronously.
        :type async_req: bool, optional
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :type _preload_content: bool, optional
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :return: Returns the result object.
                 If the method is called asynchronously,
                 returns the request thread.
        :rtype: BlogPost
        """
        kwargs["_return_http_data_only"] = True
        return self.get_draft_by_id_with_http_info(object_id, **kwargs)  # noqa: E501

    def get_draft_by_id_with_http_info(self, object_id, **kwargs):  # noqa: E501
        """Retrieve the full draft version of the Blog Post  # noqa: E501

        Retrieve the full draft version of a blog post.  # 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_draft_by_id_with_http_info(object_id, async_req=True)
        >>> result = thread.get()

        :param object_id: The ID of the blog post to retrieve the draft of. (required)
        :type object_id: str
        :param async_req: Whether to execute the request asynchronously.
        :type async_req: bool, optional
        :param _return_http_data_only: response data without head status code
                                       and headers
        :type _return_http_data_only: bool, optional
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :type _preload_content: bool, optional
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the authentication
                              in the spec for a single request.
        :type _request_auth: dict, optional
        :type _content_type: string, optional: force content-type for the request
        :return: Returns the result object.
                 If the method is called asynchronously,
                 returns the request thread.
        :rtype: tuple(BlogPost, status_code(int), headers(HTTPHeaderDict))
        """

        local_var_params = locals()

        all_params = ["object_id"]
        all_params.extend(["async_req", "_return_http_data_only", "_preload_content", "_request_timeout", "_request_auth", "_content_type", "_headers"])

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

        collection_formats = {}

        path_params = {}
        if "object_id" in local_var_params:
            path_params["objectId"] = local_var_params["object_id"]  # noqa: E501

        query_params = []

        header_params = dict(local_var_params.get("_headers", {}))

        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 = ["oauth2"]  # noqa: E501

        response_types_map = {
            200: "BlogPost",
        }

        return self.api_client.call_api(
            "/cms/v3/blogs/posts/{objectId}/draft",
            "GET",
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_types_map=response_types_map,
            auth_settings=auth_settings,
            async_req=local_var_params.get("async_req"),
            _return_http_data_only=local_var_params.get("_return_http_data_only"),  # noqa: E501
            _preload_content=local_var_params.get("_preload_content", True),
            _request_timeout=local_var_params.get("_request_timeout"),
            collection_formats=collection_formats,
            _request_auth=local_var_params.get("_request_auth"),
        )

    def get_page(self, **kwargs):  # noqa: E501
        """Get all posts  # noqa: E501

        Retrieve all blog posts, with paging and filtering options. This method would be useful for an integration that ingests posts and suggests edits.  # 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_page(async_req=True)
        >>> result = thread.get()

        :param created_at: Only return blog posts created at exactly the specified time.
        :type created_at: datetime
        :param created_after: Only return blog posts created after the specified time.
        :type created_after: datetime
        :param created_before: Only return blog posts created before the specified time.
        :type created_before: datetime
        :param updated_at: Only return blog posts last updated at exactly the specified time.
        :type updated_at: datetime
        :param updated_after: Only return blog posts last updated after the specified time.
        :type updated_after: datetime
        :param updated_before: Only return blog posts last updated before the specified time.
        :type updated_before: datetime
        :param sort: Specifies which fields to use for sorting results. Valid fields are `createdAt` (default), `name`, `updatedAt`, `createdBy`, `updatedBy`.
        :type sort: list[str]
        :param after: The cursor token value to get the next set of results. You can get this from the `paging.next.after` JSON property of a paged response containing more results.
        :type after: str
        :param limit: The maximum number of results to return. Default is 20.
        :type limit: int
        :param archived: Specifies whether to return deleted blog posts. Defaults to `false`.
        :type archived: bool
        :param _property:
        :type _property: str
        :param async_req: Whether to execute the request asynchronously.
        :type async_req: bool, optional
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :type _preload_content: bool, optional
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :return: Returns the result object.
                 If the method is called asynchronously,
                 returns the request thread.
        :rtype: CollectionResponseWithTotalBlogPostForwardPaging
        """
        kwargs["_return_http_data_only"] = True
        return self.get_page_with_http_info(**kwargs)  # noqa: E501

    def get_page_with_http_info(self, **kwargs):  # noqa: E501
        """Get all posts  # noqa: E501

        Retrieve all blog posts, with paging and filtering options. This method would be useful for an integration that ingests posts and suggests edits.  # 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_page_with_http_info(async_req=True)
        >>> result = thread.get()

        :param created_at: Only return blog posts created at exactly the specified time.
        :type created_at: datetime
        :param created_after: Only return blog posts created after the specified time.
        :type created_after: datetime
        :param created_before: Only return blog posts created before the specified time.
        :type created_before: datetime
        :param updated_at: Only return blog posts last updated at exactly the specified time.
        :type updated_at: datetime
        :param updated_after: Only return blog posts last updated after the specified time.
        :type updated_after: datetime
        :param updated_before: Only return blog posts last updated before the specified time.
        :type updated_before: datetime
        :param sort: Specifies which fields to use for sorting results. Valid fields are `createdAt` (default), `name`, `updatedAt`, `createdBy`, `updatedBy`.
        :type sort: list[str]
        :param after: The cursor token value to get the next set of results. You can get this from the `paging.next.after` JSON property of a paged response containing more results.
        :type after: str
        :param limit: The maximum number of results to return. Default is 20.
        :type limit: int
        :param archived: Specifies whether to return deleted blog posts. Defaults to `false`.
        :type archived: bool
        :param _property:
        :type _property: str
        :param async_req: Whether to execute the request asynchronously.
        :type async_req: bool, optional
        :param _return_http_data_only: response data without head status code
                                       and headers
        :type _return_http_data_only: bool, optional
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :type _preload_content: bool, optional
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the authentication
                              in the spec for a single request.
        :type _request_auth: dict, optional
        :type _content_type: string, optional: force content-type for the request
        :return: Returns the result object.
                 If the method is called asynchronously,
                 returns the request thread.
        :rtype: tuple(CollectionResponseWithTotalBlogPostForwardPaging, status_code(int), headers(HTTPHeaderDict))
        """

        local_var_params = locals()

        all_params = ["created_at", "created_after", "created_before", "updated_at", "updated_after", "updated_before", "sort", "after", "limit", "archived", "_property"]
        all_params.extend(["async_req", "_return_http_data_only", "_preload_content", "_request_timeout", "_request_auth", "_content_type", "_headers"])

        for key, val in six.iteritems(local_var_params["kwargs"]):
            if key not in all_params:
                raise ApiTypeError("Got an unexpected keyword argument '%s'" " to method get_page" % key)
            local_var_params[key] = val
        del local_var_params["kwargs"]

        collection_formats = {}

        path_params = {}

        query_params = []
        if local_var_params.get("created_at") is not None:  # noqa: E501
            query_params.append(("createdAt", local_var_params["created_at"]))  # noqa: E501
        if local_var_params.get("created_after") is not None:  # noqa: E501
            query_params.append(("createdAfter", local_var_params["created_after"]))  # noqa: E501
        if local_var_params.get("created_before") is not None:  # noqa: E501
            query_params.append(("createdBefore", local_var_params["created_before"]))  # noqa: E501
        if local_var_params.get("updated_at") is not None:  # noqa: E501
            query_params.append(("updatedAt", local_var_params["updated_at"]))  # noqa: E501
        if local_var_params.get("updated_after") is not None:  # noqa: E501
            query_params.append(("updatedAfter", local_var_params["updated_after"]))  # noqa: E501
        if local_var_params.get("updated_before") is not None:  # noqa: E501
            query_params.append(("updatedBefore", local_var_params["updated_before"]))  # noqa: E501
        if local_var_params.get("sort") is not None:  # noqa: E501
            query_params.append(("sort", local_var_params["sort"]))  # noqa: E501
            collection_formats["sort"] = "multi"  # noqa: E501
        if local_var_params.get("after") is not None:  # noqa: E501
            query_params.append(("after", local_var_params["after"]))  # noqa: E501
        if local_var_params.get("limit") is not None:  # noqa: E501
            query_params.append(("limit", local_var_params["limit"]))  # noqa: E501
        if local_var_params.get("archived") is not None:  # noqa: E501
            query_params.append(("archived", local_var_params["archived"]))  # noqa: E501
        if local_var_params.get("_property") is not None:  # noqa: E501
            query_params.append(("property", local_var_params["_property"]))  # noqa: E501

        header_params = dict(local_var_params.get("_headers", {}))

        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 = ["oauth2"]  # noqa: E501

        response_types_map = {
            200: "CollectionResponseWithTotalBlogPostForwardPaging",
        }

        return self.api_client.call_api(
            "/cms/v3/blogs/posts",
            "GET",
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_types_map=response_types_map,
            auth_settings=auth_settings,
            async_req=local_var_params.get("async_req"),
            _return_http_data_only=local_var_params.get("_return_http_data_only"),  # noqa: E501
            _preload_content=local_var_params.get("_preload_content", True),
            _request_timeout=local_var_params.get("_request_timeout"),
            collection_formats=collection_formats,
            _request_auth=local_var_params.get("_request_auth"),
        )

    def get_previous_version(self, object_id, revision_id, **kwargs):  # noqa: E501
        """Retrieve a previous version of a blog post  # noqa: E501

        Retrieve a previous version of a blog post.  # 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_previous_version(object_id, revision_id, async_req=True)
        >>> result = thread.get()

        :param object_id: The ID of the blog post. (required)
        :type object_id: str
        :param revision_id: The ID of the version to retrieve. (required)
        :type revision_id: str
        :param async_req: Whether to execute the request asynchronously.
        :type async_req: bool, optional
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :type _preload_content: bool, optional
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :return: Returns the result object.
                 If the method is called asynchronously,
                 returns the request thread.
        :rtype: VersionBlogPost
        """
        kwargs["_return_http_data_only"] = True
        return self.get_previous_version_with_http_info(object_id, revision_id, **kwargs)  # noqa: E501

    def get_previous_version_with_http_info(self, object_id, revision_id, **kwargs):  # noqa: E501
        """Retrieve a previous version of a blog post  # noqa: E501

        Retrieve a previous version of a blog post.  # 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_previous_version_with_http_info(object_id, revision_id, async_req=True)
        >>> result = thread.get()

        :param object_id: The ID of the blog post. (required)
        :type object_id: str
        :param revision_id: The ID of the version to retrieve. (required)
        :type revision_id: str
        :param async_req: Whether to execute the request asynchronously.
        :type async_req: bool, optional
        :param _return_http_data_only: response data without head status code
                                       and headers
        :type _return_http_data_only: bool, optional
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :type _preload_content: bool, optional
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the authentication
                              in the spec for a single request.
        :type _request_auth: dict, optional
        :type _content_type: string, optional: force content-type for the request
        :return: Returns the result object.
                 If the method is called asynchronously,
                 returns the request thread.
        :rtype: tuple(VersionBlogPost, status_code(int), headers(HTTPHeaderDict))
        """

        local_var_params = locals()

        all_params = ["object_id", "revision_id"]
        all_params.extend(["async_req", "_return_http_data_only", "_preload_content", "_request_timeout", "_request_auth", "_content_type", "_headers"])

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

        collection_formats = {}

        path_params = {}
        if "object_id" in local_var_params:
            path_params["objectId"] = local_var_params["object_id"]  # noqa: E501
        if "revision_id" in local_var_params:
            path_params["revisionId"] = local_var_params["revision_id"]  # noqa: E501

        query_params = []

        header_params = dict(local_var_params.get("_headers", {}))

        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 = ["oauth2"]  # noqa: E501

        response_types_map = {
            200: "VersionBlogPost",
        }

        return self.api_client.call_api(
            "/cms/v3/blogs/posts/{objectId}/revisions/{revisionId}",
            "GET",
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_types_map=response_types_map,
            auth_settings=auth_settings,
            async_req=local_var_params.get("async_req"),
            _return_http_data_only=local_var_params.get("_return_http_data_only"),  # noqa: E501
            _preload_content=local_var_params.get("_preload_content", True),
            _request_timeout=local_var_params.get("_request_timeout"),
            collection_formats=collection_formats,
            _request_auth=local_var_params.get("_request_auth"),
        )

    def get_previous_versions(self, object_id, **kwargs):  # noqa: E501
        """Retrieves all previous versions of a post  # noqa: E501

        Retrieve all the previous versions of a blog post.  # 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_previous_versions(object_id, async_req=True)
        >>> result = thread.get()

        :param object_id: The ID of the blog post to retrieve previous versions of. (required)
        :type object_id: str
        :param after: The cursor token value to get the next set of results. You can get this from the `paging.next.after` JSON property of a paged response containing more results.
        :type after: str
        :param before:
        :type before: str
        :param limit: The maximum number of results to return. Default is 100.
        :type limit: int
        :param async_req: Whether to execute the request asynchronously.
        :type async_req: bool, optional
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :type _preload_content: bool, optional
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :return: Returns the result object.
                 If the method is called asynchronously,
                 returns the request thread.
        :rtype: CollectionResponseWithTotalVersionBlogPost
        """
        kwargs["_return_http_data_only"] = True
        return self.get_previous_versions_with_http_info(object_id, **kwargs)  # noqa: E501

    def get_previous_versions_with_http_info(self, object_id, **kwargs):  # noqa: E501
        """Retrieves all previous versions of a post  # noqa: E501

        Retrieve all the previous versions of a blog post.  # 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_previous_versions_with_http_info(object_id, async_req=True)
        >>> result = thread.get()

        :param object_id: The ID of the blog post to retrieve previous versions of. (required)
        :type object_id: str
        :param after: The cursor token value to get the next set of results. You can get this from the `paging.next.after` JSON property of a paged response containing more results.
        :type after: str
        :param before:
        :type before: str
        :param limit: The maximum number of results to return. Default is 100.
        :type limit: int
        :param async_req: Whether to execute the request asynchronously.
        :type async_req: bool, optional
        :param _return_http_data_only: response data without head status code
                                       and headers
        :type _return_http_data_only: bool, optional
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :type _preload_content: bool, optional
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the authentication
                              in the spec for a single request.
        :type _request_auth: dict, optional
        :type _content_type: string, optional: force content-type for the request
        :return: Returns the result object.
                 If the method is called asynchronously,
                 returns the request thread.
        :rtype: tuple(CollectionResponseWithTotalVersionBlogPost, status_code(int), headers(HTTPHeaderDict))
        """

        local_var_params = locals()

        all_params = ["object_id", "after", "before", "limit"]
        all_params.extend(["async_req", "_return_http_data_only", "_preload_content", "_request_timeout", "_request_auth", "_content_type", "_headers"])

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

        collection_formats = {}

        path_params = {}
        if "object_id" in local_var_params:
            path_params["objectId"] = local_var_params["object_id"]  # noqa: E501

        query_params = []
        if local_var_params.get("after") is not None:  # noqa: E501
            query_params.append(("after", local_var_params["after"]))  # noqa: E501
        if local_var_params.get("before") is not None:  # noqa: E501
            query_params.append(("before", local_var_params["before"]))  # noqa: E501
        if local_var_params.get("limit") is not None:  # noqa: E501
            query_params.append(("limit", local_var_params["limit"]))  # noqa: E501

        header_params = dict(local_var_params.get("_headers", {}))

        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 = ["oauth2"]  # noqa: E501

        response_types_map = {
            200: "CollectionResponseWithTotalVersionBlogPost",
        }

        return self.api_client.call_api(
            "/cms/v3/blogs/posts/{objectId}/revisions",
            "GET",
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_types_map=response_types_map,
            auth_settings=auth_settings,
            async_req=local_var_params.get("async_req"),
            _return_http_data_only=local_var_params.get("_return_http_data_only"),  # noqa: E501
            _preload_content=local_var_params.get("_preload_content", True),
            _request_timeout=local_var_params.get("_request_timeout"),
            collection_formats=collection_formats,
            _request_auth=local_var_params.get("_request_auth"),
        )

    def push_live(self, object_id, **kwargs):  # noqa: E501
        """Publish blog post draft  # noqa: E501

        Publish the draft version of the blog post, sending its content to the live page.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True

        >>> thread = api.push_live(object_id, async_req=True)
        >>> result = thread.get()

        :param object_id: The ID of the post to publish. (required)
        :type object_id: str
        :param async_req: Whether to execute the request asynchronously.
        :type async_req: bool, optional
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :type _preload_content: bool, optional
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :return: Returns the result object.
                 If the method is called asynchronously,
                 returns the request thread.
        :rtype: None
        """
        kwargs["_return_http_data_only"] = True
        return self.push_live_with_http_info(object_id, **kwargs)  # noqa: E501

    def push_live_with_http_info(self, object_id, **kwargs):  # noqa: E501
        """Publish blog post draft  # noqa: E501

        Publish the draft version of the blog post, sending its content to the live page.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True

        >>> thread = api.push_live_with_http_info(object_id, async_req=True)
        >>> result = thread.get()

        :param object_id: The ID of the post to publish. (required)
        :type object_id: str
        :param async_req: Whether to execute the request asynchronously.
        :type async_req: bool, optional
        :param _return_http_data_only: response data without head status code
                                       and headers
        :type _return_http_data_only: bool, optional
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :type _preload_content: bool, optional
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the authentication
                              in the spec for a single request.
        :type _request_auth: dict, optional
        :type _content_type: string, optional: force content-type for the request
        :return: Returns the result object.
                 If the method is called asynchronously,
                 returns the request thread.
        :rtype: None
        """

        local_var_params = locals()

        all_params = ["object_id"]
        all_params.extend(["async_req", "_return_http_data_only", "_preload_content", "_request_timeout", "_request_auth", "_content_type", "_headers"])

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

        collection_formats = {}

        path_params = {}
        if "object_id" in local_var_params:
            path_params["objectId"] = local_var_params["object_id"]  # noqa: E501

        query_params = []

        header_params = dict(local_var_params.get("_headers", {}))

        form_params = []
        local_var_files = {}

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

        # Authentication setting
        auth_settings = ["oauth2"]  # noqa: E501

        response_types_map = {}

        return self.api_client.call_api(
            "/cms/v3/blogs/posts/{objectId}/draft/push-live",
            "POST",
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_types_map=response_types_map,
            auth_settings=auth_settings,
            async_req=local_var_params.get("async_req"),
            _return_http_data_only=local_var_params.get("_return_http_data_only"),  # noqa: E501
            _preload_content=local_var_params.get("_preload_content", True),
            _request_timeout=local_var_params.get("_request_timeout"),
            collection_formats=collection_formats,
            _request_auth=local_var_params.get("_request_auth"),
        )

    def reset_draft(self, object_id, **kwargs):  # noqa: E501
        """Reset post draft to the live version  # noqa: E501

        Discard all drafted content, resetting the draft to contain the content in the currently published version.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True

        >>> thread = api.reset_draft(object_id, async_req=True)
        >>> result = thread.get()

        :param object_id: The ID of the blog post to reset. (required)
        :type object_id: str
        :param async_req: Whether to execute the request asynchronously.
        :type async_req: bool, optional
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :type _preload_content: bool, optional
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :return: Returns the result object.
                 If the method is called asynchronously,
                 returns the request thread.
        :rtype: None
        """
        kwargs["_return_http_data_only"] = True
        return self.reset_draft_with_http_info(object_id, **kwargs)  # noqa: E501

    def reset_draft_with_http_info(self, object_id, **kwargs):  # noqa: E501
        """Reset post draft to the live version  # noqa: E501

        Discard all drafted content, resetting the draft to contain the content in the currently published version.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True

        >>> thread = api.reset_draft_with_http_info(object_id, async_req=True)
        >>> result = thread.get()

        :param object_id: The ID of the blog post to reset. (required)
        :type object_id: str
        :param async_req: Whether to execute the request asynchronously.
        :type async_req: bool, optional
        :param _return_http_data_only: response data without head status code
                                       and headers
        :type _return_http_data_only: bool, optional
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :type _preload_content: bool, optional
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the authentication
                              in the spec for a single request.
        :type _request_auth: dict, optional
        :type _content_type: string, optional: force content-type for the request
        :return: Returns the result object.
                 If the method is called asynchronously,
                 returns the request thread.
        :rtype: None
        """

        local_var_params = locals()

        all_params = ["object_id"]
        all_params.extend(["async_req", "_return_http_data_only", "_preload_content", "_request_timeout", "_request_auth", "_content_type", "_headers"])

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

        collection_formats = {}

        path_params = {}
        if "object_id" in local_var_params:
            path_params["objectId"] = local_var_params["object_id"]  # noqa: E501

        query_params = []

        header_params = dict(local_var_params.get("_headers", {}))

        form_params = []
        local_var_files = {}

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

        # Authentication setting
        auth_settings = ["oauth2"]  # noqa: E501

        response_types_map = {}

        return self.api_client.call_api(
            "/cms/v3/blogs/posts/{objectId}/draft/reset",
            "POST",
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_types_map=response_types_map,
            auth_settings=auth_settings,
            async_req=local_var_params.get("async_req"),
            _return_http_data_only=local_var_params.get("_return_http_data_only"),  # noqa: E501
            _preload_content=local_var_params.get("_preload_content", True),
            _request_timeout=local_var_params.get("_request_timeout"),
            collection_formats=collection_formats,
            _request_auth=local_var_params.get("_request_auth"),
        )

    def restore_previous_version(self, object_id, revision_id, **kwargs):  # noqa: E501
        """Restore a previous version  # noqa: E501

        Restores a blog post to one of its previous versions.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True

        >>> thread = api.restore_previous_version(object_id, revision_id, async_req=True)
        >>> result = thread.get()

        :param object_id: The ID of the blog post. (required)
        :type object_id: str
        :param revision_id: The ID of the version to restore the blog post to. (required)
        :type revision_id: str
        :param async_req: Whether to execute the request asynchronously.
        :type async_req: bool, optional
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :type _preload_content: bool, optional
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :return: Returns the result object.
                 If the method is called asynchronously,
                 returns the request thread.
        :rtype: BlogPost
        """
        kwargs["_return_http_data_only"] = True
        return self.restore_previous_version_with_http_info(object_id, revision_id, **kwargs)  # noqa: E501

    def restore_previous_version_with_http_info(self, object_id, revision_id, **kwargs):  # noqa: E501
        """Restore a previous version  # noqa: E501

        Restores a blog post to one of its previous versions.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True

        >>> thread = api.restore_previous_version_with_http_info(object_id, revision_id, async_req=True)
        >>> result = thread.get()

        :param object_id: The ID of the blog post. (required)
        :type object_id: str
        :param revision_id: The ID of the version to restore the blog post to. (required)
        :type revision_id: str
        :param async_req: Whether to execute the request asynchronously.
        :type async_req: bool, optional
        :param _return_http_data_only: response data without head status code
                                       and headers
        :type _return_http_data_only: bool, optional
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :type _preload_content: bool, optional
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the authentication
                              in the spec for a single request.
        :type _request_auth: dict, optional
        :type _content_type: string, optional: force content-type for the request
        :return: Returns the result object.
                 If the method is called asynchronously,
                 returns the request thread.
        :rtype: tuple(BlogPost, status_code(int), headers(HTTPHeaderDict))
        """

        local_var_params = locals()

        all_params = ["object_id", "revision_id"]
        all_params.extend(["async_req", "_return_http_data_only", "_preload_content", "_request_timeout", "_request_auth", "_content_type", "_headers"])

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

        collection_formats = {}

        path_params = {}
        if "object_id" in local_var_params:
            path_params["objectId"] = local_var_params["object_id"]  # noqa: E501
        if "revision_id" in local_var_params:
            path_params["revisionId"] = local_var_params["revision_id"]  # noqa: E501

        query_params = []

        header_params = dict(local_var_params.get("_headers", {}))

        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 = ["oauth2"]  # noqa: E501

        response_types_map = {
            200: "BlogPost",
        }

        return self.api_client.call_api(
            "/cms/v3/blogs/posts/{objectId}/revisions/{revisionId}/restore",
            "POST",
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_types_map=response_types_map,
            auth_settings=auth_settings,
            async_req=local_var_params.get("async_req"),
            _return_http_data_only=local_var_params.get("_return_http_data_only"),  # noqa: E501
            _preload_content=local_var_params.get("_preload_content", True),
            _request_timeout=local_var_params.get("_request_timeout"),
            collection_formats=collection_formats,
            _request_auth=local_var_params.get("_request_auth"),
        )

    def restore_previous_version_to_draft(self, object_id, revision_id, **kwargs):  # noqa: E501
        """Restore a draft to a previous version  # noqa: E501

        Takes a specified version of a blog post, sets it as the new draft version of the blog post.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True

        >>> thread = api.restore_previous_version_to_draft(object_id, revision_id, async_req=True)
        >>> result = thread.get()

        :param object_id: The ID of the blog post. (required)
        :type object_id: str
        :param revision_id: The ID of the version to restore the blog post to. (required)
        :type revision_id: int
        :param async_req: Whether to execute the request asynchronously.
        :type async_req: bool, optional
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :type _preload_content: bool, optional
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :return: Returns the result object.
                 If the method is called asynchronously,
                 returns the request thread.
        :rtype: BlogPost
        """
        kwargs["_return_http_data_only"] = True
        return self.restore_previous_version_to_draft_with_http_info(object_id, revision_id, **kwargs)  # noqa: E501

    def restore_previous_version_to_draft_with_http_info(self, object_id, revision_id, **kwargs):  # noqa: E501
        """Restore a draft to a previous version  # noqa: E501

        Takes a specified version of a blog post, sets it as the new draft version of the blog post.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True

        >>> thread = api.restore_previous_version_to_draft_with_http_info(object_id, revision_id, async_req=True)
        >>> result = thread.get()

        :param object_id: The ID of the blog post. (required)
        :type object_id: str
        :param revision_id: The ID of the version to restore the blog post to. (required)
        :type revision_id: int
        :param async_req: Whether to execute the request asynchronously.
        :type async_req: bool, optional
        :param _return_http_data_only: response data without head status code
                                       and headers
        :type _return_http_data_only: bool, optional
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :type _preload_content: bool, optional
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the authentication
                              in the spec for a single request.
        :type _request_auth: dict, optional
        :type _content_type: string, optional: force content-type for the request
        :return: Returns the result object.
                 If the method is called asynchronously,
                 returns the request thread.
        :rtype: tuple(BlogPost, status_code(int), headers(HTTPHeaderDict))
        """

        local_var_params = locals()

        all_params = ["object_id", "revision_id"]
        all_params.extend(["async_req", "_return_http_data_only", "_preload_content", "_request_timeout", "_request_auth", "_content_type", "_headers"])

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

        collection_formats = {}

        path_params = {}
        if "object_id" in local_var_params:
            path_params["objectId"] = local_var_params["object_id"]  # noqa: E501
        if "revision_id" in local_var_params:
            path_params["revisionId"] = local_var_params["revision_id"]  # noqa: E501

        query_params = []

        header_params = dict(local_var_params.get("_headers", {}))

        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 = ["oauth2"]  # noqa: E501

        response_types_map = {
            200: "BlogPost",
        }

        return self.api_client.call_api(
            "/cms/v3/blogs/posts/{objectId}/revisions/{revisionId}/restore-to-draft",
            "POST",
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_types_map=response_types_map,
            auth_settings=auth_settings,
            async_req=local_var_params.get("async_req"),
            _return_http_data_only=local_var_params.get("_return_http_data_only"),  # noqa: E501
            _preload_content=local_var_params.get("_preload_content", True),
            _request_timeout=local_var_params.get("_request_timeout"),
            collection_formats=collection_formats,
            _request_auth=local_var_params.get("_request_auth"),
        )

    def schedule(self, content_schedule_request_v_next, **kwargs):  # noqa: E501
        """Schedule a post to be published  # noqa: E501

        Schedule a blog post to be published at a specified time.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True

        >>> thread = api.schedule(content_schedule_request_v_next, async_req=True)
        >>> result = thread.get()

        :param content_schedule_request_v_next: The JSON representation of the ContentScheduleRequestVNext object. (required)
        :type content_schedule_request_v_next: ContentScheduleRequestVNext
        :param async_req: Whether to execute the request asynchronously.
        :type async_req: bool, optional
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :type _preload_content: bool, optional
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :return: Returns the result object.
                 If the method is called asynchronously,
                 returns the request thread.
        :rtype: None
        """
        kwargs["_return_http_data_only"] = True
        return self.schedule_with_http_info(content_schedule_request_v_next, **kwargs)  # noqa: E501

    def schedule_with_http_info(self, content_schedule_request_v_next, **kwargs):  # noqa: E501
        """Schedule a post to be published  # noqa: E501

        Schedule a blog post to be published at a specified time.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True

        >>> thread = api.schedule_with_http_info(content_schedule_request_v_next, async_req=True)
        >>> result = thread.get()

        :param content_schedule_request_v_next: The JSON representation of the ContentScheduleRequestVNext object. (required)
        :type content_schedule_request_v_next: ContentScheduleRequestVNext
        :param async_req: Whether to execute the request asynchronously.
        :type async_req: bool, optional
        :param _return_http_data_only: response data without head status code
                                       and headers
        :type _return_http_data_only: bool, optional
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :type _preload_content: bool, optional
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the authentication
                              in the spec for a single request.
        :type _request_auth: dict, optional
        :type _content_type: string, optional: force content-type for the request
        :return: Returns the result object.
                 If the method is called asynchronously,
                 returns the request thread.
        :rtype: None
        """

        local_var_params = locals()

        all_params = ["content_schedule_request_v_next"]
        all_params.extend(["async_req", "_return_http_data_only", "_preload_content", "_request_timeout", "_request_auth", "_content_type", "_headers"])

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

        collection_formats = {}

        path_params = {}

        query_params = []

        header_params = dict(local_var_params.get("_headers", {}))

        form_params = []
        local_var_files = {}

        body_params = None
        if "content_schedule_request_v_next" in local_var_params:
            body_params = local_var_params["content_schedule_request_v_next"]
        # HTTP header `Accept`
        header_params["Accept"] = self.api_client.select_header_accept(["*/*"])  # noqa: E501

        # HTTP header `Content-Type`
        content_types_list = local_var_params.get("_content_type", self.api_client.select_header_content_type(["application/json"], "POST", body_params))  # noqa: E501
        if content_types_list:
            header_params["Content-Type"] = content_types_list

        # Authentication setting
        auth_settings = ["oauth2"]  # noqa: E501

        response_types_map = {}

        return self.api_client.call_api(
            "/cms/v3/blogs/posts/schedule",
            "POST",
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_types_map=response_types_map,
            auth_settings=auth_settings,
            async_req=local_var_params.get("async_req"),
            _return_http_data_only=local_var_params.get("_return_http_data_only"),  # noqa: E501
            _preload_content=local_var_params.get("_preload_content", True),
            _request_timeout=local_var_params.get("_request_timeout"),
            collection_formats=collection_formats,
            _request_auth=local_var_params.get("_request_auth"),
        )

    def update(self, object_id, blog_post, **kwargs):  # noqa: E501
        """Update a post  # noqa: E501

        Partially updates a single blog post by ID. You only need to specify the values that you want to update.  # 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(object_id, blog_post, async_req=True)
        >>> result = thread.get()

        :param object_id: The ID of the blog post to update. (required)
        :type object_id: str
        :param blog_post: The JSON representation of the updated Blog Post. (required)
        :type blog_post: BlogPost
        :param archived: Specifies whether to update deleted blog posts. Defaults to `false`.
        :type archived: bool
        :param async_req: Whether to execute the request asynchronously.
        :type async_req: bool, optional
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :type _preload_content: bool, optional
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :return: Returns the result object.
                 If the method is called asynchronously,
                 returns the request thread.
        :rtype: BlogPost
        """
        kwargs["_return_http_data_only"] = True
        return self.update_with_http_info(object_id, blog_post, **kwargs)  # noqa: E501

    def update_with_http_info(self, object_id, blog_post, **kwargs):  # noqa: E501
        """Update a post  # noqa: E501

        Partially updates a single blog post by ID. You only need to specify the values that you want to update.  # 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_with_http_info(object_id, blog_post, async_req=True)
        >>> result = thread.get()

        :param object_id: The ID of the blog post to update. (required)
        :type object_id: str
        :param blog_post: The JSON representation of the updated Blog Post. (required)
        :type blog_post: BlogPost
        :param archived: Specifies whether to update deleted blog posts. Defaults to `false`.
        :type archived: bool
        :param async_req: Whether to execute the request asynchronously.
        :type async_req: bool, optional
        :param _return_http_data_only: response data without head status code
                                       and headers
        :type _return_http_data_only: bool, optional
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :type _preload_content: bool, optional
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the authentication
                              in the spec for a single request.
        :type _request_auth: dict, optional
        :type _content_type: string, optional: force content-type for the request
        :return: Returns the result object.
                 If the method is called asynchronously,
                 returns the request thread.
        :rtype: tuple(BlogPost, status_code(int), headers(HTTPHeaderDict))
        """

        local_var_params = locals()

        all_params = ["object_id", "blog_post", "archived"]
        all_params.extend(["async_req", "_return_http_data_only", "_preload_content", "_request_timeout", "_request_auth", "_content_type", "_headers"])

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

        collection_formats = {}

        path_params = {}
        if "object_id" in local_var_params:
            path_params["objectId"] = local_var_params["object_id"]  # noqa: E501

        query_params = []
        if local_var_params.get("archived") is not None:  # noqa: E501
            query_params.append(("archived", local_var_params["archived"]))  # noqa: E501

        header_params = dict(local_var_params.get("_headers", {}))

        form_params = []
        local_var_files = {}

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

        # HTTP header `Content-Type`
        content_types_list = local_var_params.get("_content_type", self.api_client.select_header_content_type(["application/json"], "PATCH", body_params))  # noqa: E501
        if content_types_list:
            header_params["Content-Type"] = content_types_list

        # Authentication setting
        auth_settings = ["oauth2"]  # noqa: E501

        response_types_map = {
            200: "BlogPost",
        }

        return self.api_client.call_api(
            "/cms/v3/blogs/posts/{objectId}",
            "PATCH",
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_types_map=response_types_map,
            auth_settings=auth_settings,
            async_req=local_var_params.get("async_req"),
            _return_http_data_only=local_var_params.get("_return_http_data_only"),  # noqa: E501
            _preload_content=local_var_params.get("_preload_content", True),
            _request_timeout=local_var_params.get("_request_timeout"),
            collection_formats=collection_formats,
            _request_auth=local_var_params.get("_request_auth"),
        )

    def update_draft(self, object_id, blog_post, **kwargs):  # noqa: E501
        """Update the draft of a post  # noqa: E501

        Partially updates the draft version of a single blog post by ID. You only need to specify the values that you want to update.  # 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_draft(object_id, blog_post, async_req=True)
        >>> result = thread.get()

        :param object_id: The ID of the blog post to update the draft of. (required)
        :type object_id: str
        :param blog_post: The JSON representation of the updated Blog Post to be applied to the draft. (required)
        :type blog_post: BlogPost
        :param async_req: Whether to execute the request asynchronously.
        :type async_req: bool, optional
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :type _preload_content: bool, optional
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :return: Returns the result object.
                 If the method is called asynchronously,
                 returns the request thread.
        :rtype: BlogPost
        """
        kwargs["_return_http_data_only"] = True
        return self.update_draft_with_http_info(object_id, blog_post, **kwargs)  # noqa: E501

    def update_draft_with_http_info(self, object_id, blog_post, **kwargs):  # noqa: E501
        """Update the draft of a post  # noqa: E501

        Partially updates the draft version of a single blog post by ID. You only need to specify the values that you want to update.  # 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_draft_with_http_info(object_id, blog_post, async_req=True)
        >>> result = thread.get()

        :param object_id: The ID of the blog post to update the draft of. (required)
        :type object_id: str
        :param blog_post: The JSON representation of the updated Blog Post to be applied to the draft. (required)
        :type blog_post: BlogPost
        :param async_req: Whether to execute the request asynchronously.
        :type async_req: bool, optional
        :param _return_http_data_only: response data without head status code
                                       and headers
        :type _return_http_data_only: bool, optional
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :type _preload_content: bool, optional
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the authentication
                              in the spec for a single request.
        :type _request_auth: dict, optional
        :type _content_type: string, optional: force content-type for the request
        :return: Returns the result object.
                 If the method is called asynchronously,
                 returns the request thread.
        :rtype: tuple(BlogPost, status_code(int), headers(HTTPHeaderDict))
        """

        local_var_params = locals()

        all_params = ["object_id", "blog_post"]
        all_params.extend(["async_req", "_return_http_data_only", "_preload_content", "_request_timeout", "_request_auth", "_content_type", "_headers"])

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

        collection_formats = {}

        path_params = {}
        if "object_id" in local_var_params:
            path_params["objectId"] = local_var_params["object_id"]  # noqa: E501

        query_params = []

        header_params = dict(local_var_params.get("_headers", {}))

        form_params = []
        local_var_files = {}

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

        # HTTP header `Content-Type`
        content_types_list = local_var_params.get("_content_type", self.api_client.select_header_content_type(["application/json"], "PATCH", body_params))  # noqa: E501
        if content_types_list:
            header_params["Content-Type"] = content_types_list

        # Authentication setting
        auth_settings = ["oauth2"]  # noqa: E501

        response_types_map = {
            200: "BlogPost",
        }

        return self.api_client.call_api(
            "/cms/v3/blogs/posts/{objectId}/draft",
            "PATCH",
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_types_map=response_types_map,
            auth_settings=auth_settings,
            async_req=local_var_params.get("async_req"),
            _return_http_data_only=local_var_params.get("_return_http_data_only"),  # noqa: E501
            _preload_content=local_var_params.get("_preload_content", True),
            _request_timeout=local_var_params.get("_request_timeout"),
            collection_formats=collection_formats,
            _request_auth=local_var_params.get("_request_auth"),
        )
