# coding: utf-8

"""
    Aron API

    No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)  # noqa: E501

    The version of the OpenAPI document: 1.0.0
    Generated by: https://openapi-generator.tech
"""


try:
    from inspect import getfullargspec
except ImportError:
    from inspect import getargspec as getfullargspec
import pprint
import re  # noqa: F401
import six

from vessl.openapi_client.configuration import Configuration


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

    Do not edit the class manually.
    """

    """
    Attributes:
      openapi_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.
    """
    openapi_types = {
        'cluster_node_ids': 'list[int]',
        'idle_shutdown_minutes': 'int',
        'init_script': 'str',
        'max_running_hours': 'int',
        'name': 'str',
        'ports': 'list[OrmWorkspacePort]',
        'resource_spec': 'OrmKernelResourceSpecField',
        'resource_spec_id': 'int',
        'service_account_name': 'str',
        'volume_v2_mounts': 'dict[str, V1MountForm]',
        'volumes': 'OrmVolumeMountRequests'
    }

    attribute_map = {
        'cluster_node_ids': 'cluster_node_ids',
        'idle_shutdown_minutes': 'idle_shutdown_minutes',
        'init_script': 'init_script',
        'max_running_hours': 'max_running_hours',
        'name': 'name',
        'ports': 'ports',
        'resource_spec': 'resource_spec',
        'resource_spec_id': 'resource_spec_id',
        'service_account_name': 'service_account_name',
        'volume_v2_mounts': 'volume_v2_mounts',
        'volumes': 'volumes'
    }

    def __init__(self, cluster_node_ids=None, idle_shutdown_minutes=None, init_script=None, max_running_hours=None, name=None, ports=None, resource_spec=None, resource_spec_id=None, service_account_name=None, volume_v2_mounts=None, volumes=None, local_vars_configuration=None):  # noqa: E501
        """WorkspaceUpdateAPIInput - a model defined in OpenAPI"""  # noqa: E501
        if local_vars_configuration is None:
            local_vars_configuration = Configuration.get_default_copy()
        self.local_vars_configuration = local_vars_configuration

        self._cluster_node_ids = None
        self._idle_shutdown_minutes = None
        self._init_script = None
        self._max_running_hours = None
        self._name = None
        self._ports = None
        self._resource_spec = None
        self._resource_spec_id = None
        self._service_account_name = None
        self._volume_v2_mounts = None
        self._volumes = None
        self.discriminator = None

        if cluster_node_ids is not None:
            self.cluster_node_ids = cluster_node_ids
        self.idle_shutdown_minutes = idle_shutdown_minutes
        self.init_script = init_script
        self.max_running_hours = max_running_hours
        self.name = name
        if ports is not None:
            self.ports = ports
        if resource_spec is not None:
            self.resource_spec = resource_spec
        self.resource_spec_id = resource_spec_id
        self.service_account_name = service_account_name
        if volume_v2_mounts is not None:
            self.volume_v2_mounts = volume_v2_mounts
        if volumes is not None:
            self.volumes = volumes

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


        :return: The cluster_node_ids of this WorkspaceUpdateAPIInput.  # noqa: E501
        :rtype: list[int]
        """
        return self._cluster_node_ids

    @cluster_node_ids.setter
    def cluster_node_ids(self, cluster_node_ids):
        """Sets the cluster_node_ids of this WorkspaceUpdateAPIInput.


        :param cluster_node_ids: The cluster_node_ids of this WorkspaceUpdateAPIInput.  # noqa: E501
        :type cluster_node_ids: list[int]
        """

        self._cluster_node_ids = cluster_node_ids

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


        :return: The idle_shutdown_minutes of this WorkspaceUpdateAPIInput.  # noqa: E501
        :rtype: int
        """
        return self._idle_shutdown_minutes

    @idle_shutdown_minutes.setter
    def idle_shutdown_minutes(self, idle_shutdown_minutes):
        """Sets the idle_shutdown_minutes of this WorkspaceUpdateAPIInput.


        :param idle_shutdown_minutes: The idle_shutdown_minutes of this WorkspaceUpdateAPIInput.  # noqa: E501
        :type idle_shutdown_minutes: int
        """

        self._idle_shutdown_minutes = idle_shutdown_minutes

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


        :return: The init_script of this WorkspaceUpdateAPIInput.  # noqa: E501
        :rtype: str
        """
        return self._init_script

    @init_script.setter
    def init_script(self, init_script):
        """Sets the init_script of this WorkspaceUpdateAPIInput.


        :param init_script: The init_script of this WorkspaceUpdateAPIInput.  # noqa: E501
        :type init_script: str
        """

        self._init_script = init_script

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


        :return: The max_running_hours of this WorkspaceUpdateAPIInput.  # noqa: E501
        :rtype: int
        """
        return self._max_running_hours

    @max_running_hours.setter
    def max_running_hours(self, max_running_hours):
        """Sets the max_running_hours of this WorkspaceUpdateAPIInput.


        :param max_running_hours: The max_running_hours of this WorkspaceUpdateAPIInput.  # noqa: E501
        :type max_running_hours: int
        """

        self._max_running_hours = max_running_hours

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


        :return: The name of this WorkspaceUpdateAPIInput.  # noqa: E501
        :rtype: str
        """
        return self._name

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


        :param name: The name of this WorkspaceUpdateAPIInput.  # noqa: E501
        :type name: str
        """

        self._name = name

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


        :return: The ports of this WorkspaceUpdateAPIInput.  # noqa: E501
        :rtype: list[OrmWorkspacePort]
        """
        return self._ports

    @ports.setter
    def ports(self, ports):
        """Sets the ports of this WorkspaceUpdateAPIInput.


        :param ports: The ports of this WorkspaceUpdateAPIInput.  # noqa: E501
        :type ports: list[OrmWorkspacePort]
        """

        self._ports = ports

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


        :return: The resource_spec of this WorkspaceUpdateAPIInput.  # noqa: E501
        :rtype: OrmKernelResourceSpecField
        """
        return self._resource_spec

    @resource_spec.setter
    def resource_spec(self, resource_spec):
        """Sets the resource_spec of this WorkspaceUpdateAPIInput.


        :param resource_spec: The resource_spec of this WorkspaceUpdateAPIInput.  # noqa: E501
        :type resource_spec: OrmKernelResourceSpecField
        """

        self._resource_spec = resource_spec

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


        :return: The resource_spec_id of this WorkspaceUpdateAPIInput.  # noqa: E501
        :rtype: int
        """
        return self._resource_spec_id

    @resource_spec_id.setter
    def resource_spec_id(self, resource_spec_id):
        """Sets the resource_spec_id of this WorkspaceUpdateAPIInput.


        :param resource_spec_id: The resource_spec_id of this WorkspaceUpdateAPIInput.  # noqa: E501
        :type resource_spec_id: int
        """

        self._resource_spec_id = resource_spec_id

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


        :return: The service_account_name of this WorkspaceUpdateAPIInput.  # noqa: E501
        :rtype: str
        """
        return self._service_account_name

    @service_account_name.setter
    def service_account_name(self, service_account_name):
        """Sets the service_account_name of this WorkspaceUpdateAPIInput.


        :param service_account_name: The service_account_name of this WorkspaceUpdateAPIInput.  # noqa: E501
        :type service_account_name: str
        """

        self._service_account_name = service_account_name

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


        :return: The volume_v2_mounts of this WorkspaceUpdateAPIInput.  # noqa: E501
        :rtype: dict[str, V1MountForm]
        """
        return self._volume_v2_mounts

    @volume_v2_mounts.setter
    def volume_v2_mounts(self, volume_v2_mounts):
        """Sets the volume_v2_mounts of this WorkspaceUpdateAPIInput.


        :param volume_v2_mounts: The volume_v2_mounts of this WorkspaceUpdateAPIInput.  # noqa: E501
        :type volume_v2_mounts: dict[str, V1MountForm]
        """

        self._volume_v2_mounts = volume_v2_mounts

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


        :return: The volumes of this WorkspaceUpdateAPIInput.  # noqa: E501
        :rtype: OrmVolumeMountRequests
        """
        return self._volumes

    @volumes.setter
    def volumes(self, volumes):
        """Sets the volumes of this WorkspaceUpdateAPIInput.


        :param volumes: The volumes of this WorkspaceUpdateAPIInput.  # noqa: E501
        :type volumes: OrmVolumeMountRequests
        """

        self._volumes = volumes

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

        def convert(x):
            if hasattr(x, "to_dict"):
                args = getfullargspec(x.to_dict).args
                if len(args) == 1:
                    return x.to_dict()
                else:
                    return x.to_dict(serialize)
            else:
                return x

        for attr, _ in six.iteritems(self.openapi_types):
            value = getattr(self, attr)
            attr = self.attribute_map.get(attr, attr) if serialize else attr
            if isinstance(value, list):
                result[attr] = list(map(
                    lambda x: convert(x),
                    value
                ))
            elif isinstance(value, dict):
                result[attr] = dict(map(
                    lambda item: (item[0], convert(item[1])),
                    value.items()
                ))
            else:
                result[attr] = convert(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, WorkspaceUpdateAPIInput):
            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, WorkspaceUpdateAPIInput):
            return True

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