# coding: utf-8

"""
    Karbon Platform Services API reference.

    OpenAPI documentation for public facing Karbon Platform Services API  This API documentation is generated from source code using go-swagger. Do not edit the generated kps_api.json directly!  # noqa: E501

    OpenAPI spec version: 1.0
    Contact: karbon-platform-services-api@nutanix.com
    Generated by: https://github.com/swagger-api/swagger-codegen.git
"""

import pprint
import re  # noqa: F401

import six
from kps_api.models.sample_stream import SampleStream  # noqa: F401,E501


class Chart(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 = {
        'chart_type': 'str',
        'error': 'str',
        'max': 'int',
        'metrics': 'list[SampleStream]',
        'min': 'int',
        'name': 'str',
        'spans': 'int',
        'start_collapsed': 'bool',
        'unit': 'str'
    }

    attribute_map = {
        'chart_type': 'chartType',
        'error': 'error',
        'max': 'max',
        'metrics': 'metrics',
        'min': 'min',
        'name': 'name',
        'spans': 'spans',
        'start_collapsed': 'startCollapsed',
        'unit': 'unit'
    }

    def __init__(self, chart_type=None, error=None, max=None, metrics=None, min=None, name=None, spans=None, start_collapsed=None, unit=None):  # noqa: E501
        """Chart - a model defined in Swagger"""  # noqa: E501
        self._chart_type = None
        self._error = None
        self._max = None
        self._metrics = None
        self._min = None
        self._name = None
        self._spans = None
        self._start_collapsed = None
        self._unit = None
        self.discriminator = None
        if chart_type is not None:
            self.chart_type = chart_type
        if error is not None:
            self.error = error
        if max is not None:
            self.max = max
        if metrics is not None:
            self.metrics = metrics
        if min is not None:
            self.min = min
        if name is not None:
            self.name = name
        if spans is not None:
            self.spans = spans
        if start_collapsed is not None:
            self.start_collapsed = start_collapsed
        if unit is not None:
            self.unit = unit

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


        :return: The chart_type of this Chart.  # noqa: E501
        :rtype: str
        """
        return self._chart_type

    @chart_type.setter
    def chart_type(self, chart_type):
        """Sets the chart_type of this Chart.


        :param chart_type: The chart_type of this Chart.  # noqa: E501
        :type: str
        """

        self._chart_type = chart_type

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


        :return: The error of this Chart.  # noqa: E501
        :rtype: str
        """
        return self._error

    @error.setter
    def error(self, error):
        """Sets the error of this Chart.


        :param error: The error of this Chart.  # noqa: E501
        :type: str
        """

        self._error = error

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


        :return: The max of this Chart.  # noqa: E501
        :rtype: int
        """
        return self._max

    @max.setter
    def max(self, max):
        """Sets the max of this Chart.


        :param max: The max of this Chart.  # noqa: E501
        :type: int
        """

        self._max = max

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


        :return: The metrics of this Chart.  # noqa: E501
        :rtype: list[SampleStream]
        """
        return self._metrics

    @metrics.setter
    def metrics(self, metrics):
        """Sets the metrics of this Chart.


        :param metrics: The metrics of this Chart.  # noqa: E501
        :type: list[SampleStream]
        """

        self._metrics = metrics

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


        :return: The min of this Chart.  # noqa: E501
        :rtype: int
        """
        return self._min

    @min.setter
    def min(self, min):
        """Sets the min of this Chart.


        :param min: The min of this Chart.  # noqa: E501
        :type: int
        """

        self._min = min

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


        :return: The name of this Chart.  # noqa: E501
        :rtype: str
        """
        return self._name

    @name.setter
    def name(self, name):
        """Sets the name of this Chart.


        :param name: The name of this Chart.  # noqa: E501
        :type: str
        """

        self._name = name

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


        :return: The spans of this Chart.  # noqa: E501
        :rtype: int
        """
        return self._spans

    @spans.setter
    def spans(self, spans):
        """Sets the spans of this Chart.


        :param spans: The spans of this Chart.  # noqa: E501
        :type: int
        """

        self._spans = spans

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


        :return: The start_collapsed of this Chart.  # noqa: E501
        :rtype: bool
        """
        return self._start_collapsed

    @start_collapsed.setter
    def start_collapsed(self, start_collapsed):
        """Sets the start_collapsed of this Chart.


        :param start_collapsed: The start_collapsed of this Chart.  # noqa: E501
        :type: bool
        """

        self._start_collapsed = start_collapsed

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


        :return: The unit of this Chart.  # noqa: E501
        :rtype: str
        """
        return self._unit

    @unit.setter
    def unit(self, unit):
        """Sets the unit of this Chart.


        :param unit: The unit of this Chart.  # noqa: E501
        :type: str
        """

        self._unit = unit

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

        return self.__dict__ == other.__dict__

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