# coding: utf-8

from __future__ import absolute_import
from datetime import date, datetime  # noqa: F401

from typing import List, Dict  # noqa: F401

from odahuflow.sdk.models.base_model_ import Model
from odahuflow.sdk.models.connection_spec import ConnectionSpec  # noqa: F401,E501
from odahuflow.sdk.models.connection_status import ConnectionStatus  # noqa: F401,E501
from odahuflow.sdk.models import util


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

    Do not edit the class manually.
    """

    def __init__(self, id: str=None, spec: ConnectionSpec=None, status: ConnectionStatus=None):  # noqa: E501
        """Connection - a model defined in Swagger

        :param id: The id of this Connection.  # noqa: E501
        :type id: str
        :param spec: The spec of this Connection.  # noqa: E501
        :type spec: ConnectionSpec
        :param status: The status of this Connection.  # noqa: E501
        :type status: ConnectionStatus
        """
        self.swagger_types = {
            'id': str,
            'spec': ConnectionSpec,
            'status': ConnectionStatus
        }

        self.attribute_map = {
            'id': 'id',
            'spec': 'spec',
            'status': 'status'
        }

        self._id = id
        self._spec = spec
        self._status = status

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

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

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

        Connection id  # noqa: E501

        :return: The id of this Connection.
        :rtype: str
        """
        return self._id

    @id.setter
    def id(self, id: str):
        """Sets the id of this Connection.

        Connection id  # noqa: E501

        :param id: The id of this Connection.
        :type id: str
        """

        self._id = id

    @property
    def spec(self) -> ConnectionSpec:
        """Gets the spec of this Connection.

        Connection specification  # noqa: E501

        :return: The spec of this Connection.
        :rtype: ConnectionSpec
        """
        return self._spec

    @spec.setter
    def spec(self, spec: ConnectionSpec):
        """Sets the spec of this Connection.

        Connection specification  # noqa: E501

        :param spec: The spec of this Connection.
        :type spec: ConnectionSpec
        """

        self._spec = spec

    @property
    def status(self) -> ConnectionStatus:
        """Gets the status of this Connection.

        Connection status  # noqa: E501

        :return: The status of this Connection.
        :rtype: ConnectionStatus
        """
        return self._status

    @status.setter
    def status(self, status: ConnectionStatus):
        """Sets the status of this Connection.

        Connection status  # noqa: E501

        :param status: The status of this Connection.
        :type status: ConnectionStatus
        """

        self._status = status
