|
| 1 | +# coding: utf-8 |
| 2 | + |
| 3 | +""" |
| 4 | + Stitch Connect |
| 5 | +
|
| 6 | + https://www.stitchdata.com/docs/developers/stitch-connect/api # noqa: E501 |
| 7 | +
|
| 8 | + The version of the OpenAPI document: 0.1 |
| 9 | + Generated by: https://openapi-generator.tech |
| 10 | +""" |
| 11 | + |
| 12 | + |
| 13 | +import pprint |
| 14 | +import re # noqa: F401 |
| 15 | + |
| 16 | +import six |
| 17 | + |
| 18 | +from stitch_connect_client.configuration import Configuration |
| 19 | + |
| 20 | + |
| 21 | +class StreamUpdate(object): |
| 22 | + """NOTE: This class is auto generated by OpenAPI Generator. |
| 23 | + Ref: https://openapi-generator.tech |
| 24 | +
|
| 25 | + Do not edit the class manually. |
| 26 | + """ |
| 27 | + |
| 28 | + """ |
| 29 | + Attributes: |
| 30 | + openapi_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 | + openapi_types = { |
| 36 | + 'stream_id': 'int', |
| 37 | + 'selected': 'bool', |
| 38 | + 'stream_name': 'str', |
| 39 | + 'tap_stream_id': 'str', |
| 40 | + 'metadata': 'list[StreamLevelMetadata]' |
| 41 | + } |
| 42 | + |
| 43 | + attribute_map = { |
| 44 | + 'stream_id': 'stream_id', |
| 45 | + 'selected': 'selected', |
| 46 | + 'stream_name': 'stream_name', |
| 47 | + 'tap_stream_id': 'tap_stream_id', |
| 48 | + 'metadata': 'metadata' |
| 49 | + } |
| 50 | + |
| 51 | + def __init__(self, stream_id=None, selected=None, stream_name=None, tap_stream_id=None, metadata=None, local_vars_configuration=None): # noqa: E501 |
| 52 | + """StreamUpdate - a model defined in OpenAPI""" # noqa: E501 |
| 53 | + if local_vars_configuration is None: |
| 54 | + local_vars_configuration = Configuration() |
| 55 | + self.local_vars_configuration = local_vars_configuration |
| 56 | + |
| 57 | + self._stream_id = None |
| 58 | + self._selected = None |
| 59 | + self._stream_name = None |
| 60 | + self._tap_stream_id = None |
| 61 | + self._metadata = None |
| 62 | + self.discriminator = None |
| 63 | + |
| 64 | + if stream_id is not None: |
| 65 | + self.stream_id = stream_id |
| 66 | + if selected is not None: |
| 67 | + self.selected = selected |
| 68 | + if stream_name is not None: |
| 69 | + self.stream_name = stream_name |
| 70 | + if tap_stream_id is not None: |
| 71 | + self.tap_stream_id = tap_stream_id |
| 72 | + if metadata is not None: |
| 73 | + self.metadata = metadata |
| 74 | + |
| 75 | + @property |
| 76 | + def stream_id(self): |
| 77 | + """Gets the stream_id of this StreamUpdate. # noqa: E501 |
| 78 | +
|
| 79 | + The stream ID. # noqa: E501 |
| 80 | +
|
| 81 | + :return: The stream_id of this StreamUpdate. # noqa: E501 |
| 82 | + :rtype: int |
| 83 | + """ |
| 84 | + return self._stream_id |
| 85 | + |
| 86 | + @stream_id.setter |
| 87 | + def stream_id(self, stream_id): |
| 88 | + """Sets the stream_id of this StreamUpdate. |
| 89 | +
|
| 90 | + The stream ID. # noqa: E501 |
| 91 | +
|
| 92 | + :param stream_id: The stream_id of this StreamUpdate. # noqa: E501 |
| 93 | + :type: int |
| 94 | + """ |
| 95 | + |
| 96 | + self._stream_id = stream_id |
| 97 | + |
| 98 | + @property |
| 99 | + def selected(self): |
| 100 | + """Gets the selected of this StreamUpdate. # noqa: E501 |
| 101 | +
|
| 102 | + Indicates if the stream is selected for replication. Possible values are: null - Only present if a stream has never been selected. Otherwise, this value will be true if selected, and false if de-selected. true - The stream is selected and data will be replicated for all selected fields false - The stream is not selected and data for this stream will not be replicated # noqa: E501 |
| 103 | +
|
| 104 | + :return: The selected of this StreamUpdate. # noqa: E501 |
| 105 | + :rtype: bool |
| 106 | + """ |
| 107 | + return self._selected |
| 108 | + |
| 109 | + @selected.setter |
| 110 | + def selected(self, selected): |
| 111 | + """Sets the selected of this StreamUpdate. |
| 112 | +
|
| 113 | + Indicates if the stream is selected for replication. Possible values are: null - Only present if a stream has never been selected. Otherwise, this value will be true if selected, and false if de-selected. true - The stream is selected and data will be replicated for all selected fields false - The stream is not selected and data for this stream will not be replicated # noqa: E501 |
| 114 | +
|
| 115 | + :param selected: The selected of this StreamUpdate. # noqa: E501 |
| 116 | + :type: bool |
| 117 | + """ |
| 118 | + |
| 119 | + self._selected = selected |
| 120 | + |
| 121 | + @property |
| 122 | + def stream_name(self): |
| 123 | + """Gets the stream_name of this StreamUpdate. # noqa: E501 |
| 124 | +
|
| 125 | + The name of the stream. This value may not be unique. For example: A database with multiple schemas can have the same stream name in multiple schemas. # noqa: E501 |
| 126 | +
|
| 127 | + :return: The stream_name of this StreamUpdate. # noqa: E501 |
| 128 | + :rtype: str |
| 129 | + """ |
| 130 | + return self._stream_name |
| 131 | + |
| 132 | + @stream_name.setter |
| 133 | + def stream_name(self, stream_name): |
| 134 | + """Sets the stream_name of this StreamUpdate. |
| 135 | +
|
| 136 | + The name of the stream. This value may not be unique. For example: A database with multiple schemas can have the same stream name in multiple schemas. # noqa: E501 |
| 137 | +
|
| 138 | + :param stream_name: The stream_name of this StreamUpdate. # noqa: E501 |
| 139 | + :type: str |
| 140 | + """ |
| 141 | + |
| 142 | + self._stream_name = stream_name |
| 143 | + |
| 144 | + @property |
| 145 | + def tap_stream_id(self): |
| 146 | + """Gets the tap_stream_id of this StreamUpdate. # noqa: E501 |
| 147 | +
|
| 148 | + The unique version of the stream name. For database sources, this value will be the database name, schema name, and table name, combined. # noqa: E501 |
| 149 | +
|
| 150 | + :return: The tap_stream_id of this StreamUpdate. # noqa: E501 |
| 151 | + :rtype: str |
| 152 | + """ |
| 153 | + return self._tap_stream_id |
| 154 | + |
| 155 | + @tap_stream_id.setter |
| 156 | + def tap_stream_id(self, tap_stream_id): |
| 157 | + """Sets the tap_stream_id of this StreamUpdate. |
| 158 | +
|
| 159 | + The unique version of the stream name. For database sources, this value will be the database name, schema name, and table name, combined. # noqa: E501 |
| 160 | +
|
| 161 | + :param tap_stream_id: The tap_stream_id of this StreamUpdate. # noqa: E501 |
| 162 | + :type: str |
| 163 | + """ |
| 164 | + |
| 165 | + self._tap_stream_id = tap_stream_id |
| 166 | + |
| 167 | + @property |
| 168 | + def metadata(self): |
| 169 | + """Gets the metadata of this StreamUpdate. # noqa: E501 |
| 170 | +
|
| 171 | +
|
| 172 | + :return: The metadata of this StreamUpdate. # noqa: E501 |
| 173 | + :rtype: list[StreamLevelMetadata] |
| 174 | + """ |
| 175 | + return self._metadata |
| 176 | + |
| 177 | + @metadata.setter |
| 178 | + def metadata(self, metadata): |
| 179 | + """Sets the metadata of this StreamUpdate. |
| 180 | +
|
| 181 | +
|
| 182 | + :param metadata: The metadata of this StreamUpdate. # noqa: E501 |
| 183 | + :type: list[StreamLevelMetadata] |
| 184 | + """ |
| 185 | + |
| 186 | + self._metadata = metadata |
| 187 | + |
| 188 | + def to_dict(self): |
| 189 | + """Returns the model properties as a dict""" |
| 190 | + result = {} |
| 191 | + |
| 192 | + for attr, _ in six.iteritems(self.openapi_types): |
| 193 | + value = getattr(self, attr) |
| 194 | + if isinstance(value, list): |
| 195 | + result[attr] = list(map( |
| 196 | + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, |
| 197 | + value |
| 198 | + )) |
| 199 | + elif hasattr(value, "to_dict"): |
| 200 | + result[attr] = value.to_dict() |
| 201 | + elif isinstance(value, dict): |
| 202 | + result[attr] = dict(map( |
| 203 | + lambda item: (item[0], item[1].to_dict()) |
| 204 | + if hasattr(item[1], "to_dict") else item, |
| 205 | + value.items() |
| 206 | + )) |
| 207 | + else: |
| 208 | + result[attr] = value |
| 209 | + |
| 210 | + return result |
| 211 | + |
| 212 | + def to_str(self): |
| 213 | + """Returns the string representation of the model""" |
| 214 | + return pprint.pformat(self.to_dict()) |
| 215 | + |
| 216 | + def __repr__(self): |
| 217 | + """For `print` and `pprint`""" |
| 218 | + return self.to_str() |
| 219 | + |
| 220 | + def __eq__(self, other): |
| 221 | + """Returns true if both objects are equal""" |
| 222 | + if not isinstance(other, StreamUpdate): |
| 223 | + return False |
| 224 | + |
| 225 | + return self.to_dict() == other.to_dict() |
| 226 | + |
| 227 | + def __ne__(self, other): |
| 228 | + """Returns true if both objects are not equal""" |
| 229 | + if not isinstance(other, StreamUpdate): |
| 230 | + return True |
| 231 | + |
| 232 | + return self.to_dict() != other.to_dict() |
0 commit comments