# coding: utf-8

"""
    external/v1/external_session_service.proto

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

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


import pprint
import re  # noqa: F401

import six

from grid.openapi.configuration import Configuration


class V1SessionSpec(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 = {
        'cluster_id': 'str',
        'datastores': 'list[V1DatastoreInput]',
        'desired_state': 'V1SessionState',
        'instance_type': 'str',
        'pause_automation': 'bool',
        'resources': 'V1Resources',
        'use_spot': 'bool',
        'user_id': 'str'
    }

    attribute_map = {
        'cluster_id': 'clusterId',
        'datastores': 'datastores',
        'desired_state': 'desiredState',
        'instance_type': 'instanceType',
        'pause_automation': 'pauseAutomation',
        'resources': 'resources',
        'use_spot': 'useSpot',
        'user_id': 'userId'
    }

    def __init__(self, cluster_id=None, datastores=None, desired_state=None, instance_type=None, pause_automation=None, resources=None, use_spot=None, user_id=None, _configuration=None):  # noqa: E501
        """V1SessionSpec - a model defined in Swagger"""  # noqa: E501
        if _configuration is None:
            _configuration = Configuration()
        self._configuration = _configuration

        self._cluster_id = None
        self._datastores = None
        self._desired_state = None
        self._instance_type = None
        self._pause_automation = None
        self._resources = None
        self._use_spot = None
        self._user_id = None
        self.discriminator = None

        if cluster_id is not None:
            self.cluster_id = cluster_id
        if datastores is not None:
            self.datastores = datastores
        if desired_state is not None:
            self.desired_state = desired_state
        if instance_type is not None:
            self.instance_type = instance_type
        if pause_automation is not None:
            self.pause_automation = pause_automation
        if resources is not None:
            self.resources = resources
        if use_spot is not None:
            self.use_spot = use_spot
        if user_id is not None:
            self.user_id = user_id

    @property
    def cluster_id(self):
        """Gets the cluster_id of this V1SessionSpec.  # noqa: E501


        :return: The cluster_id of this V1SessionSpec.  # noqa: E501
        :rtype: str
        """
        return self._cluster_id

    @cluster_id.setter
    def cluster_id(self, cluster_id):
        """Sets the cluster_id of this V1SessionSpec.


        :param cluster_id: The cluster_id of this V1SessionSpec.  # noqa: E501
        :type: str
        """

        self._cluster_id = cluster_id

    @property
    def datastores(self):
        """Gets the datastores of this V1SessionSpec.  # noqa: E501


        :return: The datastores of this V1SessionSpec.  # noqa: E501
        :rtype: list[V1DatastoreInput]
        """
        return self._datastores

    @datastores.setter
    def datastores(self, datastores):
        """Sets the datastores of this V1SessionSpec.


        :param datastores: The datastores of this V1SessionSpec.  # noqa: E501
        :type: list[V1DatastoreInput]
        """

        self._datastores = datastores

    @property
    def desired_state(self):
        """Gets the desired_state of this V1SessionSpec.  # noqa: E501


        :return: The desired_state of this V1SessionSpec.  # noqa: E501
        :rtype: V1SessionState
        """
        return self._desired_state

    @desired_state.setter
    def desired_state(self, desired_state):
        """Sets the desired_state of this V1SessionSpec.


        :param desired_state: The desired_state of this V1SessionSpec.  # noqa: E501
        :type: V1SessionState
        """

        self._desired_state = desired_state

    @property
    def instance_type(self):
        """Gets the instance_type of this V1SessionSpec.  # noqa: E501


        :return: The instance_type of this V1SessionSpec.  # noqa: E501
        :rtype: str
        """
        return self._instance_type

    @instance_type.setter
    def instance_type(self, instance_type):
        """Sets the instance_type of this V1SessionSpec.


        :param instance_type: The instance_type of this V1SessionSpec.  # noqa: E501
        :type: str
        """

        self._instance_type = instance_type

    @property
    def pause_automation(self):
        """Gets the pause_automation of this V1SessionSpec.  # noqa: E501


        :return: The pause_automation of this V1SessionSpec.  # noqa: E501
        :rtype: bool
        """
        return self._pause_automation

    @pause_automation.setter
    def pause_automation(self, pause_automation):
        """Sets the pause_automation of this V1SessionSpec.


        :param pause_automation: The pause_automation of this V1SessionSpec.  # noqa: E501
        :type: bool
        """

        self._pause_automation = pause_automation

    @property
    def resources(self):
        """Gets the resources of this V1SessionSpec.  # noqa: E501


        :return: The resources of this V1SessionSpec.  # noqa: E501
        :rtype: V1Resources
        """
        return self._resources

    @resources.setter
    def resources(self, resources):
        """Sets the resources of this V1SessionSpec.


        :param resources: The resources of this V1SessionSpec.  # noqa: E501
        :type: V1Resources
        """

        self._resources = resources

    @property
    def use_spot(self):
        """Gets the use_spot of this V1SessionSpec.  # noqa: E501


        :return: The use_spot of this V1SessionSpec.  # noqa: E501
        :rtype: bool
        """
        return self._use_spot

    @use_spot.setter
    def use_spot(self, use_spot):
        """Sets the use_spot of this V1SessionSpec.


        :param use_spot: The use_spot of this V1SessionSpec.  # noqa: E501
        :type: bool
        """

        self._use_spot = use_spot

    @property
    def user_id(self):
        """Gets the user_id of this V1SessionSpec.  # noqa: E501


        :return: The user_id of this V1SessionSpec.  # noqa: E501
        :rtype: str
        """
        return self._user_id

    @user_id.setter
    def user_id(self, user_id):
        """Sets the user_id of this V1SessionSpec.


        :param user_id: The user_id of this V1SessionSpec.  # noqa: E501
        :type: str
        """

        self._user_id = user_id

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

        for attr, _ in six.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
        if issubclass(V1SessionSpec, dict):
            for key, value in self.items():
                result[key] = value

        return result

    def to_str(self):
        """Returns the string representation of the model"""
        return pprint.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, V1SessionSpec):
            return False

        return self.to_dict() == other.to_dict()

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

        return self.to_dict() != other.to_dict()
