# 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 GooseFSCompTemplateSpec(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 = {
        'annotations': 'dict(str, str)',
        'enabled': 'bool',
        'env': 'dict(str, str)',
        'jvm_options': 'list[str]',
        'node_selector': 'dict(str, str)',
        'ports': 'dict(str, int)',
        'properties': 'dict(str, str)',
        'replicas': 'int',
        'resources': 'V1ResourceRequirements'
    }

    attribute_map = {
        'annotations': 'annotations',
        'enabled': 'enabled',
        'env': 'env',
        'jvm_options': 'jvmOptions',
        'node_selector': 'nodeSelector',
        'ports': 'ports',
        'properties': 'properties',
        'replicas': 'replicas',
        'resources': 'resources'
    }

    def __init__(self, annotations=None, enabled=None, env=None, jvm_options=None, node_selector=None, ports=None, properties=None, replicas=None, resources=None, local_vars_configuration=None):  # noqa: E501
        """GooseFSCompTemplateSpec - 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._annotations = None
        self._enabled = None
        self._env = None
        self._jvm_options = None
        self._node_selector = None
        self._ports = None
        self._properties = None
        self._replicas = None
        self._resources = None
        self.discriminator = None

        if annotations is not None:
            self.annotations = annotations
        if enabled is not None:
            self.enabled = enabled
        if env is not None:
            self.env = env
        if jvm_options is not None:
            self.jvm_options = jvm_options
        if node_selector is not None:
            self.node_selector = node_selector
        if ports is not None:
            self.ports = ports
        if properties is not None:
            self.properties = properties
        if replicas is not None:
            self.replicas = replicas
        if resources is not None:
            self.resources = resources

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

        Annotations is an unstructured key value map stored with a resource that may be set by external tools to store and retrieve arbitrary metadata. They are not queryable and should be preserved when modifying objects. More info: http://kubernetes.io/docs/user-guide/annotations  # noqa: E501

        :return: The annotations of this GooseFSCompTemplateSpec.  # noqa: E501
        :rtype: dict(str, str)
        """
        return self._annotations

    @annotations.setter
    def annotations(self, annotations):
        """Sets the annotations of this GooseFSCompTemplateSpec.

        Annotations is an unstructured key value map stored with a resource that may be set by external tools to store and retrieve arbitrary metadata. They are not queryable and should be preserved when modifying objects. More info: http://kubernetes.io/docs/user-guide/annotations  # noqa: E501

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

        self._annotations = annotations

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

        Enabled or Disabled for the components. For now, only  API Gateway is enabled or disabled.  # noqa: E501

        :return: The enabled of this GooseFSCompTemplateSpec.  # noqa: E501
        :rtype: bool
        """
        return self._enabled

    @enabled.setter
    def enabled(self, enabled):
        """Sets the enabled of this GooseFSCompTemplateSpec.

        Enabled or Disabled for the components. For now, only  API Gateway is enabled or disabled.  # noqa: E501

        :param enabled: The enabled of this GooseFSCompTemplateSpec.  # noqa: E501
        :type: bool
        """

        self._enabled = enabled

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

        Environment variables that will be used by GooseFS component. <br>  # noqa: E501

        :return: The env of this GooseFSCompTemplateSpec.  # noqa: E501
        :rtype: dict(str, str)
        """
        return self._env

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

        Environment variables that will be used by GooseFS component. <br>  # noqa: E501

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

        self._env = env

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

        Options for JVM  # noqa: E501

        :return: The jvm_options of this GooseFSCompTemplateSpec.  # noqa: E501
        :rtype: list[str]
        """
        return self._jvm_options

    @jvm_options.setter
    def jvm_options(self, jvm_options):
        """Sets the jvm_options of this GooseFSCompTemplateSpec.

        Options for JVM  # noqa: E501

        :param jvm_options: The jvm_options of this GooseFSCompTemplateSpec.  # noqa: E501
        :type: list[str]
        """

        self._jvm_options = jvm_options

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

        NodeSelector is a selector which must be true for the master to fit on a node  # noqa: E501

        :return: The node_selector of this GooseFSCompTemplateSpec.  # 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 GooseFSCompTemplateSpec.

        NodeSelector is a selector which must be true for the master to fit on a node  # noqa: E501

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

        self._node_selector = node_selector

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

        Ports used by GooseFS(e.g. rpc: 19998 for master)  # noqa: E501

        :return: The ports of this GooseFSCompTemplateSpec.  # noqa: E501
        :rtype: dict(str, int)
        """
        return self._ports

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

        Ports used by GooseFS(e.g. rpc: 19998 for master)  # noqa: E501

        :param ports: The ports of this GooseFSCompTemplateSpec.  # noqa: E501
        :type: dict(str, int)
        """

        self._ports = ports

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

        Configurable properties for the GOOSEFS component. <br> Refer to <a href=\"https://cloud.tencent.com/document/product/436/56415\">GOOSEFS Configuration Properties</a> for more info  # noqa: E501

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

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

        Configurable properties for the GOOSEFS component. <br> Refer to <a href=\"https://cloud.tencent.com/document/product/436/56415\">GOOSEFS Configuration Properties</a> for more info  # noqa: E501

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

        self._properties = properties

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

        Replicas is the desired number of replicas of the given template. If unspecified, defaults to 1. replicas is the min replicas of dataset in the cluster  # noqa: E501

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

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

        Replicas is the desired number of replicas of the given template. If unspecified, defaults to 1. replicas is the min replicas of dataset in the cluster  # noqa: E501

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

        self._replicas = replicas

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


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

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


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

        self._resources = resources

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

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