# coding: utf-8

"""
    Marketing Emails

    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.emails.configuration import Configuration


class PublicEmailTestingDetails(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 = {
        "ab_sampling_default": "str",
        "ab_sample_size_default": "str",
        "ab_status": "str",
        "ab_test_percentage": "int",
        "hours_to_wait": "int",
        "test_id": "str",
        "ab_success_metric": "str",
    }

    attribute_map = {
        "ab_sampling_default": "abSamplingDefault",
        "ab_sample_size_default": "abSampleSizeDefault",
        "ab_status": "abStatus",
        "ab_test_percentage": "abTestPercentage",
        "hours_to_wait": "hoursToWait",
        "test_id": "testId",
        "ab_success_metric": "abSuccessMetric",
    }

    def __init__(
        self, ab_sampling_default=None, ab_sample_size_default=None, ab_status=None, ab_test_percentage=None, hours_to_wait=None, test_id=None, ab_success_metric=None, local_vars_configuration=None
    ):  # noqa: E501
        """PublicEmailTestingDetails - 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._ab_sampling_default = None
        self._ab_sample_size_default = None
        self._ab_status = None
        self._ab_test_percentage = None
        self._hours_to_wait = None
        self._test_id = None
        self._ab_success_metric = None
        self.discriminator = None

        if ab_sampling_default is not None:
            self.ab_sampling_default = ab_sampling_default
        if ab_sample_size_default is not None:
            self.ab_sample_size_default = ab_sample_size_default
        if ab_status is not None:
            self.ab_status = ab_status
        if ab_test_percentage is not None:
            self.ab_test_percentage = ab_test_percentage
        if hours_to_wait is not None:
            self.hours_to_wait = hours_to_wait
        if test_id is not None:
            self.test_id = test_id
        if ab_success_metric is not None:
            self.ab_success_metric = ab_success_metric

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

        Version of the email that should be sent if the results are inconclusive after the test period, master or variant.  # noqa: E501

        :return: The ab_sampling_default of this PublicEmailTestingDetails.  # noqa: E501
        :rtype: str
        """
        return self._ab_sampling_default

    @ab_sampling_default.setter
    def ab_sampling_default(self, ab_sampling_default):
        """Sets the ab_sampling_default of this PublicEmailTestingDetails.

        Version of the email that should be sent if the results are inconclusive after the test period, master or variant.  # noqa: E501

        :param ab_sampling_default: The ab_sampling_default of this PublicEmailTestingDetails.  # noqa: E501
        :type ab_sampling_default: str
        """
        allowed_values = ["master", "variant", "loser_variant", "mab_master", "mab_variant", "automated_master", "automated_variant", "automated_loser_variant"]  # noqa: E501
        if self.local_vars_configuration.client_side_validation and ab_sampling_default not in allowed_values:  # noqa: E501
            raise ValueError("Invalid value for `ab_sampling_default` ({0}), must be one of {1}".format(ab_sampling_default, allowed_values))  # noqa: E501

        self._ab_sampling_default = ab_sampling_default

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

        Version of the email that should be sent if there are too few recipients to conduct an AB test.  # noqa: E501

        :return: The ab_sample_size_default of this PublicEmailTestingDetails.  # noqa: E501
        :rtype: str
        """
        return self._ab_sample_size_default

    @ab_sample_size_default.setter
    def ab_sample_size_default(self, ab_sample_size_default):
        """Sets the ab_sample_size_default of this PublicEmailTestingDetails.

        Version of the email that should be sent if there are too few recipients to conduct an AB test.  # noqa: E501

        :param ab_sample_size_default: The ab_sample_size_default of this PublicEmailTestingDetails.  # noqa: E501
        :type ab_sample_size_default: str
        """
        allowed_values = ["master", "variant", "loser_variant", "mab_master", "mab_variant", "automated_master", "automated_variant", "automated_loser_variant"]  # noqa: E501
        if self.local_vars_configuration.client_side_validation and ab_sample_size_default not in allowed_values:  # noqa: E501
            raise ValueError("Invalid value for `ab_sample_size_default` ({0}), must be one of {1}".format(ab_sample_size_default, allowed_values))  # noqa: E501

        self._ab_sample_size_default = ab_sample_size_default

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

        Status of the AB test.  # noqa: E501

        :return: The ab_status of this PublicEmailTestingDetails.  # noqa: E501
        :rtype: str
        """
        return self._ab_status

    @ab_status.setter
    def ab_status(self, ab_status):
        """Sets the ab_status of this PublicEmailTestingDetails.

        Status of the AB test.  # noqa: E501

        :param ab_status: The ab_status of this PublicEmailTestingDetails.  # noqa: E501
        :type ab_status: str
        """
        allowed_values = ["master", "variant", "loser_variant", "mab_master", "mab_variant", "automated_master", "automated_variant", "automated_loser_variant"]  # noqa: E501
        if self.local_vars_configuration.client_side_validation and ab_status not in allowed_values:  # noqa: E501
            raise ValueError("Invalid value for `ab_status` ({0}), must be one of {1}".format(ab_status, allowed_values))  # noqa: E501

        self._ab_status = ab_status

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

        The size of your test group.  # noqa: E501

        :return: The ab_test_percentage of this PublicEmailTestingDetails.  # noqa: E501
        :rtype: int
        """
        return self._ab_test_percentage

    @ab_test_percentage.setter
    def ab_test_percentage(self, ab_test_percentage):
        """Sets the ab_test_percentage of this PublicEmailTestingDetails.

        The size of your test group.  # noqa: E501

        :param ab_test_percentage: The ab_test_percentage of this PublicEmailTestingDetails.  # noqa: E501
        :type ab_test_percentage: int
        """

        self._ab_test_percentage = ab_test_percentage

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

        Time limit on gathering test results. After this time is up, the winning version will be sent to the remaining contacts.  # noqa: E501

        :return: The hours_to_wait of this PublicEmailTestingDetails.  # noqa: E501
        :rtype: int
        """
        return self._hours_to_wait

    @hours_to_wait.setter
    def hours_to_wait(self, hours_to_wait):
        """Sets the hours_to_wait of this PublicEmailTestingDetails.

        Time limit on gathering test results. After this time is up, the winning version will be sent to the remaining contacts.  # noqa: E501

        :param hours_to_wait: The hours_to_wait of this PublicEmailTestingDetails.  # noqa: E501
        :type hours_to_wait: int
        """

        self._hours_to_wait = hours_to_wait

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

        The ID of the AB test.  # noqa: E501

        :return: The test_id of this PublicEmailTestingDetails.  # noqa: E501
        :rtype: str
        """
        return self._test_id

    @test_id.setter
    def test_id(self, test_id):
        """Sets the test_id of this PublicEmailTestingDetails.

        The ID of the AB test.  # noqa: E501

        :param test_id: The test_id of this PublicEmailTestingDetails.  # noqa: E501
        :type test_id: str
        """

        self._test_id = test_id

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

        Metric to determine the version that will be sent to the remaining contacts.  # noqa: E501

        :return: The ab_success_metric of this PublicEmailTestingDetails.  # noqa: E501
        :rtype: str
        """
        return self._ab_success_metric

    @ab_success_metric.setter
    def ab_success_metric(self, ab_success_metric):
        """Sets the ab_success_metric of this PublicEmailTestingDetails.

        Metric to determine the version that will be sent to the remaining contacts.  # noqa: E501

        :param ab_success_metric: The ab_success_metric of this PublicEmailTestingDetails.  # noqa: E501
        :type ab_success_metric: str
        """
        allowed_values = ["CLICKS_BY_OPENS", "CLICKS_BY_DELIVERED", "OPENS_BY_DELIVERED"]  # noqa: E501
        if self.local_vars_configuration.client_side_validation and ab_success_metric not in allowed_values:  # noqa: E501
            raise ValueError("Invalid value for `ab_success_metric` ({0}), must be one of {1}".format(ab_success_metric, allowed_values))  # noqa: E501

        self._ab_success_metric = ab_success_metric

    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, PublicEmailTestingDetails):
            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, PublicEmailTestingDetails):
            return True

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