|
| 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 ForcedReplicationMethodObject(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 | + 'reason': 'str', |
| 37 | + 'replication_method': 'str' |
| 38 | + } |
| 39 | + |
| 40 | + attribute_map = { |
| 41 | + 'reason': 'reason', |
| 42 | + 'replication_method': 'replication-method' |
| 43 | + } |
| 44 | + |
| 45 | + def __init__(self, reason=None, replication_method=None, local_vars_configuration=None): # noqa: E501 |
| 46 | + """ForcedReplicationMethodObject - a model defined in OpenAPI""" # noqa: E501 |
| 47 | + if local_vars_configuration is None: |
| 48 | + local_vars_configuration = Configuration() |
| 49 | + self.local_vars_configuration = local_vars_configuration |
| 50 | + |
| 51 | + self._reason = None |
| 52 | + self._replication_method = None |
| 53 | + self.discriminator = None |
| 54 | + |
| 55 | + if reason is not None: |
| 56 | + self.reason = reason |
| 57 | + if replication_method is not None: |
| 58 | + self.replication_method = replication_method |
| 59 | + |
| 60 | + @property |
| 61 | + def reason(self): |
| 62 | + """Gets the reason of this ForcedReplicationMethodObject. # noqa: E501 |
| 63 | +
|
| 64 | + The reason for the forced Replication Method # noqa: E501 |
| 65 | +
|
| 66 | + :return: The reason of this ForcedReplicationMethodObject. # noqa: E501 |
| 67 | + :rtype: str |
| 68 | + """ |
| 69 | + return self._reason |
| 70 | + |
| 71 | + @reason.setter |
| 72 | + def reason(self, reason): |
| 73 | + """Sets the reason of this ForcedReplicationMethodObject. |
| 74 | +
|
| 75 | + The reason for the forced Replication Method # noqa: E501 |
| 76 | +
|
| 77 | + :param reason: The reason of this ForcedReplicationMethodObject. # noqa: E501 |
| 78 | + :type: str |
| 79 | + """ |
| 80 | + |
| 81 | + self._reason = reason |
| 82 | + |
| 83 | + @property |
| 84 | + def replication_method(self): |
| 85 | + """Gets the replication_method of this ForcedReplicationMethodObject. # noqa: E501 |
| 86 | +
|
| 87 | + Indicates which Replication Method is required for the stream. Possible values are: FULL_TABLE - The stream is using Full Table Replication INCREMENTAL - The stream is using Key-based Incremental Replication LOG_BASED - The stream is using Log-based Incremental Replication. # noqa: E501 |
| 88 | +
|
| 89 | + :return: The replication_method of this ForcedReplicationMethodObject. # noqa: E501 |
| 90 | + :rtype: str |
| 91 | + """ |
| 92 | + return self._replication_method |
| 93 | + |
| 94 | + @replication_method.setter |
| 95 | + def replication_method(self, replication_method): |
| 96 | + """Sets the replication_method of this ForcedReplicationMethodObject. |
| 97 | +
|
| 98 | + Indicates which Replication Method is required for the stream. Possible values are: FULL_TABLE - The stream is using Full Table Replication INCREMENTAL - The stream is using Key-based Incremental Replication LOG_BASED - The stream is using Log-based Incremental Replication. # noqa: E501 |
| 99 | +
|
| 100 | + :param replication_method: The replication_method of this ForcedReplicationMethodObject. # noqa: E501 |
| 101 | + :type: str |
| 102 | + """ |
| 103 | + allowed_values = ["FULL_TABLE", "INCREMENTAL", "LOG_BASED"] # noqa: E501 |
| 104 | + if self.local_vars_configuration.client_side_validation and replication_method not in allowed_values: # noqa: E501 |
| 105 | + raise ValueError( |
| 106 | + "Invalid value for `replication_method` ({0}), must be one of {1}" # noqa: E501 |
| 107 | + .format(replication_method, allowed_values) |
| 108 | + ) |
| 109 | + |
| 110 | + self._replication_method = replication_method |
| 111 | + |
| 112 | + def to_dict(self): |
| 113 | + """Returns the model properties as a dict""" |
| 114 | + result = {} |
| 115 | + |
| 116 | + for attr, _ in six.iteritems(self.openapi_types): |
| 117 | + value = getattr(self, attr) |
| 118 | + if isinstance(value, list): |
| 119 | + result[attr] = list(map( |
| 120 | + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, |
| 121 | + value |
| 122 | + )) |
| 123 | + elif hasattr(value, "to_dict"): |
| 124 | + result[attr] = value.to_dict() |
| 125 | + elif isinstance(value, dict): |
| 126 | + result[attr] = dict(map( |
| 127 | + lambda item: (item[0], item[1].to_dict()) |
| 128 | + if hasattr(item[1], "to_dict") else item, |
| 129 | + value.items() |
| 130 | + )) |
| 131 | + else: |
| 132 | + result[attr] = value |
| 133 | + |
| 134 | + return result |
| 135 | + |
| 136 | + def to_str(self): |
| 137 | + """Returns the string representation of the model""" |
| 138 | + return pprint.pformat(self.to_dict()) |
| 139 | + |
| 140 | + def __repr__(self): |
| 141 | + """For `print` and `pprint`""" |
| 142 | + return self.to_str() |
| 143 | + |
| 144 | + def __eq__(self, other): |
| 145 | + """Returns true if both objects are equal""" |
| 146 | + if not isinstance(other, ForcedReplicationMethodObject): |
| 147 | + return False |
| 148 | + |
| 149 | + return self.to_dict() == other.to_dict() |
| 150 | + |
| 151 | + def __ne__(self, other): |
| 152 | + """Returns true if both objects are not equal""" |
| 153 | + if not isinstance(other, ForcedReplicationMethodObject): |
| 154 | + return True |
| 155 | + |
| 156 | + return self.to_dict() != other.to_dict() |
0 commit comments