Source code for swagger_server.models.resource_create

# 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


[docs]class ResourceCreate(Model): """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ def __init__(self, urn: str=None, description: str=None): # noqa: E501 """ResourceCreate - a model defined in Swagger :param urn: The urn of this ResourceCreate. # noqa: E501 :type urn: str :param description: The description of this ResourceCreate. # noqa: E501 :type description: str """ self.swagger_types = { 'urn': str, 'description': str } self.attribute_map = { 'urn': 'urn', 'description': 'description' } self._urn = urn self._description = description
[docs] @classmethod def from_dict(cls, dikt) -> 'ResourceCreate': """Returns the dict as a model :param dikt: A dict. :type: dict :return: The resource_create of this ResourceCreate. # noqa: E501 :rtype: ResourceCreate """ return util.deserialize_model(dikt, cls)
@property def urn(self) -> str: """Gets the urn of this ResourceCreate. :return: The urn of this ResourceCreate. :rtype: str """ return self._urn @urn.setter def urn(self, urn: str): """Sets the urn of this ResourceCreate. :param urn: The urn of this ResourceCreate. :type urn: str """ if urn is None: raise ValueError("Invalid value for `urn`, must not be `None`") # noqa: E501 self._urn = urn @property def description(self) -> str: """Gets the description of this ResourceCreate. :return: The description of this ResourceCreate. :rtype: str """ return self._description @description.setter def description(self, description: str): """Sets the description of this ResourceCreate. :param description: The description of this ResourceCreate. :type description: str """ self._description = description