/* * 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.cloudwatchevents.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 StartReplayRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable { /** *
* The name of the replay to start. *
*/ private String replayName; /** ** A description for the replay to start. *
*/ private String description; /** ** The ARN of the archive to replay events from. *
*/ private String eventSourceArn; /** *
* A time stamp for the time to start replaying events. Only events that occurred between the
* EventStartTime
and EventEndTime
are replayed.
*
* A time stamp for the time to stop replaying events. Only events that occurred between the
* EventStartTime
and EventEndTime
are replayed.
*
* A ReplayDestination
object that includes details about the destination for the replay.
*
* The name of the replay to start. *
* * @param replayName * The name of the replay to start. */ public void setReplayName(String replayName) { this.replayName = replayName; } /** ** The name of the replay to start. *
* * @return The name of the replay to start. */ public String getReplayName() { return this.replayName; } /** ** The name of the replay to start. *
* * @param replayName * The name of the replay to start. * @return Returns a reference to this object so that method calls can be chained together. */ public StartReplayRequest withReplayName(String replayName) { setReplayName(replayName); return this; } /** ** A description for the replay to start. *
* * @param description * A description for the replay to start. */ public void setDescription(String description) { this.description = description; } /** ** A description for the replay to start. *
* * @return A description for the replay to start. */ public String getDescription() { return this.description; } /** ** A description for the replay to start. *
* * @param description * A description for the replay to start. * @return Returns a reference to this object so that method calls can be chained together. */ public StartReplayRequest withDescription(String description) { setDescription(description); return this; } /** ** The ARN of the archive to replay events from. *
* * @param eventSourceArn * The ARN of the archive to replay events from. */ public void setEventSourceArn(String eventSourceArn) { this.eventSourceArn = eventSourceArn; } /** ** The ARN of the archive to replay events from. *
* * @return The ARN of the archive to replay events from. */ public String getEventSourceArn() { return this.eventSourceArn; } /** ** The ARN of the archive to replay events from. *
* * @param eventSourceArn * The ARN of the archive to replay events from. * @return Returns a reference to this object so that method calls can be chained together. */ public StartReplayRequest withEventSourceArn(String eventSourceArn) { setEventSourceArn(eventSourceArn); return this; } /** *
* A time stamp for the time to start replaying events. Only events that occurred between the
* EventStartTime
and EventEndTime
are replayed.
*
EventStartTime
and EventEndTime
are replayed.
*/
public void setEventStartTime(java.util.Date eventStartTime) {
this.eventStartTime = eventStartTime;
}
/**
*
* A time stamp for the time to start replaying events. Only events that occurred between the
* EventStartTime
and EventEndTime
are replayed.
*
EventStartTime
and EventEndTime
are replayed.
*/
public java.util.Date getEventStartTime() {
return this.eventStartTime;
}
/**
*
* A time stamp for the time to start replaying events. Only events that occurred between the
* EventStartTime
and EventEndTime
are replayed.
*
EventStartTime
and EventEndTime
are replayed.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public StartReplayRequest withEventStartTime(java.util.Date eventStartTime) {
setEventStartTime(eventStartTime);
return this;
}
/**
*
* A time stamp for the time to stop replaying events. Only events that occurred between the
* EventStartTime
and EventEndTime
are replayed.
*
EventStartTime
and EventEndTime
are replayed.
*/
public void setEventEndTime(java.util.Date eventEndTime) {
this.eventEndTime = eventEndTime;
}
/**
*
* A time stamp for the time to stop replaying events. Only events that occurred between the
* EventStartTime
and EventEndTime
are replayed.
*
EventStartTime
and EventEndTime
are replayed.
*/
public java.util.Date getEventEndTime() {
return this.eventEndTime;
}
/**
*
* A time stamp for the time to stop replaying events. Only events that occurred between the
* EventStartTime
and EventEndTime
are replayed.
*
EventStartTime
and EventEndTime
are replayed.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public StartReplayRequest withEventEndTime(java.util.Date eventEndTime) {
setEventEndTime(eventEndTime);
return this;
}
/**
*
* A ReplayDestination
object that includes details about the destination for the replay.
*
ReplayDestination
object that includes details about the destination for the replay.
*/
public void setDestination(ReplayDestination destination) {
this.destination = destination;
}
/**
*
* A ReplayDestination
object that includes details about the destination for the replay.
*
ReplayDestination
object that includes details about the destination for the replay.
*/
public ReplayDestination getDestination() {
return this.destination;
}
/**
*
* A ReplayDestination
object that includes details about the destination for the replay.
*
ReplayDestination
object that includes details about the destination for the replay.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public StartReplayRequest withDestination(ReplayDestination destination) {
setDestination(destination);
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 (getReplayName() != null)
sb.append("ReplayName: ").append(getReplayName()).append(",");
if (getDescription() != null)
sb.append("Description: ").append(getDescription()).append(",");
if (getEventSourceArn() != null)
sb.append("EventSourceArn: ").append(getEventSourceArn()).append(",");
if (getEventStartTime() != null)
sb.append("EventStartTime: ").append(getEventStartTime()).append(",");
if (getEventEndTime() != null)
sb.append("EventEndTime: ").append(getEventEndTime()).append(",");
if (getDestination() != null)
sb.append("Destination: ").append(getDestination());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof StartReplayRequest == false)
return false;
StartReplayRequest other = (StartReplayRequest) obj;
if (other.getReplayName() == null ^ this.getReplayName() == null)
return false;
if (other.getReplayName() != null && other.getReplayName().equals(this.getReplayName()) == false)
return false;
if (other.getDescription() == null ^ this.getDescription() == null)
return false;
if (other.getDescription() != null && other.getDescription().equals(this.getDescription()) == false)
return false;
if (other.getEventSourceArn() == null ^ this.getEventSourceArn() == null)
return false;
if (other.getEventSourceArn() != null && other.getEventSourceArn().equals(this.getEventSourceArn()) == false)
return false;
if (other.getEventStartTime() == null ^ this.getEventStartTime() == null)
return false;
if (other.getEventStartTime() != null && other.getEventStartTime().equals(this.getEventStartTime()) == false)
return false;
if (other.getEventEndTime() == null ^ this.getEventEndTime() == null)
return false;
if (other.getEventEndTime() != null && other.getEventEndTime().equals(this.getEventEndTime()) == false)
return false;
if (other.getDestination() == null ^ this.getDestination() == null)
return false;
if (other.getDestination() != null && other.getDestination().equals(this.getDestination()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getReplayName() == null) ? 0 : getReplayName().hashCode());
hashCode = prime * hashCode + ((getDescription() == null) ? 0 : getDescription().hashCode());
hashCode = prime * hashCode + ((getEventSourceArn() == null) ? 0 : getEventSourceArn().hashCode());
hashCode = prime * hashCode + ((getEventStartTime() == null) ? 0 : getEventStartTime().hashCode());
hashCode = prime * hashCode + ((getEventEndTime() == null) ? 0 : getEventEndTime().hashCode());
hashCode = prime * hashCode + ((getDestination() == null) ? 0 : getDestination().hashCode());
return hashCode;
}
@Override
public StartReplayRequest clone() {
return (StartReplayRequest) super.clone();
}
}