|
| 1 | +# coding: utf-8 |
| 2 | + |
| 3 | +""" |
| 4 | + flink20250101 |
| 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 RestartGWSApplicationRequest(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 | + 'id': 'str', |
| 37 | + 'savepoint_id': 'str', |
| 38 | + 'type': 'str' |
| 39 | + } |
| 40 | + |
| 41 | + attribute_map = { |
| 42 | + 'id': 'Id', |
| 43 | + 'savepoint_id': 'SavepointId', |
| 44 | + 'type': 'Type' |
| 45 | + } |
| 46 | + |
| 47 | + def __init__(self, id=None, savepoint_id=None, type=None, _configuration=None): # noqa: E501 |
| 48 | + """RestartGWSApplicationRequest - a model defined in Swagger""" # noqa: E501 |
| 49 | + if _configuration is None: |
| 50 | + _configuration = Configuration() |
| 51 | + self._configuration = _configuration |
| 52 | + |
| 53 | + self._id = None |
| 54 | + self._savepoint_id = None |
| 55 | + self._type = None |
| 56 | + self.discriminator = None |
| 57 | + |
| 58 | + self.id = id |
| 59 | + if savepoint_id is not None: |
| 60 | + self.savepoint_id = savepoint_id |
| 61 | + self.type = type |
| 62 | + |
| 63 | + @property |
| 64 | + def id(self): |
| 65 | + """Gets the id of this RestartGWSApplicationRequest. # noqa: E501 |
| 66 | +
|
| 67 | +
|
| 68 | + :return: The id of this RestartGWSApplicationRequest. # noqa: E501 |
| 69 | + :rtype: str |
| 70 | + """ |
| 71 | + return self._id |
| 72 | + |
| 73 | + @id.setter |
| 74 | + def id(self, id): |
| 75 | + """Sets the id of this RestartGWSApplicationRequest. |
| 76 | +
|
| 77 | +
|
| 78 | + :param id: The id of this RestartGWSApplicationRequest. # noqa: E501 |
| 79 | + :type: str |
| 80 | + """ |
| 81 | + if self._configuration.client_side_validation and id is None: |
| 82 | + raise ValueError("Invalid value for `id`, must not be `None`") # noqa: E501 |
| 83 | + |
| 84 | + self._id = id |
| 85 | + |
| 86 | + @property |
| 87 | + def savepoint_id(self): |
| 88 | + """Gets the savepoint_id of this RestartGWSApplicationRequest. # noqa: E501 |
| 89 | +
|
| 90 | +
|
| 91 | + :return: The savepoint_id of this RestartGWSApplicationRequest. # noqa: E501 |
| 92 | + :rtype: str |
| 93 | + """ |
| 94 | + return self._savepoint_id |
| 95 | + |
| 96 | + @savepoint_id.setter |
| 97 | + def savepoint_id(self, savepoint_id): |
| 98 | + """Sets the savepoint_id of this RestartGWSApplicationRequest. |
| 99 | +
|
| 100 | +
|
| 101 | + :param savepoint_id: The savepoint_id of this RestartGWSApplicationRequest. # noqa: E501 |
| 102 | + :type: str |
| 103 | + """ |
| 104 | + |
| 105 | + self._savepoint_id = savepoint_id |
| 106 | + |
| 107 | + @property |
| 108 | + def type(self): |
| 109 | + """Gets the type of this RestartGWSApplicationRequest. # noqa: E501 |
| 110 | +
|
| 111 | +
|
| 112 | + :return: The type of this RestartGWSApplicationRequest. # noqa: E501 |
| 113 | + :rtype: str |
| 114 | + """ |
| 115 | + return self._type |
| 116 | + |
| 117 | + @type.setter |
| 118 | + def type(self, type): |
| 119 | + """Sets the type of this RestartGWSApplicationRequest. |
| 120 | +
|
| 121 | +
|
| 122 | + :param type: The type of this RestartGWSApplicationRequest. # noqa: E501 |
| 123 | + :type: str |
| 124 | + """ |
| 125 | + if self._configuration.client_side_validation and type is None: |
| 126 | + raise ValueError("Invalid value for `type`, must not be `None`") # noqa: E501 |
| 127 | + allowed_values = ["FROM_NEW", "FROM_LATEST", "FROM_SAVEPOINT"] # noqa: E501 |
| 128 | + if (self._configuration.client_side_validation and |
| 129 | + type not in allowed_values): |
| 130 | + raise ValueError( |
| 131 | + "Invalid value for `type` ({0}), must be one of {1}" # noqa: E501 |
| 132 | + .format(type, allowed_values) |
| 133 | + ) |
| 134 | + |
| 135 | + self._type = type |
| 136 | + |
| 137 | + def to_dict(self): |
| 138 | + """Returns the model properties as a dict""" |
| 139 | + result = {} |
| 140 | + |
| 141 | + for attr, _ in six.iteritems(self.swagger_types): |
| 142 | + value = getattr(self, attr) |
| 143 | + if isinstance(value, list): |
| 144 | + result[attr] = list(map( |
| 145 | + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, |
| 146 | + value |
| 147 | + )) |
| 148 | + elif hasattr(value, "to_dict"): |
| 149 | + result[attr] = value.to_dict() |
| 150 | + elif isinstance(value, dict): |
| 151 | + result[attr] = dict(map( |
| 152 | + lambda item: (item[0], item[1].to_dict()) |
| 153 | + if hasattr(item[1], "to_dict") else item, |
| 154 | + value.items() |
| 155 | + )) |
| 156 | + else: |
| 157 | + result[attr] = value |
| 158 | + if issubclass(RestartGWSApplicationRequest, dict): |
| 159 | + for key, value in self.items(): |
| 160 | + result[key] = value |
| 161 | + |
| 162 | + return result |
| 163 | + |
| 164 | + def to_str(self): |
| 165 | + """Returns the string representation of the model""" |
| 166 | + return pprint.pformat(self.to_dict()) |
| 167 | + |
| 168 | + def __repr__(self): |
| 169 | + """For `print` and `pprint`""" |
| 170 | + return self.to_str() |
| 171 | + |
| 172 | + def __eq__(self, other): |
| 173 | + """Returns true if both objects are equal""" |
| 174 | + if not isinstance(other, RestartGWSApplicationRequest): |
| 175 | + return False |
| 176 | + |
| 177 | + return self.to_dict() == other.to_dict() |
| 178 | + |
| 179 | + def __ne__(self, other): |
| 180 | + """Returns true if both objects are not equal""" |
| 181 | + if not isinstance(other, RestartGWSApplicationRequest): |
| 182 | + return True |
| 183 | + |
| 184 | + return self.to_dict() != other.to_dict() |
0 commit comments