# coding: utf-8

from __future__ import absolute_import
from datetime import date, datetime  # noqa: F401

from typing import List, Dict  # noqa: F401

from swagger_server.models.base_model_ import Model
from swagger_server.models.category import Category  # noqa: F401,E501
from swagger_server.models.model import Model  # noqa: F401,E501
from swagger_server.models.tag import Tag  # noqa: F401,E501
from swagger_server import util


class Raspi(Model):
    """NOTE: This class is auto generated by the swagger code generator program.

    Do not edit the class manually.
    """

    def __init__(self, id: int=None, category: Category=None, name: str=None, model: Model=None, ip: str=None, tags: List[Tag]=None, status: str=None):  # noqa: E501
        """Raspi - a model defined in Swagger

        :param id: The id of this Raspi.  # noqa: E501
        :type id: int
        :param category: The category of this Raspi.  # noqa: E501
        :type category: Category
        :param name: The name of this Raspi.  # noqa: E501
        :type name: str
        :param model: The model of this Raspi.  # noqa: E501
        :type model: Model
        :param ip: The ip of this Raspi.  # noqa: E501
        :type ip: str
        :param tags: The tags of this Raspi.  # noqa: E501
        :type tags: List[Tag]
        :param status: The status of this Raspi.  # noqa: E501
        :type status: str
        """
        self.swagger_types = {
            'id': int,
            'category': Category,
            'name': str,
            'model': Model,
            'ip': str,
            'tags': List[Tag],
            'status': str
        }

        self.attribute_map = {
            'id': 'id',
            'category': 'category',
            'name': 'name',
            'model': 'model',
            'ip': 'IP',
            'tags': 'tags',
            'status': 'status'
        }

        self._id = id
        self._category = category
        self._name = name
        self._model = model
        self._ip = ip
        self._tags = tags
        self._status = status

    @classmethod
    def from_dict(cls, dikt) -> 'Raspi':
        """Returns the dict as a model

        :param dikt: A dict.
        :type: dict
        :return: The Raspi of this Raspi.  # noqa: E501
        :rtype: Raspi
        """
        return util.deserialize_model(dikt, cls)

    @property
    def id(self) -> int:
        """Gets the id of this Raspi.


        :return: The id of this Raspi.
        :rtype: int
        """
        return self._id

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


        :param id: The id of this Raspi.
        :type id: int
        """

        self._id = id

    @property
    def category(self) -> Category:
        """Gets the category of this Raspi.


        :return: The category of this Raspi.
        :rtype: Category
        """
        return self._category

    @category.setter
    def category(self, category: Category):
        """Sets the category of this Raspi.


        :param category: The category of this Raspi.
        :type category: Category
        """

        self._category = category

    @property
    def name(self) -> str:
        """Gets the name of this Raspi.


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

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


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

        self._name = name

    @property
    def model(self) -> Model:
        """Gets the model of this Raspi.


        :return: The model of this Raspi.
        :rtype: Model
        """
        return self._model

    @model.setter
    def model(self, model: Model):
        """Sets the model of this Raspi.


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

        self._model = model

    @property
    def ip(self) -> str:
        """Gets the ip of this Raspi.


        :return: The ip of this Raspi.
        :rtype: str
        """
        return self._ip

    @ip.setter
    def ip(self, ip: str):
        """Sets the ip of this Raspi.


        :param ip: The ip of this Raspi.
        :type ip: str
        """

        self._ip = ip

    @property
    def tags(self) -> List[Tag]:
        """Gets the tags of this Raspi.


        :return: The tags of this Raspi.
        :rtype: List[Tag]
        """
        return self._tags

    @tags.setter
    def tags(self, tags: List[Tag]):
        """Sets the tags of this Raspi.


        :param tags: The tags of this Raspi.
        :type tags: List[Tag]
        """

        self._tags = tags

    @property
    def status(self) -> str:
        """Gets the status of this Raspi.

        pet status in the store  # noqa: E501

        :return: The status of this Raspi.
        :rtype: str
        """
        return self._status

    @status.setter
    def status(self, status: str):
        """Sets the status of this Raspi.

        pet status in the store  # noqa: E501

        :param status: The status of this Raspi.
        :type status: str
        """
        allowed_values = ["available", "pending", "sold"]  # noqa: E501
        if status not in allowed_values:
            raise ValueError(
                "Invalid value for `status` ({0}), must be one of {1}"
                .format(status, allowed_values)
            )

        self._status = status
