# coding: utf-8

"""
    3blades API

    No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)

    OpenAPI spec version: 1.0
    
    Generated by: https://github.com/swagger-api/swagger-codegen.git
"""


from pprint import pformat
from six import iteritems
import re


class ServerData(object):
    """
    NOTE: This class is auto generated by the swagger code generator program.
    Do not edit the class manually.
    """


    """
    Attributes:
      swagger_types (dict): The key is attribute name
                            and the value is attribute type.
      attribute_map (dict): The key is attribute name
                            and the value is json key in definition.
    """
    swagger_types = {
        'name': 'str',
        'image_name': 'str',
        'server_size': 'str',
        'startup_script': 'str',
        'config': 'ServerConfig',
        'connected': 'list[str]',
        'host': 'str'
    }

    attribute_map = {
        'name': 'name',
        'image_name': 'image_name',
        'server_size': 'server_size',
        'startup_script': 'startup_script',
        'config': 'config',
        'connected': 'connected',
        'host': 'host'
    }

    def __init__(self, name=None, image_name=None, server_size=None, startup_script=None, config=None, connected=None, host=None):
        """
        ServerData - a model defined in Swagger
        """

        self._name = None
        self._image_name = None
        self._server_size = None
        self._startup_script = None
        self._config = None
        self._connected = None
        self._host = None

        self.name = name
        if image_name is not None:
          self.image_name = image_name
        if server_size is not None:
          self.server_size = server_size
        if startup_script is not None:
          self.startup_script = startup_script
        if config is not None:
          self.config = config
        if connected is not None:
          self.connected = connected
        if host is not None:
          self.host = host

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

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

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

        :param name: The name of this ServerData.
        :type: str
        """
        if name is None:
            raise ValueError("Invalid value for `name`, must not be `None`")

        self._name = name

    @property
    def image_name(self):
        """
        Gets the image_name of this ServerData.
        Image name.

        :return: The image_name of this ServerData.
        :rtype: str
        """
        return self._image_name

    @image_name.setter
    def image_name(self, image_name):
        """
        Sets the image_name of this ServerData.
        Image name.

        :param image_name: The image_name of this ServerData.
        :type: str
        """

        self._image_name = image_name

    @property
    def server_size(self):
        """
        Gets the server_size of this ServerData.
        Server size unique identifier.

        :return: The server_size of this ServerData.
        :rtype: str
        """
        return self._server_size

    @server_size.setter
    def server_size(self, server_size):
        """
        Sets the server_size of this ServerData.
        Server size unique identifier.

        :param server_size: The server_size of this ServerData.
        :type: str
        """

        self._server_size = server_size

    @property
    def startup_script(self):
        """
        Gets the startup_script of this ServerData.
        Startup script to run when launching server.

        :return: The startup_script of this ServerData.
        :rtype: str
        """
        return self._startup_script

    @startup_script.setter
    def startup_script(self, startup_script):
        """
        Sets the startup_script of this ServerData.
        Startup script to run when launching server.

        :param startup_script: The startup_script of this ServerData.
        :type: str
        """

        self._startup_script = startup_script

    @property
    def config(self):
        """
        Gets the config of this ServerData.
        Server configuration option. Values are jupyter, restful and cron.

        :return: The config of this ServerData.
        :rtype: ServerConfig
        """
        return self._config

    @config.setter
    def config(self, config):
        """
        Sets the config of this ServerData.
        Server configuration option. Values are jupyter, restful and cron.

        :param config: The config of this ServerData.
        :type: ServerConfig
        """

        self._config = config

    @property
    def connected(self):
        """
        Gets the connected of this ServerData.
        Array of other servers the server is connected to.

        :return: The connected of this ServerData.
        :rtype: list[str]
        """
        return self._connected

    @connected.setter
    def connected(self, connected):
        """
        Sets the connected of this ServerData.
        Array of other servers the server is connected to.

        :param connected: The connected of this ServerData.
        :type: list[str]
        """

        self._connected = connected

    @property
    def host(self):
        """
        Gets the host of this ServerData.
        External host IPv4 address or hostname.

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

    @host.setter
    def host(self, host):
        """
        Sets the host of this ServerData.
        External host IPv4 address or hostname.

        :param host: The host of this ServerData.
        :type: str
        """

        self._host = host

    def to_dict(self):
        """
        Returns the model properties as a dict
        """
        result = {}

        for attr, _ in iteritems(self.swagger_types):
            value = getattr(self, attr)
            if isinstance(value, list):
                result[attr] = list(map(
                    lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
                    value
                ))
            elif hasattr(value, "to_dict"):
                result[attr] = value.to_dict()
            elif isinstance(value, dict):
                result[attr] = dict(map(
                    lambda item: (item[0], item[1].to_dict())
                    if hasattr(item[1], "to_dict") else item,
                    value.items()
                ))
            else:
                result[attr] = value

        return result

    def to_str(self):
        """
        Returns the string representation of the model
        """
        return pformat(self.to_dict())

    def __repr__(self):
        """
        For `print` and `pprint`
        """
        return self.to_str()

    def __eq__(self, other):
        """
        Returns true if both objects are equal
        """
        if not isinstance(other, ServerData):
            return False

        return self.__dict__ == other.__dict__

    def __ne__(self, other):
        """
        Returns true if both objects are not equal
        """
        return not self == other
