# 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

    NOTE
    ----
    standard swagger-codegen-cli for this python client has been modified
    by custom templates. The purpose of these templates is to include
    typing information in the API and Model code. Please refer to the
    main grid repository for more info
"""


import pprint
import re  # noqa: F401
from typing import TYPE_CHECKING

import six

from grid.openapi.configuration import Configuration

if TYPE_CHECKING:
    from datetime import datetime
    from grid.openapi.models import *

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: 'str' = None, datastores: 'list[V1DatastoreInput]' = None, desired_state: 'V1SessionState' = None, instance_type: 'str' = None, pause_automation: 'bool' = None, resources: 'V1Resources' = None, use_spot: 'bool' = None, user_id: 'str' = 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) -> 'str':
        """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: 'str'):
        """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) -> 'list[V1DatastoreInput]':
        """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: 'list[V1DatastoreInput]'):
        """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) -> 'V1SessionState':
        """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: 'V1SessionState'):
        """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) -> 'str':
        """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: 'str'):
        """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) -> 'bool':
        """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: 'bool'):
        """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) -> 'V1Resources':
        """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: 'V1Resources'):
        """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) -> 'bool':
        """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: 'bool'):
        """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) -> 'str':
        """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: 'str'):
        """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) -> dict:
        """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) -> str:
        """Returns the string representation of the model"""
        return pprint.pformat(self.to_dict())

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

    def __eq__(self, other: 'V1SessionSpec') -> bool:
        """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: 'V1SessionSpec') -> bool:
        """Returns true if both objects are not equal"""
        if not isinstance(other, V1SessionSpec):
            return True

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