# coding: utf-8

"""
    Lotus API

    Lotus is an open-core pricing and billing engine. We enable API companies to automate and optimize their custom usage-based pricing for any metric.  # noqa: E501

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

import pprint
import re  # noqa: F401

import six

class PlanVersionRequest(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 = {
        'components': 'list[PlanComponentRequest]',
        'features': 'list[FeatureRequest]',
        'price_adjustment': 'AllOfPlanVersionRequestPriceAdjustment',
        'currency': 'PricingUnitRequest'
    }

    attribute_map = {
        'components': 'components',
        'features': 'features',
        'price_adjustment': 'price_adjustment',
        'currency': 'currency'
    }

    def __init__(self, components=None, features=None, price_adjustment=None, currency=None):  # noqa: E501
        """PlanVersionRequest - a model defined in Swagger"""  # noqa: E501
        self._components = None
        self._features = None
        self._price_adjustment = None
        self._currency = None
        self.discriminator = None
        self.components = components
        self.features = features
        self.price_adjustment = price_adjustment
        self.currency = currency

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


        :return: The components of this PlanVersionRequest.  # noqa: E501
        :rtype: list[PlanComponentRequest]
        """
        return self._components

    @components.setter
    def components(self, components):
        """Sets the components of this PlanVersionRequest.


        :param components: The components of this PlanVersionRequest.  # noqa: E501
        :type: list[PlanComponentRequest]
        """
        if components is None:
            raise ValueError("Invalid value for `components`, must not be `None`")  # noqa: E501

        self._components = components

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


        :return: The features of this PlanVersionRequest.  # noqa: E501
        :rtype: list[FeatureRequest]
        """
        return self._features

    @features.setter
    def features(self, features):
        """Sets the features of this PlanVersionRequest.


        :param features: The features of this PlanVersionRequest.  # noqa: E501
        :type: list[FeatureRequest]
        """
        if features is None:
            raise ValueError("Invalid value for `features`, must not be `None`")  # noqa: E501

        self._features = features

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


        :return: The price_adjustment of this PlanVersionRequest.  # noqa: E501
        :rtype: AllOfPlanVersionRequestPriceAdjustment
        """
        return self._price_adjustment

    @price_adjustment.setter
    def price_adjustment(self, price_adjustment):
        """Sets the price_adjustment of this PlanVersionRequest.


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

        self._price_adjustment = price_adjustment

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


        :return: The currency of this PlanVersionRequest.  # noqa: E501
        :rtype: PricingUnitRequest
        """
        return self._currency

    @currency.setter
    def currency(self, currency):
        """Sets the currency of this PlanVersionRequest.


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

        self._currency = currency

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

        return self.__dict__ == other.__dict__

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