|
| 1 | +# coding: utf-8 |
| 2 | + |
| 3 | +""" |
| 4 | + vke |
| 5 | +
|
| 6 | + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 |
| 7 | +
|
| 8 | + OpenAPI spec version: common-version |
| 9 | + |
| 10 | + Generated by: https://github.com/swagger-api/swagger-codegen.git |
| 11 | +""" |
| 12 | + |
| 13 | + |
| 14 | +import pprint |
| 15 | +import re # noqa: F401 |
| 16 | + |
| 17 | +import six |
| 18 | + |
| 19 | +from volcenginesdkcore.configuration import Configuration |
| 20 | + |
| 21 | + |
| 22 | +class ClusterConnectorConfigRequestForUpdateClusterConfigInput(object): |
| 23 | + """NOTE: This class is auto generated by the swagger code generator program. |
| 24 | +
|
| 25 | + Do not edit the class manually. |
| 26 | + """ |
| 27 | + |
| 28 | + """ |
| 29 | + Attributes: |
| 30 | + swagger_types (dict): The key is attribute name |
| 31 | + and the value is attribute type. |
| 32 | + attribute_map (dict): The key is attribute name |
| 33 | + and the value is json key in definition. |
| 34 | + """ |
| 35 | + swagger_types = { |
| 36 | + 'provider': 'str', |
| 37 | + 'proxy_config': 'ProxyConfigForUpdateClusterConfigInput', |
| 38 | + 'target_kube_config': 'str', |
| 39 | + 'type': 'str' |
| 40 | + } |
| 41 | + |
| 42 | + attribute_map = { |
| 43 | + 'provider': 'Provider', |
| 44 | + 'proxy_config': 'ProxyConfig', |
| 45 | + 'target_kube_config': 'TargetKubeConfig', |
| 46 | + 'type': 'Type' |
| 47 | + } |
| 48 | + |
| 49 | + def __init__(self, provider=None, proxy_config=None, target_kube_config=None, type=None, _configuration=None): # noqa: E501 |
| 50 | + """ClusterConnectorConfigRequestForUpdateClusterConfigInput - a model defined in Swagger""" # noqa: E501 |
| 51 | + if _configuration is None: |
| 52 | + _configuration = Configuration() |
| 53 | + self._configuration = _configuration |
| 54 | + |
| 55 | + self._provider = None |
| 56 | + self._proxy_config = None |
| 57 | + self._target_kube_config = None |
| 58 | + self._type = None |
| 59 | + self.discriminator = None |
| 60 | + |
| 61 | + if provider is not None: |
| 62 | + self.provider = provider |
| 63 | + if proxy_config is not None: |
| 64 | + self.proxy_config = proxy_config |
| 65 | + if target_kube_config is not None: |
| 66 | + self.target_kube_config = target_kube_config |
| 67 | + if type is not None: |
| 68 | + self.type = type |
| 69 | + |
| 70 | + @property |
| 71 | + def provider(self): |
| 72 | + """Gets the provider of this ClusterConnectorConfigRequestForUpdateClusterConfigInput. # noqa: E501 |
| 73 | +
|
| 74 | +
|
| 75 | + :return: The provider of this ClusterConnectorConfigRequestForUpdateClusterConfigInput. # noqa: E501 |
| 76 | + :rtype: str |
| 77 | + """ |
| 78 | + return self._provider |
| 79 | + |
| 80 | + @provider.setter |
| 81 | + def provider(self, provider): |
| 82 | + """Sets the provider of this ClusterConnectorConfigRequestForUpdateClusterConfigInput. |
| 83 | +
|
| 84 | +
|
| 85 | + :param provider: The provider of this ClusterConnectorConfigRequestForUpdateClusterConfigInput. # noqa: E501 |
| 86 | + :type: str |
| 87 | + """ |
| 88 | + allowed_values = ["Ack", "Tke", "Cce", "Gke", "Eks", "BaiduCce", "None"] # noqa: E501 |
| 89 | + if (self._configuration.client_side_validation and |
| 90 | + provider not in allowed_values): |
| 91 | + raise ValueError( |
| 92 | + "Invalid value for `provider` ({0}), must be one of {1}" # noqa: E501 |
| 93 | + .format(provider, allowed_values) |
| 94 | + ) |
| 95 | + |
| 96 | + self._provider = provider |
| 97 | + |
| 98 | + @property |
| 99 | + def proxy_config(self): |
| 100 | + """Gets the proxy_config of this ClusterConnectorConfigRequestForUpdateClusterConfigInput. # noqa: E501 |
| 101 | +
|
| 102 | +
|
| 103 | + :return: The proxy_config of this ClusterConnectorConfigRequestForUpdateClusterConfigInput. # noqa: E501 |
| 104 | + :rtype: ProxyConfigForUpdateClusterConfigInput |
| 105 | + """ |
| 106 | + return self._proxy_config |
| 107 | + |
| 108 | + @proxy_config.setter |
| 109 | + def proxy_config(self, proxy_config): |
| 110 | + """Sets the proxy_config of this ClusterConnectorConfigRequestForUpdateClusterConfigInput. |
| 111 | +
|
| 112 | +
|
| 113 | + :param proxy_config: The proxy_config of this ClusterConnectorConfigRequestForUpdateClusterConfigInput. # noqa: E501 |
| 114 | + :type: ProxyConfigForUpdateClusterConfigInput |
| 115 | + """ |
| 116 | + |
| 117 | + self._proxy_config = proxy_config |
| 118 | + |
| 119 | + @property |
| 120 | + def target_kube_config(self): |
| 121 | + """Gets the target_kube_config of this ClusterConnectorConfigRequestForUpdateClusterConfigInput. # noqa: E501 |
| 122 | +
|
| 123 | +
|
| 124 | + :return: The target_kube_config of this ClusterConnectorConfigRequestForUpdateClusterConfigInput. # noqa: E501 |
| 125 | + :rtype: str |
| 126 | + """ |
| 127 | + return self._target_kube_config |
| 128 | + |
| 129 | + @target_kube_config.setter |
| 130 | + def target_kube_config(self, target_kube_config): |
| 131 | + """Sets the target_kube_config of this ClusterConnectorConfigRequestForUpdateClusterConfigInput. |
| 132 | +
|
| 133 | +
|
| 134 | + :param target_kube_config: The target_kube_config of this ClusterConnectorConfigRequestForUpdateClusterConfigInput. # noqa: E501 |
| 135 | + :type: str |
| 136 | + """ |
| 137 | + |
| 138 | + self._target_kube_config = target_kube_config |
| 139 | + |
| 140 | + @property |
| 141 | + def type(self): |
| 142 | + """Gets the type of this ClusterConnectorConfigRequestForUpdateClusterConfigInput. # noqa: E501 |
| 143 | +
|
| 144 | +
|
| 145 | + :return: The type of this ClusterConnectorConfigRequestForUpdateClusterConfigInput. # noqa: E501 |
| 146 | + :rtype: str |
| 147 | + """ |
| 148 | + return self._type |
| 149 | + |
| 150 | + @type.setter |
| 151 | + def type(self, type): |
| 152 | + """Sets the type of this ClusterConnectorConfigRequestForUpdateClusterConfigInput. |
| 153 | +
|
| 154 | +
|
| 155 | + :param type: The type of this ClusterConnectorConfigRequestForUpdateClusterConfigInput. # noqa: E501 |
| 156 | + :type: str |
| 157 | + """ |
| 158 | + allowed_values = ["Direct", "Proxy"] # noqa: E501 |
| 159 | + if (self._configuration.client_side_validation and |
| 160 | + type not in allowed_values): |
| 161 | + raise ValueError( |
| 162 | + "Invalid value for `type` ({0}), must be one of {1}" # noqa: E501 |
| 163 | + .format(type, allowed_values) |
| 164 | + ) |
| 165 | + |
| 166 | + self._type = type |
| 167 | + |
| 168 | + def to_dict(self): |
| 169 | + """Returns the model properties as a dict""" |
| 170 | + result = {} |
| 171 | + |
| 172 | + for attr, _ in six.iteritems(self.swagger_types): |
| 173 | + value = getattr(self, attr) |
| 174 | + if isinstance(value, list): |
| 175 | + result[attr] = list(map( |
| 176 | + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, |
| 177 | + value |
| 178 | + )) |
| 179 | + elif hasattr(value, "to_dict"): |
| 180 | + result[attr] = value.to_dict() |
| 181 | + elif isinstance(value, dict): |
| 182 | + result[attr] = dict(map( |
| 183 | + lambda item: (item[0], item[1].to_dict()) |
| 184 | + if hasattr(item[1], "to_dict") else item, |
| 185 | + value.items() |
| 186 | + )) |
| 187 | + else: |
| 188 | + result[attr] = value |
| 189 | + if issubclass(ClusterConnectorConfigRequestForUpdateClusterConfigInput, dict): |
| 190 | + for key, value in self.items(): |
| 191 | + result[key] = value |
| 192 | + |
| 193 | + return result |
| 194 | + |
| 195 | + def to_str(self): |
| 196 | + """Returns the string representation of the model""" |
| 197 | + return pprint.pformat(self.to_dict()) |
| 198 | + |
| 199 | + def __repr__(self): |
| 200 | + """For `print` and `pprint`""" |
| 201 | + return self.to_str() |
| 202 | + |
| 203 | + def __eq__(self, other): |
| 204 | + """Returns true if both objects are equal""" |
| 205 | + if not isinstance(other, ClusterConnectorConfigRequestForUpdateClusterConfigInput): |
| 206 | + return False |
| 207 | + |
| 208 | + return self.to_dict() == other.to_dict() |
| 209 | + |
| 210 | + def __ne__(self, other): |
| 211 | + """Returns true if both objects are not equal""" |
| 212 | + if not isinstance(other, ClusterConnectorConfigRequestForUpdateClusterConfigInput): |
| 213 | + return True |
| 214 | + |
| 215 | + return self.to_dict() != other.to_dict() |
0 commit comments