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 V1RuleWithOperations(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_groups': 'list[str]',37 'api_versions': 'list[str]',38 'operations': 'list[str]',39 'resources': 'list[str]',40 'scope': 'str'41 }42 43 attribute_map = {44 'api_groups': 'apiGroups',45 'api_versions': 'apiVersions',46 'operations': 'operations',47 'resources': 'resources',48 'scope': 'scope'49 }50 51 def __init__(self, api_groups=None, api_versions=None, operations=None, resources=None, scope=None, local_vars_configuration=None): # noqa: E50152 """V1RuleWithOperations - a model defined in OpenAPI""" # noqa: E50153 if local_vars_configuration is None:54 local_vars_configuration = Configuration()55 self.local_vars_configuration = local_vars_configuration56 57 self._api_groups = None58 self._api_versions = None59 self._operations = None60 self._resources = None61 self._scope = None62 self.discriminator = None63 64 if api_groups is not None:65 self.api_groups = api_groups66 if api_versions is not None:67 self.api_versions = api_versions68 if operations is not None:69 self.operations = operations70 if resources is not None:71 self.resources = resources72 if scope is not None:73 self.scope = scope74 75 @property76 def api_groups(self):77 """Gets the api_groups of this V1RuleWithOperations. # noqa: E50178 79 APIGroups is the API groups the resources belong to. '*' is all groups. If '*' is present, the length of the slice must be one. Required. # noqa: E50180 81 :return: The api_groups of this V1RuleWithOperations. # noqa: E50182 :rtype: list[str]83 """84 return self._api_groups85 86 @api_groups.setter87 def api_groups(self, api_groups):88 """Sets the api_groups of this V1RuleWithOperations.89 90 APIGroups is the API groups the resources belong to. '*' is all groups. If '*' is present, the length of the slice must be one. Required. # noqa: E50191 92 :param api_groups: The api_groups of this V1RuleWithOperations. # noqa: E50193 :type: list[str]94 """95 96 self._api_groups = api_groups97 98 @property99 def api_versions(self):100 """Gets the api_versions of this V1RuleWithOperations. # noqa: E501101 102 APIVersions is the API versions the resources belong to. '*' is all versions. If '*' is present, the length of the slice must be one. Required. # noqa: E501103 104 :return: The api_versions of this V1RuleWithOperations. # noqa: E501105 :rtype: list[str]106 """107 return self._api_versions108 109 @api_versions.setter110 def api_versions(self, api_versions):111 """Sets the api_versions of this V1RuleWithOperations.112 113 APIVersions is the API versions the resources belong to. '*' is all versions. If '*' is present, the length of the slice must be one. Required. # noqa: E501114 115 :param api_versions: The api_versions of this V1RuleWithOperations. # noqa: E501116 :type: list[str]117 """118 119 self._api_versions = api_versions120 121 @property122 def operations(self):123 """Gets the operations of this V1RuleWithOperations. # noqa: E501124 125 Operations is the operations the admission hook cares about - CREATE, UPDATE, DELETE, CONNECT or * for all of those operations and any future admission operations that are added. If '*' is present, the length of the slice must be one. Required. # noqa: E501126 127 :return: The operations of this V1RuleWithOperations. # noqa: E501128 :rtype: list[str]129 """130 return self._operations131 132 @operations.setter133 def operations(self, operations):134 """Sets the operations of this V1RuleWithOperations.135 136 Operations is the operations the admission hook cares about - CREATE, UPDATE, DELETE, CONNECT or * for all of those operations and any future admission operations that are added. If '*' is present, the length of the slice must be one. Required. # noqa: E501137 138 :param operations: The operations of this V1RuleWithOperations. # noqa: E501139 :type: list[str]140 """141 142 self._operations = operations143 144 @property145 def resources(self):146 """Gets the resources of this V1RuleWithOperations. # noqa: E501147 148 Resources is a list of resources this rule applies to. For example: 'pods' means pods. 'pods/log' means the log subresource of pods. '*' means all resources, but not subresources. 'pods/*' means all subresources of pods. '*/scale' means all scale subresources. '*/*' means all resources and their subresources. If wildcard is present, the validation rule will ensure resources do not overlap with each other. Depending on the enclosing object, subresources might not be allowed. Required. # noqa: E501149 150 :return: The resources of this V1RuleWithOperations. # noqa: E501151 :rtype: list[str]152 """153 return self._resources154 155 @resources.setter156 def resources(self, resources):157 """Sets the resources of this V1RuleWithOperations.158 159 Resources is a list of resources this rule applies to. For example: 'pods' means pods. 'pods/log' means the log subresource of pods. '*' means all resources, but not subresources. 'pods/*' means all subresources of pods. '*/scale' means all scale subresources. '*/*' means all resources and their subresources. If wildcard is present, the validation rule will ensure resources do not overlap with each other. Depending on the enclosing object, subresources might not be allowed. Required. # noqa: E501160 161 :param resources: The resources of this V1RuleWithOperations. # noqa: E501162 :type: list[str]163 """164 165 self._resources = resources166 167 @property168 def scope(self):169 """Gets the scope of this V1RuleWithOperations. # noqa: E501170 171 scope specifies the scope of this rule. Valid values are \"Cluster\", \"Namespaced\", and \"*\" \"Cluster\" means that only cluster-scoped resources will match this rule. Namespace API objects are cluster-scoped. \"Namespaced\" means that only namespaced resources will match this rule. \"*\" means that there are no scope restrictions. Subresources match the scope of their parent resource. Default is \"*\". # noqa: E501172 173 :return: The scope of this V1RuleWithOperations. # noqa: E501174 :rtype: str175 """176 return self._scope177 178 @scope.setter179 def scope(self, scope):180 """Sets the scope of this V1RuleWithOperations.181 182 scope specifies the scope of this rule. Valid values are \"Cluster\", \"Namespaced\", and \"*\" \"Cluster\" means that only cluster-scoped resources will match this rule. Namespace API objects are cluster-scoped. \"Namespaced\" means that only namespaced resources will match this rule. \"*\" means that there are no scope restrictions. Subresources match the scope of their parent resource. Default is \"*\". # noqa: E501183 184 :param scope: The scope of this V1RuleWithOperations. # noqa: E501185 :type: str186 """187 188 self._scope = scope189 190 def to_dict(self):191 """Returns the model properties as a dict"""192 result = {}193 194 for attr, _ in six.iteritems(self.openapi_types):195 value = getattr(self, attr)196 if isinstance(value, list):197 result[attr] = list(map(198 lambda x: x.to_dict() if hasattr(x, "to_dict") else x,199 value200 ))201 elif hasattr(value, "to_dict"):202 result[attr] = value.to_dict()203 elif isinstance(value, dict):204 result[attr] = dict(map(205 lambda item: (item[0], item[1].to_dict())206 if hasattr(item[1], "to_dict") else item,207 value.items()208 ))209 else:210 result[attr] = value211 212 return result213 214 def to_str(self):215 """Returns the string representation of the model"""216 return pprint.pformat(self.to_dict())217 218 def __repr__(self):219 """For `print` and `pprint`"""220 return self.to_str()221 222 def __eq__(self, other):223 """Returns true if both objects are equal"""224 if not isinstance(other, V1RuleWithOperations):225 return False226 227 return self.to_dict() == other.to_dict()228 229 def __ne__(self, other):230 """Returns true if both objects are not equal"""231 if not isinstance(other, V1RuleWithOperations):232 return True233 234 return self.to_dict() != other.to_dict()235 