# 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 JindoRuntimeSpec(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 = {
        'clean_cache_policy': 'CleanCachePolicy',
        'fuse': 'JindoFuseSpec',
        'hadoop_config': 'str',
        'image_pull_secrets': 'list[V1LocalObjectReference]',
        'jindo_version': 'VersionSpec',
        'labels': 'dict(str, str)',
        'log_config': 'dict(str, str)',
        'master': 'JindoCompTemplateSpec',
        'networkmode': 'str',
        'pod_metadata': 'PodMetadata',
        'properties': 'dict(str, str)',
        'replicas': 'int',
        'run_as': 'User',
        'secret': 'str',
        'tieredstore': 'TieredStore',
        'user': 'str',
        'volumes': 'list[V1Volume]',
        'worker': 'JindoCompTemplateSpec'
    }

    attribute_map = {
        'clean_cache_policy': 'cleanCachePolicy',
        'fuse': 'fuse',
        'hadoop_config': 'hadoopConfig',
        'image_pull_secrets': 'imagePullSecrets',
        'jindo_version': 'jindoVersion',
        'labels': 'labels',
        'log_config': 'logConfig',
        'master': 'master',
        'networkmode': 'networkmode',
        'pod_metadata': 'podMetadata',
        'properties': 'properties',
        'replicas': 'replicas',
        'run_as': 'runAs',
        'secret': 'secret',
        'tieredstore': 'tieredstore',
        'user': 'user',
        'volumes': 'volumes',
        'worker': 'worker'
    }

    def __init__(self, clean_cache_policy=None, fuse=None, hadoop_config=None, image_pull_secrets=None, jindo_version=None, labels=None, log_config=None, master=None, networkmode=None, pod_metadata=None, properties=None, replicas=None, run_as=None, secret=None, tieredstore=None, user=None, volumes=None, worker=None, local_vars_configuration=None):  # noqa: E501
        """JindoRuntimeSpec - 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._clean_cache_policy = None
        self._fuse = None
        self._hadoop_config = None
        self._image_pull_secrets = None
        self._jindo_version = None
        self._labels = None
        self._log_config = None
        self._master = None
        self._networkmode = None
        self._pod_metadata = None
        self._properties = None
        self._replicas = None
        self._run_as = None
        self._secret = None
        self._tieredstore = None
        self._user = None
        self._volumes = None
        self._worker = None
        self.discriminator = None

        if clean_cache_policy is not None:
            self.clean_cache_policy = clean_cache_policy
        if fuse is not None:
            self.fuse = fuse
        if hadoop_config is not None:
            self.hadoop_config = hadoop_config
        if image_pull_secrets is not None:
            self.image_pull_secrets = image_pull_secrets
        if jindo_version is not None:
            self.jindo_version = jindo_version
        if labels is not None:
            self.labels = labels
        if log_config is not None:
            self.log_config = log_config
        if master is not None:
            self.master = master
        if networkmode is not None:
            self.networkmode = networkmode
        if pod_metadata is not None:
            self.pod_metadata = pod_metadata
        if properties is not None:
            self.properties = properties
        if replicas is not None:
            self.replicas = replicas
        if run_as is not None:
            self.run_as = run_as
        if secret is not None:
            self.secret = secret
        if tieredstore is not None:
            self.tieredstore = tieredstore
        if user is not None:
            self.user = user
        if volumes is not None:
            self.volumes = volumes
        if worker is not None:
            self.worker = worker

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


        :return: The clean_cache_policy of this JindoRuntimeSpec.  # noqa: E501
        :rtype: CleanCachePolicy
        """
        return self._clean_cache_policy

    @clean_cache_policy.setter
    def clean_cache_policy(self, clean_cache_policy):
        """Sets the clean_cache_policy of this JindoRuntimeSpec.


        :param clean_cache_policy: The clean_cache_policy of this JindoRuntimeSpec.  # noqa: E501
        :type: CleanCachePolicy
        """

        self._clean_cache_policy = clean_cache_policy

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


        :return: The fuse of this JindoRuntimeSpec.  # noqa: E501
        :rtype: JindoFuseSpec
        """
        return self._fuse

    @fuse.setter
    def fuse(self, fuse):
        """Sets the fuse of this JindoRuntimeSpec.


        :param fuse: The fuse of this JindoRuntimeSpec.  # noqa: E501
        :type: JindoFuseSpec
        """

        self._fuse = fuse

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

        Name of the configMap used to support HDFS configurations when using HDFS as Jindo's UFS. The configMap must be in the same namespace with the JindoRuntime. The configMap should contain user-specific HDFS conf files in it. For now, only \"hdfs-site.xml\" and \"core-site.xml\" are supported. It must take the filename of the conf file as the key and content of the file as the value.  # noqa: E501

        :return: The hadoop_config of this JindoRuntimeSpec.  # noqa: E501
        :rtype: str
        """
        return self._hadoop_config

    @hadoop_config.setter
    def hadoop_config(self, hadoop_config):
        """Sets the hadoop_config of this JindoRuntimeSpec.

        Name of the configMap used to support HDFS configurations when using HDFS as Jindo's UFS. The configMap must be in the same namespace with the JindoRuntime. The configMap should contain user-specific HDFS conf files in it. For now, only \"hdfs-site.xml\" and \"core-site.xml\" are supported. It must take the filename of the conf file as the key and content of the file as the value.  # noqa: E501

        :param hadoop_config: The hadoop_config of this JindoRuntimeSpec.  # noqa: E501
        :type: str
        """

        self._hadoop_config = hadoop_config

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

        ImagePullSecrets that will be used to pull images  # noqa: E501

        :return: The image_pull_secrets of this JindoRuntimeSpec.  # noqa: E501
        :rtype: list[V1LocalObjectReference]
        """
        return self._image_pull_secrets

    @image_pull_secrets.setter
    def image_pull_secrets(self, image_pull_secrets):
        """Sets the image_pull_secrets of this JindoRuntimeSpec.

        ImagePullSecrets that will be used to pull images  # noqa: E501

        :param image_pull_secrets: The image_pull_secrets of this JindoRuntimeSpec.  # noqa: E501
        :type: list[V1LocalObjectReference]
        """

        self._image_pull_secrets = image_pull_secrets

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


        :return: The jindo_version of this JindoRuntimeSpec.  # noqa: E501
        :rtype: VersionSpec
        """
        return self._jindo_version

    @jindo_version.setter
    def jindo_version(self, jindo_version):
        """Sets the jindo_version of this JindoRuntimeSpec.


        :param jindo_version: The jindo_version of this JindoRuntimeSpec.  # noqa: E501
        :type: VersionSpec
        """

        self._jindo_version = jindo_version

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

        Labels will be added on all the JindoFS pods. DEPRECATED: this is a deprecated field. Please use PodMetadata.Labels instead. Note: this field is set to be exclusive with PodMetadata.Labels  # noqa: E501

        :return: The labels of this JindoRuntimeSpec.  # noqa: E501
        :rtype: dict(str, str)
        """
        return self._labels

    @labels.setter
    def labels(self, labels):
        """Sets the labels of this JindoRuntimeSpec.

        Labels will be added on all the JindoFS pods. DEPRECATED: this is a deprecated field. Please use PodMetadata.Labels instead. Note: this field is set to be exclusive with PodMetadata.Labels  # noqa: E501

        :param labels: The labels of this JindoRuntimeSpec.  # noqa: E501
        :type: dict(str, str)
        """

        self._labels = labels

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


        :return: The log_config of this JindoRuntimeSpec.  # noqa: E501
        :rtype: dict(str, str)
        """
        return self._log_config

    @log_config.setter
    def log_config(self, log_config):
        """Sets the log_config of this JindoRuntimeSpec.


        :param log_config: The log_config of this JindoRuntimeSpec.  # noqa: E501
        :type: dict(str, str)
        """

        self._log_config = log_config

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


        :return: The master of this JindoRuntimeSpec.  # noqa: E501
        :rtype: JindoCompTemplateSpec
        """
        return self._master

    @master.setter
    def master(self, master):
        """Sets the master of this JindoRuntimeSpec.


        :param master: The master of this JindoRuntimeSpec.  # noqa: E501
        :type: JindoCompTemplateSpec
        """

        self._master = master

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

        Whether to use hostnetwork or not  # noqa: E501

        :return: The networkmode of this JindoRuntimeSpec.  # noqa: E501
        :rtype: str
        """
        return self._networkmode

    @networkmode.setter
    def networkmode(self, networkmode):
        """Sets the networkmode of this JindoRuntimeSpec.

        Whether to use hostnetwork or not  # noqa: E501

        :param networkmode: The networkmode of this JindoRuntimeSpec.  # noqa: E501
        :type: str
        """

        self._networkmode = networkmode

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


        :return: The pod_metadata of this JindoRuntimeSpec.  # noqa: E501
        :rtype: PodMetadata
        """
        return self._pod_metadata

    @pod_metadata.setter
    def pod_metadata(self, pod_metadata):
        """Sets the pod_metadata of this JindoRuntimeSpec.


        :param pod_metadata: The pod_metadata of this JindoRuntimeSpec.  # noqa: E501
        :type: PodMetadata
        """

        self._pod_metadata = pod_metadata

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

        Configurable properties for Jindo system. <br>  # noqa: E501

        :return: The properties of this JindoRuntimeSpec.  # noqa: E501
        :rtype: dict(str, str)
        """
        return self._properties

    @properties.setter
    def properties(self, properties):
        """Sets the properties of this JindoRuntimeSpec.

        Configurable properties for Jindo system. <br>  # noqa: E501

        :param properties: The properties of this JindoRuntimeSpec.  # noqa: E501
        :type: dict(str, str)
        """

        self._properties = properties

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

        The replicas of the worker, need to be specified  # noqa: E501

        :return: The replicas of this JindoRuntimeSpec.  # noqa: E501
        :rtype: int
        """
        return self._replicas

    @replicas.setter
    def replicas(self, replicas):
        """Sets the replicas of this JindoRuntimeSpec.

        The replicas of the worker, need to be specified  # noqa: E501

        :param replicas: The replicas of this JindoRuntimeSpec.  # noqa: E501
        :type: int
        """

        self._replicas = replicas

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


        :return: The run_as of this JindoRuntimeSpec.  # noqa: E501
        :rtype: User
        """
        return self._run_as

    @run_as.setter
    def run_as(self, run_as):
        """Sets the run_as of this JindoRuntimeSpec.


        :param run_as: The run_as of this JindoRuntimeSpec.  # noqa: E501
        :type: User
        """

        self._run_as = run_as

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


        :return: The secret of this JindoRuntimeSpec.  # noqa: E501
        :rtype: str
        """
        return self._secret

    @secret.setter
    def secret(self, secret):
        """Sets the secret of this JindoRuntimeSpec.


        :param secret: The secret of this JindoRuntimeSpec.  # noqa: E501
        :type: str
        """

        self._secret = secret

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


        :return: The tieredstore of this JindoRuntimeSpec.  # noqa: E501
        :rtype: TieredStore
        """
        return self._tieredstore

    @tieredstore.setter
    def tieredstore(self, tieredstore):
        """Sets the tieredstore of this JindoRuntimeSpec.


        :param tieredstore: The tieredstore of this JindoRuntimeSpec.  # noqa: E501
        :type: TieredStore
        """

        self._tieredstore = tieredstore

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


        :return: The user of this JindoRuntimeSpec.  # noqa: E501
        :rtype: str
        """
        return self._user

    @user.setter
    def user(self, user):
        """Sets the user of this JindoRuntimeSpec.


        :param user: The user of this JindoRuntimeSpec.  # noqa: E501
        :type: str
        """

        self._user = user

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

        Volumes is the list of Kubernetes volumes that can be mounted by the jindo runtime components and/or fuses.  # noqa: E501

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

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

        Volumes is the list of Kubernetes volumes that can be mounted by the jindo runtime components and/or fuses.  # noqa: E501

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

        self._volumes = volumes

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


        :return: The worker of this JindoRuntimeSpec.  # noqa: E501
        :rtype: JindoCompTemplateSpec
        """
        return self._worker

    @worker.setter
    def worker(self, worker):
        """Sets the worker of this JindoRuntimeSpec.


        :param worker: The worker of this JindoRuntimeSpec.  # noqa: E501
        :type: JindoCompTemplateSpec
        """

        self._worker = worker

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

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