# 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 openapi_client.configuration import Configuration


class WorkspaceUpdateAPIPayload(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_name': 'str',
        'cluster_node_ids': 'list[int]',
        'init_script': 'str',
        'name': 'str',
        'ports': 'list[OrmWorkspacePort]',
        'resource_spec': 'OrmKernelResourceSpecField',
        'resource_spec_id': 'int',
        'volumes': 'ProtoVolumeMountRequests'
    }

    attribute_map = {
        'cluster_name': 'cluster_name',
        'cluster_node_ids': 'cluster_node_ids',
        'init_script': 'init_script',
        'name': 'name',
        'ports': 'ports',
        'resource_spec': 'resource_spec',
        'resource_spec_id': 'resource_spec_id',
        'volumes': 'volumes'
    }

    def __init__(self, cluster_name=None, cluster_node_ids=None, init_script=None, name=None, ports=None, resource_spec=None, resource_spec_id=None, volumes=None, local_vars_configuration=None):  # noqa: E501
        """WorkspaceUpdateAPIPayload - 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_name = None
        self._cluster_node_ids = None
        self._init_script = None
        self._name = None
        self._ports = None
        self._resource_spec = None
        self._resource_spec_id = None
        self._volumes = None
        self.discriminator = None

        self.cluster_name = cluster_name
        if cluster_node_ids is not None:
            self.cluster_node_ids = cluster_node_ids
        self.init_script = init_script
        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
        if volumes is not None:
            self.volumes = volumes

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


        :return: The cluster_name of this WorkspaceUpdateAPIPayload.  # noqa: E501
        :rtype: str
        """
        return self._cluster_name

    @cluster_name.setter
    def cluster_name(self, cluster_name):
        """Sets the cluster_name of this WorkspaceUpdateAPIPayload.


        :param cluster_name: The cluster_name of this WorkspaceUpdateAPIPayload.  # noqa: E501
        :type cluster_name: str
        """

        self._cluster_name = cluster_name

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


        :return: The cluster_node_ids of this WorkspaceUpdateAPIPayload.  # 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 WorkspaceUpdateAPIPayload.


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

        self._cluster_node_ids = cluster_node_ids

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


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

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


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

        self._init_script = init_script

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


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

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


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

        self._name = name

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


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

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


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

        self._ports = ports

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


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

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


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

        self._resource_spec = resource_spec

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


        :return: The resource_spec_id of this WorkspaceUpdateAPIPayload.  # 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 WorkspaceUpdateAPIPayload.


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

        self._resource_spec_id = resource_spec_id

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


        :return: The volumes of this WorkspaceUpdateAPIPayload.  # noqa: E501
        :rtype: ProtoVolumeMountRequests
        """
        return self._volumes

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


        :param volumes: The volumes of this WorkspaceUpdateAPIPayload.  # noqa: E501
        :type volumes: ProtoVolumeMountRequests
        """

        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, WorkspaceUpdateAPIPayload):
            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, WorkspaceUpdateAPIPayload):
            return True

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