# 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 ResponseRunSpec(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': 'ResponseKernelCluster',
        'description': 'str',
        'id': 'int',
        'kernel_image': 'ResponseKernelImage',
        'resource_spec_legacy': 'V1KernelResourceSpecFormLegacy',
        'resource_spec_preset_id': 'int',
        'spec': 'V1RunSpec',
        'title': 'str'
    }

    attribute_map = {
        'cluster': 'cluster',
        'description': 'description',
        'id': 'id',
        'kernel_image': 'kernel_image',
        'resource_spec_legacy': 'resource_spec_legacy',
        'resource_spec_preset_id': 'resource_spec_preset_id',
        'spec': 'spec',
        'title': 'title'
    }

    def __init__(self, cluster=None, description=None, id=None, kernel_image=None, resource_spec_legacy=None, resource_spec_preset_id=None, spec=None, title=None, local_vars_configuration=None):  # noqa: E501
        """ResponseRunSpec - 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 = None
        self._description = None
        self._id = None
        self._kernel_image = None
        self._resource_spec_legacy = None
        self._resource_spec_preset_id = None
        self._spec = None
        self._title = None
        self.discriminator = None

        if cluster is not None:
            self.cluster = cluster
        if description is not None:
            self.description = description
        if id is not None:
            self.id = id
        if kernel_image is not None:
            self.kernel_image = kernel_image
        if resource_spec_legacy is not None:
            self.resource_spec_legacy = resource_spec_legacy
        self.resource_spec_preset_id = resource_spec_preset_id
        if spec is not None:
            self.spec = spec
        if title is not None:
            self.title = title

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


        :return: The cluster of this ResponseRunSpec.  # noqa: E501
        :rtype: ResponseKernelCluster
        """
        return self._cluster

    @cluster.setter
    def cluster(self, cluster):
        """Sets the cluster of this ResponseRunSpec.


        :param cluster: The cluster of this ResponseRunSpec.  # noqa: E501
        :type cluster: ResponseKernelCluster
        """

        self._cluster = cluster

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


        :return: The description of this ResponseRunSpec.  # noqa: E501
        :rtype: str
        """
        return self._description

    @description.setter
    def description(self, description):
        """Sets the description of this ResponseRunSpec.


        :param description: The description of this ResponseRunSpec.  # noqa: E501
        :type description: str
        """

        self._description = description

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


        :return: The id of this ResponseRunSpec.  # noqa: E501
        :rtype: int
        """
        return self._id

    @id.setter
    def id(self, id):
        """Sets the id of this ResponseRunSpec.


        :param id: The id of this ResponseRunSpec.  # noqa: E501
        :type id: int
        """

        self._id = id

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


        :return: The kernel_image of this ResponseRunSpec.  # noqa: E501
        :rtype: ResponseKernelImage
        """
        return self._kernel_image

    @kernel_image.setter
    def kernel_image(self, kernel_image):
        """Sets the kernel_image of this ResponseRunSpec.


        :param kernel_image: The kernel_image of this ResponseRunSpec.  # noqa: E501
        :type kernel_image: ResponseKernelImage
        """

        self._kernel_image = kernel_image

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


        :return: The resource_spec_legacy of this ResponseRunSpec.  # noqa: E501
        :rtype: V1KernelResourceSpecFormLegacy
        """
        return self._resource_spec_legacy

    @resource_spec_legacy.setter
    def resource_spec_legacy(self, resource_spec_legacy):
        """Sets the resource_spec_legacy of this ResponseRunSpec.


        :param resource_spec_legacy: The resource_spec_legacy of this ResponseRunSpec.  # noqa: E501
        :type resource_spec_legacy: V1KernelResourceSpecFormLegacy
        """

        self._resource_spec_legacy = resource_spec_legacy

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


        :return: The resource_spec_preset_id of this ResponseRunSpec.  # noqa: E501
        :rtype: int
        """
        return self._resource_spec_preset_id

    @resource_spec_preset_id.setter
    def resource_spec_preset_id(self, resource_spec_preset_id):
        """Sets the resource_spec_preset_id of this ResponseRunSpec.


        :param resource_spec_preset_id: The resource_spec_preset_id of this ResponseRunSpec.  # noqa: E501
        :type resource_spec_preset_id: int
        """

        self._resource_spec_preset_id = resource_spec_preset_id

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


        :return: The spec of this ResponseRunSpec.  # noqa: E501
        :rtype: V1RunSpec
        """
        return self._spec

    @spec.setter
    def spec(self, spec):
        """Sets the spec of this ResponseRunSpec.


        :param spec: The spec of this ResponseRunSpec.  # noqa: E501
        :type spec: V1RunSpec
        """

        self._spec = spec

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


        :return: The title of this ResponseRunSpec.  # noqa: E501
        :rtype: str
        """
        return self._title

    @title.setter
    def title(self, title):
        """Sets the title of this ResponseRunSpec.


        :param title: The title of this ResponseRunSpec.  # noqa: E501
        :type title: str
        """

        self._title = title

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

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