# coding: utf-8

"""
    DataDomain Rest API Documentation

    No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)  # noqa: E501

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


import pprint
import re  # noqa: F401

import six

from dd_sdk_1_0.configuration import Configuration


class StatsCapacityInfo(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 = {
        'collection_epoch': 'int',
        'physical_capacity': 'Capacity',
        'logical_capacity': 'Capacity',
        'compression_factor': 'float',
        'data_written': 'DataWritten',
        'tier_capacity_usage': 'list[CapacityUsageDetails]',
        'tier_data_written': 'list[DataWritten]'
    }

    attribute_map = {
        'collection_epoch': 'collection_epoch',
        'physical_capacity': 'physical_capacity',
        'logical_capacity': 'logical_capacity',
        'compression_factor': 'compression_factor',
        'data_written': 'data_written',
        'tier_capacity_usage': 'tier_capacity_usage',
        'tier_data_written': 'tier_data_written'
    }

    def __init__(self, collection_epoch=None, physical_capacity=None, logical_capacity=None, compression_factor=None, data_written=None, tier_capacity_usage=None, tier_data_written=None, _configuration=None):  # noqa: E501
        """StatsCapacityInfo - a model defined in Swagger"""  # noqa: E501
        if _configuration is None:
            _configuration = Configuration()
        self._configuration = _configuration

        self._collection_epoch = None
        self._physical_capacity = None
        self._logical_capacity = None
        self._compression_factor = None
        self._data_written = None
        self._tier_capacity_usage = None
        self._tier_data_written = None
        self.discriminator = None

        self.collection_epoch = collection_epoch
        if physical_capacity is not None:
            self.physical_capacity = physical_capacity
        if logical_capacity is not None:
            self.logical_capacity = logical_capacity
        if compression_factor is not None:
            self.compression_factor = compression_factor
        if data_written is not None:
            self.data_written = data_written
        if tier_capacity_usage is not None:
            self.tier_capacity_usage = tier_capacity_usage
        if tier_data_written is not None:
            self.tier_data_written = tier_data_written

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


        :return: The collection_epoch of this StatsCapacityInfo.  # noqa: E501
        :rtype: int
        """
        return self._collection_epoch

    @collection_epoch.setter
    def collection_epoch(self, collection_epoch):
        """Sets the collection_epoch of this StatsCapacityInfo.


        :param collection_epoch: The collection_epoch of this StatsCapacityInfo.  # noqa: E501
        :type: int
        """
        if self._configuration.client_side_validation and collection_epoch is None:
            raise ValueError("Invalid value for `collection_epoch`, must not be `None`")  # noqa: E501
        if (self._configuration.client_side_validation and
                collection_epoch is not None and collection_epoch < 0):  # noqa: E501
            raise ValueError("Invalid value for `collection_epoch`, must be a value greater than or equal to `0`")  # noqa: E501

        self._collection_epoch = collection_epoch

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


        :return: The physical_capacity of this StatsCapacityInfo.  # noqa: E501
        :rtype: Capacity
        """
        return self._physical_capacity

    @physical_capacity.setter
    def physical_capacity(self, physical_capacity):
        """Sets the physical_capacity of this StatsCapacityInfo.


        :param physical_capacity: The physical_capacity of this StatsCapacityInfo.  # noqa: E501
        :type: Capacity
        """

        self._physical_capacity = physical_capacity

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


        :return: The logical_capacity of this StatsCapacityInfo.  # noqa: E501
        :rtype: Capacity
        """
        return self._logical_capacity

    @logical_capacity.setter
    def logical_capacity(self, logical_capacity):
        """Sets the logical_capacity of this StatsCapacityInfo.


        :param logical_capacity: The logical_capacity of this StatsCapacityInfo.  # noqa: E501
        :type: Capacity
        """

        self._logical_capacity = logical_capacity

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


        :return: The compression_factor of this StatsCapacityInfo.  # noqa: E501
        :rtype: float
        """
        return self._compression_factor

    @compression_factor.setter
    def compression_factor(self, compression_factor):
        """Sets the compression_factor of this StatsCapacityInfo.


        :param compression_factor: The compression_factor of this StatsCapacityInfo.  # noqa: E501
        :type: float
        """

        self._compression_factor = compression_factor

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

        Only for delta type.  # noqa: E501

        :return: The data_written of this StatsCapacityInfo.  # noqa: E501
        :rtype: DataWritten
        """
        return self._data_written

    @data_written.setter
    def data_written(self, data_written):
        """Sets the data_written of this StatsCapacityInfo.

        Only for delta type.  # noqa: E501

        :param data_written: The data_written of this StatsCapacityInfo.  # noqa: E501
        :type: DataWritten
        """

        self._data_written = data_written

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


        :return: The tier_capacity_usage of this StatsCapacityInfo.  # noqa: E501
        :rtype: list[CapacityUsageDetails]
        """
        return self._tier_capacity_usage

    @tier_capacity_usage.setter
    def tier_capacity_usage(self, tier_capacity_usage):
        """Sets the tier_capacity_usage of this StatsCapacityInfo.


        :param tier_capacity_usage: The tier_capacity_usage of this StatsCapacityInfo.  # noqa: E501
        :type: list[CapacityUsageDetails]
        """

        self._tier_capacity_usage = tier_capacity_usage

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


        :return: The tier_data_written of this StatsCapacityInfo.  # noqa: E501
        :rtype: list[DataWritten]
        """
        return self._tier_data_written

    @tier_data_written.setter
    def tier_data_written(self, tier_data_written):
        """Sets the tier_data_written of this StatsCapacityInfo.


        :param tier_data_written: The tier_data_written of this StatsCapacityInfo.  # noqa: E501
        :type: list[DataWritten]
        """

        self._tier_data_written = tier_data_written

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

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