/* * Copyright 2018-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with * the License. A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions * and limitations under the License. */ package com.amazonaws.services.databasemigrationservice.model; import java.io.Serializable; import javax.annotation.Generated; import com.amazonaws.AmazonWebServiceRequest; /** *
* * @see AWS API * Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class StartReplicationRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable { /** ** The Amazon Resource Name of the replication for which to start replication. *
*/ private String replicationConfigArn; /** ** The replication type. *
*/ private String startReplicationType; /** *
* Indicates the start time for a change data capture (CDC) operation. Use either CdcStartTime
or
* CdcStartPosition
to specify when you want a CDC operation to start. Specifying both values results
* in an error.
*
* Indicates when you want a change data capture (CDC) operation to start. Use either CdcStartPosition
* or CdcStartTime
to specify when you want a CDC operation to start. Specifying both values results in
* an error.
*
* The value can be in date, checkpoint, or LSN/SCN format. *
*/ private String cdcStartPosition; /** ** Indicates when you want a change data capture (CDC) operation to stop. The value can be either server time or * commit time. *
*/ private String cdcStopPosition; /** ** The Amazon Resource Name of the replication for which to start replication. *
* * @param replicationConfigArn * The Amazon Resource Name of the replication for which to start replication. */ public void setReplicationConfigArn(String replicationConfigArn) { this.replicationConfigArn = replicationConfigArn; } /** ** The Amazon Resource Name of the replication for which to start replication. *
* * @return The Amazon Resource Name of the replication for which to start replication. */ public String getReplicationConfigArn() { return this.replicationConfigArn; } /** ** The Amazon Resource Name of the replication for which to start replication. *
* * @param replicationConfigArn * The Amazon Resource Name of the replication for which to start replication. * @return Returns a reference to this object so that method calls can be chained together. */ public StartReplicationRequest withReplicationConfigArn(String replicationConfigArn) { setReplicationConfigArn(replicationConfigArn); return this; } /** ** The replication type. *
* * @param startReplicationType * The replication type. */ public void setStartReplicationType(String startReplicationType) { this.startReplicationType = startReplicationType; } /** ** The replication type. *
* * @return The replication type. */ public String getStartReplicationType() { return this.startReplicationType; } /** ** The replication type. *
* * @param startReplicationType * The replication type. * @return Returns a reference to this object so that method calls can be chained together. */ public StartReplicationRequest withStartReplicationType(String startReplicationType) { setStartReplicationType(startReplicationType); return this; } /** *
* Indicates the start time for a change data capture (CDC) operation. Use either CdcStartTime
or
* CdcStartPosition
to specify when you want a CDC operation to start. Specifying both values results
* in an error.
*
CdcStartTime
* or CdcStartPosition
to specify when you want a CDC operation to start. Specifying both values
* results in an error.
*/
public void setCdcStartTime(java.util.Date cdcStartTime) {
this.cdcStartTime = cdcStartTime;
}
/**
*
* Indicates the start time for a change data capture (CDC) operation. Use either CdcStartTime
or
* CdcStartPosition
to specify when you want a CDC operation to start. Specifying both values results
* in an error.
*
CdcStartTime
* or CdcStartPosition
to specify when you want a CDC operation to start. Specifying both
* values results in an error.
*/
public java.util.Date getCdcStartTime() {
return this.cdcStartTime;
}
/**
*
* Indicates the start time for a change data capture (CDC) operation. Use either CdcStartTime
or
* CdcStartPosition
to specify when you want a CDC operation to start. Specifying both values results
* in an error.
*
CdcStartTime
* or CdcStartPosition
to specify when you want a CDC operation to start. Specifying both values
* results in an error.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public StartReplicationRequest withCdcStartTime(java.util.Date cdcStartTime) {
setCdcStartTime(cdcStartTime);
return this;
}
/**
*
* Indicates when you want a change data capture (CDC) operation to start. Use either CdcStartPosition
* or CdcStartTime
to specify when you want a CDC operation to start. Specifying both values results in
* an error.
*
* The value can be in date, checkpoint, or LSN/SCN format. *
* * @param cdcStartPosition * Indicates when you want a change data capture (CDC) operation to start. Use either *CdcStartPosition
or CdcStartTime
to specify when you want a CDC operation to
* start. Specifying both values results in an error.
* * The value can be in date, checkpoint, or LSN/SCN format. */ public void setCdcStartPosition(String cdcStartPosition) { this.cdcStartPosition = cdcStartPosition; } /** *
* Indicates when you want a change data capture (CDC) operation to start. Use either CdcStartPosition
* or CdcStartTime
to specify when you want a CDC operation to start. Specifying both values results in
* an error.
*
* The value can be in date, checkpoint, or LSN/SCN format. *
* * @return Indicates when you want a change data capture (CDC) operation to start. Use either *CdcStartPosition
or CdcStartTime
to specify when you want a CDC operation to
* start. Specifying both values results in an error.
* * The value can be in date, checkpoint, or LSN/SCN format. */ public String getCdcStartPosition() { return this.cdcStartPosition; } /** *
* Indicates when you want a change data capture (CDC) operation to start. Use either CdcStartPosition
* or CdcStartTime
to specify when you want a CDC operation to start. Specifying both values results in
* an error.
*
* The value can be in date, checkpoint, or LSN/SCN format. *
* * @param cdcStartPosition * Indicates when you want a change data capture (CDC) operation to start. Use either *CdcStartPosition
or CdcStartTime
to specify when you want a CDC operation to
* start. Specifying both values results in an error.
* * The value can be in date, checkpoint, or LSN/SCN format. * @return Returns a reference to this object so that method calls can be chained together. */ public StartReplicationRequest withCdcStartPosition(String cdcStartPosition) { setCdcStartPosition(cdcStartPosition); return this; } /** *
* Indicates when you want a change data capture (CDC) operation to stop. The value can be either server time or * commit time. *
* * @param cdcStopPosition * Indicates when you want a change data capture (CDC) operation to stop. The value can be either server time * or commit time. */ public void setCdcStopPosition(String cdcStopPosition) { this.cdcStopPosition = cdcStopPosition; } /** ** Indicates when you want a change data capture (CDC) operation to stop. The value can be either server time or * commit time. *
* * @return Indicates when you want a change data capture (CDC) operation to stop. The value can be either server * time or commit time. */ public String getCdcStopPosition() { return this.cdcStopPosition; } /** ** Indicates when you want a change data capture (CDC) operation to stop. The value can be either server time or * commit time. *
* * @param cdcStopPosition * Indicates when you want a change data capture (CDC) operation to stop. The value can be either server time * or commit time. * @return Returns a reference to this object so that method calls can be chained together. */ public StartReplicationRequest withCdcStopPosition(String cdcStopPosition) { setCdcStopPosition(cdcStopPosition); return this; } /** * Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be * redacted from this string using a placeholder value. * * @return A string representation of this object. * * @see java.lang.Object#toString() */ @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("{"); if (getReplicationConfigArn() != null) sb.append("ReplicationConfigArn: ").append(getReplicationConfigArn()).append(","); if (getStartReplicationType() != null) sb.append("StartReplicationType: ").append(getStartReplicationType()).append(","); if (getCdcStartTime() != null) sb.append("CdcStartTime: ").append(getCdcStartTime()).append(","); if (getCdcStartPosition() != null) sb.append("CdcStartPosition: ").append(getCdcStartPosition()).append(","); if (getCdcStopPosition() != null) sb.append("CdcStopPosition: ").append(getCdcStopPosition()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof StartReplicationRequest == false) return false; StartReplicationRequest other = (StartReplicationRequest) obj; if (other.getReplicationConfigArn() == null ^ this.getReplicationConfigArn() == null) return false; if (other.getReplicationConfigArn() != null && other.getReplicationConfigArn().equals(this.getReplicationConfigArn()) == false) return false; if (other.getStartReplicationType() == null ^ this.getStartReplicationType() == null) return false; if (other.getStartReplicationType() != null && other.getStartReplicationType().equals(this.getStartReplicationType()) == false) return false; if (other.getCdcStartTime() == null ^ this.getCdcStartTime() == null) return false; if (other.getCdcStartTime() != null && other.getCdcStartTime().equals(this.getCdcStartTime()) == false) return false; if (other.getCdcStartPosition() == null ^ this.getCdcStartPosition() == null) return false; if (other.getCdcStartPosition() != null && other.getCdcStartPosition().equals(this.getCdcStartPosition()) == false) return false; if (other.getCdcStopPosition() == null ^ this.getCdcStopPosition() == null) return false; if (other.getCdcStopPosition() != null && other.getCdcStopPosition().equals(this.getCdcStopPosition()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getReplicationConfigArn() == null) ? 0 : getReplicationConfigArn().hashCode()); hashCode = prime * hashCode + ((getStartReplicationType() == null) ? 0 : getStartReplicationType().hashCode()); hashCode = prime * hashCode + ((getCdcStartTime() == null) ? 0 : getCdcStartTime().hashCode()); hashCode = prime * hashCode + ((getCdcStartPosition() == null) ? 0 : getCdcStartPosition().hashCode()); hashCode = prime * hashCode + ((getCdcStopPosition() == null) ? 0 : getCdcStopPosition().hashCode()); return hashCode; } @Override public StartReplicationRequest clone() { return (StartReplicationRequest) super.clone(); } }