com.amazonaws.services.appflow.model.ScheduledTriggerProperties Maven / Gradle / Ivy
/*
* Copyright 2019-2024 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.appflow.model;
import java.io.Serializable;
import javax.annotation.Generated;
import com.amazonaws.protocol.StructuredPojo;
import com.amazonaws.protocol.ProtocolMarshaller;
/**
*
* Specifies the configuration details of a schedule-triggered flow as defined by the user. Currently, these settings
* only apply to the Scheduled
trigger type.
*
*
* @see AWS
* API Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class ScheduledTriggerProperties implements Serializable, Cloneable, StructuredPojo {
/**
*
* The scheduling expression that determines the rate at which the schedule will run, for example
* rate(5minutes)
.
*
*/
private String scheduleExpression;
/**
*
* Specifies whether a scheduled flow has an incremental data transfer or a complete data transfer for each flow
* run.
*
*/
private String dataPullMode;
/**
*
* The time at which the scheduled flow starts. The time is formatted as a timestamp that follows the ISO 8601
* standard, such as 2022-04-26T13:00:00-07:00
.
*
*/
private java.util.Date scheduleStartTime;
/**
*
* The time at which the scheduled flow ends. The time is formatted as a timestamp that follows the ISO 8601
* standard, such as 2022-04-27T13:00:00-07:00
.
*
*/
private java.util.Date scheduleEndTime;
/**
*
* Specifies the time zone used when referring to the dates and times of a scheduled flow, such as
* America/New_York
. This time zone is only a descriptive label. It doesn't affect how Amazon AppFlow
* interprets the timestamps that you specify to schedule the flow.
*
*
* If you want to schedule a flow by using times in a particular time zone, indicate the time zone as a UTC offset
* in your timestamps. For example, the UTC offsets for the America/New_York
timezone are
* -04:00
EDT and -05:00 EST
.
*
*/
private String timezone;
/**
*
* Specifies the optional offset that is added to the time interval for a schedule-triggered flow.
*
*/
private Long scheduleOffset;
/**
*
* Specifies the date range for the records to import from the connector in the first flow run.
*
*/
private java.util.Date firstExecutionFrom;
/**
*
* Defines how many times a scheduled flow fails consecutively before Amazon AppFlow deactivates it.
*
*/
private Integer flowErrorDeactivationThreshold;
/**
*
* The scheduling expression that determines the rate at which the schedule will run, for example
* rate(5minutes)
.
*
*
* @param scheduleExpression
* The scheduling expression that determines the rate at which the schedule will run, for example
* rate(5minutes)
.
*/
public void setScheduleExpression(String scheduleExpression) {
this.scheduleExpression = scheduleExpression;
}
/**
*
* The scheduling expression that determines the rate at which the schedule will run, for example
* rate(5minutes)
.
*
*
* @return The scheduling expression that determines the rate at which the schedule will run, for example
* rate(5minutes)
.
*/
public String getScheduleExpression() {
return this.scheduleExpression;
}
/**
*
* The scheduling expression that determines the rate at which the schedule will run, for example
* rate(5minutes)
.
*
*
* @param scheduleExpression
* The scheduling expression that determines the rate at which the schedule will run, for example
* rate(5minutes)
.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ScheduledTriggerProperties withScheduleExpression(String scheduleExpression) {
setScheduleExpression(scheduleExpression);
return this;
}
/**
*
* Specifies whether a scheduled flow has an incremental data transfer or a complete data transfer for each flow
* run.
*
*
* @param dataPullMode
* Specifies whether a scheduled flow has an incremental data transfer or a complete data transfer for each
* flow run.
* @see DataPullMode
*/
public void setDataPullMode(String dataPullMode) {
this.dataPullMode = dataPullMode;
}
/**
*
* Specifies whether a scheduled flow has an incremental data transfer or a complete data transfer for each flow
* run.
*
*
* @return Specifies whether a scheduled flow has an incremental data transfer or a complete data transfer for each
* flow run.
* @see DataPullMode
*/
public String getDataPullMode() {
return this.dataPullMode;
}
/**
*
* Specifies whether a scheduled flow has an incremental data transfer or a complete data transfer for each flow
* run.
*
*
* @param dataPullMode
* Specifies whether a scheduled flow has an incremental data transfer or a complete data transfer for each
* flow run.
* @return Returns a reference to this object so that method calls can be chained together.
* @see DataPullMode
*/
public ScheduledTriggerProperties withDataPullMode(String dataPullMode) {
setDataPullMode(dataPullMode);
return this;
}
/**
*
* Specifies whether a scheduled flow has an incremental data transfer or a complete data transfer for each flow
* run.
*
*
* @param dataPullMode
* Specifies whether a scheduled flow has an incremental data transfer or a complete data transfer for each
* flow run.
* @return Returns a reference to this object so that method calls can be chained together.
* @see DataPullMode
*/
public ScheduledTriggerProperties withDataPullMode(DataPullMode dataPullMode) {
this.dataPullMode = dataPullMode.toString();
return this;
}
/**
*
* The time at which the scheduled flow starts. The time is formatted as a timestamp that follows the ISO 8601
* standard, such as 2022-04-26T13:00:00-07:00
.
*
*
* @param scheduleStartTime
* The time at which the scheduled flow starts. The time is formatted as a timestamp that follows the ISO
* 8601 standard, such as 2022-04-26T13:00:00-07:00
.
*/
public void setScheduleStartTime(java.util.Date scheduleStartTime) {
this.scheduleStartTime = scheduleStartTime;
}
/**
*
* The time at which the scheduled flow starts. The time is formatted as a timestamp that follows the ISO 8601
* standard, such as 2022-04-26T13:00:00-07:00
.
*
*
* @return The time at which the scheduled flow starts. The time is formatted as a timestamp that follows the ISO
* 8601 standard, such as 2022-04-26T13:00:00-07:00
.
*/
public java.util.Date getScheduleStartTime() {
return this.scheduleStartTime;
}
/**
*
* The time at which the scheduled flow starts. The time is formatted as a timestamp that follows the ISO 8601
* standard, such as 2022-04-26T13:00:00-07:00
.
*
*
* @param scheduleStartTime
* The time at which the scheduled flow starts. The time is formatted as a timestamp that follows the ISO
* 8601 standard, such as 2022-04-26T13:00:00-07:00
.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ScheduledTriggerProperties withScheduleStartTime(java.util.Date scheduleStartTime) {
setScheduleStartTime(scheduleStartTime);
return this;
}
/**
*
* The time at which the scheduled flow ends. The time is formatted as a timestamp that follows the ISO 8601
* standard, such as 2022-04-27T13:00:00-07:00
.
*
*
* @param scheduleEndTime
* The time at which the scheduled flow ends. The time is formatted as a timestamp that follows the ISO 8601
* standard, such as 2022-04-27T13:00:00-07:00
.
*/
public void setScheduleEndTime(java.util.Date scheduleEndTime) {
this.scheduleEndTime = scheduleEndTime;
}
/**
*
* The time at which the scheduled flow ends. The time is formatted as a timestamp that follows the ISO 8601
* standard, such as 2022-04-27T13:00:00-07:00
.
*
*
* @return The time at which the scheduled flow ends. The time is formatted as a timestamp that follows the ISO 8601
* standard, such as 2022-04-27T13:00:00-07:00
.
*/
public java.util.Date getScheduleEndTime() {
return this.scheduleEndTime;
}
/**
*
* The time at which the scheduled flow ends. The time is formatted as a timestamp that follows the ISO 8601
* standard, such as 2022-04-27T13:00:00-07:00
.
*
*
* @param scheduleEndTime
* The time at which the scheduled flow ends. The time is formatted as a timestamp that follows the ISO 8601
* standard, such as 2022-04-27T13:00:00-07:00
.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ScheduledTriggerProperties withScheduleEndTime(java.util.Date scheduleEndTime) {
setScheduleEndTime(scheduleEndTime);
return this;
}
/**
*
* Specifies the time zone used when referring to the dates and times of a scheduled flow, such as
* America/New_York
. This time zone is only a descriptive label. It doesn't affect how Amazon AppFlow
* interprets the timestamps that you specify to schedule the flow.
*
*
* If you want to schedule a flow by using times in a particular time zone, indicate the time zone as a UTC offset
* in your timestamps. For example, the UTC offsets for the America/New_York
timezone are
* -04:00
EDT and -05:00 EST
.
*
*
* @param timezone
* Specifies the time zone used when referring to the dates and times of a scheduled flow, such as
* America/New_York
. This time zone is only a descriptive label. It doesn't affect how Amazon
* AppFlow interprets the timestamps that you specify to schedule the flow.
*
* If you want to schedule a flow by using times in a particular time zone, indicate the time zone as a UTC
* offset in your timestamps. For example, the UTC offsets for the America/New_York
timezone are
* -04:00
EDT and -05:00 EST
.
*/
public void setTimezone(String timezone) {
this.timezone = timezone;
}
/**
*
* Specifies the time zone used when referring to the dates and times of a scheduled flow, such as
* America/New_York
. This time zone is only a descriptive label. It doesn't affect how Amazon AppFlow
* interprets the timestamps that you specify to schedule the flow.
*
*
* If you want to schedule a flow by using times in a particular time zone, indicate the time zone as a UTC offset
* in your timestamps. For example, the UTC offsets for the America/New_York
timezone are
* -04:00
EDT and -05:00 EST
.
*
*
* @return Specifies the time zone used when referring to the dates and times of a scheduled flow, such as
* America/New_York
. This time zone is only a descriptive label. It doesn't affect how Amazon
* AppFlow interprets the timestamps that you specify to schedule the flow.
*
* If you want to schedule a flow by using times in a particular time zone, indicate the time zone as a UTC
* offset in your timestamps. For example, the UTC offsets for the America/New_York
timezone
* are -04:00
EDT and -05:00 EST
.
*/
public String getTimezone() {
return this.timezone;
}
/**
*
* Specifies the time zone used when referring to the dates and times of a scheduled flow, such as
* America/New_York
. This time zone is only a descriptive label. It doesn't affect how Amazon AppFlow
* interprets the timestamps that you specify to schedule the flow.
*
*
* If you want to schedule a flow by using times in a particular time zone, indicate the time zone as a UTC offset
* in your timestamps. For example, the UTC offsets for the America/New_York
timezone are
* -04:00
EDT and -05:00 EST
.
*
*
* @param timezone
* Specifies the time zone used when referring to the dates and times of a scheduled flow, such as
* America/New_York
. This time zone is only a descriptive label. It doesn't affect how Amazon
* AppFlow interprets the timestamps that you specify to schedule the flow.
*
* If you want to schedule a flow by using times in a particular time zone, indicate the time zone as a UTC
* offset in your timestamps. For example, the UTC offsets for the America/New_York
timezone are
* -04:00
EDT and -05:00 EST
.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ScheduledTriggerProperties withTimezone(String timezone) {
setTimezone(timezone);
return this;
}
/**
*
* Specifies the optional offset that is added to the time interval for a schedule-triggered flow.
*
*
* @param scheduleOffset
* Specifies the optional offset that is added to the time interval for a schedule-triggered flow.
*/
public void setScheduleOffset(Long scheduleOffset) {
this.scheduleOffset = scheduleOffset;
}
/**
*
* Specifies the optional offset that is added to the time interval for a schedule-triggered flow.
*
*
* @return Specifies the optional offset that is added to the time interval for a schedule-triggered flow.
*/
public Long getScheduleOffset() {
return this.scheduleOffset;
}
/**
*
* Specifies the optional offset that is added to the time interval for a schedule-triggered flow.
*
*
* @param scheduleOffset
* Specifies the optional offset that is added to the time interval for a schedule-triggered flow.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ScheduledTriggerProperties withScheduleOffset(Long scheduleOffset) {
setScheduleOffset(scheduleOffset);
return this;
}
/**
*
* Specifies the date range for the records to import from the connector in the first flow run.
*
*
* @param firstExecutionFrom
* Specifies the date range for the records to import from the connector in the first flow run.
*/
public void setFirstExecutionFrom(java.util.Date firstExecutionFrom) {
this.firstExecutionFrom = firstExecutionFrom;
}
/**
*
* Specifies the date range for the records to import from the connector in the first flow run.
*
*
* @return Specifies the date range for the records to import from the connector in the first flow run.
*/
public java.util.Date getFirstExecutionFrom() {
return this.firstExecutionFrom;
}
/**
*
* Specifies the date range for the records to import from the connector in the first flow run.
*
*
* @param firstExecutionFrom
* Specifies the date range for the records to import from the connector in the first flow run.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ScheduledTriggerProperties withFirstExecutionFrom(java.util.Date firstExecutionFrom) {
setFirstExecutionFrom(firstExecutionFrom);
return this;
}
/**
*
* Defines how many times a scheduled flow fails consecutively before Amazon AppFlow deactivates it.
*
*
* @param flowErrorDeactivationThreshold
* Defines how many times a scheduled flow fails consecutively before Amazon AppFlow deactivates it.
*/
public void setFlowErrorDeactivationThreshold(Integer flowErrorDeactivationThreshold) {
this.flowErrorDeactivationThreshold = flowErrorDeactivationThreshold;
}
/**
*
* Defines how many times a scheduled flow fails consecutively before Amazon AppFlow deactivates it.
*
*
* @return Defines how many times a scheduled flow fails consecutively before Amazon AppFlow deactivates it.
*/
public Integer getFlowErrorDeactivationThreshold() {
return this.flowErrorDeactivationThreshold;
}
/**
*
* Defines how many times a scheduled flow fails consecutively before Amazon AppFlow deactivates it.
*
*
* @param flowErrorDeactivationThreshold
* Defines how many times a scheduled flow fails consecutively before Amazon AppFlow deactivates it.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ScheduledTriggerProperties withFlowErrorDeactivationThreshold(Integer flowErrorDeactivationThreshold) {
setFlowErrorDeactivationThreshold(flowErrorDeactivationThreshold);
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 (getScheduleExpression() != null)
sb.append("ScheduleExpression: ").append(getScheduleExpression()).append(",");
if (getDataPullMode() != null)
sb.append("DataPullMode: ").append(getDataPullMode()).append(",");
if (getScheduleStartTime() != null)
sb.append("ScheduleStartTime: ").append(getScheduleStartTime()).append(",");
if (getScheduleEndTime() != null)
sb.append("ScheduleEndTime: ").append(getScheduleEndTime()).append(",");
if (getTimezone() != null)
sb.append("Timezone: ").append(getTimezone()).append(",");
if (getScheduleOffset() != null)
sb.append("ScheduleOffset: ").append(getScheduleOffset()).append(",");
if (getFirstExecutionFrom() != null)
sb.append("FirstExecutionFrom: ").append(getFirstExecutionFrom()).append(",");
if (getFlowErrorDeactivationThreshold() != null)
sb.append("FlowErrorDeactivationThreshold: ").append(getFlowErrorDeactivationThreshold());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof ScheduledTriggerProperties == false)
return false;
ScheduledTriggerProperties other = (ScheduledTriggerProperties) obj;
if (other.getScheduleExpression() == null ^ this.getScheduleExpression() == null)
return false;
if (other.getScheduleExpression() != null && other.getScheduleExpression().equals(this.getScheduleExpression()) == false)
return false;
if (other.getDataPullMode() == null ^ this.getDataPullMode() == null)
return false;
if (other.getDataPullMode() != null && other.getDataPullMode().equals(this.getDataPullMode()) == false)
return false;
if (other.getScheduleStartTime() == null ^ this.getScheduleStartTime() == null)
return false;
if (other.getScheduleStartTime() != null && other.getScheduleStartTime().equals(this.getScheduleStartTime()) == false)
return false;
if (other.getScheduleEndTime() == null ^ this.getScheduleEndTime() == null)
return false;
if (other.getScheduleEndTime() != null && other.getScheduleEndTime().equals(this.getScheduleEndTime()) == false)
return false;
if (other.getTimezone() == null ^ this.getTimezone() == null)
return false;
if (other.getTimezone() != null && other.getTimezone().equals(this.getTimezone()) == false)
return false;
if (other.getScheduleOffset() == null ^ this.getScheduleOffset() == null)
return false;
if (other.getScheduleOffset() != null && other.getScheduleOffset().equals(this.getScheduleOffset()) == false)
return false;
if (other.getFirstExecutionFrom() == null ^ this.getFirstExecutionFrom() == null)
return false;
if (other.getFirstExecutionFrom() != null && other.getFirstExecutionFrom().equals(this.getFirstExecutionFrom()) == false)
return false;
if (other.getFlowErrorDeactivationThreshold() == null ^ this.getFlowErrorDeactivationThreshold() == null)
return false;
if (other.getFlowErrorDeactivationThreshold() != null
&& other.getFlowErrorDeactivationThreshold().equals(this.getFlowErrorDeactivationThreshold()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getScheduleExpression() == null) ? 0 : getScheduleExpression().hashCode());
hashCode = prime * hashCode + ((getDataPullMode() == null) ? 0 : getDataPullMode().hashCode());
hashCode = prime * hashCode + ((getScheduleStartTime() == null) ? 0 : getScheduleStartTime().hashCode());
hashCode = prime * hashCode + ((getScheduleEndTime() == null) ? 0 : getScheduleEndTime().hashCode());
hashCode = prime * hashCode + ((getTimezone() == null) ? 0 : getTimezone().hashCode());
hashCode = prime * hashCode + ((getScheduleOffset() == null) ? 0 : getScheduleOffset().hashCode());
hashCode = prime * hashCode + ((getFirstExecutionFrom() == null) ? 0 : getFirstExecutionFrom().hashCode());
hashCode = prime * hashCode + ((getFlowErrorDeactivationThreshold() == null) ? 0 : getFlowErrorDeactivationThreshold().hashCode());
return hashCode;
}
@Override
public ScheduledTriggerProperties clone() {
try {
return (ScheduledTriggerProperties) super.clone();
} catch (CloneNotSupportedException e) {
throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e);
}
}
@com.amazonaws.annotation.SdkInternalApi
@Override
public void marshall(ProtocolMarshaller protocolMarshaller) {
com.amazonaws.services.appflow.model.transform.ScheduledTriggerPropertiesMarshaller.getInstance().marshall(this, protocolMarshaller);
}
}