# coding: utf-8

from __future__ import absolute_import
from .base_model_ import Model
from datetime import date, datetime
from typing import List, Dict
from ..util import deserialize_model


class RelationshipModel(Model):
    """
    NOTE: This class is auto generated by the swagger code generator program.
    Do not edit the class manually.
    """
    def __init__(self, sub_type=None, sub_type_schema=None, name=None):
        """
        RelationshipModel - a model defined in Swagger

        :param sub_type: The sub_type of this RelationshipModel.
        :type sub_type: str
        :param sub_type_schema: The sub_type_schema of this RelationshipModel.
        :type sub_type_schema: str
        :param name: The name of this RelationshipModel.
        :type name: str
        """
        self.swagger_types = {
            'sub_type': str,
            'sub_type_schema': str,
            'name': str
        }

        self.attribute_map = {
            'sub_type': 'SubType',
            'sub_type_schema': 'SubTypeSchema',
            'name': 'Name'
        }

        self._sub_type = sub_type
        self._sub_type_schema = sub_type_schema
        self._name = name

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

        :param dikt: A dict.
        :type: dict
        :return: The Relationship Model of this RelationshipModel.
        :rtype: RelationshipModel
        """
        return deserialize_model(dikt, cls)

    @property
    def sub_type(self):
        """
        Gets the sub_type of this RelationshipModel.

        :return: The sub_type of this RelationshipModel.
        :rtype: str
        """
        return self._sub_type

    @sub_type.setter
    def sub_type(self, sub_type):
        """
        Sets the sub_type of this RelationshipModel.

        :param sub_type: The sub_type of this RelationshipModel.
        :type sub_type: str
        """
        allowed_values = ["IsSupplementTo", "IsSupplementedBy", "References", "IsReferencedBy", "IsRelatedTo"]
        if sub_type not in allowed_values:
            raise ValueError(
                "Invalid value for `sub_type` ({0}), must be one of {1}"
                .format(sub_type, allowed_values)
            )

        self._sub_type = sub_type

    @property
    def sub_type_schema(self):
        """
        Gets the sub_type_schema of this RelationshipModel.

        :return: The sub_type_schema of this RelationshipModel.
        :rtype: str
        """
        return self._sub_type_schema

    @sub_type_schema.setter
    def sub_type_schema(self, sub_type_schema):
        """
        Sets the sub_type_schema of this RelationshipModel.

        :param sub_type_schema: The sub_type_schema of this RelationshipModel.
        :type sub_type_schema: str
        """

        self._sub_type_schema = sub_type_schema

    @property
    def name(self):
        """
        Gets the name of this RelationshipModel.

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

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

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

        self._name = name

