# 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 DomainCreate(Model):
"""NOTE: This class is auto generated by the swagger code generator program.
Do not edit the class manually.
"""
def __init__(self, parent_id: int=None, name: str=None, description: str=None): # noqa: E501
"""DomainCreate - a model defined in Swagger
:param parent_id: The parent_id of this DomainCreate. # noqa: E501
:type parent_id: int
:param name: The name of this DomainCreate. # noqa: E501
:type name: str
:param description: The description of this DomainCreate. # noqa: E501
:type description: str
"""
self.swagger_types = {
'parent_id': int,
'name': str,
'description': str
}
self.attribute_map = {
'parent_id': 'parent_id',
'name': 'name',
'description': 'description'
}
self._parent_id = parent_id
self._name = name
self._description = description
[docs] @classmethod
def from_dict(cls, dikt) -> 'DomainCreate':
"""Returns the dict as a model
:param dikt: A dict.
:type: dict
:return: The domain_create of this DomainCreate. # noqa: E501
:rtype: DomainCreate
"""
return util.deserialize_model(dikt, cls)
@property
def parent_id(self) -> int:
"""Gets the parent_id of this DomainCreate.
:return: The parent_id of this DomainCreate.
:rtype: int
"""
return self._parent_id
@parent_id.setter
def parent_id(self, parent_id: int):
"""Sets the parent_id of this DomainCreate.
:param parent_id: The parent_id of this DomainCreate.
:type parent_id: int
"""
self._parent_id = parent_id
@property
def name(self) -> str:
"""Gets the name of this DomainCreate.
:return: The name of this DomainCreate.
:rtype: str
"""
return self._name
@name.setter
def name(self, name: str):
"""Sets the name of this DomainCreate.
:param name: The name of this DomainCreate.
:type name: str
"""
if name is None:
raise ValueError("Invalid value for `name`, must not be `None`") # noqa: E501
if name is not None and len(name) > 100:
raise ValueError("Invalid value for `name`, length must be less than or equal to `100`") # noqa: E501
self._name = name
@property
def description(self) -> str:
"""Gets the description of this DomainCreate.
:return: The description of this DomainCreate.
:rtype: str
"""
return self._description
@description.setter
def description(self, description: str):
"""Sets the description of this DomainCreate.
:param description: The description of this DomainCreate.
:type description: str
"""
self._description = description