# coding: utf-8

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

from typing import List, Dict  # noqa: F401

from ga4ghtest.models.base_model_ import Model
from ga4ghtest.openapi import util


class Server(Model):
    """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

    Do not edit the class manually.
    """

    def __init__(self, id=None, api=None, name=None, host=None, proto=None, auth=None):  # noqa: E501
        """Server - a model defined in OpenAPI

        :param id: The id of this Server.  # noqa: E501
        :type id: str
        :param api: The api of this Server.  # noqa: E501
        :type api: str
        :param name: The name of this Server.  # noqa: E501
        :type name: str
        :param host: The host of this Server.  # noqa: E501
        :type host: str
        :param proto: The proto of this Server.  # noqa: E501
        :type proto: str
        :param auth: The auth of this Server.  # noqa: E501
        :type auth: str
        """
        self.openapi_types = {
            'id': str,
            'api': str,
            'name': str,
            'host': str,
            'proto': str,
            'auth': str
        }

        self.attribute_map = {
            'id': 'id',
            'api': 'api',
            'name': 'name',
            'host': 'host',
            'proto': 'proto',
            'auth': 'auth'
        }

        self._id = id
        self._api = api
        self._name = name
        self._host = host
        self._proto = proto
        self._auth = auth

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

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

    @property
    def id(self):
        """Gets the id of this Server.


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

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


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

        self._id = id

    @property
    def api(self):
        """Gets the api of this Server.


        :return: The api of this Server.
        :rtype: str
        """
        return self._api

    @api.setter
    def api(self, api):
        """Sets the api of this Server.


        :param api: The api of this Server.
        :type api: str
        """
        allowed_values = ["WES", "TRS"]  # noqa: E501
        if api not in allowed_values:
            raise ValueError(
                "Invalid value for `api` ({0}), must be one of {1}"
                .format(api, allowed_values)
            )

        self._api = api

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


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

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


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

        self._name = name

    @property
    def host(self):
        """Gets the host of this Server.


        :return: The host of this Server.
        :rtype: str
        """
        return self._host

    @host.setter
    def host(self, host):
        """Sets the host of this Server.


        :param host: The host of this Server.
        :type host: str
        """
        if host is None:
            raise ValueError("Invalid value for `host`, must not be `None`")  # noqa: E501

        self._host = host

    @property
    def proto(self):
        """Gets the proto of this Server.


        :return: The proto of this Server.
        :rtype: str
        """
        return self._proto

    @proto.setter
    def proto(self, proto):
        """Sets the proto of this Server.


        :param proto: The proto of this Server.
        :type proto: str
        """
        if proto is None:
            raise ValueError("Invalid value for `proto`, must not be `None`")  # noqa: E501

        self._proto = proto

    @property
    def auth(self):
        """Gets the auth of this Server.


        :return: The auth of this Server.
        :rtype: str
        """
        return self._auth

    @auth.setter
    def auth(self, auth):
        """Sets the auth of this Server.


        :param auth: The auth of this Server.
        :type auth: str
        """

        self._auth = auth
