|
| 1 | +/* |
| 2 | + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except |
| 3 | + * in compliance with the License. You may obtain a copy of the License at |
| 4 | + * |
| 5 | + * http://www.apache.org/licenses/LICENSE-2.0 |
| 6 | + * |
| 7 | + * Unless required by applicable law or agreed to in writing, software distributed under the License |
| 8 | + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express |
| 9 | + * or implied. See the License for the specific language governing permissions and limitations under |
| 10 | + * the License. |
| 11 | + */ |
| 12 | +/* |
| 13 | + * This code was generated by https://github.com/googleapis/google-api-java-client-services/ |
| 14 | + * Modify at your own risk. |
| 15 | + */ |
| 16 | + |
| 17 | +package com.google.api.services.bigqueryreservation.v1.model; |
| 18 | + |
| 19 | +/** |
| 20 | + * Disaster Recovery(DR) replication status of the reservation. |
| 21 | + * |
| 22 | + * <p> This is the Java data model class that specifies how to parse/serialize into the JSON that is |
| 23 | + * transmitted over HTTP when working with the BigQuery Reservation API. For a detailed explanation |
| 24 | + * see: |
| 25 | + * <a href="https://developers.google.com/api-client-library/java/google-http-java-client/json">https://developers.google.com/api-client-library/java/google-http-java-client/json</a> |
| 26 | + * </p> |
| 27 | + * |
| 28 | + * @author Google, Inc. |
| 29 | + */ |
| 30 | +@SuppressWarnings("javadoc") |
| 31 | +public final class ReplicationStatus extends com.google.api.client.json.GenericJson { |
| 32 | + |
| 33 | + /** |
| 34 | + * Output only. The last error encountered while trying to replicate changes from the primary to |
| 35 | + * the secondary. This field is only available if the replication has not succeeded since. |
| 36 | + * The value may be {@code null}. |
| 37 | + */ |
| 38 | + @com.google.api.client.util.Key |
| 39 | + private Status error; |
| 40 | + |
| 41 | + /** |
| 42 | + * Output only. The time at which the last error was encountered while trying to replicate changes |
| 43 | + * from the primary to the secondary. This field is only available if the replication has not |
| 44 | + * succeeded since. |
| 45 | + * The value may be {@code null}. |
| 46 | + */ |
| 47 | + @com.google.api.client.util.Key |
| 48 | + private String lastErrorTime; |
| 49 | + |
| 50 | + /** |
| 51 | + * Output only. A timestamp corresponding to the last change on the primary that was successfully |
| 52 | + * replicated to the secondary. |
| 53 | + * The value may be {@code null}. |
| 54 | + */ |
| 55 | + @com.google.api.client.util.Key |
| 56 | + private String lastReplicationTime; |
| 57 | + |
| 58 | + /** |
| 59 | + * Output only. The time at which a soft failover for the reservation and its associated datasets |
| 60 | + * was initiated. After this field is set, all subsequent changes to the reservation will be |
| 61 | + * rejected unless a hard failover overrides this operation. This field will be cleared once the |
| 62 | + * failover is complete. |
| 63 | + * The value may be {@code null}. |
| 64 | + */ |
| 65 | + @com.google.api.client.util.Key |
| 66 | + private String softFailoverStartTime; |
| 67 | + |
| 68 | + /** |
| 69 | + * Output only. The last error encountered while trying to replicate changes from the primary to |
| 70 | + * the secondary. This field is only available if the replication has not succeeded since. |
| 71 | + * @return value or {@code null} for none |
| 72 | + */ |
| 73 | + public Status getError() { |
| 74 | + return error; |
| 75 | + } |
| 76 | + |
| 77 | + /** |
| 78 | + * Output only. The last error encountered while trying to replicate changes from the primary to |
| 79 | + * the secondary. This field is only available if the replication has not succeeded since. |
| 80 | + * @param error error or {@code null} for none |
| 81 | + */ |
| 82 | + public ReplicationStatus setError(Status error) { |
| 83 | + this.error = error; |
| 84 | + return this; |
| 85 | + } |
| 86 | + |
| 87 | + /** |
| 88 | + * Output only. The time at which the last error was encountered while trying to replicate changes |
| 89 | + * from the primary to the secondary. This field is only available if the replication has not |
| 90 | + * succeeded since. |
| 91 | + * @return value or {@code null} for none |
| 92 | + */ |
| 93 | + public String getLastErrorTime() { |
| 94 | + return lastErrorTime; |
| 95 | + } |
| 96 | + |
| 97 | + /** |
| 98 | + * Output only. The time at which the last error was encountered while trying to replicate changes |
| 99 | + * from the primary to the secondary. This field is only available if the replication has not |
| 100 | + * succeeded since. |
| 101 | + * @param lastErrorTime lastErrorTime or {@code null} for none |
| 102 | + */ |
| 103 | + public ReplicationStatus setLastErrorTime(String lastErrorTime) { |
| 104 | + this.lastErrorTime = lastErrorTime; |
| 105 | + return this; |
| 106 | + } |
| 107 | + |
| 108 | + /** |
| 109 | + * Output only. A timestamp corresponding to the last change on the primary that was successfully |
| 110 | + * replicated to the secondary. |
| 111 | + * @return value or {@code null} for none |
| 112 | + */ |
| 113 | + public String getLastReplicationTime() { |
| 114 | + return lastReplicationTime; |
| 115 | + } |
| 116 | + |
| 117 | + /** |
| 118 | + * Output only. A timestamp corresponding to the last change on the primary that was successfully |
| 119 | + * replicated to the secondary. |
| 120 | + * @param lastReplicationTime lastReplicationTime or {@code null} for none |
| 121 | + */ |
| 122 | + public ReplicationStatus setLastReplicationTime(String lastReplicationTime) { |
| 123 | + this.lastReplicationTime = lastReplicationTime; |
| 124 | + return this; |
| 125 | + } |
| 126 | + |
| 127 | + /** |
| 128 | + * Output only. The time at which a soft failover for the reservation and its associated datasets |
| 129 | + * was initiated. After this field is set, all subsequent changes to the reservation will be |
| 130 | + * rejected unless a hard failover overrides this operation. This field will be cleared once the |
| 131 | + * failover is complete. |
| 132 | + * @return value or {@code null} for none |
| 133 | + */ |
| 134 | + public String getSoftFailoverStartTime() { |
| 135 | + return softFailoverStartTime; |
| 136 | + } |
| 137 | + |
| 138 | + /** |
| 139 | + * Output only. The time at which a soft failover for the reservation and its associated datasets |
| 140 | + * was initiated. After this field is set, all subsequent changes to the reservation will be |
| 141 | + * rejected unless a hard failover overrides this operation. This field will be cleared once the |
| 142 | + * failover is complete. |
| 143 | + * @param softFailoverStartTime softFailoverStartTime or {@code null} for none |
| 144 | + */ |
| 145 | + public ReplicationStatus setSoftFailoverStartTime(String softFailoverStartTime) { |
| 146 | + this.softFailoverStartTime = softFailoverStartTime; |
| 147 | + return this; |
| 148 | + } |
| 149 | + |
| 150 | + @Override |
| 151 | + public ReplicationStatus set(String fieldName, Object value) { |
| 152 | + return (ReplicationStatus) super.set(fieldName, value); |
| 153 | + } |
| 154 | + |
| 155 | + @Override |
| 156 | + public ReplicationStatus clone() { |
| 157 | + return (ReplicationStatus) super.clone(); |
| 158 | + } |
| 159 | + |
| 160 | +} |
0 commit comments