# 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 SweepCreateAPIInput(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',
        'cluster_id': 'int',
        'cluster_node_ids': 'list[int]',
        'docker_credentials_id': 'int',
        'early_stopping_spec': 'OrmEarlyStoppingSpec',
        'hyperparameters': 'list[OrmHyperparameter]',
        'image_url': 'str',
        'max_experiment_count': 'int',
        'max_failed_experiment_count': 'int',
        'message': 'str',
        'objective': 'OrmSweepObjective',
        'parallel_experiment_count': 'int',
        'resource_spec': 'OrmKernelResourceSpecField',
        'resource_spec_id': 'int',
        'search_space': 'OrmSweepSearchSpace',
        'start_command': 'str',
        'volumes': 'ProtoVolumeMountRequests'
    }

    attribute_map = {
        'algorithm': 'algorithm',
        'cluster_id': 'cluster_id',
        'cluster_node_ids': 'cluster_node_ids',
        'docker_credentials_id': 'docker_credentials_id',
        'early_stopping_spec': 'early_stopping_spec',
        'hyperparameters': 'hyperparameters',
        'image_url': 'image_url',
        'max_experiment_count': 'max_experiment_count',
        'max_failed_experiment_count': 'max_failed_experiment_count',
        'message': 'message',
        'objective': 'objective',
        'parallel_experiment_count': 'parallel_experiment_count',
        'resource_spec': 'resource_spec',
        'resource_spec_id': 'resource_spec_id',
        'search_space': 'search_space',
        'start_command': 'start_command',
        'volumes': 'volumes'
    }

    def __init__(self, algorithm=None, cluster_id=None, cluster_node_ids=None, docker_credentials_id=None, early_stopping_spec=None, hyperparameters=None, image_url=None, max_experiment_count=None, max_failed_experiment_count=None, message=None, objective=None, parallel_experiment_count=None, resource_spec=None, resource_spec_id=None, search_space=None, start_command=None, volumes=None, local_vars_configuration=None):  # noqa: E501
        """SweepCreateAPIInput - 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._cluster_id = None
        self._cluster_node_ids = None
        self._docker_credentials_id = None
        self._early_stopping_spec = None
        self._hyperparameters = None
        self._image_url = None
        self._max_experiment_count = None
        self._max_failed_experiment_count = None
        self._message = None
        self._objective = None
        self._parallel_experiment_count = None
        self._resource_spec = None
        self._resource_spec_id = None
        self._search_space = None
        self._start_command = None
        self._volumes = None
        self.discriminator = None

        self.algorithm = algorithm
        self.cluster_id = cluster_id
        if cluster_node_ids is not None:
            self.cluster_node_ids = cluster_node_ids
        self.docker_credentials_id = docker_credentials_id
        if early_stopping_spec is not None:
            self.early_stopping_spec = early_stopping_spec
        if hyperparameters is not None:
            self.hyperparameters = hyperparameters
        self.image_url = image_url
        self.max_experiment_count = max_experiment_count
        self.max_failed_experiment_count = max_failed_experiment_count
        self.message = message
        self.objective = objective
        self.parallel_experiment_count = parallel_experiment_count
        if resource_spec is not None:
            self.resource_spec = resource_spec
        self.resource_spec_id = resource_spec_id
        self.search_space = search_space
        self.start_command = start_command
        self.volumes = volumes

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


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

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


        :param algorithm: The algorithm of this SweepCreateAPIInput.  # 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 cluster_id(self):
        """Gets the cluster_id of this SweepCreateAPIInput.  # noqa: E501


        :return: The cluster_id of this SweepCreateAPIInput.  # noqa: E501
        :rtype: int
        """
        return self._cluster_id

    @cluster_id.setter
    def cluster_id(self, cluster_id):
        """Sets the cluster_id of this SweepCreateAPIInput.


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

        self._cluster_id = cluster_id

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


        :return: The cluster_node_ids of this SweepCreateAPIInput.  # noqa: E501
        :rtype: list[int]
        """
        return self._cluster_node_ids

    @cluster_node_ids.setter
    def cluster_node_ids(self, cluster_node_ids):
        """Sets the cluster_node_ids of this SweepCreateAPIInput.


        :param cluster_node_ids: The cluster_node_ids of this SweepCreateAPIInput.  # noqa: E501
        :type cluster_node_ids: list[int]
        """

        self._cluster_node_ids = cluster_node_ids

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


        :return: The docker_credentials_id of this SweepCreateAPIInput.  # noqa: E501
        :rtype: int
        """
        return self._docker_credentials_id

    @docker_credentials_id.setter
    def docker_credentials_id(self, docker_credentials_id):
        """Sets the docker_credentials_id of this SweepCreateAPIInput.


        :param docker_credentials_id: The docker_credentials_id of this SweepCreateAPIInput.  # noqa: E501
        :type docker_credentials_id: int
        """

        self._docker_credentials_id = docker_credentials_id

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


        :return: The early_stopping_spec of this SweepCreateAPIInput.  # noqa: E501
        :rtype: OrmEarlyStoppingSpec
        """
        return self._early_stopping_spec

    @early_stopping_spec.setter
    def early_stopping_spec(self, early_stopping_spec):
        """Sets the early_stopping_spec of this SweepCreateAPIInput.


        :param early_stopping_spec: The early_stopping_spec of this SweepCreateAPIInput.  # noqa: E501
        :type early_stopping_spec: OrmEarlyStoppingSpec
        """

        self._early_stopping_spec = early_stopping_spec

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


        :return: The hyperparameters of this SweepCreateAPIInput.  # noqa: E501
        :rtype: list[OrmHyperparameter]
        """
        return self._hyperparameters

    @hyperparameters.setter
    def hyperparameters(self, hyperparameters):
        """Sets the hyperparameters of this SweepCreateAPIInput.


        :param hyperparameters: The hyperparameters of this SweepCreateAPIInput.  # noqa: E501
        :type hyperparameters: list[OrmHyperparameter]
        """

        self._hyperparameters = hyperparameters

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


        :return: The image_url of this SweepCreateAPIInput.  # noqa: E501
        :rtype: str
        """
        return self._image_url

    @image_url.setter
    def image_url(self, image_url):
        """Sets the image_url of this SweepCreateAPIInput.


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

        self._image_url = image_url

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


        :return: The max_experiment_count of this SweepCreateAPIInput.  # 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 SweepCreateAPIInput.


        :param max_experiment_count: The max_experiment_count of this SweepCreateAPIInput.  # 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 SweepCreateAPIInput.  # noqa: E501


        :return: The max_failed_experiment_count of this SweepCreateAPIInput.  # 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 SweepCreateAPIInput.


        :param max_failed_experiment_count: The max_failed_experiment_count of this SweepCreateAPIInput.  # 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 message(self):
        """Gets the message of this SweepCreateAPIInput.  # noqa: E501


        :return: The message of this SweepCreateAPIInput.  # noqa: E501
        :rtype: str
        """
        return self._message

    @message.setter
    def message(self, message):
        """Sets the message of this SweepCreateAPIInput.


        :param message: The message of this SweepCreateAPIInput.  # noqa: E501
        :type message: str
        """
        if (self.local_vars_configuration.client_side_validation and
                message is not None and len(message) > 255):
            raise ValueError("Invalid value for `message`, length must be less than or equal to `255`")  # noqa: E501

        self._message = message

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


        :return: The objective of this SweepCreateAPIInput.  # noqa: E501
        :rtype: OrmSweepObjective
        """
        return self._objective

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


        :param objective: The objective of this SweepCreateAPIInput.  # noqa: E501
        :type objective: OrmSweepObjective
        """
        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 SweepCreateAPIInput.  # noqa: E501


        :return: The parallel_experiment_count of this SweepCreateAPIInput.  # 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 SweepCreateAPIInput.


        :param parallel_experiment_count: The parallel_experiment_count of this SweepCreateAPIInput.  # 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 resource_spec(self):
        """Gets the resource_spec of this SweepCreateAPIInput.  # noqa: E501


        :return: The resource_spec of this SweepCreateAPIInput.  # noqa: E501
        :rtype: OrmKernelResourceSpecField
        """
        return self._resource_spec

    @resource_spec.setter
    def resource_spec(self, resource_spec):
        """Sets the resource_spec of this SweepCreateAPIInput.


        :param resource_spec: The resource_spec of this SweepCreateAPIInput.  # noqa: E501
        :type resource_spec: OrmKernelResourceSpecField
        """

        self._resource_spec = resource_spec

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


        :return: The resource_spec_id of this SweepCreateAPIInput.  # noqa: E501
        :rtype: int
        """
        return self._resource_spec_id

    @resource_spec_id.setter
    def resource_spec_id(self, resource_spec_id):
        """Sets the resource_spec_id of this SweepCreateAPIInput.


        :param resource_spec_id: The resource_spec_id of this SweepCreateAPIInput.  # noqa: E501
        :type resource_spec_id: int
        """

        self._resource_spec_id = resource_spec_id

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


        :return: The search_space of this SweepCreateAPIInput.  # noqa: E501
        :rtype: OrmSweepSearchSpace
        """
        return self._search_space

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


        :param search_space: The search_space of this SweepCreateAPIInput.  # noqa: E501
        :type search_space: OrmSweepSearchSpace
        """
        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

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


        :return: The start_command of this SweepCreateAPIInput.  # noqa: E501
        :rtype: str
        """
        return self._start_command

    @start_command.setter
    def start_command(self, start_command):
        """Sets the start_command of this SweepCreateAPIInput.


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

        self._start_command = start_command

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


        :return: The volumes of this SweepCreateAPIInput.  # noqa: E501
        :rtype: ProtoVolumeMountRequests
        """
        return self._volumes

    @volumes.setter
    def volumes(self, volumes):
        """Sets the volumes of this SweepCreateAPIInput.


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

        self._volumes = volumes

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

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