Team Ai
Datasetpublic

codekingpro/portable-devtools

sourceHugging Faceupdated 5mo agoView on Hugging Face
1likes14kdownloads
v1_ingress_spec.py205 linesDownload Raw Back to models
1# coding: utf-82 3"""4    Kubernetes5 6    No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)  # noqa: E5017 8    The version of the OpenAPI document: release-1.359    Generated by: https://openapi-generator.tech10"""11 12 13import pprint14import re  # noqa: F40115 16import six17 18from kubernetes.client.configuration import Configuration19 20 21class V1IngressSpec(object):22    """NOTE: This class is auto generated by OpenAPI Generator.23    Ref: https://openapi-generator.tech24 25    Do not edit the class manually.26    """27 28    """29    Attributes:30      openapi_types (dict): The key is attribute name31                            and the value is attribute type.32      attribute_map (dict): The key is attribute name33                            and the value is json key in definition.34    """35    openapi_types = {36        'default_backend': 'V1IngressBackend',37        'ingress_class_name': 'str',38        'rules': 'list[V1IngressRule]',39        'tls': 'list[V1IngressTLS]'40    }41 42    attribute_map = {43        'default_backend': 'defaultBackend',44        'ingress_class_name': 'ingressClassName',45        'rules': 'rules',46        'tls': 'tls'47    }48 49    def __init__(self, default_backend=None, ingress_class_name=None, rules=None, tls=None, local_vars_configuration=None):  # noqa: E50150        """V1IngressSpec - a model defined in OpenAPI"""  # noqa: E50151        if local_vars_configuration is None:52            local_vars_configuration = Configuration()53        self.local_vars_configuration = local_vars_configuration54 55        self._default_backend = None56        self._ingress_class_name = None57        self._rules = None58        self._tls = None59        self.discriminator = None60 61        if default_backend is not None:62            self.default_backend = default_backend63        if ingress_class_name is not None:64            self.ingress_class_name = ingress_class_name65        if rules is not None:66            self.rules = rules67        if tls is not None:68            self.tls = tls69 70    @property71    def default_backend(self):72        """Gets the default_backend of this V1IngressSpec.  # noqa: E50173 74 75        :return: The default_backend of this V1IngressSpec.  # noqa: E50176        :rtype: V1IngressBackend77        """78        return self._default_backend79 80    @default_backend.setter81    def default_backend(self, default_backend):82        """Sets the default_backend of this V1IngressSpec.83 84 85        :param default_backend: The default_backend of this V1IngressSpec.  # noqa: E50186        :type: V1IngressBackend87        """88 89        self._default_backend = default_backend90 91    @property92    def ingress_class_name(self):93        """Gets the ingress_class_name of this V1IngressSpec.  # noqa: E50194 95        ingressClassName is the name of an IngressClass cluster resource. Ingress controller implementations use this field to know whether they should be serving this Ingress resource, by a transitive connection (controller -> IngressClass -> Ingress resource). Although the `kubernetes.io/ingress.class` annotation (simple constant name) was never formally defined, it was widely supported by Ingress controllers to create a direct binding between Ingress controller and Ingress resources. Newly created Ingress resources should prefer using the field. However, even though the annotation is officially deprecated, for backwards compatibility reasons, ingress controllers should still honor that annotation if present.  # noqa: E50196 97        :return: The ingress_class_name of this V1IngressSpec.  # noqa: E50198        :rtype: str99        """100        return self._ingress_class_name101 102    @ingress_class_name.setter103    def ingress_class_name(self, ingress_class_name):104        """Sets the ingress_class_name of this V1IngressSpec.105 106        ingressClassName is the name of an IngressClass cluster resource. Ingress controller implementations use this field to know whether they should be serving this Ingress resource, by a transitive connection (controller -> IngressClass -> Ingress resource). Although the `kubernetes.io/ingress.class` annotation (simple constant name) was never formally defined, it was widely supported by Ingress controllers to create a direct binding between Ingress controller and Ingress resources. Newly created Ingress resources should prefer using the field. However, even though the annotation is officially deprecated, for backwards compatibility reasons, ingress controllers should still honor that annotation if present.  # noqa: E501107 108        :param ingress_class_name: The ingress_class_name of this V1IngressSpec.  # noqa: E501109        :type: str110        """111 112        self._ingress_class_name = ingress_class_name113 114    @property115    def rules(self):116        """Gets the rules of this V1IngressSpec.  # noqa: E501117 118        rules is a list of host rules used to configure the Ingress. If unspecified, or no rule matches, all traffic is sent to the default backend.  # noqa: E501119 120        :return: The rules of this V1IngressSpec.  # noqa: E501121        :rtype: list[V1IngressRule]122        """123        return self._rules124 125    @rules.setter126    def rules(self, rules):127        """Sets the rules of this V1IngressSpec.128 129        rules is a list of host rules used to configure the Ingress. If unspecified, or no rule matches, all traffic is sent to the default backend.  # noqa: E501130 131        :param rules: The rules of this V1IngressSpec.  # noqa: E501132        :type: list[V1IngressRule]133        """134 135        self._rules = rules136 137    @property138    def tls(self):139        """Gets the tls of this V1IngressSpec.  # noqa: E501140 141        tls represents the TLS configuration. Currently the Ingress only supports a single TLS port, 443. If multiple members of this list specify different hosts, they will be multiplexed on the same port according to the hostname specified through the SNI TLS extension, if the ingress controller fulfilling the ingress supports SNI.  # noqa: E501142 143        :return: The tls of this V1IngressSpec.  # noqa: E501144        :rtype: list[V1IngressTLS]145        """146        return self._tls147 148    @tls.setter149    def tls(self, tls):150        """Sets the tls of this V1IngressSpec.151 152        tls represents the TLS configuration. Currently the Ingress only supports a single TLS port, 443. If multiple members of this list specify different hosts, they will be multiplexed on the same port according to the hostname specified through the SNI TLS extension, if the ingress controller fulfilling the ingress supports SNI.  # noqa: E501153 154        :param tls: The tls of this V1IngressSpec.  # noqa: E501155        :type: list[V1IngressTLS]156        """157 158        self._tls = tls159 160    def to_dict(self):161        """Returns the model properties as a dict"""162        result = {}163 164        for attr, _ in six.iteritems(self.openapi_types):165            value = getattr(self, attr)166            if isinstance(value, list):167                result[attr] = list(map(168                    lambda x: x.to_dict() if hasattr(x, "to_dict") else x,169                    value170                ))171            elif hasattr(value, "to_dict"):172                result[attr] = value.to_dict()173            elif isinstance(value, dict):174                result[attr] = dict(map(175                    lambda item: (item[0], item[1].to_dict())176                    if hasattr(item[1], "to_dict") else item,177                    value.items()178                ))179            else:180                result[attr] = value181 182        return result183 184    def to_str(self):185        """Returns the string representation of the model"""186        return pprint.pformat(self.to_dict())187 188    def __repr__(self):189        """For `print` and `pprint`"""190        return self.to_str()191 192    def __eq__(self, other):193        """Returns true if both objects are equal"""194        if not isinstance(other, V1IngressSpec):195            return False196 197        return self.to_dict() == other.to_dict()198 199    def __ne__(self, other):200        """Returns true if both objects are not equal"""201        if not isinstance(other, V1IngressSpec):202            return True203 204        return self.to_dict() != other.to_dict()205 
codekingpro/portable-devtools · Team Ai