# coding: utf-8

"""
    Aron API

    No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)  # noqa: E501

    The version of the OpenAPI document: 1.0.0
    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 openapi_client.configuration import Configuration


class SweepCreateAPIPayload(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 = {
        'algorithm': 'str',
        'max_experiment_count': 'int',
        'max_failed_experiment_count': 'int',
        'objective': 'ModelSweepObjective',
        'parallel_experiment_count': 'int',
        'search_space': 'ModelSweepSearchSpace'
    }

    attribute_map = {
        'algorithm': 'algorithm',
        'max_experiment_count': 'max_experiment_count',
        'max_failed_experiment_count': 'max_failed_experiment_count',
        'objective': 'objective',
        'parallel_experiment_count': 'parallel_experiment_count',
        'search_space': 'search_space'
    }

    def __init__(self, algorithm=None, max_experiment_count=None, max_failed_experiment_count=None, objective=None, parallel_experiment_count=None, search_space=None, local_vars_configuration=None):  # noqa: E501
        """SweepCreateAPIPayload - 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._algorithm = None
        self._max_experiment_count = None
        self._max_failed_experiment_count = None
        self._objective = None
        self._parallel_experiment_count = None
        self._search_space = None
        self.discriminator = None

        self.algorithm = algorithm
        self.max_experiment_count = max_experiment_count
        self.max_failed_experiment_count = max_failed_experiment_count
        self.objective = objective
        self.parallel_experiment_count = parallel_experiment_count
        self.search_space = search_space

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


        :return: The algorithm of this SweepCreateAPIPayload.  # noqa: E501
        :rtype: str
        """
        return self._algorithm

    @algorithm.setter
    def algorithm(self, algorithm):
        """Sets the algorithm of this SweepCreateAPIPayload.


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

        self._algorithm = algorithm

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


        :return: The max_experiment_count of this SweepCreateAPIPayload.  # noqa: E501
        :rtype: int
        """
        return self._max_experiment_count

    @max_experiment_count.setter
    def max_experiment_count(self, max_experiment_count):
        """Sets the max_experiment_count of this SweepCreateAPIPayload.


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

        self._max_experiment_count = max_experiment_count

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


        :return: The max_failed_experiment_count of this SweepCreateAPIPayload.  # noqa: E501
        :rtype: int
        """
        return self._max_failed_experiment_count

    @max_failed_experiment_count.setter
    def max_failed_experiment_count(self, max_failed_experiment_count):
        """Sets the max_failed_experiment_count of this SweepCreateAPIPayload.


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

        self._max_failed_experiment_count = max_failed_experiment_count

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


        :return: The objective of this SweepCreateAPIPayload.  # noqa: E501
        :rtype: ModelSweepObjective
        """
        return self._objective

    @objective.setter
    def objective(self, objective):
        """Sets the objective of this SweepCreateAPIPayload.


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

        self._objective = objective

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


        :return: The parallel_experiment_count of this SweepCreateAPIPayload.  # noqa: E501
        :rtype: int
        """
        return self._parallel_experiment_count

    @parallel_experiment_count.setter
    def parallel_experiment_count(self, parallel_experiment_count):
        """Sets the parallel_experiment_count of this SweepCreateAPIPayload.


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

        self._parallel_experiment_count = parallel_experiment_count

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


        :return: The search_space of this SweepCreateAPIPayload.  # noqa: E501
        :rtype: ModelSweepSearchSpace
        """
        return self._search_space

    @search_space.setter
    def search_space(self, search_space):
        """Sets the search_space of this SweepCreateAPIPayload.


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

        self._search_space = search_space

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

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