# 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 JuiceFSRuntimeSpec(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',
        'configs': 'list[str]',
        'disable_prometheus': 'bool',
        'fuse': 'JuiceFSFuseSpec',
        'init_users': 'InitUsersSpec',
        'job_worker': 'JuiceFSCompTemplateSpec',
        'juicefs_version': 'VersionSpec',
        'master': 'JuiceFSCompTemplateSpec',
        'pod_metadata': 'PodMetadata',
        'replicas': 'int',
        'run_as': 'User',
        'tieredstore': 'TieredStore',
        'volumes': 'list[V1Volume]',
        'worker': 'JuiceFSCompTemplateSpec'
    }

    attribute_map = {
        'clean_cache_policy': 'cleanCachePolicy',
        'configs': 'configs',
        'disable_prometheus': 'disablePrometheus',
        'fuse': 'fuse',
        'init_users': 'initUsers',
        'job_worker': 'jobWorker',
        'juicefs_version': 'juicefsVersion',
        'master': 'master',
        'pod_metadata': 'podMetadata',
        'replicas': 'replicas',
        'run_as': 'runAs',
        'tieredstore': 'tieredstore',
        'volumes': 'volumes',
        'worker': 'worker'
    }

    def __init__(self, clean_cache_policy=None, configs=None, disable_prometheus=None, fuse=None, init_users=None, job_worker=None, juicefs_version=None, master=None, pod_metadata=None, replicas=None, run_as=None, tieredstore=None, volumes=None, worker=None, local_vars_configuration=None):  # noqa: E501
        """JuiceFSRuntimeSpec - 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._configs = None
        self._disable_prometheus = None
        self._fuse = None
        self._init_users = None
        self._job_worker = None
        self._juicefs_version = None
        self._master = None
        self._pod_metadata = None
        self._replicas = None
        self._run_as = None
        self._tieredstore = 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 configs is not None:
            self.configs = configs
        if disable_prometheus is not None:
            self.disable_prometheus = disable_prometheus
        if fuse is not None:
            self.fuse = fuse
        if init_users is not None:
            self.init_users = init_users
        if job_worker is not None:
            self.job_worker = job_worker
        if juicefs_version is not None:
            self.juicefs_version = juicefs_version
        if master is not None:
            self.master = master
        if pod_metadata is not None:
            self.pod_metadata = pod_metadata
        if replicas is not None:
            self.replicas = replicas
        if run_as is not None:
            self.run_as = run_as
        if tieredstore is not None:
            self.tieredstore = tieredstore
        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 JuiceFSRuntimeSpec.  # noqa: E501


        :return: The clean_cache_policy of this JuiceFSRuntimeSpec.  # 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 JuiceFSRuntimeSpec.


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

        self._clean_cache_policy = clean_cache_policy

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

        Configs of JuiceFS  # noqa: E501

        :return: The configs of this JuiceFSRuntimeSpec.  # noqa: E501
        :rtype: list[str]
        """
        return self._configs

    @configs.setter
    def configs(self, configs):
        """Sets the configs of this JuiceFSRuntimeSpec.

        Configs of JuiceFS  # noqa: E501

        :param configs: The configs of this JuiceFSRuntimeSpec.  # noqa: E501
        :type: list[str]
        """

        self._configs = configs

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

        Disable monitoring for JuiceFS Runtime Prometheus is enabled by default  # noqa: E501

        :return: The disable_prometheus of this JuiceFSRuntimeSpec.  # noqa: E501
        :rtype: bool
        """
        return self._disable_prometheus

    @disable_prometheus.setter
    def disable_prometheus(self, disable_prometheus):
        """Sets the disable_prometheus of this JuiceFSRuntimeSpec.

        Disable monitoring for JuiceFS Runtime Prometheus is enabled by default  # noqa: E501

        :param disable_prometheus: The disable_prometheus of this JuiceFSRuntimeSpec.  # noqa: E501
        :type: bool
        """

        self._disable_prometheus = disable_prometheus

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


        :return: The fuse of this JuiceFSRuntimeSpec.  # noqa: E501
        :rtype: JuiceFSFuseSpec
        """
        return self._fuse

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


        :param fuse: The fuse of this JuiceFSRuntimeSpec.  # noqa: E501
        :type: JuiceFSFuseSpec
        """

        self._fuse = fuse

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


        :return: The init_users of this JuiceFSRuntimeSpec.  # noqa: E501
        :rtype: InitUsersSpec
        """
        return self._init_users

    @init_users.setter
    def init_users(self, init_users):
        """Sets the init_users of this JuiceFSRuntimeSpec.


        :param init_users: The init_users of this JuiceFSRuntimeSpec.  # noqa: E501
        :type: InitUsersSpec
        """

        self._init_users = init_users

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


        :return: The job_worker of this JuiceFSRuntimeSpec.  # noqa: E501
        :rtype: JuiceFSCompTemplateSpec
        """
        return self._job_worker

    @job_worker.setter
    def job_worker(self, job_worker):
        """Sets the job_worker of this JuiceFSRuntimeSpec.


        :param job_worker: The job_worker of this JuiceFSRuntimeSpec.  # noqa: E501
        :type: JuiceFSCompTemplateSpec
        """

        self._job_worker = job_worker

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


        :return: The juicefs_version of this JuiceFSRuntimeSpec.  # noqa: E501
        :rtype: VersionSpec
        """
        return self._juicefs_version

    @juicefs_version.setter
    def juicefs_version(self, juicefs_version):
        """Sets the juicefs_version of this JuiceFSRuntimeSpec.


        :param juicefs_version: The juicefs_version of this JuiceFSRuntimeSpec.  # noqa: E501
        :type: VersionSpec
        """

        self._juicefs_version = juicefs_version

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


        :return: The master of this JuiceFSRuntimeSpec.  # noqa: E501
        :rtype: JuiceFSCompTemplateSpec
        """
        return self._master

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


        :param master: The master of this JuiceFSRuntimeSpec.  # noqa: E501
        :type: JuiceFSCompTemplateSpec
        """

        self._master = master

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


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

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


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

        self._pod_metadata = pod_metadata

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

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

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

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

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

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

        self._replicas = replicas

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


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

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


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

        self._run_as = run_as

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


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

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


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

        self._tieredstore = tieredstore

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

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

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

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

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

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

        self._volumes = volumes

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


        :return: The worker of this JuiceFSRuntimeSpec.  # noqa: E501
        :rtype: JuiceFSCompTemplateSpec
        """
        return self._worker

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


        :param worker: The worker of this JuiceFSRuntimeSpec.  # noqa: E501
        :type: JuiceFSCompTemplateSpec
        """

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

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