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 V1Sysctl(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 'value': 'str'38 }39 40 attribute_map = {41 'name': 'name',42 'value': 'value'43 }44 45 def __init__(self, name=None, value=None, local_vars_configuration=None): # noqa: E50146 """V1Sysctl - a model defined in OpenAPI""" # noqa: E50147 if local_vars_configuration is None:48 local_vars_configuration = Configuration()49 self.local_vars_configuration = local_vars_configuration50 51 self._name = None52 self._value = None53 self.discriminator = None54 55 self.name = name56 self.value = value57 58 @property59 def name(self):60 """Gets the name of this V1Sysctl. # noqa: E50161 62 Name of a property to set # noqa: E50163 64 :return: The name of this V1Sysctl. # noqa: E50165 :rtype: str66 """67 return self._name68 69 @name.setter70 def name(self, name):71 """Sets the name of this V1Sysctl.72 73 Name of a property to set # noqa: E50174 75 :param name: The name of this V1Sysctl. # noqa: E50176 :type: str77 """78 if self.local_vars_configuration.client_side_validation and name is None: # noqa: E50179 raise ValueError("Invalid value for `name`, must not be `None`") # noqa: E50180 81 self._name = name82 83 @property84 def value(self):85 """Gets the value of this V1Sysctl. # noqa: E50186 87 Value of a property to set # noqa: E50188 89 :return: The value of this V1Sysctl. # noqa: E50190 :rtype: str91 """92 return self._value93 94 @value.setter95 def value(self, value):96 """Sets the value of this V1Sysctl.97 98 Value of a property to set # noqa: E50199 100 :param value: The value of this V1Sysctl. # noqa: E501101 :type: str102 """103 if self.local_vars_configuration.client_side_validation and value is None: # noqa: E501104 raise ValueError("Invalid value for `value`, must not be `None`") # noqa: E501105 106 self._value = value107 108 def to_dict(self):109 """Returns the model properties as a dict"""110 result = {}111 112 for attr, _ in six.iteritems(self.openapi_types):113 value = getattr(self, attr)114 if isinstance(value, list):115 result[attr] = list(map(116 lambda x: x.to_dict() if hasattr(x, "to_dict") else x,117 value118 ))119 elif hasattr(value, "to_dict"):120 result[attr] = value.to_dict()121 elif isinstance(value, dict):122 result[attr] = dict(map(123 lambda item: (item[0], item[1].to_dict())124 if hasattr(item[1], "to_dict") else item,125 value.items()126 ))127 else:128 result[attr] = value129 130 return result131 132 def to_str(self):133 """Returns the string representation of the model"""134 return pprint.pformat(self.to_dict())135 136 def __repr__(self):137 """For `print` and `pprint`"""138 return self.to_str()139 140 def __eq__(self, other):141 """Returns true if both objects are equal"""142 if not isinstance(other, V1Sysctl):143 return False144 145 return self.to_dict() == other.to_dict()146 147 def __ne__(self, other):148 """Returns true if both objects are not equal"""149 if not isinstance(other, V1Sysctl):150 return True151 152 return self.to_dict() != other.to_dict()153 