# coding: utf-8

"""
    3blades API

    No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)

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


from pprint import pformat
from six import iteritems
import re


class ServerSize(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',
        'cpu': 'int',
        'memory': 'int',
        'active': 'bool'
    }

    attribute_map = {
        'id': 'id',
        'name': 'name',
        'cpu': 'cpu',
        'memory': 'memory',
        'active': 'active'
    }

    def __init__(self, id=None, name=None, cpu=None, memory=None, active=None):
        """
        ServerSize - a model defined in Swagger
        """

        self._id = None
        self._name = None
        self._cpu = None
        self._memory = None
        self._active = None

        if id is not None:
          self.id = id
        self.name = name
        self.cpu = cpu
        self.memory = memory
        if active is not None:
          self.active = active

    @property
    def id(self):
        """
        Gets the id of this ServerSize.
        Server size unique identifier.

        :return: The id of this ServerSize.
        :rtype: str
        """
        return self._id

    @id.setter
    def id(self, id):
        """
        Sets the id of this ServerSize.
        Server size unique identifier.

        :param id: The id of this ServerSize.
        :type: str
        """

        self._id = id

    @property
    def name(self):
        """
        Gets the name of this ServerSize.
        Server size name.

        :return: The name of this ServerSize.
        :rtype: str
        """
        return self._name

    @name.setter
    def name(self, name):
        """
        Sets the name of this ServerSize.
        Server size name.

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

        self._name = name

    @property
    def cpu(self):
        """
        Gets the cpu of this ServerSize.
        CPU availability, equivalent to --cpus=<value>. For example if a host has 2 CPU's, then a value of 1.5 would be limit the container to using all of the first CPU and half of the second CPU. 

        :return: The cpu of this ServerSize.
        :rtype: int
        """
        return self._cpu

    @cpu.setter
    def cpu(self, cpu):
        """
        Sets the cpu of this ServerSize.
        CPU availability, equivalent to --cpus=<value>. For example if a host has 2 CPU's, then a value of 1.5 would be limit the container to using all of the first CPU and half of the second CPU. 

        :param cpu: The cpu of this ServerSize.
        :type: int
        """
        if cpu is None:
            raise ValueError("Invalid value for `cpu`, must not be `None`")

        self._cpu = cpu

    @property
    def memory(self):
        """
        Gets the memory of this ServerSize.
        Memory restriction for container.

        :return: The memory of this ServerSize.
        :rtype: int
        """
        return self._memory

    @memory.setter
    def memory(self, memory):
        """
        Sets the memory of this ServerSize.
        Memory restriction for container.

        :param memory: The memory of this ServerSize.
        :type: int
        """
        if memory is None:
            raise ValueError("Invalid value for `memory`, must not be `None`")

        self._memory = memory

    @property
    def active(self):
        """
        Gets the active of this ServerSize.
        States whether the Server size is active, or not.

        :return: The active of this ServerSize.
        :rtype: bool
        """
        return self._active

    @active.setter
    def active(self, active):
        """
        Sets the active of this ServerSize.
        States whether the Server size is active, or not.

        :param active: The active of this ServerSize.
        :type: bool
        """

        self._active = active

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

        for attr, _ in 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

        return result

    def to_str(self):
        """
        Returns the string representation of the model
        """
        return 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, ServerSize):
            return False

        return self.__dict__ == other.__dict__

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