# coding: utf-8

"""
    Katib

    Swagger description for Katib  # noqa: E501

    OpenAPI spec version: v1beta1-0.1
    
    Generated by: https://github.com/swagger-api/swagger-codegen.git
"""


import pprint
import re  # noqa: F401

import six

from kubeflow.katib.models.v1_time import V1Time  # noqa: F401,E501
from kubeflow.katib.models.v1beta1_observation import V1beta1Observation  # noqa: F401,E501
from kubeflow.katib.models.v1beta1_trial_condition import V1beta1TrialCondition  # noqa: F401,E501


class V1beta1TrialStatus(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 = {
        'completion_time': 'V1Time',
        'conditions': 'list[V1beta1TrialCondition]',
        'last_reconcile_time': 'V1Time',
        'observation': 'V1beta1Observation',
        'start_time': 'V1Time'
    }

    attribute_map = {
        'completion_time': 'completionTime',
        'conditions': 'conditions',
        'last_reconcile_time': 'lastReconcileTime',
        'observation': 'observation',
        'start_time': 'startTime'
    }

    def __init__(self, completion_time=None, conditions=None, last_reconcile_time=None, observation=None, start_time=None):  # noqa: E501
        """V1beta1TrialStatus - a model defined in Swagger"""  # noqa: E501

        self._completion_time = None
        self._conditions = None
        self._last_reconcile_time = None
        self._observation = None
        self._start_time = None
        self.discriminator = None

        if completion_time is not None:
            self.completion_time = completion_time
        if conditions is not None:
            self.conditions = conditions
        if last_reconcile_time is not None:
            self.last_reconcile_time = last_reconcile_time
        if observation is not None:
            self.observation = observation
        if start_time is not None:
            self.start_time = start_time

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

        Represents time when the Trial was completed. It is not guaranteed to be set in happens-before order across separate operations. It is represented in RFC3339 form and is in UTC  # noqa: E501

        :return: The completion_time of this V1beta1TrialStatus.  # noqa: E501
        :rtype: V1Time
        """
        return self._completion_time

    @completion_time.setter
    def completion_time(self, completion_time):
        """Sets the completion_time of this V1beta1TrialStatus.

        Represents time when the Trial was completed. It is not guaranteed to be set in happens-before order across separate operations. It is represented in RFC3339 form and is in UTC  # noqa: E501

        :param completion_time: The completion_time of this V1beta1TrialStatus.  # noqa: E501
        :type: V1Time
        """

        self._completion_time = completion_time

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

        List of observed runtime conditions for this Trial.  # noqa: E501

        :return: The conditions of this V1beta1TrialStatus.  # noqa: E501
        :rtype: list[V1beta1TrialCondition]
        """
        return self._conditions

    @conditions.setter
    def conditions(self, conditions):
        """Sets the conditions of this V1beta1TrialStatus.

        List of observed runtime conditions for this Trial.  # noqa: E501

        :param conditions: The conditions of this V1beta1TrialStatus.  # noqa: E501
        :type: list[V1beta1TrialCondition]
        """

        self._conditions = conditions

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

        Represents last time when the Trial was reconciled. It is not guaranteed to be set in happens-before order across separate operations. It is represented in RFC3339 form and is in UTC.  # noqa: E501

        :return: The last_reconcile_time of this V1beta1TrialStatus.  # noqa: E501
        :rtype: V1Time
        """
        return self._last_reconcile_time

    @last_reconcile_time.setter
    def last_reconcile_time(self, last_reconcile_time):
        """Sets the last_reconcile_time of this V1beta1TrialStatus.

        Represents last time when the Trial was reconciled. It is not guaranteed to be set in happens-before order across separate operations. It is represented in RFC3339 form and is in UTC.  # noqa: E501

        :param last_reconcile_time: The last_reconcile_time of this V1beta1TrialStatus.  # noqa: E501
        :type: V1Time
        """

        self._last_reconcile_time = last_reconcile_time

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

        Results of the Trial - objectives and other metrics values.  # noqa: E501

        :return: The observation of this V1beta1TrialStatus.  # noqa: E501
        :rtype: V1beta1Observation
        """
        return self._observation

    @observation.setter
    def observation(self, observation):
        """Sets the observation of this V1beta1TrialStatus.

        Results of the Trial - objectives and other metrics values.  # noqa: E501

        :param observation: The observation of this V1beta1TrialStatus.  # noqa: E501
        :type: V1beta1Observation
        """

        self._observation = observation

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

        Represents time when the Trial was acknowledged by the Trial controller. It is not guaranteed to be set in happens-before order across separate operations. It is represented in RFC3339 form and is in UTC  # noqa: E501

        :return: The start_time of this V1beta1TrialStatus.  # noqa: E501
        :rtype: V1Time
        """
        return self._start_time

    @start_time.setter
    def start_time(self, start_time):
        """Sets the start_time of this V1beta1TrialStatus.

        Represents time when the Trial was acknowledged by the Trial controller. It is not guaranteed to be set in happens-before order across separate operations. It is represented in RFC3339 form and is in UTC  # noqa: E501

        :param start_time: The start_time of this V1beta1TrialStatus.  # noqa: E501
        :type: V1Time
        """

        self._start_time = start_time

    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(V1beta1TrialStatus, 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, V1beta1TrialStatus):
            return False

        return self.__dict__ == other.__dict__

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