# coding: utf-8

"""
    HyperOne

    HyperOne API  # noqa: E501

    The version of the OpenAPI document: 0.1.0
    Generated by: https://openapi-generator.tech
"""


import pprint
import re  # noqa: F401

import six

from h1.configuration import Configuration


class Billing(object):
    """NOTE: This class is auto generated by OpenAPI Generator.
    Ref: https://openapi-generator.tech

    Do not edit the class manually.
    """

    """
    Attributes:
      openapi_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.
    """
    openapi_types = {
        'id': 'str',
        'period': 'str',
        'price': 'float',
        'quantity': 'float',
        'project': 'str',
        'one_time': 'bool',
        'service': 'BillingService',
        'resource': 'BillingResource',
        'charges': 'list[BillingCharges]'
    }

    attribute_map = {
        'id': 'id',
        'period': 'period',
        'price': 'price',
        'quantity': 'quantity',
        'project': 'project',
        'one_time': 'oneTime',
        'service': 'service',
        'resource': 'resource',
        'charges': 'charges'
    }

    def __init__(self, id=None, period=None, price=None, quantity=None, project=None, one_time=None, service=None, resource=None, charges=None, local_vars_configuration=None):  # noqa: E501
        """Billing - a model defined in OpenAPI"""  # noqa: E501
        if local_vars_configuration is None:
            local_vars_configuration = Configuration()
        self.local_vars_configuration = local_vars_configuration

        self._id = None
        self._period = None
        self._price = None
        self._quantity = None
        self._project = None
        self._one_time = None
        self._service = None
        self._resource = None
        self._charges = None
        self.discriminator = None

        if id is not None:
            self.id = id
        if period is not None:
            self.period = period
        if price is not None:
            self.price = price
        if quantity is not None:
            self.quantity = quantity
        if project is not None:
            self.project = project
        if one_time is not None:
            self.one_time = one_time
        if service is not None:
            self.service = service
        if resource is not None:
            self.resource = resource
        if charges is not None:
            self.charges = charges

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


        :return: The id of this Billing.  # noqa: E501
        :rtype: str
        """
        return self._id

    @id.setter
    def id(self, id):
        """Sets the id of this Billing.


        :param id: The id of this Billing.  # noqa: E501
        :type: str
        """

        self._id = id

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


        :return: The period of this Billing.  # noqa: E501
        :rtype: str
        """
        return self._period

    @period.setter
    def period(self, period):
        """Sets the period of this Billing.


        :param period: The period of this Billing.  # noqa: E501
        :type: str
        """

        self._period = period

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


        :return: The price of this Billing.  # noqa: E501
        :rtype: float
        """
        return self._price

    @price.setter
    def price(self, price):
        """Sets the price of this Billing.


        :param price: The price of this Billing.  # noqa: E501
        :type: float
        """

        self._price = price

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


        :return: The quantity of this Billing.  # noqa: E501
        :rtype: float
        """
        return self._quantity

    @quantity.setter
    def quantity(self, quantity):
        """Sets the quantity of this Billing.


        :param quantity: The quantity of this Billing.  # noqa: E501
        :type: float
        """

        self._quantity = quantity

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


        :return: The project of this Billing.  # noqa: E501
        :rtype: str
        """
        return self._project

    @project.setter
    def project(self, project):
        """Sets the project of this Billing.


        :param project: The project of this Billing.  # noqa: E501
        :type: str
        """

        self._project = project

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


        :return: The one_time of this Billing.  # noqa: E501
        :rtype: bool
        """
        return self._one_time

    @one_time.setter
    def one_time(self, one_time):
        """Sets the one_time of this Billing.


        :param one_time: The one_time of this Billing.  # noqa: E501
        :type: bool
        """

        self._one_time = one_time

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


        :return: The service of this Billing.  # noqa: E501
        :rtype: BillingService
        """
        return self._service

    @service.setter
    def service(self, service):
        """Sets the service of this Billing.


        :param service: The service of this Billing.  # noqa: E501
        :type: BillingService
        """

        self._service = service

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


        :return: The resource of this Billing.  # noqa: E501
        :rtype: BillingResource
        """
        return self._resource

    @resource.setter
    def resource(self, resource):
        """Sets the resource of this Billing.


        :param resource: The resource of this Billing.  # noqa: E501
        :type: BillingResource
        """

        self._resource = resource

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


        :return: The charges of this Billing.  # noqa: E501
        :rtype: list[BillingCharges]
        """
        return self._charges

    @charges.setter
    def charges(self, charges):
        """Sets the charges of this Billing.


        :param charges: The charges of this Billing.  # noqa: E501
        :type: list[BillingCharges]
        """

        self._charges = charges

    def to_dict(self):
        """Returns the model properties as a dict"""
        result = {}

        for attr, _ in six.iteritems(self.openapi_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

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

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

# coding: utf-8

"""
    HyperOne

    HyperOne API  # noqa: E501

    The version of the OpenAPI document: 0.1.0
    Generated by: https://openapi-generator.tech
"""


import pprint
import re  # noqa: F401

import six

from h1.configuration import Configuration


class Billing(object):
    """NOTE: This class is auto generated by OpenAPI Generator.
    Ref: https://openapi-generator.tech

    Do not edit the class manually.
    """

    """
    Attributes:
      openapi_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.
    """
    openapi_types = {
        'id': 'str',
        'period': 'str',
        'price': 'float',
        'quantity': 'float',
        'project': 'str',
        'one_time': 'bool',
        'service': 'BillingService',
        'resource': 'BillingResource',
        'charges': 'list[BillingCharges]'
    }

    attribute_map = {
        'id': 'id',
        'period': 'period',
        'price': 'price',
        'quantity': 'quantity',
        'project': 'project',
        'one_time': 'oneTime',
        'service': 'service',
        'resource': 'resource',
        'charges': 'charges'
    }

    def __init__(self, id=None, period=None, price=None, quantity=None, project=None, one_time=None, service=None, resource=None, charges=None, local_vars_configuration=None):  # noqa: E501
        """Billing - a model defined in OpenAPI"""  # noqa: E501
        if local_vars_configuration is None:
            local_vars_configuration = Configuration()
        self.local_vars_configuration = local_vars_configuration

        self._id = None
        self._period = None
        self._price = None
        self._quantity = None
        self._project = None
        self._one_time = None
        self._service = None
        self._resource = None
        self._charges = None
        self.discriminator = None

        if id is not None:
            self.id = id
        if period is not None:
            self.period = period
        if price is not None:
            self.price = price
        if quantity is not None:
            self.quantity = quantity
        if project is not None:
            self.project = project
        if one_time is not None:
            self.one_time = one_time
        if service is not None:
            self.service = service
        if resource is not None:
            self.resource = resource
        if charges is not None:
            self.charges = charges

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


        :return: The id of this Billing.  # noqa: E501
        :rtype: str
        """
        return self._id

    @id.setter
    def id(self, id):
        """Sets the id of this Billing.


        :param id: The id of this Billing.  # noqa: E501
        :type: str
        """

        self._id = id

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


        :return: The period of this Billing.  # noqa: E501
        :rtype: str
        """
        return self._period

    @period.setter
    def period(self, period):
        """Sets the period of this Billing.


        :param period: The period of this Billing.  # noqa: E501
        :type: str
        """

        self._period = period

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


        :return: The price of this Billing.  # noqa: E501
        :rtype: float
        """
        return self._price

    @price.setter
    def price(self, price):
        """Sets the price of this Billing.


        :param price: The price of this Billing.  # noqa: E501
        :type: float
        """

        self._price = price

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


        :return: The quantity of this Billing.  # noqa: E501
        :rtype: float
        """
        return self._quantity

    @quantity.setter
    def quantity(self, quantity):
        """Sets the quantity of this Billing.


        :param quantity: The quantity of this Billing.  # noqa: E501
        :type: float
        """

        self._quantity = quantity

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


        :return: The project of this Billing.  # noqa: E501
        :rtype: str
        """
        return self._project

    @project.setter
    def project(self, project):
        """Sets the project of this Billing.


        :param project: The project of this Billing.  # noqa: E501
        :type: str
        """

        self._project = project

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


        :return: The one_time of this Billing.  # noqa: E501
        :rtype: bool
        """
        return self._one_time

    @one_time.setter
    def one_time(self, one_time):
        """Sets the one_time of this Billing.


        :param one_time: The one_time of this Billing.  # noqa: E501
        :type: bool
        """

        self._one_time = one_time

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


        :return: The service of this Billing.  # noqa: E501
        :rtype: BillingService
        """
        return self._service

    @service.setter
    def service(self, service):
        """Sets the service of this Billing.


        :param service: The service of this Billing.  # noqa: E501
        :type: BillingService
        """

        self._service = service

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


        :return: The resource of this Billing.  # noqa: E501
        :rtype: BillingResource
        """
        return self._resource

    @resource.setter
    def resource(self, resource):
        """Sets the resource of this Billing.


        :param resource: The resource of this Billing.  # noqa: E501
        :type: BillingResource
        """

        self._resource = resource

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


        :return: The charges of this Billing.  # noqa: E501
        :rtype: list[BillingCharges]
        """
        return self._charges

    @charges.setter
    def charges(self, charges):
        """Sets the charges of this Billing.


        :param charges: The charges of this Billing.  # noqa: E501
        :type: list[BillingCharges]
        """

        self._charges = charges

    def to_dict(self):
        """Returns the model properties as a dict"""
        result = {}

        for attr, _ in six.iteritems(self.openapi_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

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

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

# coding: utf-8 HyperOne      HyperOne API  # noqa: E501      The version of the OpenAPI document: 0.1.0     Generated by: https://openapi-generator.tech # noqa: F401 NOTE: This class is auto generated by OpenAPI Generator.     Ref: https://openapi-generator.tech      Do not edit the class manually. Attributes:       openapi_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. # noqa: E501 Billing - a model defined in OpenAPI # noqa: E501 Gets the id of this Billing.  # noqa: E501           :return: The id of this Billing.  # noqa: E501         :rtype: str Sets the id of this Billing.           :param id: The id of this Billing.  # noqa: E501         :type: str Gets the period of this Billing.  # noqa: E501           :return: The period of this Billing.  # noqa: E501         :rtype: str Sets the period of this Billing.           :param period: The period of this Billing.  # noqa: E501         :type: str Gets the price of this Billing.  # noqa: E501           :return: The price of this Billing.  # noqa: E501         :rtype: float Sets the price of this Billing.           :param price: The price of this Billing.  # noqa: E501         :type: float Gets the quantity of this Billing.  # noqa: E501           :return: The quantity of this Billing.  # noqa: E501         :rtype: float Sets the quantity of this Billing.           :param quantity: The quantity of this Billing.  # noqa: E501         :type: float Gets the project of this Billing.  # noqa: E501           :return: The project of this Billing.  # noqa: E501         :rtype: str Sets the project of this Billing.           :param project: The project of this Billing.  # noqa: E501         :type: str Gets the one_time of this Billing.  # noqa: E501           :return: The one_time of this Billing.  # noqa: E501         :rtype: bool Sets the one_time of this Billing.           :param one_time: The one_time of this Billing.  # noqa: E501         :type: bool Gets the service of this Billing.  # noqa: E501           :return: The service of this Billing.  # noqa: E501         :rtype: BillingService Sets the service of this Billing.           :param service: The service of this Billing.  # noqa: E501         :type: BillingService Gets the resource of this Billing.  # noqa: E501           :return: The resource of this Billing.  # noqa: E501         :rtype: BillingResource Sets the resource of this Billing.           :param resource: The resource of this Billing.  # noqa: E501         :type: BillingResource Gets the charges of this Billing.  # noqa: E501           :return: The charges of this Billing.  # noqa: E501         :rtype: list[BillingCharges] Sets the charges of this Billing.           :param charges: The charges of this Billing.  # noqa: E501         :type: list[BillingCharges] Returns the model properties as a dict Returns the string representation of the model For `print` and `pprint` Returns true if both objects are equal Returns true if both objects are not equal