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 V1beta1Mutation(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 'apply_configuration': 'V1beta1ApplyConfiguration',37 'json_patch': 'V1beta1JSONPatch',38 'patch_type': 'str'39 }40 41 attribute_map = {42 'apply_configuration': 'applyConfiguration',43 'json_patch': 'jsonPatch',44 'patch_type': 'patchType'45 }46 47 def __init__(self, apply_configuration=None, json_patch=None, patch_type=None, local_vars_configuration=None): # noqa: E50148 """V1beta1Mutation - 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._apply_configuration = None54 self._json_patch = None55 self._patch_type = None56 self.discriminator = None57 58 if apply_configuration is not None:59 self.apply_configuration = apply_configuration60 if json_patch is not None:61 self.json_patch = json_patch62 self.patch_type = patch_type63 64 @property65 def apply_configuration(self):66 """Gets the apply_configuration of this V1beta1Mutation. # noqa: E50167 68 69 :return: The apply_configuration of this V1beta1Mutation. # noqa: E50170 :rtype: V1beta1ApplyConfiguration71 """72 return self._apply_configuration73 74 @apply_configuration.setter75 def apply_configuration(self, apply_configuration):76 """Sets the apply_configuration of this V1beta1Mutation.77 78 79 :param apply_configuration: The apply_configuration of this V1beta1Mutation. # noqa: E50180 :type: V1beta1ApplyConfiguration81 """82 83 self._apply_configuration = apply_configuration84 85 @property86 def json_patch(self):87 """Gets the json_patch of this V1beta1Mutation. # noqa: E50188 89 90 :return: The json_patch of this V1beta1Mutation. # noqa: E50191 :rtype: V1beta1JSONPatch92 """93 return self._json_patch94 95 @json_patch.setter96 def json_patch(self, json_patch):97 """Sets the json_patch of this V1beta1Mutation.98 99 100 :param json_patch: The json_patch of this V1beta1Mutation. # noqa: E501101 :type: V1beta1JSONPatch102 """103 104 self._json_patch = json_patch105 106 @property107 def patch_type(self):108 """Gets the patch_type of this V1beta1Mutation. # noqa: E501109 110 patchType indicates the patch strategy used. Allowed values are \"ApplyConfiguration\" and \"JSONPatch\". Required. # noqa: E501111 112 :return: The patch_type of this V1beta1Mutation. # noqa: E501113 :rtype: str114 """115 return self._patch_type116 117 @patch_type.setter118 def patch_type(self, patch_type):119 """Sets the patch_type of this V1beta1Mutation.120 121 patchType indicates the patch strategy used. Allowed values are \"ApplyConfiguration\" and \"JSONPatch\". Required. # noqa: E501122 123 :param patch_type: The patch_type of this V1beta1Mutation. # noqa: E501124 :type: str125 """126 if self.local_vars_configuration.client_side_validation and patch_type is None: # noqa: E501127 raise ValueError("Invalid value for `patch_type`, must not be `None`") # noqa: E501128 129 self._patch_type = patch_type130 131 def to_dict(self):132 """Returns the model properties as a dict"""133 result = {}134 135 for attr, _ in six.iteritems(self.openapi_types):136 value = getattr(self, attr)137 if isinstance(value, list):138 result[attr] = list(map(139 lambda x: x.to_dict() if hasattr(x, "to_dict") else x,140 value141 ))142 elif hasattr(value, "to_dict"):143 result[attr] = value.to_dict()144 elif isinstance(value, dict):145 result[attr] = dict(map(146 lambda item: (item[0], item[1].to_dict())147 if hasattr(item[1], "to_dict") else item,148 value.items()149 ))150 else:151 result[attr] = value152 153 return result154 155 def to_str(self):156 """Returns the string representation of the model"""157 return pprint.pformat(self.to_dict())158 159 def __repr__(self):160 """For `print` and `pprint`"""161 return self.to_str()162 163 def __eq__(self, other):164 """Returns true if both objects are equal"""165 if not isinstance(other, V1beta1Mutation):166 return False167 168 return self.to_dict() == other.to_dict()169 170 def __ne__(self, other):171 """Returns true if both objects are not equal"""172 if not isinstance(other, V1beta1Mutation):173 return True174 175 return self.to_dict() != other.to_dict()176 