Team Ai
Datasetpublic

codekingpro/portable-devtools

sourceHugging Faceupdated 5mo agoView on Hugging Face
1likes14kdownloads
v1_owner_reference.py267 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 V1OwnerReference(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        'api_version': 'str',37        'block_owner_deletion': 'bool',38        'controller': 'bool',39        'kind': 'str',40        'name': 'str',41        'uid': 'str'42    }43 44    attribute_map = {45        'api_version': 'apiVersion',46        'block_owner_deletion': 'blockOwnerDeletion',47        'controller': 'controller',48        'kind': 'kind',49        'name': 'name',50        'uid': 'uid'51    }52 53    def __init__(self, api_version=None, block_owner_deletion=None, controller=None, kind=None, name=None, uid=None, local_vars_configuration=None):  # noqa: E50154        """V1OwnerReference - a model defined in OpenAPI"""  # noqa: E50155        if local_vars_configuration is None:56            local_vars_configuration = Configuration()57        self.local_vars_configuration = local_vars_configuration58 59        self._api_version = None60        self._block_owner_deletion = None61        self._controller = None62        self._kind = None63        self._name = None64        self._uid = None65        self.discriminator = None66 67        self.api_version = api_version68        if block_owner_deletion is not None:69            self.block_owner_deletion = block_owner_deletion70        if controller is not None:71            self.controller = controller72        self.kind = kind73        self.name = name74        self.uid = uid75 76    @property77    def api_version(self):78        """Gets the api_version of this V1OwnerReference.  # noqa: E50179 80        API version of the referent.  # noqa: E50181 82        :return: The api_version of this V1OwnerReference.  # noqa: E50183        :rtype: str84        """85        return self._api_version86 87    @api_version.setter88    def api_version(self, api_version):89        """Sets the api_version of this V1OwnerReference.90 91        API version of the referent.  # noqa: E50192 93        :param api_version: The api_version of this V1OwnerReference.  # noqa: E50194        :type: str95        """96        if self.local_vars_configuration.client_side_validation and api_version is None:  # noqa: E50197            raise ValueError("Invalid value for `api_version`, must not be `None`")  # noqa: E50198 99        self._api_version = api_version100 101    @property102    def block_owner_deletion(self):103        """Gets the block_owner_deletion of this V1OwnerReference.  # noqa: E501104 105        If true, AND if the owner has the \"foregroundDeletion\" finalizer, then the owner cannot be deleted from the key-value store until this reference is removed. See https://kubernetes.io/docs/concepts/architecture/garbage-collection/#foreground-deletion for how the garbage collector interacts with this field and enforces the foreground deletion. Defaults to false. To set this field, a user needs \"delete\" permission of the owner, otherwise 422 (Unprocessable Entity) will be returned.  # noqa: E501106 107        :return: The block_owner_deletion of this V1OwnerReference.  # noqa: E501108        :rtype: bool109        """110        return self._block_owner_deletion111 112    @block_owner_deletion.setter113    def block_owner_deletion(self, block_owner_deletion):114        """Sets the block_owner_deletion of this V1OwnerReference.115 116        If true, AND if the owner has the \"foregroundDeletion\" finalizer, then the owner cannot be deleted from the key-value store until this reference is removed. See https://kubernetes.io/docs/concepts/architecture/garbage-collection/#foreground-deletion for how the garbage collector interacts with this field and enforces the foreground deletion. Defaults to false. To set this field, a user needs \"delete\" permission of the owner, otherwise 422 (Unprocessable Entity) will be returned.  # noqa: E501117 118        :param block_owner_deletion: The block_owner_deletion of this V1OwnerReference.  # noqa: E501119        :type: bool120        """121 122        self._block_owner_deletion = block_owner_deletion123 124    @property125    def controller(self):126        """Gets the controller of this V1OwnerReference.  # noqa: E501127 128        If true, this reference points to the managing controller.  # noqa: E501129 130        :return: The controller of this V1OwnerReference.  # noqa: E501131        :rtype: bool132        """133        return self._controller134 135    @controller.setter136    def controller(self, controller):137        """Sets the controller of this V1OwnerReference.138 139        If true, this reference points to the managing controller.  # noqa: E501140 141        :param controller: The controller of this V1OwnerReference.  # noqa: E501142        :type: bool143        """144 145        self._controller = controller146 147    @property148    def kind(self):149        """Gets the kind of this V1OwnerReference.  # noqa: E501150 151        Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds  # noqa: E501152 153        :return: The kind of this V1OwnerReference.  # noqa: E501154        :rtype: str155        """156        return self._kind157 158    @kind.setter159    def kind(self, kind):160        """Sets the kind of this V1OwnerReference.161 162        Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds  # noqa: E501163 164        :param kind: The kind of this V1OwnerReference.  # noqa: E501165        :type: str166        """167        if self.local_vars_configuration.client_side_validation and kind is None:  # noqa: E501168            raise ValueError("Invalid value for `kind`, must not be `None`")  # noqa: E501169 170        self._kind = kind171 172    @property173    def name(self):174        """Gets the name of this V1OwnerReference.  # noqa: E501175 176        Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names#names  # noqa: E501177 178        :return: The name of this V1OwnerReference.  # noqa: E501179        :rtype: str180        """181        return self._name182 183    @name.setter184    def name(self, name):185        """Sets the name of this V1OwnerReference.186 187        Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names#names  # noqa: E501188 189        :param name: The name of this V1OwnerReference.  # noqa: E501190        :type: str191        """192        if self.local_vars_configuration.client_side_validation and name is None:  # noqa: E501193            raise ValueError("Invalid value for `name`, must not be `None`")  # noqa: E501194 195        self._name = name196 197    @property198    def uid(self):199        """Gets the uid of this V1OwnerReference.  # noqa: E501200 201        UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names#uids  # noqa: E501202 203        :return: The uid of this V1OwnerReference.  # noqa: E501204        :rtype: str205        """206        return self._uid207 208    @uid.setter209    def uid(self, uid):210        """Sets the uid of this V1OwnerReference.211 212        UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names#uids  # noqa: E501213 214        :param uid: The uid of this V1OwnerReference.  # noqa: E501215        :type: str216        """217        if self.local_vars_configuration.client_side_validation and uid is None:  # noqa: E501218            raise ValueError("Invalid value for `uid`, must not be `None`")  # noqa: E501219 220        self._uid = uid221 222    def to_dict(self):223        """Returns the model properties as a dict"""224        result = {}225 226        for attr, _ in six.iteritems(self.openapi_types):227            value = getattr(self, attr)228            if isinstance(value, list):229                result[attr] = list(map(230                    lambda x: x.to_dict() if hasattr(x, "to_dict") else x,231                    value232                ))233            elif hasattr(value, "to_dict"):234                result[attr] = value.to_dict()235            elif isinstance(value, dict):236                result[attr] = dict(map(237                    lambda item: (item[0], item[1].to_dict())238                    if hasattr(item[1], "to_dict") else item,239                    value.items()240                ))241            else:242                result[attr] = value243 244        return result245 246    def to_str(self):247        """Returns the string representation of the model"""248        return pprint.pformat(self.to_dict())249 250    def __repr__(self):251        """For `print` and `pprint`"""252        return self.to_str()253 254    def __eq__(self, other):255        """Returns true if both objects are equal"""256        if not isinstance(other, V1OwnerReference):257            return False258 259        return self.to_dict() == other.to_dict()260 261    def __ne__(self, other):262        """Returns true if both objects are not equal"""263        if not isinstance(other, V1OwnerReference):264            return True265 266        return self.to_dict() != other.to_dict()267 
codekingpro/portable-devtools · Team Ai