# 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 PlanRequest(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 = {
        'plan_id': 'str',
        'plan_name': 'str',
        'plan_duration': 'str',
        'plan_description': 'str',
        'external_links': 'list[InitialExternalPlanLinkRequest]',
        'versions': 'list[PlanVersionRequest]'
    }

    attribute_map = {
        'plan_id': 'plan_id',
        'plan_name': 'plan_name',
        'plan_duration': 'plan_duration',
        'plan_description': 'plan_description',
        'external_links': 'external_links',
        'versions': 'versions'
    }

    def __init__(self, plan_id=None, plan_name=None, plan_duration=None, plan_description=None, external_links=None, versions=None):  # noqa: E501
        """PlanRequest - a model defined in Swagger"""  # noqa: E501
        self._plan_id = None
        self._plan_name = None
        self._plan_duration = None
        self._plan_description = None
        self._external_links = None
        self._versions = None
        self.discriminator = None
        self.plan_id = plan_id
        self.plan_name = plan_name
        self.plan_duration = plan_duration
        self.plan_description = plan_description
        self.external_links = external_links
        self.versions = versions

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


        :return: The plan_id of this PlanRequest.  # noqa: E501
        :rtype: str
        """
        return self._plan_id

    @plan_id.setter
    def plan_id(self, plan_id):
        """Sets the plan_id of this PlanRequest.


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

        self._plan_id = plan_id

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

        Name of the plan  # noqa: E501

        :return: The plan_name of this PlanRequest.  # noqa: E501
        :rtype: str
        """
        return self._plan_name

    @plan_name.setter
    def plan_name(self, plan_name):
        """Sets the plan_name of this PlanRequest.

        Name of the plan  # noqa: E501

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

        self._plan_name = plan_name

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

        Duration of the plan  * `monthly` - Monthly * `quarterly` - Quarterly * `yearly` - Yearly  # noqa: E501

        :return: The plan_duration of this PlanRequest.  # noqa: E501
        :rtype: str
        """
        return self._plan_duration

    @plan_duration.setter
    def plan_duration(self, plan_duration):
        """Sets the plan_duration of this PlanRequest.

        Duration of the plan  * `monthly` - Monthly * `quarterly` - Quarterly * `yearly` - Yearly  # noqa: E501

        :param plan_duration: The plan_duration of this PlanRequest.  # noqa: E501
        :type: str
        """
        if plan_duration is None:
            raise ValueError("Invalid value for `plan_duration`, must not be `None`")  # noqa: E501
        allowed_values = ["monthly", "quarterly", "yearly", ""]  # noqa: E501
        if plan_duration not in allowed_values:
            raise ValueError(
                "Invalid value for `plan_duration` ({0}), must be one of {1}"  # noqa: E501
                .format(plan_duration, allowed_values)
            )

        self._plan_duration = plan_duration

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

        Description of the plan  # noqa: E501

        :return: The plan_description of this PlanRequest.  # noqa: E501
        :rtype: str
        """
        return self._plan_description

    @plan_description.setter
    def plan_description(self, plan_description):
        """Sets the plan_description of this PlanRequest.

        Description of the plan  # noqa: E501

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

        self._plan_description = plan_description

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

        The external links that this plan has.  # noqa: E501

        :return: The external_links of this PlanRequest.  # noqa: E501
        :rtype: list[InitialExternalPlanLinkRequest]
        """
        return self._external_links

    @external_links.setter
    def external_links(self, external_links):
        """Sets the external_links of this PlanRequest.

        The external links that this plan has.  # noqa: E501

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

        self._external_links = external_links

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

        This plan's versions.  # noqa: E501

        :return: The versions of this PlanRequest.  # noqa: E501
        :rtype: list[PlanVersionRequest]
        """
        return self._versions

    @versions.setter
    def versions(self, versions):
        """Sets the versions of this PlanRequest.

        This plan's versions.  # noqa: E501

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

        self._versions = versions

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

        return self.__dict__ == other.__dict__

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