Team Ai
Datasetpublic

codekingpro/portable-devtools

sourceHugging Faceupdated 5mo agoView on Hugging Face
1likes14kdownloads
v1beta1_parent_reference.py209 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 V1beta1ParentReference(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        'group': 'str',37        'name': 'str',38        'namespace': 'str',39        'resource': 'str'40    }41 42    attribute_map = {43        'group': 'group',44        'name': 'name',45        'namespace': 'namespace',46        'resource': 'resource'47    }48 49    def __init__(self, group=None, name=None, namespace=None, resource=None, local_vars_configuration=None):  # noqa: E50150        """V1beta1ParentReference - 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._group = None56        self._name = None57        self._namespace = None58        self._resource = None59        self.discriminator = None60 61        if group is not None:62            self.group = group63        self.name = name64        if namespace is not None:65            self.namespace = namespace66        self.resource = resource67 68    @property69    def group(self):70        """Gets the group of this V1beta1ParentReference.  # noqa: E50171 72        Group is the group of the object being referenced.  # noqa: E50173 74        :return: The group of this V1beta1ParentReference.  # noqa: E50175        :rtype: str76        """77        return self._group78 79    @group.setter80    def group(self, group):81        """Sets the group of this V1beta1ParentReference.82 83        Group is the group of the object being referenced.  # noqa: E50184 85        :param group: The group of this V1beta1ParentReference.  # noqa: E50186        :type: str87        """88 89        self._group = group90 91    @property92    def name(self):93        """Gets the name of this V1beta1ParentReference.  # noqa: E50194 95        Name is the name of the object being referenced.  # noqa: E50196 97        :return: The name of this V1beta1ParentReference.  # noqa: E50198        :rtype: str99        """100        return self._name101 102    @name.setter103    def name(self, name):104        """Sets the name of this V1beta1ParentReference.105 106        Name is the name of the object being referenced.  # noqa: E501107 108        :param name: The name of this V1beta1ParentReference.  # noqa: E501109        :type: str110        """111        if self.local_vars_configuration.client_side_validation and name is None:  # noqa: E501112            raise ValueError("Invalid value for `name`, must not be `None`")  # noqa: E501113 114        self._name = name115 116    @property117    def namespace(self):118        """Gets the namespace of this V1beta1ParentReference.  # noqa: E501119 120        Namespace is the namespace of the object being referenced.  # noqa: E501121 122        :return: The namespace of this V1beta1ParentReference.  # noqa: E501123        :rtype: str124        """125        return self._namespace126 127    @namespace.setter128    def namespace(self, namespace):129        """Sets the namespace of this V1beta1ParentReference.130 131        Namespace is the namespace of the object being referenced.  # noqa: E501132 133        :param namespace: The namespace of this V1beta1ParentReference.  # noqa: E501134        :type: str135        """136 137        self._namespace = namespace138 139    @property140    def resource(self):141        """Gets the resource of this V1beta1ParentReference.  # noqa: E501142 143        Resource is the resource of the object being referenced.  # noqa: E501144 145        :return: The resource of this V1beta1ParentReference.  # noqa: E501146        :rtype: str147        """148        return self._resource149 150    @resource.setter151    def resource(self, resource):152        """Sets the resource of this V1beta1ParentReference.153 154        Resource is the resource of the object being referenced.  # noqa: E501155 156        :param resource: The resource of this V1beta1ParentReference.  # noqa: E501157        :type: str158        """159        if self.local_vars_configuration.client_side_validation and resource is None:  # noqa: E501160            raise ValueError("Invalid value for `resource`, must not be `None`")  # noqa: E501161 162        self._resource = resource163 164    def to_dict(self):165        """Returns the model properties as a dict"""166        result = {}167 168        for attr, _ in six.iteritems(self.openapi_types):169            value = getattr(self, attr)170            if isinstance(value, list):171                result[attr] = list(map(172                    lambda x: x.to_dict() if hasattr(x, "to_dict") else x,173                    value174                ))175            elif hasattr(value, "to_dict"):176                result[attr] = value.to_dict()177            elif isinstance(value, dict):178                result[attr] = dict(map(179                    lambda item: (item[0], item[1].to_dict())180                    if hasattr(item[1], "to_dict") else item,181                    value.items()182                ))183            else:184                result[attr] = value185 186        return result187 188    def to_str(self):189        """Returns the string representation of the model"""190        return pprint.pformat(self.to_dict())191 192    def __repr__(self):193        """For `print` and `pprint`"""194        return self.to_str()195 196    def __eq__(self, other):197        """Returns true if both objects are equal"""198        if not isinstance(other, V1beta1ParentReference):199            return False200 201        return self.to_dict() == other.to_dict()202 203    def __ne__(self, other):204        """Returns true if both objects are not equal"""205        if not isinstance(other, V1beta1ParentReference):206            return True207 208        return self.to_dict() != other.to_dict()209 
codekingpro/portable-devtools · Team Ai