# coding: utf-8

"""
    fluid

    client for fluid  # noqa: E501

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


import pprint
import re  # noqa: F401

import six

from fluid.configuration import Configuration


class ScriptProcessor(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[str]',
        'env': 'list[V1EnvVar]',
        'image': 'str',
        'image_pull_policy': 'str',
        'image_tag': 'str',
        'resources': 'V1ResourceRequirements',
        'restart_policy': 'str',
        'source': 'str',
        'volume_mounts': 'list[V1VolumeMount]',
        'volumes': 'list[V1Volume]'
    }

    attribute_map = {
        'command': 'command',
        'env': 'env',
        'image': 'image',
        'image_pull_policy': 'imagePullPolicy',
        'image_tag': 'imageTag',
        'resources': 'resources',
        'restart_policy': 'restartPolicy',
        'source': 'source',
        'volume_mounts': 'volumeMounts',
        'volumes': 'volumes'
    }

    def __init__(self, command=None, env=None, image=None, image_pull_policy=None, image_tag=None, resources=None, restart_policy=None, source='', volume_mounts=None, volumes=None, local_vars_configuration=None):  # noqa: E501
        """ScriptProcessor - a model defined in OpenAPI"""  # noqa: E501
        if local_vars_configuration is None:
            local_vars_configuration = Configuration()
        self.local_vars_configuration = local_vars_configuration

        self._command = None
        self._env = None
        self._image = None
        self._image_pull_policy = None
        self._image_tag = None
        self._resources = None
        self._restart_policy = None
        self._source = None
        self._volume_mounts = None
        self._volumes = None
        self.discriminator = None

        if command is not None:
            self.command = command
        if env is not None:
            self.env = env
        if image is not None:
            self.image = image
        if image_pull_policy is not None:
            self.image_pull_policy = image_pull_policy
        if image_tag is not None:
            self.image_tag = image_tag
        if resources is not None:
            self.resources = resources
        if restart_policy is not None:
            self.restart_policy = restart_policy
        self.source = source
        if volume_mounts is not None:
            self.volume_mounts = volume_mounts
        if volumes is not None:
            self.volumes = volumes

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

        Entrypoint command for ScriptProcessor.  # noqa: E501

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

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

        Entrypoint command for ScriptProcessor.  # noqa: E501

        :param command: The command of this ScriptProcessor.  # noqa: E501
        :type: list[str]
        """

        self._command = command

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

        List of environment variables to set in the container.  # noqa: E501

        :return: The env of this ScriptProcessor.  # noqa: E501
        :rtype: list[V1EnvVar]
        """
        return self._env

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

        List of environment variables to set in the container.  # noqa: E501

        :param env: The env of this ScriptProcessor.  # noqa: E501
        :type: list[V1EnvVar]
        """

        self._env = env

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

        Image (e.g. alluxio/alluxio)  # noqa: E501

        :return: The image of this ScriptProcessor.  # noqa: E501
        :rtype: str
        """
        return self._image

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

        Image (e.g. alluxio/alluxio)  # noqa: E501

        :param image: The image of this ScriptProcessor.  # noqa: E501
        :type: str
        """

        self._image = image

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

        One of the three policies: `Always`, `IfNotPresent`, `Never`  # noqa: E501

        :return: The image_pull_policy of this ScriptProcessor.  # noqa: E501
        :rtype: str
        """
        return self._image_pull_policy

    @image_pull_policy.setter
    def image_pull_policy(self, image_pull_policy):
        """Sets the image_pull_policy of this ScriptProcessor.

        One of the three policies: `Always`, `IfNotPresent`, `Never`  # noqa: E501

        :param image_pull_policy: The image_pull_policy of this ScriptProcessor.  # noqa: E501
        :type: str
        """

        self._image_pull_policy = image_pull_policy

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

        Image tag (e.g. 2.3.0-SNAPSHOT)  # noqa: E501

        :return: The image_tag of this ScriptProcessor.  # noqa: E501
        :rtype: str
        """
        return self._image_tag

    @image_tag.setter
    def image_tag(self, image_tag):
        """Sets the image_tag of this ScriptProcessor.

        Image tag (e.g. 2.3.0-SNAPSHOT)  # noqa: E501

        :param image_tag: The image_tag of this ScriptProcessor.  # noqa: E501
        :type: str
        """

        self._image_tag = image_tag

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


        :return: The resources of this ScriptProcessor.  # noqa: E501
        :rtype: V1ResourceRequirements
        """
        return self._resources

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


        :param resources: The resources of this ScriptProcessor.  # noqa: E501
        :type: V1ResourceRequirements
        """

        self._resources = resources

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

        RestartPolicy specifies the processor job's restart policy. Only \"Never\", \"OnFailure\" is allowed.  # noqa: E501

        :return: The restart_policy of this ScriptProcessor.  # noqa: E501
        :rtype: str
        """
        return self._restart_policy

    @restart_policy.setter
    def restart_policy(self, restart_policy):
        """Sets the restart_policy of this ScriptProcessor.

        RestartPolicy specifies the processor job's restart policy. Only \"Never\", \"OnFailure\" is allowed.  # noqa: E501

        :param restart_policy: The restart_policy of this ScriptProcessor.  # noqa: E501
        :type: str
        """

        self._restart_policy = restart_policy

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

        Script source for ScriptProcessor  # noqa: E501

        :return: The source of this ScriptProcessor.  # noqa: E501
        :rtype: str
        """
        return self._source

    @source.setter
    def source(self, source):
        """Sets the source of this ScriptProcessor.

        Script source for ScriptProcessor  # noqa: E501

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

        self._source = source

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

        Pod volumes to mount into the container's filesystem.  # noqa: E501

        :return: The volume_mounts of this ScriptProcessor.  # noqa: E501
        :rtype: list[V1VolumeMount]
        """
        return self._volume_mounts

    @volume_mounts.setter
    def volume_mounts(self, volume_mounts):
        """Sets the volume_mounts of this ScriptProcessor.

        Pod volumes to mount into the container's filesystem.  # noqa: E501

        :param volume_mounts: The volume_mounts of this ScriptProcessor.  # noqa: E501
        :type: list[V1VolumeMount]
        """

        self._volume_mounts = volume_mounts

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

        List of volumes that can be mounted by containers belonging to the pod.  # noqa: E501

        :return: The volumes of this ScriptProcessor.  # noqa: E501
        :rtype: list[V1Volume]
        """
        return self._volumes

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

        List of volumes that can be mounted by containers belonging to the pod.  # noqa: E501

        :param volumes: The volumes of this ScriptProcessor.  # noqa: E501
        :type: list[V1Volume]
        """

        self._volumes = volumes

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

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

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