Team Ai
Datasetpublic

codekingpro/portable-devtools

sourceHugging Faceupdated 5mo agoView on Hugging Face
1likes14kdownloads
v1_queuing_configuration.py179 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 V1QueuingConfiguration(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        'hand_size': 'int',37        'queue_length_limit': 'int',38        'queues': 'int'39    }40 41    attribute_map = {42        'hand_size': 'handSize',43        'queue_length_limit': 'queueLengthLimit',44        'queues': 'queues'45    }46 47    def __init__(self, hand_size=None, queue_length_limit=None, queues=None, local_vars_configuration=None):  # noqa: E50148        """V1QueuingConfiguration - a model defined in OpenAPI"""  # noqa: E50149        if local_vars_configuration is None:50            local_vars_configuration = Configuration()51        self.local_vars_configuration = local_vars_configuration52 53        self._hand_size = None54        self._queue_length_limit = None55        self._queues = None56        self.discriminator = None57 58        if hand_size is not None:59            self.hand_size = hand_size60        if queue_length_limit is not None:61            self.queue_length_limit = queue_length_limit62        if queues is not None:63            self.queues = queues64 65    @property66    def hand_size(self):67        """Gets the hand_size of this V1QueuingConfiguration.  # noqa: E50168 69        `handSize` is a small positive number that configures the shuffle sharding of requests into queues.  When enqueuing a request at this priority level the request's flow identifier (a string pair) is hashed and the hash value is used to shuffle the list of queues and deal a hand of the size specified here.  The request is put into one of the shortest queues in that hand. `handSize` must be no larger than `queues`, and should be significantly smaller (so that a few heavy flows do not saturate most of the queues).  See the user-facing documentation for more extensive guidance on setting this field.  This field has a default value of 8.  # noqa: E50170 71        :return: The hand_size of this V1QueuingConfiguration.  # noqa: E50172        :rtype: int73        """74        return self._hand_size75 76    @hand_size.setter77    def hand_size(self, hand_size):78        """Sets the hand_size of this V1QueuingConfiguration.79 80        `handSize` is a small positive number that configures the shuffle sharding of requests into queues.  When enqueuing a request at this priority level the request's flow identifier (a string pair) is hashed and the hash value is used to shuffle the list of queues and deal a hand of the size specified here.  The request is put into one of the shortest queues in that hand. `handSize` must be no larger than `queues`, and should be significantly smaller (so that a few heavy flows do not saturate most of the queues).  See the user-facing documentation for more extensive guidance on setting this field.  This field has a default value of 8.  # noqa: E50181 82        :param hand_size: The hand_size of this V1QueuingConfiguration.  # noqa: E50183        :type: int84        """85 86        self._hand_size = hand_size87 88    @property89    def queue_length_limit(self):90        """Gets the queue_length_limit of this V1QueuingConfiguration.  # noqa: E50191 92        `queueLengthLimit` is the maximum number of requests allowed to be waiting in a given queue of this priority level at a time; excess requests are rejected.  This value must be positive.  If not specified, it will be defaulted to 50.  # noqa: E50193 94        :return: The queue_length_limit of this V1QueuingConfiguration.  # noqa: E50195        :rtype: int96        """97        return self._queue_length_limit98 99    @queue_length_limit.setter100    def queue_length_limit(self, queue_length_limit):101        """Sets the queue_length_limit of this V1QueuingConfiguration.102 103        `queueLengthLimit` is the maximum number of requests allowed to be waiting in a given queue of this priority level at a time; excess requests are rejected.  This value must be positive.  If not specified, it will be defaulted to 50.  # noqa: E501104 105        :param queue_length_limit: The queue_length_limit of this V1QueuingConfiguration.  # noqa: E501106        :type: int107        """108 109        self._queue_length_limit = queue_length_limit110 111    @property112    def queues(self):113        """Gets the queues of this V1QueuingConfiguration.  # noqa: E501114 115        `queues` is the number of queues for this priority level. The queues exist independently at each apiserver. The value must be positive.  Setting it to 1 effectively precludes shufflesharding and thus makes the distinguisher method of associated flow schemas irrelevant.  This field has a default value of 64.  # noqa: E501116 117        :return: The queues of this V1QueuingConfiguration.  # noqa: E501118        :rtype: int119        """120        return self._queues121 122    @queues.setter123    def queues(self, queues):124        """Sets the queues of this V1QueuingConfiguration.125 126        `queues` is the number of queues for this priority level. The queues exist independently at each apiserver. The value must be positive.  Setting it to 1 effectively precludes shufflesharding and thus makes the distinguisher method of associated flow schemas irrelevant.  This field has a default value of 64.  # noqa: E501127 128        :param queues: The queues of this V1QueuingConfiguration.  # noqa: E501129        :type: int130        """131 132        self._queues = queues133 134    def to_dict(self):135        """Returns the model properties as a dict"""136        result = {}137 138        for attr, _ in six.iteritems(self.openapi_types):139            value = getattr(self, attr)140            if isinstance(value, list):141                result[attr] = list(map(142                    lambda x: x.to_dict() if hasattr(x, "to_dict") else x,143                    value144                ))145            elif hasattr(value, "to_dict"):146                result[attr] = value.to_dict()147            elif isinstance(value, dict):148                result[attr] = dict(map(149                    lambda item: (item[0], item[1].to_dict())150                    if hasattr(item[1], "to_dict") else item,151                    value.items()152                ))153            else:154                result[attr] = value155 156        return result157 158    def to_str(self):159        """Returns the string representation of the model"""160        return pprint.pformat(self.to_dict())161 162    def __repr__(self):163        """For `print` and `pprint`"""164        return self.to_str()165 166    def __eq__(self, other):167        """Returns true if both objects are equal"""168        if not isinstance(other, V1QueuingConfiguration):169            return False170 171        return self.to_dict() == other.to_dict()172 173    def __ne__(self, other):174        """Returns true if both objects are not equal"""175        if not isinstance(other, V1QueuingConfiguration):176            return True177 178        return self.to_dict() != other.to_dict()179 
codekingpro/portable-devtools · Team Ai