codekingpro/portable-devtools
114k
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 V1FlowSchemaSpec(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 'distinguisher_method': 'V1FlowDistinguisherMethod',37 'matching_precedence': 'int',38 'priority_level_configuration': 'V1PriorityLevelConfigurationReference',39 'rules': 'list[V1PolicyRulesWithSubjects]'40 }41 42 attribute_map = {43 'distinguisher_method': 'distinguisherMethod',44 'matching_precedence': 'matchingPrecedence',45 'priority_level_configuration': 'priorityLevelConfiguration',46 'rules': 'rules'47 }48 49 def __init__(self, distinguisher_method=None, matching_precedence=None, priority_level_configuration=None, rules=None, local_vars_configuration=None): # noqa: E50150 """V1FlowSchemaSpec - 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._distinguisher_method = None56 self._matching_precedence = None57 self._priority_level_configuration = None58 self._rules = None59 self.discriminator = None60 61 if distinguisher_method is not None:62 self.distinguisher_method = distinguisher_method63 if matching_precedence is not None:64 self.matching_precedence = matching_precedence65 self.priority_level_configuration = priority_level_configuration66 if rules is not None:67 self.rules = rules68 69 @property70 def distinguisher_method(self):71 """Gets the distinguisher_method of this V1FlowSchemaSpec. # noqa: E50172 73 74 :return: The distinguisher_method of this V1FlowSchemaSpec. # noqa: E50175 :rtype: V1FlowDistinguisherMethod76 """77 return self._distinguisher_method78 79 @distinguisher_method.setter80 def distinguisher_method(self, distinguisher_method):81 """Sets the distinguisher_method of this V1FlowSchemaSpec.82 83 84 :param distinguisher_method: The distinguisher_method of this V1FlowSchemaSpec. # noqa: E50185 :type: V1FlowDistinguisherMethod86 """87 88 self._distinguisher_method = distinguisher_method89 90 @property91 def matching_precedence(self):92 """Gets the matching_precedence of this V1FlowSchemaSpec. # noqa: E50193 94 `matchingPrecedence` is used to choose among the FlowSchemas that match a given request. The chosen FlowSchema is among those with the numerically lowest (which we take to be logically highest) MatchingPrecedence. Each MatchingPrecedence value must be ranged in [1,10000]. Note that if the precedence is not specified, it will be set to 1000 as default. # noqa: E50195 96 :return: The matching_precedence of this V1FlowSchemaSpec. # noqa: E50197 :rtype: int98 """99 return self._matching_precedence100 101 @matching_precedence.setter102 def matching_precedence(self, matching_precedence):103 """Sets the matching_precedence of this V1FlowSchemaSpec.104 105 `matchingPrecedence` is used to choose among the FlowSchemas that match a given request. The chosen FlowSchema is among those with the numerically lowest (which we take to be logically highest) MatchingPrecedence. Each MatchingPrecedence value must be ranged in [1,10000]. Note that if the precedence is not specified, it will be set to 1000 as default. # noqa: E501106 107 :param matching_precedence: The matching_precedence of this V1FlowSchemaSpec. # noqa: E501108 :type: int109 """110 111 self._matching_precedence = matching_precedence112 113 @property114 def priority_level_configuration(self):115 """Gets the priority_level_configuration of this V1FlowSchemaSpec. # noqa: E501116 117 118 :return: The priority_level_configuration of this V1FlowSchemaSpec. # noqa: E501119 :rtype: V1PriorityLevelConfigurationReference120 """121 return self._priority_level_configuration122 123 @priority_level_configuration.setter124 def priority_level_configuration(self, priority_level_configuration):125 """Sets the priority_level_configuration of this V1FlowSchemaSpec.126 127 128 :param priority_level_configuration: The priority_level_configuration of this V1FlowSchemaSpec. # noqa: E501129 :type: V1PriorityLevelConfigurationReference130 """131 if self.local_vars_configuration.client_side_validation and priority_level_configuration is None: # noqa: E501132 raise ValueError("Invalid value for `priority_level_configuration`, must not be `None`") # noqa: E501133 134 self._priority_level_configuration = priority_level_configuration135 136 @property137 def rules(self):138 """Gets the rules of this V1FlowSchemaSpec. # noqa: E501139 140 `rules` describes which requests will match this flow schema. This FlowSchema matches a request if and only if at least one member of rules matches the request. if it is an empty slice, there will be no requests matching the FlowSchema. # noqa: E501141 142 :return: The rules of this V1FlowSchemaSpec. # noqa: E501143 :rtype: list[V1PolicyRulesWithSubjects]144 """145 return self._rules146 147 @rules.setter148 def rules(self, rules):149 """Sets the rules of this V1FlowSchemaSpec.150 151 `rules` describes which requests will match this flow schema. This FlowSchema matches a request if and only if at least one member of rules matches the request. if it is an empty slice, there will be no requests matching the FlowSchema. # noqa: E501152 153 :param rules: The rules of this V1FlowSchemaSpec. # noqa: E501154 :type: list[V1PolicyRulesWithSubjects]155 """156 157 self._rules = rules158 159 def to_dict(self):160 """Returns the model properties as a dict"""161 result = {}162 163 for attr, _ in six.iteritems(self.openapi_types):164 value = getattr(self, attr)165 if isinstance(value, list):166 result[attr] = list(map(167 lambda x: x.to_dict() if hasattr(x, "to_dict") else x,168 value169 ))170 elif hasattr(value, "to_dict"):171 result[attr] = value.to_dict()172 elif isinstance(value, dict):173 result[attr] = dict(map(174 lambda item: (item[0], item[1].to_dict())175 if hasattr(item[1], "to_dict") else item,176 value.items()177 ))178 else:179 result[attr] = value180 181 return result182 183 def to_str(self):184 """Returns the string representation of the model"""185 return pprint.pformat(self.to_dict())186 187 def __repr__(self):188 """For `print` and `pprint`"""189 return self.to_str()190 191 def __eq__(self, other):192 """Returns true if both objects are equal"""193 if not isinstance(other, V1FlowSchemaSpec):194 return False195 196 return self.to_dict() == other.to_dict()197 198 def __ne__(self, other):199 """Returns true if both objects are not equal"""200 if not isinstance(other, V1FlowSchemaSpec):201 return True202 203 return self.to_dict() != other.to_dict()204 