Team Ai
Datasetpublic

codekingpro/portable-devtools

sourceHugging Faceupdated 5mo agoView on Hugging Face
1likes14kdownloads
v1_resource_attributes.py343 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 V1ResourceAttributes(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        'field_selector': 'V1FieldSelectorAttributes',37        'group': 'str',38        'label_selector': 'V1LabelSelectorAttributes',39        'name': 'str',40        'namespace': 'str',41        'resource': 'str',42        'subresource': 'str',43        'verb': 'str',44        'version': 'str'45    }46 47    attribute_map = {48        'field_selector': 'fieldSelector',49        'group': 'group',50        'label_selector': 'labelSelector',51        'name': 'name',52        'namespace': 'namespace',53        'resource': 'resource',54        'subresource': 'subresource',55        'verb': 'verb',56        'version': 'version'57    }58 59    def __init__(self, field_selector=None, group=None, label_selector=None, name=None, namespace=None, resource=None, subresource=None, verb=None, version=None, local_vars_configuration=None):  # noqa: E50160        """V1ResourceAttributes - a model defined in OpenAPI"""  # noqa: E50161        if local_vars_configuration is None:62            local_vars_configuration = Configuration()63        self.local_vars_configuration = local_vars_configuration64 65        self._field_selector = None66        self._group = None67        self._label_selector = None68        self._name = None69        self._namespace = None70        self._resource = None71        self._subresource = None72        self._verb = None73        self._version = None74        self.discriminator = None75 76        if field_selector is not None:77            self.field_selector = field_selector78        if group is not None:79            self.group = group80        if label_selector is not None:81            self.label_selector = label_selector82        if name is not None:83            self.name = name84        if namespace is not None:85            self.namespace = namespace86        if resource is not None:87            self.resource = resource88        if subresource is not None:89            self.subresource = subresource90        if verb is not None:91            self.verb = verb92        if version is not None:93            self.version = version94 95    @property96    def field_selector(self):97        """Gets the field_selector of this V1ResourceAttributes.  # noqa: E50198 99 100        :return: The field_selector of this V1ResourceAttributes.  # noqa: E501101        :rtype: V1FieldSelectorAttributes102        """103        return self._field_selector104 105    @field_selector.setter106    def field_selector(self, field_selector):107        """Sets the field_selector of this V1ResourceAttributes.108 109 110        :param field_selector: The field_selector of this V1ResourceAttributes.  # noqa: E501111        :type: V1FieldSelectorAttributes112        """113 114        self._field_selector = field_selector115 116    @property117    def group(self):118        """Gets the group of this V1ResourceAttributes.  # noqa: E501119 120        Group is the API Group of the Resource.  \"*\" means all.  # noqa: E501121 122        :return: The group of this V1ResourceAttributes.  # noqa: E501123        :rtype: str124        """125        return self._group126 127    @group.setter128    def group(self, group):129        """Sets the group of this V1ResourceAttributes.130 131        Group is the API Group of the Resource.  \"*\" means all.  # noqa: E501132 133        :param group: The group of this V1ResourceAttributes.  # noqa: E501134        :type: str135        """136 137        self._group = group138 139    @property140    def label_selector(self):141        """Gets the label_selector of this V1ResourceAttributes.  # noqa: E501142 143 144        :return: The label_selector of this V1ResourceAttributes.  # noqa: E501145        :rtype: V1LabelSelectorAttributes146        """147        return self._label_selector148 149    @label_selector.setter150    def label_selector(self, label_selector):151        """Sets the label_selector of this V1ResourceAttributes.152 153 154        :param label_selector: The label_selector of this V1ResourceAttributes.  # noqa: E501155        :type: V1LabelSelectorAttributes156        """157 158        self._label_selector = label_selector159 160    @property161    def name(self):162        """Gets the name of this V1ResourceAttributes.  # noqa: E501163 164        Name is the name of the resource being requested for a \"get\" or deleted for a \"delete\". \"\" (empty) means all.  # noqa: E501165 166        :return: The name of this V1ResourceAttributes.  # noqa: E501167        :rtype: str168        """169        return self._name170 171    @name.setter172    def name(self, name):173        """Sets the name of this V1ResourceAttributes.174 175        Name is the name of the resource being requested for a \"get\" or deleted for a \"delete\". \"\" (empty) means all.  # noqa: E501176 177        :param name: The name of this V1ResourceAttributes.  # noqa: E501178        :type: str179        """180 181        self._name = name182 183    @property184    def namespace(self):185        """Gets the namespace of this V1ResourceAttributes.  # noqa: E501186 187        Namespace is the namespace of the action being requested.  Currently, there is no distinction between no namespace and all namespaces \"\" (empty) is defaulted for LocalSubjectAccessReviews \"\" (empty) is empty for cluster-scoped resources \"\" (empty) means \"all\" for namespace scoped resources from a SubjectAccessReview or SelfSubjectAccessReview  # noqa: E501188 189        :return: The namespace of this V1ResourceAttributes.  # noqa: E501190        :rtype: str191        """192        return self._namespace193 194    @namespace.setter195    def namespace(self, namespace):196        """Sets the namespace of this V1ResourceAttributes.197 198        Namespace is the namespace of the action being requested.  Currently, there is no distinction between no namespace and all namespaces \"\" (empty) is defaulted for LocalSubjectAccessReviews \"\" (empty) is empty for cluster-scoped resources \"\" (empty) means \"all\" for namespace scoped resources from a SubjectAccessReview or SelfSubjectAccessReview  # noqa: E501199 200        :param namespace: The namespace of this V1ResourceAttributes.  # noqa: E501201        :type: str202        """203 204        self._namespace = namespace205 206    @property207    def resource(self):208        """Gets the resource of this V1ResourceAttributes.  # noqa: E501209 210        Resource is one of the existing resource types.  \"*\" means all.  # noqa: E501211 212        :return: The resource of this V1ResourceAttributes.  # noqa: E501213        :rtype: str214        """215        return self._resource216 217    @resource.setter218    def resource(self, resource):219        """Sets the resource of this V1ResourceAttributes.220 221        Resource is one of the existing resource types.  \"*\" means all.  # noqa: E501222 223        :param resource: The resource of this V1ResourceAttributes.  # noqa: E501224        :type: str225        """226 227        self._resource = resource228 229    @property230    def subresource(self):231        """Gets the subresource of this V1ResourceAttributes.  # noqa: E501232 233        Subresource is one of the existing resource types.  \"\" means none.  # noqa: E501234 235        :return: The subresource of this V1ResourceAttributes.  # noqa: E501236        :rtype: str237        """238        return self._subresource239 240    @subresource.setter241    def subresource(self, subresource):242        """Sets the subresource of this V1ResourceAttributes.243 244        Subresource is one of the existing resource types.  \"\" means none.  # noqa: E501245 246        :param subresource: The subresource of this V1ResourceAttributes.  # noqa: E501247        :type: str248        """249 250        self._subresource = subresource251 252    @property253    def verb(self):254        """Gets the verb of this V1ResourceAttributes.  # noqa: E501255 256        Verb is a kubernetes resource API verb, like: get, list, watch, create, update, delete, proxy.  \"*\" means all.  # noqa: E501257 258        :return: The verb of this V1ResourceAttributes.  # noqa: E501259        :rtype: str260        """261        return self._verb262 263    @verb.setter264    def verb(self, verb):265        """Sets the verb of this V1ResourceAttributes.266 267        Verb is a kubernetes resource API verb, like: get, list, watch, create, update, delete, proxy.  \"*\" means all.  # noqa: E501268 269        :param verb: The verb of this V1ResourceAttributes.  # noqa: E501270        :type: str271        """272 273        self._verb = verb274 275    @property276    def version(self):277        """Gets the version of this V1ResourceAttributes.  # noqa: E501278 279        Version is the API Version of the Resource.  \"*\" means all.  # noqa: E501280 281        :return: The version of this V1ResourceAttributes.  # noqa: E501282        :rtype: str283        """284        return self._version285 286    @version.setter287    def version(self, version):288        """Sets the version of this V1ResourceAttributes.289 290        Version is the API Version of the Resource.  \"*\" means all.  # noqa: E501291 292        :param version: The version of this V1ResourceAttributes.  # noqa: E501293        :type: str294        """295 296        self._version = version297 298    def to_dict(self):299        """Returns the model properties as a dict"""300        result = {}301 302        for attr, _ in six.iteritems(self.openapi_types):303            value = getattr(self, attr)304            if isinstance(value, list):305                result[attr] = list(map(306                    lambda x: x.to_dict() if hasattr(x, "to_dict") else x,307                    value308                ))309            elif hasattr(value, "to_dict"):310                result[attr] = value.to_dict()311            elif isinstance(value, dict):312                result[attr] = dict(map(313                    lambda item: (item[0], item[1].to_dict())314                    if hasattr(item[1], "to_dict") else item,315                    value.items()316                ))317            else:318                result[attr] = value319 320        return result321 322    def to_str(self):323        """Returns the string representation of the model"""324        return pprint.pformat(self.to_dict())325 326    def __repr__(self):327        """For `print` and `pprint`"""328        return self.to_str()329 330    def __eq__(self, other):331        """Returns true if both objects are equal"""332        if not isinstance(other, V1ResourceAttributes):333            return False334 335        return self.to_dict() == other.to_dict()336 337    def __ne__(self, other):338        """Returns true if both objects are not equal"""339        if not isinstance(other, V1ResourceAttributes):340            return True341 342        return self.to_dict() != other.to_dict()343 
codekingpro/portable-devtools · Team Ai