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 V1EnvVarSource(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 'config_map_key_ref': 'V1ConfigMapKeySelector',37 'field_ref': 'V1ObjectFieldSelector',38 'file_key_ref': 'V1FileKeySelector',39 'resource_field_ref': 'V1ResourceFieldSelector',40 'secret_key_ref': 'V1SecretKeySelector'41 }42 43 attribute_map = {44 'config_map_key_ref': 'configMapKeyRef',45 'field_ref': 'fieldRef',46 'file_key_ref': 'fileKeyRef',47 'resource_field_ref': 'resourceFieldRef',48 'secret_key_ref': 'secretKeyRef'49 }50 51 def __init__(self, config_map_key_ref=None, field_ref=None, file_key_ref=None, resource_field_ref=None, secret_key_ref=None, local_vars_configuration=None): # noqa: E50152 """V1EnvVarSource - 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._config_map_key_ref = None58 self._field_ref = None59 self._file_key_ref = None60 self._resource_field_ref = None61 self._secret_key_ref = None62 self.discriminator = None63 64 if config_map_key_ref is not None:65 self.config_map_key_ref = config_map_key_ref66 if field_ref is not None:67 self.field_ref = field_ref68 if file_key_ref is not None:69 self.file_key_ref = file_key_ref70 if resource_field_ref is not None:71 self.resource_field_ref = resource_field_ref72 if secret_key_ref is not None:73 self.secret_key_ref = secret_key_ref74 75 @property76 def config_map_key_ref(self):77 """Gets the config_map_key_ref of this V1EnvVarSource. # noqa: E50178 79 80 :return: The config_map_key_ref of this V1EnvVarSource. # noqa: E50181 :rtype: V1ConfigMapKeySelector82 """83 return self._config_map_key_ref84 85 @config_map_key_ref.setter86 def config_map_key_ref(self, config_map_key_ref):87 """Sets the config_map_key_ref of this V1EnvVarSource.88 89 90 :param config_map_key_ref: The config_map_key_ref of this V1EnvVarSource. # noqa: E50191 :type: V1ConfigMapKeySelector92 """93 94 self._config_map_key_ref = config_map_key_ref95 96 @property97 def field_ref(self):98 """Gets the field_ref of this V1EnvVarSource. # noqa: E50199 100 101 :return: The field_ref of this V1EnvVarSource. # noqa: E501102 :rtype: V1ObjectFieldSelector103 """104 return self._field_ref105 106 @field_ref.setter107 def field_ref(self, field_ref):108 """Sets the field_ref of this V1EnvVarSource.109 110 111 :param field_ref: The field_ref of this V1EnvVarSource. # noqa: E501112 :type: V1ObjectFieldSelector113 """114 115 self._field_ref = field_ref116 117 @property118 def file_key_ref(self):119 """Gets the file_key_ref of this V1EnvVarSource. # noqa: E501120 121 122 :return: The file_key_ref of this V1EnvVarSource. # noqa: E501123 :rtype: V1FileKeySelector124 """125 return self._file_key_ref126 127 @file_key_ref.setter128 def file_key_ref(self, file_key_ref):129 """Sets the file_key_ref of this V1EnvVarSource.130 131 132 :param file_key_ref: The file_key_ref of this V1EnvVarSource. # noqa: E501133 :type: V1FileKeySelector134 """135 136 self._file_key_ref = file_key_ref137 138 @property139 def resource_field_ref(self):140 """Gets the resource_field_ref of this V1EnvVarSource. # noqa: E501141 142 143 :return: The resource_field_ref of this V1EnvVarSource. # noqa: E501144 :rtype: V1ResourceFieldSelector145 """146 return self._resource_field_ref147 148 @resource_field_ref.setter149 def resource_field_ref(self, resource_field_ref):150 """Sets the resource_field_ref of this V1EnvVarSource.151 152 153 :param resource_field_ref: The resource_field_ref of this V1EnvVarSource. # noqa: E501154 :type: V1ResourceFieldSelector155 """156 157 self._resource_field_ref = resource_field_ref158 159 @property160 def secret_key_ref(self):161 """Gets the secret_key_ref of this V1EnvVarSource. # noqa: E501162 163 164 :return: The secret_key_ref of this V1EnvVarSource. # noqa: E501165 :rtype: V1SecretKeySelector166 """167 return self._secret_key_ref168 169 @secret_key_ref.setter170 def secret_key_ref(self, secret_key_ref):171 """Sets the secret_key_ref of this V1EnvVarSource.172 173 174 :param secret_key_ref: The secret_key_ref of this V1EnvVarSource. # noqa: E501175 :type: V1SecretKeySelector176 """177 178 self._secret_key_ref = secret_key_ref179 180 def to_dict(self):181 """Returns the model properties as a dict"""182 result = {}183 184 for attr, _ in six.iteritems(self.openapi_types):185 value = getattr(self, attr)186 if isinstance(value, list):187 result[attr] = list(map(188 lambda x: x.to_dict() if hasattr(x, "to_dict") else x,189 value190 ))191 elif hasattr(value, "to_dict"):192 result[attr] = value.to_dict()193 elif isinstance(value, dict):194 result[attr] = dict(map(195 lambda item: (item[0], item[1].to_dict())196 if hasattr(item[1], "to_dict") else item,197 value.items()198 ))199 else:200 result[attr] = value201 202 return result203 204 def to_str(self):205 """Returns the string representation of the model"""206 return pprint.pformat(self.to_dict())207 208 def __repr__(self):209 """For `print` and `pprint`"""210 return self.to_str()211 212 def __eq__(self, other):213 """Returns true if both objects are equal"""214 if not isinstance(other, V1EnvVarSource):215 return False216 217 return self.to_dict() == other.to_dict()218 219 def __ne__(self, other):220 """Returns true if both objects are not equal"""221 if not isinstance(other, V1EnvVarSource):222 return True223 224 return self.to_dict() != other.to_dict()225 