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 V1ParamRef(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 'name': 'str',37 'namespace': 'str',38 'parameter_not_found_action': 'str',39 'selector': 'V1LabelSelector'40 }41 42 attribute_map = {43 'name': 'name',44 'namespace': 'namespace',45 'parameter_not_found_action': 'parameterNotFoundAction',46 'selector': 'selector'47 }48 49 def __init__(self, name=None, namespace=None, parameter_not_found_action=None, selector=None, local_vars_configuration=None): # noqa: E50150 """V1ParamRef - 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._name = None56 self._namespace = None57 self._parameter_not_found_action = None58 self._selector = None59 self.discriminator = None60 61 if name is not None:62 self.name = name63 if namespace is not None:64 self.namespace = namespace65 if parameter_not_found_action is not None:66 self.parameter_not_found_action = parameter_not_found_action67 if selector is not None:68 self.selector = selector69 70 @property71 def name(self):72 """Gets the name of this V1ParamRef. # noqa: E50173 74 name is the name of the resource being referenced. One of `name` or `selector` must be set, but `name` and `selector` are mutually exclusive properties. If one is set, the other must be unset. A single parameter used for all admission requests can be configured by setting the `name` field, leaving `selector` blank, and setting namespace if `paramKind` is namespace-scoped. # noqa: E50175 76 :return: The name of this V1ParamRef. # noqa: E50177 :rtype: str78 """79 return self._name80 81 @name.setter82 def name(self, name):83 """Sets the name of this V1ParamRef.84 85 name is the name of the resource being referenced. One of `name` or `selector` must be set, but `name` and `selector` are mutually exclusive properties. If one is set, the other must be unset. A single parameter used for all admission requests can be configured by setting the `name` field, leaving `selector` blank, and setting namespace if `paramKind` is namespace-scoped. # noqa: E50186 87 :param name: The name of this V1ParamRef. # noqa: E50188 :type: str89 """90 91 self._name = name92 93 @property94 def namespace(self):95 """Gets the namespace of this V1ParamRef. # noqa: E50196 97 namespace is the namespace of the referenced resource. Allows limiting the search for params to a specific namespace. Applies to both `name` and `selector` fields. A per-namespace parameter may be used by specifying a namespace-scoped `paramKind` in the policy and leaving this field empty. - If `paramKind` is cluster-scoped, this field MUST be unset. Setting this field results in a configuration error. - If `paramKind` is namespace-scoped, the namespace of the object being evaluated for admission will be used when this field is left unset. Take care that if this is left empty the binding must not match any cluster-scoped resources, which will result in an error. # noqa: E50198 99 :return: The namespace of this V1ParamRef. # noqa: E501100 :rtype: str101 """102 return self._namespace103 104 @namespace.setter105 def namespace(self, namespace):106 """Sets the namespace of this V1ParamRef.107 108 namespace is the namespace of the referenced resource. Allows limiting the search for params to a specific namespace. Applies to both `name` and `selector` fields. A per-namespace parameter may be used by specifying a namespace-scoped `paramKind` in the policy and leaving this field empty. - If `paramKind` is cluster-scoped, this field MUST be unset. Setting this field results in a configuration error. - If `paramKind` is namespace-scoped, the namespace of the object being evaluated for admission will be used when this field is left unset. Take care that if this is left empty the binding must not match any cluster-scoped resources, which will result in an error. # noqa: E501109 110 :param namespace: The namespace of this V1ParamRef. # noqa: E501111 :type: str112 """113 114 self._namespace = namespace115 116 @property117 def parameter_not_found_action(self):118 """Gets the parameter_not_found_action of this V1ParamRef. # noqa: E501119 120 `parameterNotFoundAction` controls the behavior of the binding when the resource exists, and name or selector is valid, but there are no parameters matched by the binding. If the value is set to `Allow`, then no matched parameters will be treated as successful validation by the binding. If set to `Deny`, then no matched parameters will be subject to the `failurePolicy` of the policy. Allowed values are `Allow` or `Deny` Required # noqa: E501121 122 :return: The parameter_not_found_action of this V1ParamRef. # noqa: E501123 :rtype: str124 """125 return self._parameter_not_found_action126 127 @parameter_not_found_action.setter128 def parameter_not_found_action(self, parameter_not_found_action):129 """Sets the parameter_not_found_action of this V1ParamRef.130 131 `parameterNotFoundAction` controls the behavior of the binding when the resource exists, and name or selector is valid, but there are no parameters matched by the binding. If the value is set to `Allow`, then no matched parameters will be treated as successful validation by the binding. If set to `Deny`, then no matched parameters will be subject to the `failurePolicy` of the policy. Allowed values are `Allow` or `Deny` Required # noqa: E501132 133 :param parameter_not_found_action: The parameter_not_found_action of this V1ParamRef. # noqa: E501134 :type: str135 """136 137 self._parameter_not_found_action = parameter_not_found_action138 139 @property140 def selector(self):141 """Gets the selector of this V1ParamRef. # noqa: E501142 143 144 :return: The selector of this V1ParamRef. # noqa: E501145 :rtype: V1LabelSelector146 """147 return self._selector148 149 @selector.setter150 def selector(self, selector):151 """Sets the selector of this V1ParamRef.152 153 154 :param selector: The selector of this V1ParamRef. # noqa: E501155 :type: V1LabelSelector156 """157 158 self._selector = selector159 160 def to_dict(self):161 """Returns the model properties as a dict"""162 result = {}163 164 for attr, _ in six.iteritems(self.openapi_types):165 value = getattr(self, attr)166 if isinstance(value, list):167 result[attr] = list(map(168 lambda x: x.to_dict() if hasattr(x, "to_dict") else x,169 value170 ))171 elif hasattr(value, "to_dict"):172 result[attr] = value.to_dict()173 elif isinstance(value, dict):174 result[attr] = dict(map(175 lambda item: (item[0], item[1].to_dict())176 if hasattr(item[1], "to_dict") else item,177 value.items()178 ))179 else:180 result[attr] = value181 182 return result183 184 def to_str(self):185 """Returns the string representation of the model"""186 return pprint.pformat(self.to_dict())187 188 def __repr__(self):189 """For `print` and `pprint`"""190 return self.to_str()191 192 def __eq__(self, other):193 """Returns true if both objects are equal"""194 if not isinstance(other, V1ParamRef):195 return False196 197 return self.to_dict() == other.to_dict()198 199 def __ne__(self, other):200 """Returns true if both objects are not equal"""201 if not isinstance(other, V1ParamRef):202 return True203 204 return self.to_dict() != other.to_dict()205 