Team Ai
Datasetpublic

codekingpro/portable-devtools

sourceHugging Faceupdated 5mo agoView on Hugging Face
1likes14kdownloads
v1_ip_address_spec.py122 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 V1IPAddressSpec(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        'parent_ref': 'V1ParentReference'37    }38 39    attribute_map = {40        'parent_ref': 'parentRef'41    }42 43    def __init__(self, parent_ref=None, local_vars_configuration=None):  # noqa: E50144        """V1IPAddressSpec - a model defined in OpenAPI"""  # noqa: E50145        if local_vars_configuration is None:46            local_vars_configuration = Configuration()47        self.local_vars_configuration = local_vars_configuration48 49        self._parent_ref = None50        self.discriminator = None51 52        self.parent_ref = parent_ref53 54    @property55    def parent_ref(self):56        """Gets the parent_ref of this V1IPAddressSpec.  # noqa: E50157 58 59        :return: The parent_ref of this V1IPAddressSpec.  # noqa: E50160        :rtype: V1ParentReference61        """62        return self._parent_ref63 64    @parent_ref.setter65    def parent_ref(self, parent_ref):66        """Sets the parent_ref of this V1IPAddressSpec.67 68 69        :param parent_ref: The parent_ref of this V1IPAddressSpec.  # noqa: E50170        :type: V1ParentReference71        """72        if self.local_vars_configuration.client_side_validation and parent_ref is None:  # noqa: E50173            raise ValueError("Invalid value for `parent_ref`, must not be `None`")  # noqa: E50174 75        self._parent_ref = parent_ref76 77    def to_dict(self):78        """Returns the model properties as a dict"""79        result = {}80 81        for attr, _ in six.iteritems(self.openapi_types):82            value = getattr(self, attr)83            if isinstance(value, list):84                result[attr] = list(map(85                    lambda x: x.to_dict() if hasattr(x, "to_dict") else x,86                    value87                ))88            elif hasattr(value, "to_dict"):89                result[attr] = value.to_dict()90            elif isinstance(value, dict):91                result[attr] = dict(map(92                    lambda item: (item[0], item[1].to_dict())93                    if hasattr(item[1], "to_dict") else item,94                    value.items()95                ))96            else:97                result[attr] = value98 99        return result100 101    def to_str(self):102        """Returns the string representation of the model"""103        return pprint.pformat(self.to_dict())104 105    def __repr__(self):106        """For `print` and `pprint`"""107        return self.to_str()108 109    def __eq__(self, other):110        """Returns true if both objects are equal"""111        if not isinstance(other, V1IPAddressSpec):112            return False113 114        return self.to_dict() == other.to_dict()115 116    def __ne__(self, other):117        """Returns true if both objects are not equal"""118        if not isinstance(other, V1IPAddressSpec):119            return True120 121        return self.to_dict() != other.to_dict()122 
codekingpro/portable-devtools · Team Ai