# 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 ModelProperty(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, model: str=None, nanoid: str=None, is_required: str=None, value_domain: str=None, units: str=None, pattern: str=None):  # noqa: E501
        """ModelProperty - a model defined in Swagger

        :param handle: The handle of this ModelProperty.  # noqa: E501
        :type handle: str
        :param model: The model of this ModelProperty.  # noqa: E501
        :type model: str
        :param nanoid: The nanoid of this ModelProperty.  # noqa: E501
        :type nanoid: str
        :param is_required: The is_required of this ModelProperty.  # noqa: E501
        :type is_required: str
        :param value_domain: The value_domain of this ModelProperty.  # noqa: E501
        :type value_domain: str
        :param units: The units of this ModelProperty.  # noqa: E501
        :type units: str
        :param pattern: The pattern of this ModelProperty.  # noqa: E501
        :type pattern: str
        """
        self.swagger_types = {
            'handle': str,
            'model': str,
            'nanoid': str,
            'is_required': str,
            'value_domain': str,
            'units': str,
            'pattern': str
        }

        self.attribute_map = {
            'handle': 'handle',
            'model': 'model',
            'nanoid': 'nanoid',
            'is_required': 'is_required',
            'value_domain': 'value_domain',
            'units': 'units',
            'pattern': 'pattern'
        }

        self._handle = handle
        self._model = model
        self._nanoid = nanoid
        self._is_required = is_required
        self._value_domain = value_domain
        self._units = units
        self._pattern = pattern

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

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

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


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

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


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

        self._handle = handle

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


        :return: The model of this ModelProperty.
        :rtype: str
        """
        return self._model

    @model.setter
    def model(self, model: str):
        """Sets the model of this ModelProperty.


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

        self._model = model

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


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

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


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

        self._nanoid = nanoid

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


        :return: The is_required of this ModelProperty.
        :rtype: str
        """
        return self._is_required

    @is_required.setter
    def is_required(self, is_required: str):
        """Sets the is_required of this ModelProperty.


        :param is_required: The is_required of this ModelProperty.
        :type is_required: str
        """

        self._is_required = is_required

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


        :return: The value_domain of this ModelProperty.
        :rtype: str
        """
        return self._value_domain

    @value_domain.setter
    def value_domain(self, value_domain: str):
        """Sets the value_domain of this ModelProperty.


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

        self._value_domain = value_domain

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


        :return: The units of this ModelProperty.
        :rtype: str
        """
        return self._units

    @units.setter
    def units(self, units: str):
        """Sets the units of this ModelProperty.


        :param units: The units of this ModelProperty.
        :type units: str
        """

        self._units = units

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


        :return: The pattern of this ModelProperty.
        :rtype: str
        """
        return self._pattern

    @pattern.setter
    def pattern(self, pattern: str):
        """Sets the pattern of this ModelProperty.


        :param pattern: The pattern of this ModelProperty.
        :type pattern: str
        """

        self._pattern = pattern
