# coding: utf-8

"""
    PKS

    PKS API  # noqa: E501

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


import pprint
import re  # noqa: F401

import six


class Plan(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 = {
        'id': 'str',
        'name': 'str',
        'description': 'str',
        'worker_instances': 'int',
        'master_instances': 'int',
        'allow_privileged_containers': 'bool'
    }

    attribute_map = {
        'id': 'id',
        'name': 'name',
        'description': 'description',
        'worker_instances': 'worker_instances',
        'master_instances': 'master_instances',
        'allow_privileged_containers': 'allow-privileged-containers'
    }

    def __init__(self, id=None, name=None, description=None, worker_instances=None, master_instances=None, allow_privileged_containers=None):  # noqa: E501
        """Plan - a model defined in Swagger"""  # noqa: E501

        self._id = None
        self._name = None
        self._description = None
        self._worker_instances = None
        self._master_instances = None
        self._allow_privileged_containers = None
        self.discriminator = None

        self.id = id
        self.name = name
        self.description = description
        self.worker_instances = worker_instances
        self.master_instances = master_instances
        self.allow_privileged_containers = allow_privileged_containers

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


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

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


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

        self._id = id

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


        :return: The name of this Plan.  # noqa: E501
        :rtype: str
        """
        return self._name

    @name.setter
    def name(self, name):
        """Sets the name of this Plan.


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

        self._name = name

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


        :return: The description of this Plan.  # noqa: E501
        :rtype: str
        """
        return self._description

    @description.setter
    def description(self, description):
        """Sets the description of this Plan.


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

        self._description = description

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


        :return: The worker_instances of this Plan.  # noqa: E501
        :rtype: int
        """
        return self._worker_instances

    @worker_instances.setter
    def worker_instances(self, worker_instances):
        """Sets the worker_instances of this Plan.


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

        self._worker_instances = worker_instances

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


        :return: The master_instances of this Plan.  # noqa: E501
        :rtype: int
        """
        return self._master_instances

    @master_instances.setter
    def master_instances(self, master_instances):
        """Sets the master_instances of this Plan.


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

        self._master_instances = master_instances

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


        :return: The allow_privileged_containers of this Plan.  # noqa: E501
        :rtype: bool
        """
        return self._allow_privileged_containers

    @allow_privileged_containers.setter
    def allow_privileged_containers(self, allow_privileged_containers):
        """Sets the allow_privileged_containers of this Plan.


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

        self._allow_privileged_containers = allow_privileged_containers

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

        return self.__dict__ == other.__dict__

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