# 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 V1RunSpecForm(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 = {
        'description': 'str',
        'env': 'dict[str, V1EnvForm]',
        'export': 'dict[str, V1ExportForm]',
        'image': 'V1ImageForm',
        '_import': 'dict[str, V1ImportForm]',
        'interactive': 'V1InteractiveForm',
        'mount': 'dict[str, V1MountForm]',
        'name': 'str',
        'ports': 'list[V1PortForm]',
        'resources': 'V1ResourcesForm',
        'run': 'list[V1CommandForm]',
        'service_account_name': 'str',
        'tags': 'list[str]',
        'termination_protection': 'bool'
    }

    attribute_map = {
        'description': 'description',
        'env': 'env',
        'export': 'export',
        'image': 'image',
        '_import': 'import',
        'interactive': 'interactive',
        'mount': 'mount',
        'name': 'name',
        'ports': 'ports',
        'resources': 'resources',
        'run': 'run',
        'service_account_name': 'service_account_name',
        'tags': 'tags',
        'termination_protection': 'termination_protection'
    }

    def __init__(self, description=None, env=None, export=None, image=None, _import=None, interactive=None, mount=None, name=None, ports=None, resources=None, run=None, service_account_name=None, tags=None, termination_protection=None, local_vars_configuration=None):  # noqa: E501
        """V1RunSpecForm - 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._description = None
        self._env = None
        self._export = None
        self._image = None
        self.__import = None
        self._interactive = None
        self._mount = None
        self._name = None
        self._ports = None
        self._resources = None
        self._run = None
        self._service_account_name = None
        self._tags = None
        self._termination_protection = None
        self.discriminator = None

        self.description = description
        if env is not None:
            self.env = env
        if export is not None:
            self.export = export
        self.image = image
        if _import is not None:
            self._import = _import
        if interactive is not None:
            self.interactive = interactive
        if mount is not None:
            self.mount = mount
        self.name = name
        if ports is not None:
            self.ports = ports
        self.resources = resources
        if run is not None:
            self.run = run
        self.service_account_name = service_account_name
        if tags is not None:
            self.tags = tags
        self.termination_protection = termination_protection

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


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

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


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

        self._description = description

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


        :return: The env of this V1RunSpecForm.  # noqa: E501
        :rtype: dict[str, V1EnvForm]
        """
        return self._env

    @env.setter
    def env(self, env):
        """Sets the env of this V1RunSpecForm.


        :param env: The env of this V1RunSpecForm.  # noqa: E501
        :type env: dict[str, V1EnvForm]
        """

        self._env = env

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


        :return: The export of this V1RunSpecForm.  # noqa: E501
        :rtype: dict[str, V1ExportForm]
        """
        return self._export

    @export.setter
    def export(self, export):
        """Sets the export of this V1RunSpecForm.


        :param export: The export of this V1RunSpecForm.  # noqa: E501
        :type export: dict[str, V1ExportForm]
        """

        self._export = export

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


        :return: The image of this V1RunSpecForm.  # noqa: E501
        :rtype: V1ImageForm
        """
        return self._image

    @image.setter
    def image(self, image):
        """Sets the image of this V1RunSpecForm.


        :param image: The image of this V1RunSpecForm.  # noqa: E501
        :type image: V1ImageForm
        """
        if self.local_vars_configuration.client_side_validation and image is None:  # noqa: E501
            raise ValueError("Invalid value for `image`, must not be `None`")  # noqa: E501

        self._image = image

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


        :return: The _import of this V1RunSpecForm.  # noqa: E501
        :rtype: dict[str, V1ImportForm]
        """
        return self.__import

    @_import.setter
    def _import(self, _import):
        """Sets the _import of this V1RunSpecForm.


        :param _import: The _import of this V1RunSpecForm.  # noqa: E501
        :type _import: dict[str, V1ImportForm]
        """

        self.__import = _import

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


        :return: The interactive of this V1RunSpecForm.  # noqa: E501
        :rtype: V1InteractiveForm
        """
        return self._interactive

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


        :param interactive: The interactive of this V1RunSpecForm.  # noqa: E501
        :type interactive: V1InteractiveForm
        """

        self._interactive = interactive

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


        :return: The mount of this V1RunSpecForm.  # noqa: E501
        :rtype: dict[str, V1MountForm]
        """
        return self._mount

    @mount.setter
    def mount(self, mount):
        """Sets the mount of this V1RunSpecForm.


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

        self._mount = mount

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


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

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


        :param name: The name of this V1RunSpecForm.  # noqa: E501
        :type name: str
        """
        if self.local_vars_configuration.client_side_validation and name is None:  # noqa: E501
            raise ValueError("Invalid value for `name`, must not be `None`")  # noqa: E501

        self._name = name

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


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

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


        :param ports: The ports of this V1RunSpecForm.  # noqa: E501
        :type ports: list[V1PortForm]
        """

        self._ports = ports

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


        :return: The resources of this V1RunSpecForm.  # noqa: E501
        :rtype: V1ResourcesForm
        """
        return self._resources

    @resources.setter
    def resources(self, resources):
        """Sets the resources of this V1RunSpecForm.


        :param resources: The resources of this V1RunSpecForm.  # noqa: E501
        :type resources: V1ResourcesForm
        """
        if self.local_vars_configuration.client_side_validation and resources is None:  # noqa: E501
            raise ValueError("Invalid value for `resources`, must not be `None`")  # noqa: E501

        self._resources = resources

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


        :return: The run of this V1RunSpecForm.  # noqa: E501
        :rtype: list[V1CommandForm]
        """
        return self._run

    @run.setter
    def run(self, run):
        """Sets the run of this V1RunSpecForm.


        :param run: The run of this V1RunSpecForm.  # noqa: E501
        :type run: list[V1CommandForm]
        """

        self._run = run

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


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


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

        self._service_account_name = service_account_name

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


        :return: The tags of this V1RunSpecForm.  # noqa: E501
        :rtype: list[str]
        """
        return self._tags

    @tags.setter
    def tags(self, tags):
        """Sets the tags of this V1RunSpecForm.


        :param tags: The tags of this V1RunSpecForm.  # noqa: E501
        :type tags: list[str]
        """

        self._tags = tags

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


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

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


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

        self._termination_protection = termination_protection

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

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