/*
* 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.scheduler.model;
import java.io.Serializable;
import javax.annotation.Generated;
/**
*
* @see AWS API
* Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class GetScheduleResult extends com.amazonaws.AmazonWebServiceResult
* The Amazon Resource Name (ARN) of the schedule.
*
* The time at which the schedule was created.
*
* The description of the schedule.
*
* The date, in UTC, before which the schedule can invoke its target. Depending on the schedule's recurrence
* expression, invocations might stop on, or before, the
* Allows you to configure a time window during which EventBridge Scheduler invokes the schedule.
*
* The name of the schedule group associated with this schedule.
*
* The ARN for a customer managed KMS Key that is be used to encrypt and decrypt your data.
*
* The time at which the schedule was last modified.
*
* The name of the schedule.
*
* The expression that defines when the schedule runs. The following formats are supported.
*
*
*
*
* You can use
* A
* A
* For more information and examples, see Schedule types on EventBridge
* Scheduler in the EventBridge Scheduler User Guide.
*
* The timezone in which the scheduling expression is evaluated.
*
* The date, in UTC, after which the schedule can begin invoking its target. Depending on the schedule's recurrence
* expression, invocations might occur on, or after, the
* Specifies whether the schedule is enabled or disabled.
*
* The schedule target.
*
* The Amazon Resource Name (ARN) of the schedule.
*
* The Amazon Resource Name (ARN) of the schedule.
*
* The Amazon Resource Name (ARN) of the schedule.
*
* The time at which the schedule was created.
*
* The time at which the schedule was created.
*
* The time at which the schedule was created.
*
* The description of the schedule.
*
* The description of the schedule.
*
* The description of the schedule.
*
* The date, in UTC, before which the schedule can invoke its target. Depending on the schedule's recurrence
* expression, invocations might stop on, or before, the
* The date, in UTC, before which the schedule can invoke its target. Depending on the schedule's recurrence
* expression, invocations might stop on, or before, the
* The date, in UTC, before which the schedule can invoke its target. Depending on the schedule's recurrence
* expression, invocations might stop on, or before, the
* Allows you to configure a time window during which EventBridge Scheduler invokes the schedule.
*
* Allows you to configure a time window during which EventBridge Scheduler invokes the schedule.
*
* Allows you to configure a time window during which EventBridge Scheduler invokes the schedule.
*
* The name of the schedule group associated with this schedule.
*
* The name of the schedule group associated with this schedule.
*
* The name of the schedule group associated with this schedule.
*
* The ARN for a customer managed KMS Key that is be used to encrypt and decrypt your data.
*
* The ARN for a customer managed KMS Key that is be used to encrypt and decrypt your data.
*
* The ARN for a customer managed KMS Key that is be used to encrypt and decrypt your data.
*
* The time at which the schedule was last modified.
*
* The time at which the schedule was last modified.
*
* The time at which the schedule was last modified.
*
* The name of the schedule.
*
* The name of the schedule.
*
* The name of the schedule.
*
* The expression that defines when the schedule runs. The following formats are supported.
*
*
*
*
* You can use
* A
* A
* For more information and examples, see Schedule types on EventBridge
* Scheduler in the EventBridge Scheduler User Guide.
* EndDate
you specify. EventBridge Scheduler
* ignores EndDate
for one-time schedules.
*
*
* at
expression - at(yyyy-mm-ddThh:mm:ss)
* rate
expression - rate(unit value)
* cron
expression - cron(fields)
* at
expressions to create one-time schedules that invoke a target once, at the time and
* in the time zone, that you specify. You can use rate
and cron
expressions to create
* recurring schedules. Rate-based schedules are useful when you want to invoke a target at regular intervals, such
* as every 15 minutes or every five days. Cron-based schedules are useful when you want to invoke a target
* periodically at a specific time, such as at 8:00 am (UTC+0) every 1st day of the month.
* cron
expression consists of six fields separated by white spaces:
* (minutes hours day_of_month month day_of_week year)
.
* rate
expression consists of a value as a positive integer, and a unit with the
* following options: minute
| minutes
| hour
| hours
|
* day
| days
* StartDate
you specify. EventBridge Scheduler
* ignores StartDate
for one-time schedules.
* EndDate
you specify. EventBridge Scheduler
* ignores EndDate
for one-time schedules.
* EndDate
you specify. EventBridge
* Scheduler ignores EndDate
for one-time schedules.
*/
public void setEndDate(java.util.Date endDate) {
this.endDate = endDate;
}
/**
* EndDate
you specify. EventBridge Scheduler
* ignores EndDate
for one-time schedules.
* EndDate
you specify. EventBridge
* Scheduler ignores EndDate
for one-time schedules.
*/
public java.util.Date getEndDate() {
return this.endDate;
}
/**
* EndDate
you specify. EventBridge Scheduler
* ignores EndDate
for one-time schedules.
* EndDate
you specify. EventBridge
* Scheduler ignores EndDate
for one-time schedules.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public GetScheduleResult withEndDate(java.util.Date endDate) {
setEndDate(endDate);
return this;
}
/**
*
*
* at
expression - at(yyyy-mm-ddThh:mm:ss)
* rate
expression - rate(unit value)
* cron
expression - cron(fields)
* at
expressions to create one-time schedules that invoke a target once, at the time and
* in the time zone, that you specify. You can use rate
and cron
expressions to create
* recurring schedules. Rate-based schedules are useful when you want to invoke a target at regular intervals, such
* as every 15 minutes or every five days. Cron-based schedules are useful when you want to invoke a target
* periodically at a specific time, such as at 8:00 am (UTC+0) every 1st day of the month.
* cron
expression consists of six fields separated by white spaces:
* (minutes hours day_of_month month day_of_week year)
.
* rate
expression consists of a value as a positive integer, and a unit with the
* following options: minute
| minutes
| hour
| hours
|
* day
| days
*
* at
expression - at(yyyy-mm-ddThh:mm:ss)
*
* rate
expression - rate(unit value)
*
* cron
expression - cron(fields)
*
* You can use at
expressions to create one-time schedules that invoke a target once, at the
* time and in the time zone, that you specify. You can use rate
and cron
* expressions to create recurring schedules. Rate-based schedules are useful when you want to invoke a
* target at regular intervals, such as every 15 minutes or every five days. Cron-based schedules are useful
* when you want to invoke a target periodically at a specific time, such as at 8:00 am (UTC+0) every 1st day
* of the month.
*
* A cron
expression consists of six fields separated by white spaces:
* (minutes hours day_of_month month day_of_week year)
.
*
* A rate
expression consists of a value as a positive integer, and a unit with
* the following options: minute
| minutes
| hour
| hours
* | day
| days
*
* For more information and examples, see Schedule types on * EventBridge Scheduler in the EventBridge Scheduler User Guide. */ public void setScheduleExpression(String scheduleExpression) { this.scheduleExpression = scheduleExpression; } /** *
* The expression that defines when the schedule runs. The following formats are supported. *
*
* at
expression - at(yyyy-mm-ddThh:mm:ss)
*
* rate
expression - rate(unit value)
*
* cron
expression - cron(fields)
*
* You can use at
expressions to create one-time schedules that invoke a target once, at the time and
* in the time zone, that you specify. You can use rate
and cron
expressions to create
* recurring schedules. Rate-based schedules are useful when you want to invoke a target at regular intervals, such
* as every 15 minutes or every five days. Cron-based schedules are useful when you want to invoke a target
* periodically at a specific time, such as at 8:00 am (UTC+0) every 1st day of the month.
*
* A cron
expression consists of six fields separated by white spaces:
* (minutes hours day_of_month month day_of_week year)
.
*
* A rate
expression consists of a value as a positive integer, and a unit with the
* following options: minute
| minutes
| hour
| hours
|
* day
| days
*
* For more information and examples, see Schedule types on EventBridge * Scheduler in the EventBridge Scheduler User Guide. *
* * @return The expression that defines when the schedule runs. The following formats are supported. *
* at
expression - at(yyyy-mm-ddThh:mm:ss)
*
* rate
expression - rate(unit value)
*
* cron
expression - cron(fields)
*
* You can use at
expressions to create one-time schedules that invoke a target once, at the
* time and in the time zone, that you specify. You can use rate
and cron
* expressions to create recurring schedules. Rate-based schedules are useful when you want to invoke a
* target at regular intervals, such as every 15 minutes or every five days. Cron-based schedules are useful
* when you want to invoke a target periodically at a specific time, such as at 8:00 am (UTC+0) every 1st
* day of the month.
*
* A cron
expression consists of six fields separated by white spaces:
* (minutes hours day_of_month month day_of_week year)
.
*
* A rate
expression consists of a value as a positive integer, and a unit with
* the following options: minute
| minutes
| hour
|
* hours
| day
| days
*
* For more information and examples, see Schedule types on * EventBridge Scheduler in the EventBridge Scheduler User Guide. */ public String getScheduleExpression() { return this.scheduleExpression; } /** *
* The expression that defines when the schedule runs. The following formats are supported. *
*
* at
expression - at(yyyy-mm-ddThh:mm:ss)
*
* rate
expression - rate(unit value)
*
* cron
expression - cron(fields)
*
* You can use at
expressions to create one-time schedules that invoke a target once, at the time and
* in the time zone, that you specify. You can use rate
and cron
expressions to create
* recurring schedules. Rate-based schedules are useful when you want to invoke a target at regular intervals, such
* as every 15 minutes or every five days. Cron-based schedules are useful when you want to invoke a target
* periodically at a specific time, such as at 8:00 am (UTC+0) every 1st day of the month.
*
* A cron
expression consists of six fields separated by white spaces:
* (minutes hours day_of_month month day_of_week year)
.
*
* A rate
expression consists of a value as a positive integer, and a unit with the
* following options: minute
| minutes
| hour
| hours
|
* day
| days
*
* For more information and examples, see Schedule types on EventBridge * Scheduler in the EventBridge Scheduler User Guide. *
* * @param scheduleExpression * The expression that defines when the schedule runs. The following formats are supported. *
* at
expression - at(yyyy-mm-ddThh:mm:ss)
*
* rate
expression - rate(unit value)
*
* cron
expression - cron(fields)
*
* You can use at
expressions to create one-time schedules that invoke a target once, at the
* time and in the time zone, that you specify. You can use rate
and cron
* expressions to create recurring schedules. Rate-based schedules are useful when you want to invoke a
* target at regular intervals, such as every 15 minutes or every five days. Cron-based schedules are useful
* when you want to invoke a target periodically at a specific time, such as at 8:00 am (UTC+0) every 1st day
* of the month.
*
* A cron
expression consists of six fields separated by white spaces:
* (minutes hours day_of_month month day_of_week year)
.
*
* A rate
expression consists of a value as a positive integer, and a unit with
* the following options: minute
| minutes
| hour
| hours
* | day
| days
*
* For more information and examples, see Schedule types on * EventBridge Scheduler in the EventBridge Scheduler User Guide. * @return Returns a reference to this object so that method calls can be chained together. */ public GetScheduleResult withScheduleExpression(String scheduleExpression) { setScheduleExpression(scheduleExpression); return this; } /** *
* The timezone in which the scheduling expression is evaluated. *
* * @param scheduleExpressionTimezone * The timezone in which the scheduling expression is evaluated. */ public void setScheduleExpressionTimezone(String scheduleExpressionTimezone) { this.scheduleExpressionTimezone = scheduleExpressionTimezone; } /** ** The timezone in which the scheduling expression is evaluated. *
* * @return The timezone in which the scheduling expression is evaluated. */ public String getScheduleExpressionTimezone() { return this.scheduleExpressionTimezone; } /** ** The timezone in which the scheduling expression is evaluated. *
* * @param scheduleExpressionTimezone * The timezone in which the scheduling expression is evaluated. * @return Returns a reference to this object so that method calls can be chained together. */ public GetScheduleResult withScheduleExpressionTimezone(String scheduleExpressionTimezone) { setScheduleExpressionTimezone(scheduleExpressionTimezone); return this; } /** *
* The date, in UTC, after which the schedule can begin invoking its target. Depending on the schedule's recurrence
* expression, invocations might occur on, or after, the StartDate
you specify. EventBridge Scheduler
* ignores StartDate
for one-time schedules.
*
StartDate
you specify.
* EventBridge Scheduler ignores StartDate
for one-time schedules.
*/
public void setStartDate(java.util.Date startDate) {
this.startDate = startDate;
}
/**
*
* The date, in UTC, after which the schedule can begin invoking its target. Depending on the schedule's recurrence
* expression, invocations might occur on, or after, the StartDate
you specify. EventBridge Scheduler
* ignores StartDate
for one-time schedules.
*
StartDate
you specify.
* EventBridge Scheduler ignores StartDate
for one-time schedules.
*/
public java.util.Date getStartDate() {
return this.startDate;
}
/**
*
* The date, in UTC, after which the schedule can begin invoking its target. Depending on the schedule's recurrence
* expression, invocations might occur on, or after, the StartDate
you specify. EventBridge Scheduler
* ignores StartDate
for one-time schedules.
*
StartDate
you specify.
* EventBridge Scheduler ignores StartDate
for one-time schedules.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public GetScheduleResult withStartDate(java.util.Date startDate) {
setStartDate(startDate);
return this;
}
/**
* * Specifies whether the schedule is enabled or disabled. *
* * @param state * Specifies whether the schedule is enabled or disabled. * @see ScheduleState */ public void setState(String state) { this.state = state; } /** ** Specifies whether the schedule is enabled or disabled. *
* * @return Specifies whether the schedule is enabled or disabled. * @see ScheduleState */ public String getState() { return this.state; } /** ** Specifies whether the schedule is enabled or disabled. *
* * @param state * Specifies whether the schedule is enabled or disabled. * @return Returns a reference to this object so that method calls can be chained together. * @see ScheduleState */ public GetScheduleResult withState(String state) { setState(state); return this; } /** ** Specifies whether the schedule is enabled or disabled. *
* * @param state * Specifies whether the schedule is enabled or disabled. * @return Returns a reference to this object so that method calls can be chained together. * @see ScheduleState */ public GetScheduleResult withState(ScheduleState state) { this.state = state.toString(); return this; } /** ** The schedule target. *
* * @param target * The schedule target. */ public void setTarget(Target target) { this.target = target; } /** ** The schedule target. *
* * @return The schedule target. */ public Target getTarget() { return this.target; } /** ** The schedule target. *
* * @param target * The schedule target. * @return Returns a reference to this object so that method calls can be chained together. */ public GetScheduleResult withTarget(Target target) { setTarget(target); 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 (getArn() != null) sb.append("Arn: ").append(getArn()).append(","); if (getCreationDate() != null) sb.append("CreationDate: ").append(getCreationDate()).append(","); if (getDescription() != null) sb.append("Description: ").append(getDescription()).append(","); if (getEndDate() != null) sb.append("EndDate: ").append(getEndDate()).append(","); if (getFlexibleTimeWindow() != null) sb.append("FlexibleTimeWindow: ").append(getFlexibleTimeWindow()).append(","); if (getGroupName() != null) sb.append("GroupName: ").append(getGroupName()).append(","); if (getKmsKeyArn() != null) sb.append("KmsKeyArn: ").append(getKmsKeyArn()).append(","); if (getLastModificationDate() != null) sb.append("LastModificationDate: ").append(getLastModificationDate()).append(","); if (getName() != null) sb.append("Name: ").append(getName()).append(","); if (getScheduleExpression() != null) sb.append("ScheduleExpression: ").append(getScheduleExpression()).append(","); if (getScheduleExpressionTimezone() != null) sb.append("ScheduleExpressionTimezone: ").append(getScheduleExpressionTimezone()).append(","); if (getStartDate() != null) sb.append("StartDate: ").append(getStartDate()).append(","); if (getState() != null) sb.append("State: ").append(getState()).append(","); if (getTarget() != null) sb.append("Target: ").append(getTarget()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof GetScheduleResult == false) return false; GetScheduleResult other = (GetScheduleResult) obj; if (other.getArn() == null ^ this.getArn() == null) return false; if (other.getArn() != null && other.getArn().equals(this.getArn()) == false) return false; if (other.getCreationDate() == null ^ this.getCreationDate() == null) return false; if (other.getCreationDate() != null && other.getCreationDate().equals(this.getCreationDate()) == 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.getEndDate() == null ^ this.getEndDate() == null) return false; if (other.getEndDate() != null && other.getEndDate().equals(this.getEndDate()) == false) return false; if (other.getFlexibleTimeWindow() == null ^ this.getFlexibleTimeWindow() == null) return false; if (other.getFlexibleTimeWindow() != null && other.getFlexibleTimeWindow().equals(this.getFlexibleTimeWindow()) == false) return false; if (other.getGroupName() == null ^ this.getGroupName() == null) return false; if (other.getGroupName() != null && other.getGroupName().equals(this.getGroupName()) == false) return false; if (other.getKmsKeyArn() == null ^ this.getKmsKeyArn() == null) return false; if (other.getKmsKeyArn() != null && other.getKmsKeyArn().equals(this.getKmsKeyArn()) == false) return false; if (other.getLastModificationDate() == null ^ this.getLastModificationDate() == null) return false; if (other.getLastModificationDate() != null && other.getLastModificationDate().equals(this.getLastModificationDate()) == false) return false; if (other.getName() == null ^ this.getName() == null) return false; if (other.getName() != null && other.getName().equals(this.getName()) == false) return false; if (other.getScheduleExpression() == null ^ this.getScheduleExpression() == null) return false; if (other.getScheduleExpression() != null && other.getScheduleExpression().equals(this.getScheduleExpression()) == false) return false; if (other.getScheduleExpressionTimezone() == null ^ this.getScheduleExpressionTimezone() == null) return false; if (other.getScheduleExpressionTimezone() != null && other.getScheduleExpressionTimezone().equals(this.getScheduleExpressionTimezone()) == false) return false; if (other.getStartDate() == null ^ this.getStartDate() == null) return false; if (other.getStartDate() != null && other.getStartDate().equals(this.getStartDate()) == false) return false; if (other.getState() == null ^ this.getState() == null) return false; if (other.getState() != null && other.getState().equals(this.getState()) == false) return false; if (other.getTarget() == null ^ this.getTarget() == null) return false; if (other.getTarget() != null && other.getTarget().equals(this.getTarget()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getArn() == null) ? 0 : getArn().hashCode()); hashCode = prime * hashCode + ((getCreationDate() == null) ? 0 : getCreationDate().hashCode()); hashCode = prime * hashCode + ((getDescription() == null) ? 0 : getDescription().hashCode()); hashCode = prime * hashCode + ((getEndDate() == null) ? 0 : getEndDate().hashCode()); hashCode = prime * hashCode + ((getFlexibleTimeWindow() == null) ? 0 : getFlexibleTimeWindow().hashCode()); hashCode = prime * hashCode + ((getGroupName() == null) ? 0 : getGroupName().hashCode()); hashCode = prime * hashCode + ((getKmsKeyArn() == null) ? 0 : getKmsKeyArn().hashCode()); hashCode = prime * hashCode + ((getLastModificationDate() == null) ? 0 : getLastModificationDate().hashCode()); hashCode = prime * hashCode + ((getName() == null) ? 0 : getName().hashCode()); hashCode = prime * hashCode + ((getScheduleExpression() == null) ? 0 : getScheduleExpression().hashCode()); hashCode = prime * hashCode + ((getScheduleExpressionTimezone() == null) ? 0 : getScheduleExpressionTimezone().hashCode()); hashCode = prime * hashCode + ((getStartDate() == null) ? 0 : getStartDate().hashCode()); hashCode = prime * hashCode + ((getState() == null) ? 0 : getState().hashCode()); hashCode = prime * hashCode + ((getTarget() == null) ? 0 : getTarget().hashCode()); return hashCode; } @Override public GetScheduleResult clone() { try { return (GetScheduleResult) super.clone(); } catch (CloneNotSupportedException e) { throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e); } } }