Team Ai
Datasetpublic

codekingpro/portable-devtools

sourceHugging Faceupdated 5mo agoView on Hugging Face
1likes14kdownloads
v1_load_balancer_ingress.py207 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 V1LoadBalancerIngress(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        'hostname': 'str',37        'ip': 'str',38        'ip_mode': 'str',39        'ports': 'list[V1PortStatus]'40    }41 42    attribute_map = {43        'hostname': 'hostname',44        'ip': 'ip',45        'ip_mode': 'ipMode',46        'ports': 'ports'47    }48 49    def __init__(self, hostname=None, ip=None, ip_mode=None, ports=None, local_vars_configuration=None):  # noqa: E50150        """V1LoadBalancerIngress - 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._hostname = None56        self._ip = None57        self._ip_mode = None58        self._ports = None59        self.discriminator = None60 61        if hostname is not None:62            self.hostname = hostname63        if ip is not None:64            self.ip = ip65        if ip_mode is not None:66            self.ip_mode = ip_mode67        if ports is not None:68            self.ports = ports69 70    @property71    def hostname(self):72        """Gets the hostname of this V1LoadBalancerIngress.  # noqa: E50173 74        Hostname is set for load-balancer ingress points that are DNS based (typically AWS load-balancers)  # noqa: E50175 76        :return: The hostname of this V1LoadBalancerIngress.  # noqa: E50177        :rtype: str78        """79        return self._hostname80 81    @hostname.setter82    def hostname(self, hostname):83        """Sets the hostname of this V1LoadBalancerIngress.84 85        Hostname is set for load-balancer ingress points that are DNS based (typically AWS load-balancers)  # noqa: E50186 87        :param hostname: The hostname of this V1LoadBalancerIngress.  # noqa: E50188        :type: str89        """90 91        self._hostname = hostname92 93    @property94    def ip(self):95        """Gets the ip of this V1LoadBalancerIngress.  # noqa: E50196 97        IP is set for load-balancer ingress points that are IP based (typically GCE or OpenStack load-balancers)  # noqa: E50198 99        :return: The ip of this V1LoadBalancerIngress.  # noqa: E501100        :rtype: str101        """102        return self._ip103 104    @ip.setter105    def ip(self, ip):106        """Sets the ip of this V1LoadBalancerIngress.107 108        IP is set for load-balancer ingress points that are IP based (typically GCE or OpenStack load-balancers)  # noqa: E501109 110        :param ip: The ip of this V1LoadBalancerIngress.  # noqa: E501111        :type: str112        """113 114        self._ip = ip115 116    @property117    def ip_mode(self):118        """Gets the ip_mode of this V1LoadBalancerIngress.  # noqa: E501119 120        IPMode specifies how the load-balancer IP behaves, and may only be specified when the ip field is specified. Setting this to \"VIP\" indicates that traffic is delivered to the node with the destination set to the load-balancer's IP and port. Setting this to \"Proxy\" indicates that traffic is delivered to the node or pod with the destination set to the node's IP and node port or the pod's IP and port. Service implementations may use this information to adjust traffic routing.  # noqa: E501121 122        :return: The ip_mode of this V1LoadBalancerIngress.  # noqa: E501123        :rtype: str124        """125        return self._ip_mode126 127    @ip_mode.setter128    def ip_mode(self, ip_mode):129        """Sets the ip_mode of this V1LoadBalancerIngress.130 131        IPMode specifies how the load-balancer IP behaves, and may only be specified when the ip field is specified. Setting this to \"VIP\" indicates that traffic is delivered to the node with the destination set to the load-balancer's IP and port. Setting this to \"Proxy\" indicates that traffic is delivered to the node or pod with the destination set to the node's IP and node port or the pod's IP and port. Service implementations may use this information to adjust traffic routing.  # noqa: E501132 133        :param ip_mode: The ip_mode of this V1LoadBalancerIngress.  # noqa: E501134        :type: str135        """136 137        self._ip_mode = ip_mode138 139    @property140    def ports(self):141        """Gets the ports of this V1LoadBalancerIngress.  # noqa: E501142 143        Ports is a list of records of service ports If used, every port defined in the service should have an entry in it  # noqa: E501144 145        :return: The ports of this V1LoadBalancerIngress.  # noqa: E501146        :rtype: list[V1PortStatus]147        """148        return self._ports149 150    @ports.setter151    def ports(self, ports):152        """Sets the ports of this V1LoadBalancerIngress.153 154        Ports is a list of records of service ports If used, every port defined in the service should have an entry in it  # noqa: E501155 156        :param ports: The ports of this V1LoadBalancerIngress.  # noqa: E501157        :type: list[V1PortStatus]158        """159 160        self._ports = ports161 162    def to_dict(self):163        """Returns the model properties as a dict"""164        result = {}165 166        for attr, _ in six.iteritems(self.openapi_types):167            value = getattr(self, attr)168            if isinstance(value, list):169                result[attr] = list(map(170                    lambda x: x.to_dict() if hasattr(x, "to_dict") else x,171                    value172                ))173            elif hasattr(value, "to_dict"):174                result[attr] = value.to_dict()175            elif isinstance(value, dict):176                result[attr] = dict(map(177                    lambda item: (item[0], item[1].to_dict())178                    if hasattr(item[1], "to_dict") else item,179                    value.items()180                ))181            else:182                result[attr] = value183 184        return result185 186    def to_str(self):187        """Returns the string representation of the model"""188        return pprint.pformat(self.to_dict())189 190    def __repr__(self):191        """For `print` and `pprint`"""192        return self.to_str()193 194    def __eq__(self, other):195        """Returns true if both objects are equal"""196        if not isinstance(other, V1LoadBalancerIngress):197            return False198 199        return self.to_dict() == other.to_dict()200 201    def __ne__(self, other):202        """Returns true if both objects are not equal"""203        if not isinstance(other, V1LoadBalancerIngress):204            return True205 206        return self.to_dict() != other.to_dict()207 
codekingpro/portable-devtools · Team Ai