# coding: utf-8

"""
    Marketing Events

    No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)  # 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.marketing.events.api_client import ApiClient
from hubspot.marketing.events.exceptions import ApiTypeError, ApiValueError  # noqa: F401


class RetrieveParticipantStateApi(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 get_participations_breakdown_by_contact_id(self, contact_identifier, **kwargs):  # noqa: E501
        """Read participations breakdown by Contact identifier  # noqa: E501

        Read Contact's participations by identifier - email or internal 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_participations_breakdown_by_contact_id(contact_identifier, async_req=True)
        >>> result = thread.get()

        :param contact_identifier: The identifier of the Contact. It may be email or internal id. (required)
        :type contact_identifier: str
        :param state: The participation state value. It may be REGISTERED, CANCELLED, ATTENDED, NO_SHOW
        :type state: str
        :param limit: The limit for response size. The default value is 10, the max number is 100
        :type limit: int
        :param after: The cursor indicating the position of the last retrieved item.
        :type after: 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: CollectionResponseWithTotalParticipationBreakdownForwardPaging
        """
        kwargs["_return_http_data_only"] = True
        return self.get_participations_breakdown_by_contact_id_with_http_info(contact_identifier, **kwargs)  # noqa: E501

    def get_participations_breakdown_by_contact_id_with_http_info(self, contact_identifier, **kwargs):  # noqa: E501
        """Read participations breakdown by Contact identifier  # noqa: E501

        Read Contact's participations by identifier - email or internal 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_participations_breakdown_by_contact_id_with_http_info(contact_identifier, async_req=True)
        >>> result = thread.get()

        :param contact_identifier: The identifier of the Contact. It may be email or internal id. (required)
        :type contact_identifier: str
        :param state: The participation state value. It may be REGISTERED, CANCELLED, ATTENDED, NO_SHOW
        :type state: str
        :param limit: The limit for response size. The default value is 10, the max number is 100
        :type limit: int
        :param after: The cursor indicating the position of the last retrieved item.
        :type after: 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(CollectionResponseWithTotalParticipationBreakdownForwardPaging, status_code(int), headers(HTTPHeaderDict))
        """

        local_var_params = locals()

        all_params = ["contact_identifier", "state", "limit", "after"]
        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_participations_breakdown_by_contact_id" % key)
            local_var_params[key] = val
        del local_var_params["kwargs"]
        # verify the required parameter 'contact_identifier' is set
        if self.api_client.client_side_validation and local_var_params.get("contact_identifier") is None:  # noqa: E501
            raise ApiValueError("Missing the required parameter `contact_identifier` when calling `get_participations_breakdown_by_contact_id`")  # noqa: E501

        collection_formats = {}

        path_params = {}
        if "contact_identifier" in local_var_params:
            path_params["contactIdentifier"] = local_var_params["contact_identifier"]  # noqa: E501

        query_params = []
        if local_var_params.get("state") is not None:  # noqa: E501
            query_params.append(("state", local_var_params["state"]))  # 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("after") is not None:  # noqa: E501
            query_params.append(("after", local_var_params["after"]))  # 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: "CollectionResponseWithTotalParticipationBreakdownForwardPaging",
        }

        return self.api_client.call_api(
            "/marketing/v3/marketing-events/participations/contacts/{contactIdentifier}/breakdown",
            "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_participations_breakdown_by_external_event_id(self, external_account_id, external_event_id, **kwargs):  # noqa: E501
        """Read participations breakdown by Marketing Event external identifier  # noqa: E501

        Read Marketing event's participations breakdown with optional filters by externalAccountId and externalEventId pair.  # 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_participations_breakdown_by_external_event_id(external_account_id, external_event_id, async_req=True)
        >>> result = thread.get()

        :param external_account_id: The accountId that is associated with this marketing event in the external event application. (required)
        :type external_account_id: str
        :param external_event_id: The id of the marketing event in the external event application. (required)
        :type external_event_id: str
        :param contact_identifier: The identifier of the Contact. It may be email or internal id.
        :type contact_identifier: str
        :param state: The participation state value. It may be REGISTERED, CANCELLED, ATTENDED, NO_SHOW
        :type state: str
        :param limit: The limit for response size. The default value is 10, the max number is 100
        :type limit: int
        :param after: The cursor indicating the position of the last retrieved item.
        :type after: 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: CollectionResponseWithTotalParticipationBreakdownForwardPaging
        """
        kwargs["_return_http_data_only"] = True
        return self.get_participations_breakdown_by_external_event_id_with_http_info(external_account_id, external_event_id, **kwargs)  # noqa: E501

    def get_participations_breakdown_by_external_event_id_with_http_info(self, external_account_id, external_event_id, **kwargs):  # noqa: E501
        """Read participations breakdown by Marketing Event external identifier  # noqa: E501

        Read Marketing event's participations breakdown with optional filters by externalAccountId and externalEventId pair.  # 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_participations_breakdown_by_external_event_id_with_http_info(external_account_id, external_event_id, async_req=True)
        >>> result = thread.get()

        :param external_account_id: The accountId that is associated with this marketing event in the external event application. (required)
        :type external_account_id: str
        :param external_event_id: The id of the marketing event in the external event application. (required)
        :type external_event_id: str
        :param contact_identifier: The identifier of the Contact. It may be email or internal id.
        :type contact_identifier: str
        :param state: The participation state value. It may be REGISTERED, CANCELLED, ATTENDED, NO_SHOW
        :type state: str
        :param limit: The limit for response size. The default value is 10, the max number is 100
        :type limit: int
        :param after: The cursor indicating the position of the last retrieved item.
        :type after: 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(CollectionResponseWithTotalParticipationBreakdownForwardPaging, status_code(int), headers(HTTPHeaderDict))
        """

        local_var_params = locals()

        all_params = ["external_account_id", "external_event_id", "contact_identifier", "state", "limit", "after"]
        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_participations_breakdown_by_external_event_id" % key)
            local_var_params[key] = val
        del local_var_params["kwargs"]
        # verify the required parameter 'external_account_id' is set
        if self.api_client.client_side_validation and local_var_params.get("external_account_id") is None:  # noqa: E501
            raise ApiValueError("Missing the required parameter `external_account_id` when calling `get_participations_breakdown_by_external_event_id`")  # noqa: E501
        # verify the required parameter 'external_event_id' is set
        if self.api_client.client_side_validation and local_var_params.get("external_event_id") is None:  # noqa: E501
            raise ApiValueError("Missing the required parameter `external_event_id` when calling `get_participations_breakdown_by_external_event_id`")  # noqa: E501

        collection_formats = {}

        path_params = {}
        if "external_account_id" in local_var_params:
            path_params["externalAccountId"] = local_var_params["external_account_id"]  # noqa: E501
        if "external_event_id" in local_var_params:
            path_params["externalEventId"] = local_var_params["external_event_id"]  # noqa: E501

        query_params = []
        if local_var_params.get("contact_identifier") is not None:  # noqa: E501
            query_params.append(("contactIdentifier", local_var_params["contact_identifier"]))  # noqa: E501
        if local_var_params.get("state") is not None:  # noqa: E501
            query_params.append(("state", local_var_params["state"]))  # 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("after") is not None:  # noqa: E501
            query_params.append(("after", local_var_params["after"]))  # 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: "CollectionResponseWithTotalParticipationBreakdownForwardPaging",
        }

        return self.api_client.call_api(
            "/marketing/v3/marketing-events/participations/{externalAccountId}/{externalEventId}/breakdown",
            "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_participations_breakdown_by_marketing_event_id(self, marketing_event_id, **kwargs):  # noqa: E501
        """Read participations breakdown by Marketing Event internal identifier  # noqa: E501

        Read Marketing event's participations breakdown with optional filters by internal identifier marketingEventId.  # 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_participations_breakdown_by_marketing_event_id(marketing_event_id, async_req=True)
        >>> result = thread.get()

        :param marketing_event_id: The internal id of the marketing event in HubSpot. (required)
        :type marketing_event_id: int
        :param contact_identifier: The identifier of the Contact. It may be email or internal id.
        :type contact_identifier: str
        :param state: The participation state value. It may be REGISTERED, CANCELLED, ATTENDED, NO_SHOW
        :type state: str
        :param limit: The limit for response size. The default value is 10, the max number is 100
        :type limit: int
        :param after: The cursor indicating the position of the last retrieved item.
        :type after: 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: CollectionResponseWithTotalParticipationBreakdownForwardPaging
        """
        kwargs["_return_http_data_only"] = True
        return self.get_participations_breakdown_by_marketing_event_id_with_http_info(marketing_event_id, **kwargs)  # noqa: E501

    def get_participations_breakdown_by_marketing_event_id_with_http_info(self, marketing_event_id, **kwargs):  # noqa: E501
        """Read participations breakdown by Marketing Event internal identifier  # noqa: E501

        Read Marketing event's participations breakdown with optional filters by internal identifier marketingEventId.  # 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_participations_breakdown_by_marketing_event_id_with_http_info(marketing_event_id, async_req=True)
        >>> result = thread.get()

        :param marketing_event_id: The internal id of the marketing event in HubSpot. (required)
        :type marketing_event_id: int
        :param contact_identifier: The identifier of the Contact. It may be email or internal id.
        :type contact_identifier: str
        :param state: The participation state value. It may be REGISTERED, CANCELLED, ATTENDED, NO_SHOW
        :type state: str
        :param limit: The limit for response size. The default value is 10, the max number is 100
        :type limit: int
        :param after: The cursor indicating the position of the last retrieved item.
        :type after: 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(CollectionResponseWithTotalParticipationBreakdownForwardPaging, status_code(int), headers(HTTPHeaderDict))
        """

        local_var_params = locals()

        all_params = ["marketing_event_id", "contact_identifier", "state", "limit", "after"]
        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_participations_breakdown_by_marketing_event_id" % key)
            local_var_params[key] = val
        del local_var_params["kwargs"]
        # verify the required parameter 'marketing_event_id' is set
        if self.api_client.client_side_validation and local_var_params.get("marketing_event_id") is None:  # noqa: E501
            raise ApiValueError("Missing the required parameter `marketing_event_id` when calling `get_participations_breakdown_by_marketing_event_id`")  # noqa: E501

        collection_formats = {}

        path_params = {}
        if "marketing_event_id" in local_var_params:
            path_params["marketingEventId"] = local_var_params["marketing_event_id"]  # noqa: E501

        query_params = []
        if local_var_params.get("contact_identifier") is not None:  # noqa: E501
            query_params.append(("contactIdentifier", local_var_params["contact_identifier"]))  # noqa: E501
        if local_var_params.get("state") is not None:  # noqa: E501
            query_params.append(("state", local_var_params["state"]))  # 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("after") is not None:  # noqa: E501
            query_params.append(("after", local_var_params["after"]))  # 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: "CollectionResponseWithTotalParticipationBreakdownForwardPaging",
        }

        return self.api_client.call_api(
            "/marketing/v3/marketing-events/participations/{marketingEventId}/breakdown",
            "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_participations_counters_by_event_external_id(self, external_account_id, external_event_id, **kwargs):  # noqa: E501
        """Read participations counters by Marketing Event external identifier  # noqa: E501

        Read Marketing event's participations counters by externalAccountId and externalEventId pair.  # 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_participations_counters_by_event_external_id(external_account_id, external_event_id, async_req=True)
        >>> result = thread.get()

        :param external_account_id: The accountId that is associated with this marketing event in the external event application. (required)
        :type external_account_id: str
        :param external_event_id: The id of the marketing event in the external event application. (required)
        :type external_event_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: AttendanceCounters
        """
        kwargs["_return_http_data_only"] = True
        return self.get_participations_counters_by_event_external_id_with_http_info(external_account_id, external_event_id, **kwargs)  # noqa: E501

    def get_participations_counters_by_event_external_id_with_http_info(self, external_account_id, external_event_id, **kwargs):  # noqa: E501
        """Read participations counters by Marketing Event external identifier  # noqa: E501

        Read Marketing event's participations counters by externalAccountId and externalEventId pair.  # 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_participations_counters_by_event_external_id_with_http_info(external_account_id, external_event_id, async_req=True)
        >>> result = thread.get()

        :param external_account_id: The accountId that is associated with this marketing event in the external event application. (required)
        :type external_account_id: str
        :param external_event_id: The id of the marketing event in the external event application. (required)
        :type external_event_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(AttendanceCounters, status_code(int), headers(HTTPHeaderDict))
        """

        local_var_params = locals()

        all_params = ["external_account_id", "external_event_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_participations_counters_by_event_external_id" % key)
            local_var_params[key] = val
        del local_var_params["kwargs"]
        # verify the required parameter 'external_account_id' is set
        if self.api_client.client_side_validation and local_var_params.get("external_account_id") is None:  # noqa: E501
            raise ApiValueError("Missing the required parameter `external_account_id` when calling `get_participations_counters_by_event_external_id`")  # noqa: E501
        # verify the required parameter 'external_event_id' is set
        if self.api_client.client_side_validation and local_var_params.get("external_event_id") is None:  # noqa: E501
            raise ApiValueError("Missing the required parameter `external_event_id` when calling `get_participations_counters_by_event_external_id`")  # noqa: E501

        collection_formats = {}

        path_params = {}
        if "external_account_id" in local_var_params:
            path_params["externalAccountId"] = local_var_params["external_account_id"]  # noqa: E501
        if "external_event_id" in local_var_params:
            path_params["externalEventId"] = local_var_params["external_event_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: "AttendanceCounters",
        }

        return self.api_client.call_api(
            "/marketing/v3/marketing-events/participations/{externalAccountId}/{externalEventId}",
            "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_participations_counters_by_marketing_event_id(self, marketing_event_id, **kwargs):  # noqa: E501
        """Read participations counters by Marketing Event internal identifier  # noqa: E501

        Read Marketing event's participations counters by internal identifier marketingEventId.  # 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_participations_counters_by_marketing_event_id(marketing_event_id, async_req=True)
        >>> result = thread.get()

        :param marketing_event_id: The internal id of the marketing event in HubSpot. (required)
        :type marketing_event_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: AttendanceCounters
        """
        kwargs["_return_http_data_only"] = True
        return self.get_participations_counters_by_marketing_event_id_with_http_info(marketing_event_id, **kwargs)  # noqa: E501

    def get_participations_counters_by_marketing_event_id_with_http_info(self, marketing_event_id, **kwargs):  # noqa: E501
        """Read participations counters by Marketing Event internal identifier  # noqa: E501

        Read Marketing event's participations counters by internal identifier marketingEventId.  # 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_participations_counters_by_marketing_event_id_with_http_info(marketing_event_id, async_req=True)
        >>> result = thread.get()

        :param marketing_event_id: The internal id of the marketing event in HubSpot. (required)
        :type marketing_event_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(AttendanceCounters, status_code(int), headers(HTTPHeaderDict))
        """

        local_var_params = locals()

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

        collection_formats = {}

        path_params = {}
        if "marketing_event_id" in local_var_params:
            path_params["marketingEventId"] = local_var_params["marketing_event_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: "AttendanceCounters",
        }

        return self.api_client.call_api(
            "/marketing/v3/marketing-events/participations/{marketingEventId}",
            "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"),
        )
