# 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.models.node import Node  # noqa: F401,E501
from swagger_server import util


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

    Do not edit the class manually.
    """

    def __init__(self, name: str=None, _from: Node=None, to: Node=None, weight: int=None):  # noqa: E501
        """Link - a model defined in Swagger

        :param name: The name of this Link.  # noqa: E501
        :type name: str
        :param _from: The _from of this Link.  # noqa: E501
        :type _from: Node
        :param to: The to of this Link.  # noqa: E501
        :type to: Node
        :param weight: The weight of this Link.  # noqa: E501
        :type weight: int
        """
        self.swagger_types = {
            'name': str,
            '_from': Node,
            'to': Node,
            'weight': int
        }

        self.attribute_map = {
            'name': 'name',
            '_from': 'from',
            'to': 'to',
            'weight': 'weight'
        }

        self._name = name
        self.__from = _from
        self._to = to
        self._weight = weight

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

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

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


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

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


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

        self._name = name

    @property
    def _from(self) -> Node:
        """Gets the _from of this Link.


        :return: The _from of this Link.
        :rtype: Node
        """
        return self.__from

    @_from.setter
    def _from(self, _from: Node):
        """Sets the _from of this Link.


        :param _from: The _from of this Link.
        :type _from: Node
        """

        self.__from = _from

    @property
    def to(self) -> Node:
        """Gets the to of this Link.


        :return: The to of this Link.
        :rtype: Node
        """
        return self._to

    @to.setter
    def to(self, to: Node):
        """Sets the to of this Link.


        :param to: The to of this Link.
        :type to: Node
        """

        self._to = to

    @property
    def weight(self) -> int:
        """Gets the weight of this Link.


        :return: The weight of this Link.
        :rtype: int
        """
        return self._weight

    @weight.setter
    def weight(self, weight: int):
        """Sets the weight of this Link.


        :param weight: The weight of this Link.
        :type weight: int
        """

        self._weight = weight
