# 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 EFCFuseSpec(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_policy': 'str',
        'network_mode': 'str',
        'node_selector': 'dict(str, str)',
        'pod_metadata': 'PodMetadata',
        'properties': 'dict(str, str)',
        'resources': 'V1ResourceRequirements',
        'version': 'VersionSpec'
    }

    attribute_map = {
        'clean_policy': 'cleanPolicy',
        'network_mode': 'networkMode',
        'node_selector': 'nodeSelector',
        'pod_metadata': 'podMetadata',
        'properties': 'properties',
        'resources': 'resources',
        'version': 'version'
    }

    def __init__(self, clean_policy=None, network_mode=None, node_selector=None, pod_metadata=None, properties=None, resources=None, version=None, local_vars_configuration=None):  # noqa: E501
        """EFCFuseSpec - 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_policy = None
        self._network_mode = None
        self._node_selector = None
        self._pod_metadata = None
        self._properties = None
        self._resources = None
        self._version = None
        self.discriminator = None

        if clean_policy is not None:
            self.clean_policy = clean_policy
        if network_mode is not None:
            self.network_mode = network_mode
        if node_selector is not None:
            self.node_selector = node_selector
        if pod_metadata is not None:
            self.pod_metadata = pod_metadata
        if properties is not None:
            self.properties = properties
        if resources is not None:
            self.resources = resources
        if version is not None:
            self.version = version

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

        CleanPolicy decides when to clean EFC Fuse pods. Currently Fluid supports two policies: OnDemand and OnRuntimeDeleted OnDemand cleans fuse pod once th fuse pod on some node is not needed OnRuntimeDeleted cleans fuse pod only when the cache runtime is deleted Defaults to OnRuntimeDeleted  # noqa: E501

        :return: The clean_policy of this EFCFuseSpec.  # noqa: E501
        :rtype: str
        """
        return self._clean_policy

    @clean_policy.setter
    def clean_policy(self, clean_policy):
        """Sets the clean_policy of this EFCFuseSpec.

        CleanPolicy decides when to clean EFC Fuse pods. Currently Fluid supports two policies: OnDemand and OnRuntimeDeleted OnDemand cleans fuse pod once th fuse pod on some node is not needed OnRuntimeDeleted cleans fuse pod only when the cache runtime is deleted Defaults to OnRuntimeDeleted  # noqa: E501

        :param clean_policy: The clean_policy of this EFCFuseSpec.  # noqa: E501
        :type: str
        """

        self._clean_policy = clean_policy

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

        Whether to use hostnetwork or not  # noqa: E501

        :return: The network_mode of this EFCFuseSpec.  # noqa: E501
        :rtype: str
        """
        return self._network_mode

    @network_mode.setter
    def network_mode(self, network_mode):
        """Sets the network_mode of this EFCFuseSpec.

        Whether to use hostnetwork or not  # noqa: E501

        :param network_mode: The network_mode of this EFCFuseSpec.  # noqa: E501
        :type: str
        """

        self._network_mode = network_mode

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

        NodeSelector is a selector which must be true for the fuse client to fit on a node, this option only effect when global is enabled  # noqa: E501

        :return: The node_selector of this EFCFuseSpec.  # noqa: E501
        :rtype: dict(str, str)
        """
        return self._node_selector

    @node_selector.setter
    def node_selector(self, node_selector):
        """Sets the node_selector of this EFCFuseSpec.

        NodeSelector is a selector which must be true for the fuse client to fit on a node, this option only effect when global is enabled  # noqa: E501

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

        self._node_selector = node_selector

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


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

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


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

        self._pod_metadata = pod_metadata

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

        Configurable properties for EFC fuse  # noqa: E501

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

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

        Configurable properties for EFC fuse  # noqa: E501

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

        self._properties = properties

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


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

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


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

        self._resources = resources

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


        :return: The version of this EFCFuseSpec.  # noqa: E501
        :rtype: VersionSpec
        """
        return self._version

    @version.setter
    def version(self, version):
        """Sets the version of this EFCFuseSpec.


        :param version: The version of this EFCFuseSpec.  # noqa: E501
        :type: VersionSpec
        """

        self._version = version

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

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