# coding: utf-8

"""
    xpctl

    This is a sample xpctl  server.  You can find out more about xpctl at [baseline](https://github.com/dpressel/baseline/blob/master/docs/xpctl.md).  # noqa: E501

    OpenAPI spec version: 1.0.0
    Contact: apiteam@swagger.io
    Generated by: https://github.com/swagger-api/swagger-codegen.git
"""


import pprint
import re  # noqa: F401

import six

from xpctl.xpclient.models.aggregate_result import AggregateResult  # noqa: F401,E501


class ExperimentAggregate(object):
    """NOTE: This class is auto generated by the swagger code generator program.

    Do not edit the class manually.
    """

    """
    Attributes:
      swagger_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.
    """
    swagger_types = {
        'task': 'str',
        'eid': 'str',
        'sha1': 'str',
        'config': 'str',
        'dataset': 'str',
        'username': 'str',
        'hostname': 'str',
        'exp_date': 'date',
        'label': 'str',
        'version': 'str',
        'num_exps': 'int',
        'train_events': 'list[AggregateResult]',
        'valid_events': 'list[AggregateResult]',
        'test_events': 'list[AggregateResult]'
    }

    attribute_map = {
        'task': 'task',
        'eid': 'eid',
        'sha1': 'sha1',
        'config': 'config',
        'dataset': 'dataset',
        'username': 'username',
        'hostname': 'hostname',
        'exp_date': 'exp_date',
        'label': 'label',
        'version': 'version',
        'num_exps': 'num_exps',
        'train_events': 'train_events',
        'valid_events': 'valid_events',
        'test_events': 'test_events'
    }

    def __init__(self, task=None, eid=None, sha1=None, config=None, dataset=None, username=None, hostname=None, exp_date=None, label=None, version=None, num_exps=None, train_events=None, valid_events=None, test_events=None):  # noqa: E501
        """ExperimentAggregate - a model defined in Swagger"""  # noqa: E501

        self._task = None
        self._eid = None
        self._sha1 = None
        self._config = None
        self._dataset = None
        self._username = None
        self._hostname = None
        self._exp_date = None
        self._label = None
        self._version = None
        self._num_exps = None
        self._train_events = None
        self._valid_events = None
        self._test_events = None
        self.discriminator = None

        if task is not None:
            self.task = task
        if eid is not None:
            self.eid = eid
        if sha1 is not None:
            self.sha1 = sha1
        if config is not None:
            self.config = config
        if dataset is not None:
            self.dataset = dataset
        if username is not None:
            self.username = username
        if hostname is not None:
            self.hostname = hostname
        if exp_date is not None:
            self.exp_date = exp_date
        if label is not None:
            self.label = label
        if version is not None:
            self.version = version
        if num_exps is not None:
            self.num_exps = num_exps
        if train_events is not None:
            self.train_events = train_events
        if valid_events is not None:
            self.valid_events = valid_events
        if test_events is not None:
            self.test_events = test_events

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


        :return: The task of this ExperimentAggregate.  # noqa: E501
        :rtype: str
        """
        return self._task

    @task.setter
    def task(self, task):
        """Sets the task of this ExperimentAggregate.


        :param task: The task of this ExperimentAggregate.  # noqa: E501
        :type: str
        """

        self._task = task

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


        :return: The eid of this ExperimentAggregate.  # noqa: E501
        :rtype: str
        """
        return self._eid

    @eid.setter
    def eid(self, eid):
        """Sets the eid of this ExperimentAggregate.


        :param eid: The eid of this ExperimentAggregate.  # noqa: E501
        :type: str
        """

        self._eid = eid

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


        :return: The sha1 of this ExperimentAggregate.  # noqa: E501
        :rtype: str
        """
        return self._sha1

    @sha1.setter
    def sha1(self, sha1):
        """Sets the sha1 of this ExperimentAggregate.


        :param sha1: The sha1 of this ExperimentAggregate.  # noqa: E501
        :type: str
        """

        self._sha1 = sha1

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


        :return: The config of this ExperimentAggregate.  # noqa: E501
        :rtype: str
        """
        return self._config

    @config.setter
    def config(self, config):
        """Sets the config of this ExperimentAggregate.


        :param config: The config of this ExperimentAggregate.  # noqa: E501
        :type: str
        """

        self._config = config

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


        :return: The dataset of this ExperimentAggregate.  # noqa: E501
        :rtype: str
        """
        return self._dataset

    @dataset.setter
    def dataset(self, dataset):
        """Sets the dataset of this ExperimentAggregate.


        :param dataset: The dataset of this ExperimentAggregate.  # noqa: E501
        :type: str
        """

        self._dataset = dataset

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


        :return: The username of this ExperimentAggregate.  # noqa: E501
        :rtype: str
        """
        return self._username

    @username.setter
    def username(self, username):
        """Sets the username of this ExperimentAggregate.


        :param username: The username of this ExperimentAggregate.  # noqa: E501
        :type: str
        """

        self._username = username

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


        :return: The hostname of this ExperimentAggregate.  # noqa: E501
        :rtype: str
        """
        return self._hostname

    @hostname.setter
    def hostname(self, hostname):
        """Sets the hostname of this ExperimentAggregate.


        :param hostname: The hostname of this ExperimentAggregate.  # noqa: E501
        :type: str
        """

        self._hostname = hostname

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


        :return: The exp_date of this ExperimentAggregate.  # noqa: E501
        :rtype: date
        """
        return self._exp_date

    @exp_date.setter
    def exp_date(self, exp_date):
        """Sets the exp_date of this ExperimentAggregate.


        :param exp_date: The exp_date of this ExperimentAggregate.  # noqa: E501
        :type: date
        """

        self._exp_date = exp_date

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


        :return: The label of this ExperimentAggregate.  # noqa: E501
        :rtype: str
        """
        return self._label

    @label.setter
    def label(self, label):
        """Sets the label of this ExperimentAggregate.


        :param label: The label of this ExperimentAggregate.  # noqa: E501
        :type: str
        """

        self._label = label

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


        :return: The version of this ExperimentAggregate.  # noqa: E501
        :rtype: str
        """
        return self._version

    @version.setter
    def version(self, version):
        """Sets the version of this ExperimentAggregate.


        :param version: The version of this ExperimentAggregate.  # noqa: E501
        :type: str
        """

        self._version = version

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


        :return: The num_exps of this ExperimentAggregate.  # noqa: E501
        :rtype: int
        """
        return self._num_exps

    @num_exps.setter
    def num_exps(self, num_exps):
        """Sets the num_exps of this ExperimentAggregate.


        :param num_exps: The num_exps of this ExperimentAggregate.  # noqa: E501
        :type: int
        """

        self._num_exps = num_exps

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


        :return: The train_events of this ExperimentAggregate.  # noqa: E501
        :rtype: list[AggregateResult]
        """
        return self._train_events

    @train_events.setter
    def train_events(self, train_events):
        """Sets the train_events of this ExperimentAggregate.


        :param train_events: The train_events of this ExperimentAggregate.  # noqa: E501
        :type: list[AggregateResult]
        """

        self._train_events = train_events

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


        :return: The valid_events of this ExperimentAggregate.  # noqa: E501
        :rtype: list[AggregateResult]
        """
        return self._valid_events

    @valid_events.setter
    def valid_events(self, valid_events):
        """Sets the valid_events of this ExperimentAggregate.


        :param valid_events: The valid_events of this ExperimentAggregate.  # noqa: E501
        :type: list[AggregateResult]
        """

        self._valid_events = valid_events

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


        :return: The test_events of this ExperimentAggregate.  # noqa: E501
        :rtype: list[AggregateResult]
        """
        return self._test_events

    @test_events.setter
    def test_events(self, test_events):
        """Sets the test_events of this ExperimentAggregate.


        :param test_events: The test_events of this ExperimentAggregate.  # noqa: E501
        :type: list[AggregateResult]
        """

        self._test_events = test_events

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

        for attr, _ in six.iteritems(self.swagger_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
        if issubclass(ExperimentAggregate, dict):
            for key, value in self.items():
                result[key] = 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, ExperimentAggregate):
            return False

        return self.__dict__ == other.__dict__

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