# coding: utf-8

"""
    Katib

    Swagger description for Katib  # noqa: E501

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


import pprint
import re  # noqa: F401

import six

from kubeflow.katib.configuration import Configuration


class V1beta1SuggestionSpec(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': 'V1beta1AlgorithmSpec',
        'early_stopping': 'V1beta1EarlyStoppingSpec',
        'requests': 'int',
        'resume_policy': 'str'
    }

    attribute_map = {
        'algorithm': 'algorithm',
        'early_stopping': 'earlyStopping',
        'requests': 'requests',
        'resume_policy': 'resumePolicy'
    }

    def __init__(self, algorithm=None, early_stopping=None, requests=None, resume_policy=None, local_vars_configuration=None):  # noqa: E501
        """V1beta1SuggestionSpec - a model defined in OpenAPI"""  # noqa: E501
        if local_vars_configuration is None:
            local_vars_configuration = Configuration()
        self.local_vars_configuration = local_vars_configuration

        self._algorithm = None
        self._early_stopping = None
        self._requests = None
        self._resume_policy = None
        self.discriminator = None

        if algorithm is not None:
            self.algorithm = algorithm
        if early_stopping is not None:
            self.early_stopping = early_stopping
        if requests is not None:
            self.requests = requests
        if resume_policy is not None:
            self.resume_policy = resume_policy

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


        :return: The algorithm of this V1beta1SuggestionSpec.  # noqa: E501
        :rtype: V1beta1AlgorithmSpec
        """
        return self._algorithm

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


        :param algorithm: The algorithm of this V1beta1SuggestionSpec.  # noqa: E501
        :type: V1beta1AlgorithmSpec
        """

        self._algorithm = algorithm

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


        :return: The early_stopping of this V1beta1SuggestionSpec.  # noqa: E501
        :rtype: V1beta1EarlyStoppingSpec
        """
        return self._early_stopping

    @early_stopping.setter
    def early_stopping(self, early_stopping):
        """Sets the early_stopping of this V1beta1SuggestionSpec.


        :param early_stopping: The early_stopping of this V1beta1SuggestionSpec.  # noqa: E501
        :type: V1beta1EarlyStoppingSpec
        """

        self._early_stopping = early_stopping

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

        Number of suggestions requested.  # noqa: E501

        :return: The requests of this V1beta1SuggestionSpec.  # noqa: E501
        :rtype: int
        """
        return self._requests

    @requests.setter
    def requests(self, requests):
        """Sets the requests of this V1beta1SuggestionSpec.

        Number of suggestions requested.  # noqa: E501

        :param requests: The requests of this V1beta1SuggestionSpec.  # noqa: E501
        :type: int
        """

        self._requests = requests

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

        ResumePolicy describes resuming policy which usually take effect after experiment terminated. Default value is Never.  # noqa: E501

        :return: The resume_policy of this V1beta1SuggestionSpec.  # noqa: E501
        :rtype: str
        """
        return self._resume_policy

    @resume_policy.setter
    def resume_policy(self, resume_policy):
        """Sets the resume_policy of this V1beta1SuggestionSpec.

        ResumePolicy describes resuming policy which usually take effect after experiment terminated. Default value is Never.  # noqa: E501

        :param resume_policy: The resume_policy of this V1beta1SuggestionSpec.  # noqa: E501
        :type: str
        """

        self._resume_policy = resume_policy

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

        for attr, _ in six.iteritems(self.openapi_types):
            value = getattr(self, attr)
            if isinstance(value, list):
                result[attr] = list(map(
                    lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
                    value
                ))
            elif hasattr(value, "to_dict"):
                result[attr] = value.to_dict()
            elif isinstance(value, dict):
                result[attr] = dict(map(
                    lambda item: (item[0], item[1].to_dict())
                    if hasattr(item[1], "to_dict") else item,
                    value.items()
                ))
            else:
                result[attr] = 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, V1beta1SuggestionSpec):
            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, V1beta1SuggestionSpec):
            return True

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