Team Ai
Datasetpublic

codekingpro/portable-devtools

sourceHugging Faceupdated 5mo agoView on Hugging Face
1likes14kdownloads
v1_ingress_backend.py147 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 V1IngressBackend(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        'resource': 'V1TypedLocalObjectReference',37        'service': 'V1IngressServiceBackend'38    }39 40    attribute_map = {41        'resource': 'resource',42        'service': 'service'43    }44 45    def __init__(self, resource=None, service=None, local_vars_configuration=None):  # noqa: E50146        """V1IngressBackend - a model defined in OpenAPI"""  # noqa: E50147        if local_vars_configuration is None:48            local_vars_configuration = Configuration()49        self.local_vars_configuration = local_vars_configuration50 51        self._resource = None52        self._service = None53        self.discriminator = None54 55        if resource is not None:56            self.resource = resource57        if service is not None:58            self.service = service59 60    @property61    def resource(self):62        """Gets the resource of this V1IngressBackend.  # noqa: E50163 64 65        :return: The resource of this V1IngressBackend.  # noqa: E50166        :rtype: V1TypedLocalObjectReference67        """68        return self._resource69 70    @resource.setter71    def resource(self, resource):72        """Sets the resource of this V1IngressBackend.73 74 75        :param resource: The resource of this V1IngressBackend.  # noqa: E50176        :type: V1TypedLocalObjectReference77        """78 79        self._resource = resource80 81    @property82    def service(self):83        """Gets the service of this V1IngressBackend.  # noqa: E50184 85 86        :return: The service of this V1IngressBackend.  # noqa: E50187        :rtype: V1IngressServiceBackend88        """89        return self._service90 91    @service.setter92    def service(self, service):93        """Sets the service of this V1IngressBackend.94 95 96        :param service: The service of this V1IngressBackend.  # noqa: E50197        :type: V1IngressServiceBackend98        """99 100        self._service = service101 102    def to_dict(self):103        """Returns the model properties as a dict"""104        result = {}105 106        for attr, _ in six.iteritems(self.openapi_types):107            value = getattr(self, attr)108            if isinstance(value, list):109                result[attr] = list(map(110                    lambda x: x.to_dict() if hasattr(x, "to_dict") else x,111                    value112                ))113            elif hasattr(value, "to_dict"):114                result[attr] = value.to_dict()115            elif isinstance(value, dict):116                result[attr] = dict(map(117                    lambda item: (item[0], item[1].to_dict())118                    if hasattr(item[1], "to_dict") else item,119                    value.items()120                ))121            else:122                result[attr] = value123 124        return result125 126    def to_str(self):127        """Returns the string representation of the model"""128        return pprint.pformat(self.to_dict())129 130    def __repr__(self):131        """For `print` and `pprint`"""132        return self.to_str()133 134    def __eq__(self, other):135        """Returns true if both objects are equal"""136        if not isinstance(other, V1IngressBackend):137            return False138 139        return self.to_dict() == other.to_dict()140 141    def __ne__(self, other):142        """Returns true if both objects are not equal"""143        if not isinstance(other, V1IngressBackend):144            return True145 146        return self.to_dict() != other.to_dict()147