# 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
"""


try:
    from inspect import getfullargspec
except ImportError:
    from inspect import getargspec as getfullargspec
import pprint
import re  # noqa: F401
import six

from hubspot.marketing.events.configuration import Configuration


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

    Do not edit the class manually.
    """

    """
    Attributes:
      openapi_types (dict): The key is attribute name
                            and the value is attribute type.
      attribute_map (dict): The key is attribute name
                            and the value is json key in definition.
    """
    openapi_types = {"occurred_at": "int", "attendance_percentage": "str", "attendance_state": "str", "attendance_duration_seconds": "int"}

    attribute_map = {"occurred_at": "occurredAt", "attendance_percentage": "attendancePercentage", "attendance_state": "attendanceState", "attendance_duration_seconds": "attendanceDurationSeconds"}

    def __init__(self, occurred_at=None, attendance_percentage=None, attendance_state=None, attendance_duration_seconds=None, local_vars_configuration=None):  # noqa: E501
        """ParticipationProperties - a model defined in OpenAPI"""  # noqa: E501
        if local_vars_configuration is None:
            local_vars_configuration = Configuration.get_default_copy()
        self.local_vars_configuration = local_vars_configuration

        self._occurred_at = None
        self._attendance_percentage = None
        self._attendance_state = None
        self._attendance_duration_seconds = None
        self.discriminator = None

        self.occurred_at = occurred_at
        if attendance_percentage is not None:
            self.attendance_percentage = attendance_percentage
        self.attendance_state = attendance_state
        if attendance_duration_seconds is not None:
            self.attendance_duration_seconds = attendance_duration_seconds

    @property
    def occurred_at(self):
        """Gets the occurred_at of this ParticipationProperties.  # noqa: E501


        :return: The occurred_at of this ParticipationProperties.  # noqa: E501
        :rtype: int
        """
        return self._occurred_at

    @occurred_at.setter
    def occurred_at(self, occurred_at):
        """Sets the occurred_at of this ParticipationProperties.


        :param occurred_at: The occurred_at of this ParticipationProperties.  # noqa: E501
        :type occurred_at: int
        """
        if self.local_vars_configuration.client_side_validation and occurred_at is None:  # noqa: E501
            raise ValueError("Invalid value for `occurred_at`, must not be `None`")  # noqa: E501

        self._occurred_at = occurred_at

    @property
    def attendance_percentage(self):
        """Gets the attendance_percentage of this ParticipationProperties.  # noqa: E501


        :return: The attendance_percentage of this ParticipationProperties.  # noqa: E501
        :rtype: str
        """
        return self._attendance_percentage

    @attendance_percentage.setter
    def attendance_percentage(self, attendance_percentage):
        """Sets the attendance_percentage of this ParticipationProperties.


        :param attendance_percentage: The attendance_percentage of this ParticipationProperties.  # noqa: E501
        :type attendance_percentage: str
        """

        self._attendance_percentage = attendance_percentage

    @property
    def attendance_state(self):
        """Gets the attendance_state of this ParticipationProperties.  # noqa: E501


        :return: The attendance_state of this ParticipationProperties.  # noqa: E501
        :rtype: str
        """
        return self._attendance_state

    @attendance_state.setter
    def attendance_state(self, attendance_state):
        """Sets the attendance_state of this ParticipationProperties.


        :param attendance_state: The attendance_state of this ParticipationProperties.  # noqa: E501
        :type attendance_state: str
        """
        if self.local_vars_configuration.client_side_validation and attendance_state is None:  # noqa: E501
            raise ValueError("Invalid value for `attendance_state`, must not be `None`")  # noqa: E501
        allowed_values = ["REGISTERED", "ATTENDED", "CANCELLED", "EMPTY", "NO_SHOW"]  # noqa: E501
        if self.local_vars_configuration.client_side_validation and attendance_state not in allowed_values:  # noqa: E501
            raise ValueError("Invalid value for `attendance_state` ({0}), must be one of {1}".format(attendance_state, allowed_values))  # noqa: E501

        self._attendance_state = attendance_state

    @property
    def attendance_duration_seconds(self):
        """Gets the attendance_duration_seconds of this ParticipationProperties.  # noqa: E501


        :return: The attendance_duration_seconds of this ParticipationProperties.  # noqa: E501
        :rtype: int
        """
        return self._attendance_duration_seconds

    @attendance_duration_seconds.setter
    def attendance_duration_seconds(self, attendance_duration_seconds):
        """Sets the attendance_duration_seconds of this ParticipationProperties.


        :param attendance_duration_seconds: The attendance_duration_seconds of this ParticipationProperties.  # noqa: E501
        :type attendance_duration_seconds: int
        """

        self._attendance_duration_seconds = attendance_duration_seconds

    def to_dict(self, serialize=False):
        """Returns the model properties as a dict"""
        result = {}

        def convert(x):
            if hasattr(x, "to_dict"):
                args = getfullargspec(x.to_dict).args
                if len(args) == 1:
                    return x.to_dict()
                else:
                    return x.to_dict(serialize)
            else:
                return x

        for attr, _ in six.iteritems(self.openapi_types):
            value = getattr(self, attr)
            attr = self.attribute_map.get(attr, attr) if serialize else attr
            if isinstance(value, list):
                result[attr] = list(map(lambda x: convert(x), value))
            elif isinstance(value, dict):
                result[attr] = dict(map(lambda item: (item[0], convert(item[1])), value.items()))
            else:
                result[attr] = convert(value)

        return result

    def to_str(self):
        """Returns the string representation of the model"""
        return pprint.pformat(self.to_dict())

    def __repr__(self):
        """For `print` and `pprint`"""
        return self.to_str()

    def __eq__(self, other):
        """Returns true if both objects are equal"""
        if not isinstance(other, ParticipationProperties):
            return False

        return self.to_dict() == other.to_dict()

    def __ne__(self, other):
        """Returns true if both objects are not equal"""
        if not isinstance(other, ParticipationProperties):
            return True

        return self.to_dict() != other.to_dict()
