# 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


class Result(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 = {
        'metric': 'str',
        'value': 'float',
        'tick_type': 'str',
        'tick': 'int',
        'phase': 'str'
    }

    attribute_map = {
        'metric': 'metric',
        'value': 'value',
        'tick_type': 'tick_type',
        'tick': 'tick',
        'phase': 'phase'
    }

    def __init__(self, metric=None, value=None, tick_type=None, tick=None, phase=None):  # noqa: E501
        """Result - a model defined in Swagger"""  # noqa: E501

        self._metric = None
        self._value = None
        self._tick_type = None
        self._tick = None
        self._phase = None
        self.discriminator = None

        self.metric = metric
        self.value = value
        self.tick_type = tick_type
        self.tick = tick
        self.phase = phase

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


        :return: The metric of this Result.  # noqa: E501
        :rtype: str
        """
        return self._metric

    @metric.setter
    def metric(self, metric):
        """Sets the metric of this Result.


        :param metric: The metric of this Result.  # noqa: E501
        :type: str
        """
        if metric is None:
            raise ValueError("Invalid value for `metric`, must not be `None`")  # noqa: E501

        self._metric = metric

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


        :return: The value of this Result.  # noqa: E501
        :rtype: float
        """
        return self._value

    @value.setter
    def value(self, value):
        """Sets the value of this Result.


        :param value: The value of this Result.  # noqa: E501
        :type: float
        """
        if value is None:
            raise ValueError("Invalid value for `value`, must not be `None`")  # noqa: E501

        self._value = value

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


        :return: The tick_type of this Result.  # noqa: E501
        :rtype: str
        """
        return self._tick_type

    @tick_type.setter
    def tick_type(self, tick_type):
        """Sets the tick_type of this Result.


        :param tick_type: The tick_type of this Result.  # noqa: E501
        :type: str
        """
        if tick_type is None:
            raise ValueError("Invalid value for `tick_type`, must not be `None`")  # noqa: E501

        self._tick_type = tick_type

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


        :return: The tick of this Result.  # noqa: E501
        :rtype: int
        """
        return self._tick

    @tick.setter
    def tick(self, tick):
        """Sets the tick of this Result.


        :param tick: The tick of this Result.  # noqa: E501
        :type: int
        """
        if tick is None:
            raise ValueError("Invalid value for `tick`, must not be `None`")  # noqa: E501

        self._tick = tick

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


        :return: The phase of this Result.  # noqa: E501
        :rtype: str
        """
        return self._phase

    @phase.setter
    def phase(self, phase):
        """Sets the phase of this Result.


        :param phase: The phase of this Result.  # noqa: E501
        :type: str
        """
        if phase is None:
            raise ValueError("Invalid value for `phase`, must not be `None`")  # noqa: E501

        self._phase = phase

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

        return self.__dict__ == other.__dict__

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