# 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 V1RunSpec(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 = {
        'command': 'list[V1CommandBody]',
        'env_vars': 'list[V1EnvVar]',
        'interactive': 'V1Interactive',
        'node_ids': 'list[int]',
        'ports': 'list[V1Port]',
        'resource_spec': 'V1KernelResourceSpec',
        'service_account_name': 'str',
        'start_command': 'str',
        'termination_protection': 'bool',
        'volume_claim_mounts': 'dict[str, V1VolumeClaimMount]',
        'volume_v2_mounts': 'list[V1VolumeV2Mount]'
    }

    attribute_map = {
        'command': 'command',
        'env_vars': 'env_vars',
        'interactive': 'interactive',
        'node_ids': 'node_ids',
        'ports': 'ports',
        'resource_spec': 'resource_spec',
        'service_account_name': 'service_account_name',
        'start_command': 'start_command',
        'termination_protection': 'termination_protection',
        'volume_claim_mounts': 'volume_claim_mounts',
        'volume_v2_mounts': 'volume_v2_mounts'
    }

    def __init__(self, command=None, env_vars=None, interactive=None, node_ids=None, ports=None, resource_spec=None, service_account_name=None, start_command=None, termination_protection=None, volume_claim_mounts=None, volume_v2_mounts=None, local_vars_configuration=None):  # noqa: E501
        """V1RunSpec - 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._command = None
        self._env_vars = None
        self._interactive = None
        self._node_ids = None
        self._ports = None
        self._resource_spec = None
        self._service_account_name = None
        self._start_command = None
        self._termination_protection = None
        self._volume_claim_mounts = None
        self._volume_v2_mounts = None
        self.discriminator = None

        if command is not None:
            self.command = command
        if env_vars is not None:
            self.env_vars = env_vars
        if interactive is not None:
            self.interactive = interactive
        if node_ids is not None:
            self.node_ids = node_ids
        if ports is not None:
            self.ports = ports
        if resource_spec is not None:
            self.resource_spec = resource_spec
        if service_account_name is not None:
            self.service_account_name = service_account_name
        if start_command is not None:
            self.start_command = start_command
        if termination_protection is not None:
            self.termination_protection = termination_protection
        if volume_claim_mounts is not None:
            self.volume_claim_mounts = volume_claim_mounts
        if volume_v2_mounts is not None:
            self.volume_v2_mounts = volume_v2_mounts

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


        :return: The command of this V1RunSpec.  # noqa: E501
        :rtype: list[V1CommandBody]
        """
        return self._command

    @command.setter
    def command(self, command):
        """Sets the command of this V1RunSpec.


        :param command: The command of this V1RunSpec.  # noqa: E501
        :type command: list[V1CommandBody]
        """

        self._command = command

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


        :return: The env_vars of this V1RunSpec.  # noqa: E501
        :rtype: list[V1EnvVar]
        """
        return self._env_vars

    @env_vars.setter
    def env_vars(self, env_vars):
        """Sets the env_vars of this V1RunSpec.


        :param env_vars: The env_vars of this V1RunSpec.  # noqa: E501
        :type env_vars: list[V1EnvVar]
        """

        self._env_vars = env_vars

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


        :return: The interactive of this V1RunSpec.  # noqa: E501
        :rtype: V1Interactive
        """
        return self._interactive

    @interactive.setter
    def interactive(self, interactive):
        """Sets the interactive of this V1RunSpec.


        :param interactive: The interactive of this V1RunSpec.  # noqa: E501
        :type interactive: V1Interactive
        """

        self._interactive = interactive

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


        :return: The node_ids of this V1RunSpec.  # noqa: E501
        :rtype: list[int]
        """
        return self._node_ids

    @node_ids.setter
    def node_ids(self, node_ids):
        """Sets the node_ids of this V1RunSpec.


        :param node_ids: The node_ids of this V1RunSpec.  # noqa: E501
        :type node_ids: list[int]
        """

        self._node_ids = node_ids

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


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

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


        :param ports: The ports of this V1RunSpec.  # noqa: E501
        :type ports: list[V1Port]
        """

        self._ports = ports

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


        :return: The resource_spec of this V1RunSpec.  # noqa: E501
        :rtype: V1KernelResourceSpec
        """
        return self._resource_spec

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


        :param resource_spec: The resource_spec of this V1RunSpec.  # noqa: E501
        :type resource_spec: V1KernelResourceSpec
        """

        self._resource_spec = resource_spec

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


        :return: The service_account_name of this V1RunSpec.  # 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 V1RunSpec.


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

        self._service_account_name = service_account_name

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


        :return: The start_command of this V1RunSpec.  # noqa: E501
        :rtype: str
        """
        return self._start_command

    @start_command.setter
    def start_command(self, start_command):
        """Sets the start_command of this V1RunSpec.


        :param start_command: The start_command of this V1RunSpec.  # noqa: E501
        :type start_command: str
        """

        self._start_command = start_command

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


        :return: The termination_protection of this V1RunSpec.  # noqa: E501
        :rtype: bool
        """
        return self._termination_protection

    @termination_protection.setter
    def termination_protection(self, termination_protection):
        """Sets the termination_protection of this V1RunSpec.


        :param termination_protection: The termination_protection of this V1RunSpec.  # noqa: E501
        :type termination_protection: bool
        """

        self._termination_protection = termination_protection

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


        :return: The volume_claim_mounts of this V1RunSpec.  # noqa: E501
        :rtype: dict[str, V1VolumeClaimMount]
        """
        return self._volume_claim_mounts

    @volume_claim_mounts.setter
    def volume_claim_mounts(self, volume_claim_mounts):
        """Sets the volume_claim_mounts of this V1RunSpec.


        :param volume_claim_mounts: The volume_claim_mounts of this V1RunSpec.  # noqa: E501
        :type volume_claim_mounts: dict[str, V1VolumeClaimMount]
        """

        self._volume_claim_mounts = volume_claim_mounts

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


        :return: The volume_v2_mounts of this V1RunSpec.  # noqa: E501
        :rtype: list[V1VolumeV2Mount]
        """
        return self._volume_v2_mounts

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


        :param volume_v2_mounts: The volume_v2_mounts of this V1RunSpec.  # noqa: E501
        :type volume_v2_mounts: list[V1VolumeV2Mount]
        """

        self._volume_v2_mounts = volume_v2_mounts

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

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