# 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 import util


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

    Do not edit the class manually.
    """

    def __init__(self, handle: str=None, name: str=None, repository: str=None, nanoid: str=None):  # noqa: E501
        """Model - a model defined in Swagger

        :param handle: The handle of this Model.  # noqa: E501
        :type handle: str
        :param name: The name of this Model.  # noqa: E501
        :type name: str
        :param repository: The repository of this Model.  # noqa: E501
        :type repository: str
        :param nanoid: The nanoid of this Model.  # noqa: E501
        :type nanoid: str
        """
        self.swagger_types = {
            'handle': str,
            'name': str,
            'repository': str,
            'nanoid': str
        }

        self.attribute_map = {
            'handle': 'handle',
            'name': 'name',
            'repository': 'repository',
            'nanoid': 'nanoid'
        }

        self._handle = handle
        self._name = name
        self._repository = repository
        self._nanoid = nanoid

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

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

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


        :return: The handle of this Model.
        :rtype: str
        """
        return self._handle

    @handle.setter
    def handle(self, handle: str):
        """Sets the handle of this Model.


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

        self._handle = handle

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


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

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


        :param name: The name of this Model.
        :type name: str
        """

        self._name = name

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


        :return: The repository of this Model.
        :rtype: str
        """
        return self._repository

    @repository.setter
    def repository(self, repository: str):
        """Sets the repository of this Model.


        :param repository: The repository of this Model.
        :type repository: str
        """

        self._repository = repository

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


        :return: The nanoid of this Model.
        :rtype: str
        """
        return self._nanoid

    @nanoid.setter
    def nanoid(self, nanoid: str):
        """Sets the nanoid of this Model.


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

        self._nanoid = nanoid
