# coding: utf-8

"""
    Python client for GIG based clouds (pc4g)

    RESTful api client to a GIG based cloud.  # noqa: E501

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


import pprint
import re  # noqa: F401

import six

from pc4g.configuration import Configuration


class Consumption(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 = {
        'cloudspaces': 'list[CloudspaceConsumption]',
        'disks': 'list[DiskConsumption]',
        'end': 'int',
        'invoice_lines': 'list[InvoiceLine]',
        'objectspaces': 'list[ObjectspaceConsumption]',
        'resources': 'ResourceConsumption',
        'start': 'int',
        'total_ex': 'float',
        'total_incl': 'float'
    }

    attribute_map = {
        'cloudspaces': 'cloudspaces',
        'disks': 'disks',
        'end': 'end',
        'invoice_lines': 'invoice_lines',
        'objectspaces': 'objectspaces',
        'resources': 'resources',
        'start': 'start',
        'total_ex': 'total_ex',
        'total_incl': 'total_incl'
    }

    def __init__(self, cloudspaces=None, disks=None, end=None, invoice_lines=None, objectspaces=None, resources=None, start=None, total_ex=None, total_incl=None, _configuration=None):  # noqa: E501
        """Consumption - a model defined in Swagger"""  # noqa: E501
        if _configuration is None:
            _configuration = Configuration()
        self._configuration = _configuration

        self._cloudspaces = None
        self._disks = None
        self._end = None
        self._invoice_lines = None
        self._objectspaces = None
        self._resources = None
        self._start = None
        self._total_ex = None
        self._total_incl = None
        self.discriminator = None

        if cloudspaces is not None:
            self.cloudspaces = cloudspaces
        if disks is not None:
            self.disks = disks
        if end is not None:
            self.end = end
        if invoice_lines is not None:
            self.invoice_lines = invoice_lines
        if objectspaces is not None:
            self.objectspaces = objectspaces
        if resources is not None:
            self.resources = resources
        if start is not None:
            self.start = start
        if total_ex is not None:
            self.total_ex = total_ex
        if total_incl is not None:
            self.total_incl = total_incl

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


        :return: The cloudspaces of this Consumption.  # noqa: E501
        :rtype: list[CloudspaceConsumption]
        """
        return self._cloudspaces

    @cloudspaces.setter
    def cloudspaces(self, cloudspaces):
        """Sets the cloudspaces of this Consumption.


        :param cloudspaces: The cloudspaces of this Consumption.  # noqa: E501
        :type: list[CloudspaceConsumption]
        """

        self._cloudspaces = cloudspaces

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


        :return: The disks of this Consumption.  # noqa: E501
        :rtype: list[DiskConsumption]
        """
        return self._disks

    @disks.setter
    def disks(self, disks):
        """Sets the disks of this Consumption.


        :param disks: The disks of this Consumption.  # noqa: E501
        :type: list[DiskConsumption]
        """

        self._disks = disks

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

        Time Boundary of consumption  # noqa: E501

        :return: The end of this Consumption.  # noqa: E501
        :rtype: int
        """
        return self._end

    @end.setter
    def end(self, end):
        """Sets the end of this Consumption.

        Time Boundary of consumption  # noqa: E501

        :param end: The end of this Consumption.  # noqa: E501
        :type: int
        """

        self._end = end

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


        :return: The invoice_lines of this Consumption.  # noqa: E501
        :rtype: list[InvoiceLine]
        """
        return self._invoice_lines

    @invoice_lines.setter
    def invoice_lines(self, invoice_lines):
        """Sets the invoice_lines of this Consumption.


        :param invoice_lines: The invoice_lines of this Consumption.  # noqa: E501
        :type: list[InvoiceLine]
        """

        self._invoice_lines = invoice_lines

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


        :return: The objectspaces of this Consumption.  # noqa: E501
        :rtype: list[ObjectspaceConsumption]
        """
        return self._objectspaces

    @objectspaces.setter
    def objectspaces(self, objectspaces):
        """Sets the objectspaces of this Consumption.


        :param objectspaces: The objectspaces of this Consumption.  # noqa: E501
        :type: list[ObjectspaceConsumption]
        """

        self._objectspaces = objectspaces

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


        :return: The resources of this Consumption.  # noqa: E501
        :rtype: ResourceConsumption
        """
        return self._resources

    @resources.setter
    def resources(self, resources):
        """Sets the resources of this Consumption.


        :param resources: The resources of this Consumption.  # noqa: E501
        :type: ResourceConsumption
        """

        self._resources = resources

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

        Time Boundary of consumption  # noqa: E501

        :return: The start of this Consumption.  # noqa: E501
        :rtype: int
        """
        return self._start

    @start.setter
    def start(self, start):
        """Sets the start of this Consumption.

        Time Boundary of consumption  # noqa: E501

        :param start: The start of this Consumption.  # noqa: E501
        :type: int
        """

        self._start = start

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

        Total initial price  # noqa: E501

        :return: The total_ex of this Consumption.  # noqa: E501
        :rtype: float
        """
        return self._total_ex

    @total_ex.setter
    def total_ex(self, total_ex):
        """Sets the total_ex of this Consumption.

        Total initial price  # noqa: E501

        :param total_ex: The total_ex of this Consumption.  # noqa: E501
        :type: float
        """

        self._total_ex = total_ex

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

        Total amount after VAT  # noqa: E501

        :return: The total_incl of this Consumption.  # noqa: E501
        :rtype: float
        """
        return self._total_incl

    @total_incl.setter
    def total_incl(self, total_incl):
        """Sets the total_incl of this Consumption.

        Total amount after VAT  # noqa: E501

        :param total_incl: The total_incl of this Consumption.  # noqa: E501
        :type: float
        """

        self._total_incl = total_incl

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

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