Team Ai
Datasetpublic

codekingpro/portable-devtools

sourceHugging Faceupdated 5mo agoView on Hugging Face
1likes14kdownloads
v1_role_list.py206 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 V1RoleList(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        'items': 'list[V1Role]',38        'kind': 'str',39        'metadata': 'V1ListMeta'40    }41 42    attribute_map = {43        'api_version': 'apiVersion',44        'items': 'items',45        'kind': 'kind',46        'metadata': 'metadata'47    }48 49    def __init__(self, api_version=None, items=None, kind=None, metadata=None, local_vars_configuration=None):  # noqa: E50150        """V1RoleList - 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._api_version = None56        self._items = None57        self._kind = None58        self._metadata = None59        self.discriminator = None60 61        if api_version is not None:62            self.api_version = api_version63        self.items = items64        if kind is not None:65            self.kind = kind66        if metadata is not None:67            self.metadata = metadata68 69    @property70    def api_version(self):71        """Gets the api_version of this V1RoleList.  # noqa: E50172 73        APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources  # noqa: E50174 75        :return: The api_version of this V1RoleList.  # noqa: E50176        :rtype: str77        """78        return self._api_version79 80    @api_version.setter81    def api_version(self, api_version):82        """Sets the api_version of this V1RoleList.83 84        APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources  # noqa: E50185 86        :param api_version: The api_version of this V1RoleList.  # noqa: E50187        :type: str88        """89 90        self._api_version = api_version91 92    @property93    def items(self):94        """Gets the items of this V1RoleList.  # noqa: E50195 96        Items is a list of Roles  # noqa: E50197 98        :return: The items of this V1RoleList.  # noqa: E50199        :rtype: list[V1Role]100        """101        return self._items102 103    @items.setter104    def items(self, items):105        """Sets the items of this V1RoleList.106 107        Items is a list of Roles  # noqa: E501108 109        :param items: The items of this V1RoleList.  # noqa: E501110        :type: list[V1Role]111        """112        if self.local_vars_configuration.client_side_validation and items is None:  # noqa: E501113            raise ValueError("Invalid value for `items`, must not be `None`")  # noqa: E501114 115        self._items = items116 117    @property118    def kind(self):119        """Gets the kind of this V1RoleList.  # noqa: E501120 121        Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds  # noqa: E501122 123        :return: The kind of this V1RoleList.  # noqa: E501124        :rtype: str125        """126        return self._kind127 128    @kind.setter129    def kind(self, kind):130        """Sets the kind of this V1RoleList.131 132        Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds  # noqa: E501133 134        :param kind: The kind of this V1RoleList.  # noqa: E501135        :type: str136        """137 138        self._kind = kind139 140    @property141    def metadata(self):142        """Gets the metadata of this V1RoleList.  # noqa: E501143 144 145        :return: The metadata of this V1RoleList.  # noqa: E501146        :rtype: V1ListMeta147        """148        return self._metadata149 150    @metadata.setter151    def metadata(self, metadata):152        """Sets the metadata of this V1RoleList.153 154 155        :param metadata: The metadata of this V1RoleList.  # noqa: E501156        :type: V1ListMeta157        """158 159        self._metadata = metadata160 161    def to_dict(self):162        """Returns the model properties as a dict"""163        result = {}164 165        for attr, _ in six.iteritems(self.openapi_types):166            value = getattr(self, attr)167            if isinstance(value, list):168                result[attr] = list(map(169                    lambda x: x.to_dict() if hasattr(x, "to_dict") else x,170                    value171                ))172            elif hasattr(value, "to_dict"):173                result[attr] = value.to_dict()174            elif isinstance(value, dict):175                result[attr] = dict(map(176                    lambda item: (item[0], item[1].to_dict())177                    if hasattr(item[1], "to_dict") else item,178                    value.items()179                ))180            else:181                result[attr] = value182 183        return result184 185    def to_str(self):186        """Returns the string representation of the model"""187        return pprint.pformat(self.to_dict())188 189    def __repr__(self):190        """For `print` and `pprint`"""191        return self.to_str()192 193    def __eq__(self, other):194        """Returns true if both objects are equal"""195        if not isinstance(other, V1RoleList):196            return False197 198        return self.to_dict() == other.to_dict()199 200    def __ne__(self, other):201        """Returns true if both objects are not equal"""202        if not isinstance(other, V1RoleList):203            return True204 205        return self.to_dict() != other.to_dict()206 
codekingpro/portable-devtools · Team Ai