Team Ai
Datasetpublic

codekingpro/portable-devtools

sourceHugging Faceupdated 5mo agoView on Hugging Face
1likes14kdownloads
v1_runtime_class.py258 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 V1RuntimeClass(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        'handler': 'str',38        'kind': 'str',39        'metadata': 'V1ObjectMeta',40        'overhead': 'V1Overhead',41        'scheduling': 'V1Scheduling'42    }43 44    attribute_map = {45        'api_version': 'apiVersion',46        'handler': 'handler',47        'kind': 'kind',48        'metadata': 'metadata',49        'overhead': 'overhead',50        'scheduling': 'scheduling'51    }52 53    def __init__(self, api_version=None, handler=None, kind=None, metadata=None, overhead=None, scheduling=None, local_vars_configuration=None):  # noqa: E50154        """V1RuntimeClass - 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._handler = None61        self._kind = None62        self._metadata = None63        self._overhead = None64        self._scheduling = None65        self.discriminator = None66 67        if api_version is not None:68            self.api_version = api_version69        self.handler = handler70        if kind is not None:71            self.kind = kind72        if metadata is not None:73            self.metadata = metadata74        if overhead is not None:75            self.overhead = overhead76        if scheduling is not None:77            self.scheduling = scheduling78 79    @property80    def api_version(self):81        """Gets the api_version of this V1RuntimeClass.  # noqa: E50182 83        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: E50184 85        :return: The api_version of this V1RuntimeClass.  # noqa: E50186        :rtype: str87        """88        return self._api_version89 90    @api_version.setter91    def api_version(self, api_version):92        """Sets the api_version of this V1RuntimeClass.93 94        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: E50195 96        :param api_version: The api_version of this V1RuntimeClass.  # noqa: E50197        :type: str98        """99 100        self._api_version = api_version101 102    @property103    def handler(self):104        """Gets the handler of this V1RuntimeClass.  # noqa: E501105 106        handler specifies the underlying runtime and configuration that the CRI implementation will use to handle pods of this class. The possible values are specific to the node & CRI configuration.  It is assumed that all handlers are available on every node, and handlers of the same name are equivalent on every node. For example, a handler called \"runc\" might specify that the runc OCI runtime (using native Linux containers) will be used to run the containers in a pod. The Handler must be lowercase, conform to the DNS Label (RFC 1123) requirements, and is immutable.  # noqa: E501107 108        :return: The handler of this V1RuntimeClass.  # noqa: E501109        :rtype: str110        """111        return self._handler112 113    @handler.setter114    def handler(self, handler):115        """Sets the handler of this V1RuntimeClass.116 117        handler specifies the underlying runtime and configuration that the CRI implementation will use to handle pods of this class. The possible values are specific to the node & CRI configuration.  It is assumed that all handlers are available on every node, and handlers of the same name are equivalent on every node. For example, a handler called \"runc\" might specify that the runc OCI runtime (using native Linux containers) will be used to run the containers in a pod. The Handler must be lowercase, conform to the DNS Label (RFC 1123) requirements, and is immutable.  # noqa: E501118 119        :param handler: The handler of this V1RuntimeClass.  # noqa: E501120        :type: str121        """122        if self.local_vars_configuration.client_side_validation and handler is None:  # noqa: E501123            raise ValueError("Invalid value for `handler`, must not be `None`")  # noqa: E501124 125        self._handler = handler126 127    @property128    def kind(self):129        """Gets the kind of this V1RuntimeClass.  # noqa: E501130 131        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: E501132 133        :return: The kind of this V1RuntimeClass.  # noqa: E501134        :rtype: str135        """136        return self._kind137 138    @kind.setter139    def kind(self, kind):140        """Sets the kind of this V1RuntimeClass.141 142        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: E501143 144        :param kind: The kind of this V1RuntimeClass.  # noqa: E501145        :type: str146        """147 148        self._kind = kind149 150    @property151    def metadata(self):152        """Gets the metadata of this V1RuntimeClass.  # noqa: E501153 154 155        :return: The metadata of this V1RuntimeClass.  # noqa: E501156        :rtype: V1ObjectMeta157        """158        return self._metadata159 160    @metadata.setter161    def metadata(self, metadata):162        """Sets the metadata of this V1RuntimeClass.163 164 165        :param metadata: The metadata of this V1RuntimeClass.  # noqa: E501166        :type: V1ObjectMeta167        """168 169        self._metadata = metadata170 171    @property172    def overhead(self):173        """Gets the overhead of this V1RuntimeClass.  # noqa: E501174 175 176        :return: The overhead of this V1RuntimeClass.  # noqa: E501177        :rtype: V1Overhead178        """179        return self._overhead180 181    @overhead.setter182    def overhead(self, overhead):183        """Sets the overhead of this V1RuntimeClass.184 185 186        :param overhead: The overhead of this V1RuntimeClass.  # noqa: E501187        :type: V1Overhead188        """189 190        self._overhead = overhead191 192    @property193    def scheduling(self):194        """Gets the scheduling of this V1RuntimeClass.  # noqa: E501195 196 197        :return: The scheduling of this V1RuntimeClass.  # noqa: E501198        :rtype: V1Scheduling199        """200        return self._scheduling201 202    @scheduling.setter203    def scheduling(self, scheduling):204        """Sets the scheduling of this V1RuntimeClass.205 206 207        :param scheduling: The scheduling of this V1RuntimeClass.  # noqa: E501208        :type: V1Scheduling209        """210 211        self._scheduling = scheduling212 213    def to_dict(self):214        """Returns the model properties as a dict"""215        result = {}216 217        for attr, _ in six.iteritems(self.openapi_types):218            value = getattr(self, attr)219            if isinstance(value, list):220                result[attr] = list(map(221                    lambda x: x.to_dict() if hasattr(x, "to_dict") else x,222                    value223                ))224            elif hasattr(value, "to_dict"):225                result[attr] = value.to_dict()226            elif isinstance(value, dict):227                result[attr] = dict(map(228                    lambda item: (item[0], item[1].to_dict())229                    if hasattr(item[1], "to_dict") else item,230                    value.items()231                ))232            else:233                result[attr] = value234 235        return result236 237    def to_str(self):238        """Returns the string representation of the model"""239        return pprint.pformat(self.to_dict())240 241    def __repr__(self):242        """For `print` and `pprint`"""243        return self.to_str()244 245    def __eq__(self, other):246        """Returns true if both objects are equal"""247        if not isinstance(other, V1RuntimeClass):248            return False249 250        return self.to_dict() == other.to_dict()251 252    def __ne__(self, other):253        """Returns true if both objects are not equal"""254        if not isinstance(other, V1RuntimeClass):255            return True256 257        return self.to_dict() != other.to_dict()258 
codekingpro/portable-devtools · Team Ai