All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.amazonaws.services.redshift.model.CreateScheduledActionResult Maven / Gradle / Ivy

Go to download

The AWS Java SDK for Amazon Redshift module holds the client classes that are used for communicating with Amazon Redshift Service

The newest version!
/*
 * 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.redshift.model;

import java.io.Serializable;
import javax.annotation.Generated;

/**
 * 

* Describes a scheduled action. You can use a scheduled action to trigger some Amazon Redshift API operations on a * schedule. For information about which API operations can be scheduled, see ScheduledActionType. *

* * @see AWS API * Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class CreateScheduledActionResult extends com.amazonaws.AmazonWebServiceResult implements Serializable, Cloneable { /** *

* The name of the scheduled action. *

*/ private String scheduledActionName; /** *

* A JSON format string of the Amazon Redshift API operation with input parameters. *

*

* " * {\"ResizeCluster\":{\"NodeType\":\"ra3.4xlarge\",\"ClusterIdentifier\":\"my-test-cluster\",\"NumberOfNodes\":3}} * ". *

*/ private ScheduledActionType targetAction; /** *

* The schedule for a one-time (at format) or recurring (cron format) scheduled action. Schedule invocations must be * separated by at least one hour. *

*

* Format of at expressions is "at(yyyy-mm-ddThh:mm:ss)". For example, " * at(2016-03-04T17:27:00)". *

*

* Format of cron expressions is "cron(Minutes Hours Day-of-month Month Day-of-week Year) * ". For example, "cron(0 10 ? * MON *) * ". For more information, see Cron Expressions in the Amazon * CloudWatch Events User Guide. *

*/ private String schedule; /** *

* The IAM role to assume to run the scheduled action. This IAM role must have permission to run the Amazon Redshift * API operation in the scheduled action. This IAM role must allow the Amazon Redshift scheduler (Principal * scheduler.redshift.amazonaws.com) to assume permissions on your behalf. For more information about the IAM role * to use with the Amazon Redshift scheduler, see Using * Identity-Based Policies for Amazon Redshift in the Amazon Redshift Cluster Management Guide. *

*/ private String iamRole; /** *

* The description of the scheduled action. *

*/ private String scheduledActionDescription; /** *

* The state of the scheduled action. For example, DISABLED. *

*/ private String state; /** *

* List of times when the scheduled action will run. *

*/ private com.amazonaws.internal.SdkInternalList nextInvocations; /** *

* The start time in UTC when the schedule is active. Before this time, the scheduled action does not trigger. *

*/ private java.util.Date startTime; /** *

* The end time in UTC when the schedule is no longer active. After this time, the scheduled action does not * trigger. *

*/ private java.util.Date endTime; /** *

* The name of the scheduled action. *

* * @param scheduledActionName * The name of the scheduled action. */ public void setScheduledActionName(String scheduledActionName) { this.scheduledActionName = scheduledActionName; } /** *

* The name of the scheduled action. *

* * @return The name of the scheduled action. */ public String getScheduledActionName() { return this.scheduledActionName; } /** *

* The name of the scheduled action. *

* * @param scheduledActionName * The name of the scheduled action. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateScheduledActionResult withScheduledActionName(String scheduledActionName) { setScheduledActionName(scheduledActionName); return this; } /** *

* A JSON format string of the Amazon Redshift API operation with input parameters. *

*

* " * {\"ResizeCluster\":{\"NodeType\":\"ra3.4xlarge\",\"ClusterIdentifier\":\"my-test-cluster\",\"NumberOfNodes\":3}} * ". *

* * @param targetAction * A JSON format string of the Amazon Redshift API operation with input parameters.

*

* " * {\"ResizeCluster\":{\"NodeType\":\"ra3.4xlarge\",\"ClusterIdentifier\":\"my-test-cluster\",\"NumberOfNodes\":3}} * ". */ public void setTargetAction(ScheduledActionType targetAction) { this.targetAction = targetAction; } /** *

* A JSON format string of the Amazon Redshift API operation with input parameters. *

*

* " * {\"ResizeCluster\":{\"NodeType\":\"ra3.4xlarge\",\"ClusterIdentifier\":\"my-test-cluster\",\"NumberOfNodes\":3}} * ". *

* * @return A JSON format string of the Amazon Redshift API operation with input parameters.

*

* " * {\"ResizeCluster\":{\"NodeType\":\"ra3.4xlarge\",\"ClusterIdentifier\":\"my-test-cluster\",\"NumberOfNodes\":3}} * ". */ public ScheduledActionType getTargetAction() { return this.targetAction; } /** *

* A JSON format string of the Amazon Redshift API operation with input parameters. *

*

* " * {\"ResizeCluster\":{\"NodeType\":\"ra3.4xlarge\",\"ClusterIdentifier\":\"my-test-cluster\",\"NumberOfNodes\":3}} * ". *

* * @param targetAction * A JSON format string of the Amazon Redshift API operation with input parameters.

*

* " * {\"ResizeCluster\":{\"NodeType\":\"ra3.4xlarge\",\"ClusterIdentifier\":\"my-test-cluster\",\"NumberOfNodes\":3}} * ". * @return Returns a reference to this object so that method calls can be chained together. */ public CreateScheduledActionResult withTargetAction(ScheduledActionType targetAction) { setTargetAction(targetAction); return this; } /** *

* The schedule for a one-time (at format) or recurring (cron format) scheduled action. Schedule invocations must be * separated by at least one hour. *

*

* Format of at expressions is "at(yyyy-mm-ddThh:mm:ss)". For example, " * at(2016-03-04T17:27:00)". *

*

* Format of cron expressions is "cron(Minutes Hours Day-of-month Month Day-of-week Year) * ". For example, "cron(0 10 ? * MON *) * ". For more information, see Cron Expressions in the Amazon * CloudWatch Events User Guide. *

* * @param schedule * The schedule for a one-time (at format) or recurring (cron format) scheduled action. Schedule invocations * must be separated by at least one hour.

*

* Format of at expressions is "at(yyyy-mm-ddThh:mm:ss)". For example, " * at(2016-03-04T17:27:00)". *

*

* Format of cron expressions is "cron(Minutes Hours Day-of-month Month Day-of-week Year) * ". For example, "cron(0 10 ? * MON *) * ". For more information, see Cron Expressions in the * Amazon CloudWatch Events User Guide. */ public void setSchedule(String schedule) { this.schedule = schedule; } /** *

* The schedule for a one-time (at format) or recurring (cron format) scheduled action. Schedule invocations must be * separated by at least one hour. *

*

* Format of at expressions is "at(yyyy-mm-ddThh:mm:ss)". For example, " * at(2016-03-04T17:27:00)". *

*

* Format of cron expressions is "cron(Minutes Hours Day-of-month Month Day-of-week Year) * ". For example, "cron(0 10 ? * MON *) * ". For more information, see Cron Expressions in the Amazon * CloudWatch Events User Guide. *

* * @return The schedule for a one-time (at format) or recurring (cron format) scheduled action. Schedule invocations * must be separated by at least one hour.

*

* Format of at expressions is "at(yyyy-mm-ddThh:mm:ss)". For example, " * at(2016-03-04T17:27:00)". *

*

* Format of cron expressions is "cron(Minutes Hours Day-of-month Month Day-of-week Year) * ". For example, "cron(0 10 ? * MON *) * ". For more information, see Cron Expressions in the * Amazon CloudWatch Events User Guide. */ public String getSchedule() { return this.schedule; } /** *

* The schedule for a one-time (at format) or recurring (cron format) scheduled action. Schedule invocations must be * separated by at least one hour. *

*

* Format of at expressions is "at(yyyy-mm-ddThh:mm:ss)". For example, " * at(2016-03-04T17:27:00)". *

*

* Format of cron expressions is "cron(Minutes Hours Day-of-month Month Day-of-week Year) * ". For example, "cron(0 10 ? * MON *) * ". For more information, see Cron Expressions in the Amazon * CloudWatch Events User Guide. *

* * @param schedule * The schedule for a one-time (at format) or recurring (cron format) scheduled action. Schedule invocations * must be separated by at least one hour.

*

* Format of at expressions is "at(yyyy-mm-ddThh:mm:ss)". For example, " * at(2016-03-04T17:27:00)". *

*

* Format of cron expressions is "cron(Minutes Hours Day-of-month Month Day-of-week Year) * ". For example, "cron(0 10 ? * MON *) * ". For more information, see Cron Expressions in the * Amazon CloudWatch Events User Guide. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateScheduledActionResult withSchedule(String schedule) { setSchedule(schedule); return this; } /** *

* The IAM role to assume to run the scheduled action. This IAM role must have permission to run the Amazon Redshift * API operation in the scheduled action. This IAM role must allow the Amazon Redshift scheduler (Principal * scheduler.redshift.amazonaws.com) to assume permissions on your behalf. For more information about the IAM role * to use with the Amazon Redshift scheduler, see Using * Identity-Based Policies for Amazon Redshift in the Amazon Redshift Cluster Management Guide. *

* * @param iamRole * The IAM role to assume to run the scheduled action. This IAM role must have permission to run the Amazon * Redshift API operation in the scheduled action. This IAM role must allow the Amazon Redshift scheduler * (Principal scheduler.redshift.amazonaws.com) to assume permissions on your behalf. For more information * about the IAM role to use with the Amazon Redshift scheduler, see Using Identity-Based Policies for Amazon Redshift in the Amazon Redshift Cluster Management * Guide. */ public void setIamRole(String iamRole) { this.iamRole = iamRole; } /** *

* The IAM role to assume to run the scheduled action. This IAM role must have permission to run the Amazon Redshift * API operation in the scheduled action. This IAM role must allow the Amazon Redshift scheduler (Principal * scheduler.redshift.amazonaws.com) to assume permissions on your behalf. For more information about the IAM role * to use with the Amazon Redshift scheduler, see Using * Identity-Based Policies for Amazon Redshift in the Amazon Redshift Cluster Management Guide. *

* * @return The IAM role to assume to run the scheduled action. This IAM role must have permission to run the Amazon * Redshift API operation in the scheduled action. This IAM role must allow the Amazon Redshift scheduler * (Principal scheduler.redshift.amazonaws.com) to assume permissions on your behalf. For more information * about the IAM role to use with the Amazon Redshift scheduler, see Using Identity-Based Policies for Amazon Redshift in the Amazon Redshift Cluster Management * Guide. */ public String getIamRole() { return this.iamRole; } /** *

* The IAM role to assume to run the scheduled action. This IAM role must have permission to run the Amazon Redshift * API operation in the scheduled action. This IAM role must allow the Amazon Redshift scheduler (Principal * scheduler.redshift.amazonaws.com) to assume permissions on your behalf. For more information about the IAM role * to use with the Amazon Redshift scheduler, see Using * Identity-Based Policies for Amazon Redshift in the Amazon Redshift Cluster Management Guide. *

* * @param iamRole * The IAM role to assume to run the scheduled action. This IAM role must have permission to run the Amazon * Redshift API operation in the scheduled action. This IAM role must allow the Amazon Redshift scheduler * (Principal scheduler.redshift.amazonaws.com) to assume permissions on your behalf. For more information * about the IAM role to use with the Amazon Redshift scheduler, see Using Identity-Based Policies for Amazon Redshift in the Amazon Redshift Cluster Management * Guide. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateScheduledActionResult withIamRole(String iamRole) { setIamRole(iamRole); return this; } /** *

* The description of the scheduled action. *

* * @param scheduledActionDescription * The description of the scheduled action. */ public void setScheduledActionDescription(String scheduledActionDescription) { this.scheduledActionDescription = scheduledActionDescription; } /** *

* The description of the scheduled action. *

* * @return The description of the scheduled action. */ public String getScheduledActionDescription() { return this.scheduledActionDescription; } /** *

* The description of the scheduled action. *

* * @param scheduledActionDescription * The description of the scheduled action. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateScheduledActionResult withScheduledActionDescription(String scheduledActionDescription) { setScheduledActionDescription(scheduledActionDescription); return this; } /** *

* The state of the scheduled action. For example, DISABLED. *

* * @param state * The state of the scheduled action. For example, DISABLED. * @see ScheduledActionState */ public void setState(String state) { this.state = state; } /** *

* The state of the scheduled action. For example, DISABLED. *

* * @return The state of the scheduled action. For example, DISABLED. * @see ScheduledActionState */ public String getState() { return this.state; } /** *

* The state of the scheduled action. For example, DISABLED. *

* * @param state * The state of the scheduled action. For example, DISABLED. * @return Returns a reference to this object so that method calls can be chained together. * @see ScheduledActionState */ public CreateScheduledActionResult withState(String state) { setState(state); return this; } /** *

* The state of the scheduled action. For example, DISABLED. *

* * @param state * The state of the scheduled action. For example, DISABLED. * @return Returns a reference to this object so that method calls can be chained together. * @see ScheduledActionState */ public CreateScheduledActionResult withState(ScheduledActionState state) { this.state = state.toString(); return this; } /** *

* List of times when the scheduled action will run. *

* * @return List of times when the scheduled action will run. */ public java.util.List getNextInvocations() { if (nextInvocations == null) { nextInvocations = new com.amazonaws.internal.SdkInternalList(); } return nextInvocations; } /** *

* List of times when the scheduled action will run. *

* * @param nextInvocations * List of times when the scheduled action will run. */ public void setNextInvocations(java.util.Collection nextInvocations) { if (nextInvocations == null) { this.nextInvocations = null; return; } this.nextInvocations = new com.amazonaws.internal.SdkInternalList(nextInvocations); } /** *

* List of times when the scheduled action will run. *

*

* NOTE: This method appends the values to the existing list (if any). Use * {@link #setNextInvocations(java.util.Collection)} or {@link #withNextInvocations(java.util.Collection)} if you * want to override the existing values. *

* * @param nextInvocations * List of times when the scheduled action will run. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateScheduledActionResult withNextInvocations(java.util.Date... nextInvocations) { if (this.nextInvocations == null) { setNextInvocations(new com.amazonaws.internal.SdkInternalList(nextInvocations.length)); } for (java.util.Date ele : nextInvocations) { this.nextInvocations.add(ele); } return this; } /** *

* List of times when the scheduled action will run. *

* * @param nextInvocations * List of times when the scheduled action will run. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateScheduledActionResult withNextInvocations(java.util.Collection nextInvocations) { setNextInvocations(nextInvocations); return this; } /** *

* The start time in UTC when the schedule is active. Before this time, the scheduled action does not trigger. *

* * @param startTime * The start time in UTC when the schedule is active. Before this time, the scheduled action does not * trigger. */ public void setStartTime(java.util.Date startTime) { this.startTime = startTime; } /** *

* The start time in UTC when the schedule is active. Before this time, the scheduled action does not trigger. *

* * @return The start time in UTC when the schedule is active. Before this time, the scheduled action does not * trigger. */ public java.util.Date getStartTime() { return this.startTime; } /** *

* The start time in UTC when the schedule is active. Before this time, the scheduled action does not trigger. *

* * @param startTime * The start time in UTC when the schedule is active. Before this time, the scheduled action does not * trigger. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateScheduledActionResult withStartTime(java.util.Date startTime) { setStartTime(startTime); return this; } /** *

* The end time in UTC when the schedule is no longer active. After this time, the scheduled action does not * trigger. *

* * @param endTime * The end time in UTC when the schedule is no longer active. After this time, the scheduled action does not * trigger. */ public void setEndTime(java.util.Date endTime) { this.endTime = endTime; } /** *

* The end time in UTC when the schedule is no longer active. After this time, the scheduled action does not * trigger. *

* * @return The end time in UTC when the schedule is no longer active. After this time, the scheduled action does not * trigger. */ public java.util.Date getEndTime() { return this.endTime; } /** *

* The end time in UTC when the schedule is no longer active. After this time, the scheduled action does not * trigger. *

* * @param endTime * The end time in UTC when the schedule is no longer active. After this time, the scheduled action does not * trigger. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateScheduledActionResult withEndTime(java.util.Date endTime) { setEndTime(endTime); 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 (getScheduledActionName() != null) sb.append("ScheduledActionName: ").append(getScheduledActionName()).append(","); if (getTargetAction() != null) sb.append("TargetAction: ").append(getTargetAction()).append(","); if (getSchedule() != null) sb.append("Schedule: ").append(getSchedule()).append(","); if (getIamRole() != null) sb.append("IamRole: ").append(getIamRole()).append(","); if (getScheduledActionDescription() != null) sb.append("ScheduledActionDescription: ").append(getScheduledActionDescription()).append(","); if (getState() != null) sb.append("State: ").append(getState()).append(","); if (getNextInvocations() != null) sb.append("NextInvocations: ").append(getNextInvocations()).append(","); if (getStartTime() != null) sb.append("StartTime: ").append(getStartTime()).append(","); if (getEndTime() != null) sb.append("EndTime: ").append(getEndTime()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof CreateScheduledActionResult == false) return false; CreateScheduledActionResult other = (CreateScheduledActionResult) obj; if (other.getScheduledActionName() == null ^ this.getScheduledActionName() == null) return false; if (other.getScheduledActionName() != null && other.getScheduledActionName().equals(this.getScheduledActionName()) == false) return false; if (other.getTargetAction() == null ^ this.getTargetAction() == null) return false; if (other.getTargetAction() != null && other.getTargetAction().equals(this.getTargetAction()) == false) return false; if (other.getSchedule() == null ^ this.getSchedule() == null) return false; if (other.getSchedule() != null && other.getSchedule().equals(this.getSchedule()) == false) return false; if (other.getIamRole() == null ^ this.getIamRole() == null) return false; if (other.getIamRole() != null && other.getIamRole().equals(this.getIamRole()) == false) return false; if (other.getScheduledActionDescription() == null ^ this.getScheduledActionDescription() == null) return false; if (other.getScheduledActionDescription() != null && other.getScheduledActionDescription().equals(this.getScheduledActionDescription()) == 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.getNextInvocations() == null ^ this.getNextInvocations() == null) return false; if (other.getNextInvocations() != null && other.getNextInvocations().equals(this.getNextInvocations()) == false) return false; if (other.getStartTime() == null ^ this.getStartTime() == null) return false; if (other.getStartTime() != null && other.getStartTime().equals(this.getStartTime()) == false) return false; if (other.getEndTime() == null ^ this.getEndTime() == null) return false; if (other.getEndTime() != null && other.getEndTime().equals(this.getEndTime()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getScheduledActionName() == null) ? 0 : getScheduledActionName().hashCode()); hashCode = prime * hashCode + ((getTargetAction() == null) ? 0 : getTargetAction().hashCode()); hashCode = prime * hashCode + ((getSchedule() == null) ? 0 : getSchedule().hashCode()); hashCode = prime * hashCode + ((getIamRole() == null) ? 0 : getIamRole().hashCode()); hashCode = prime * hashCode + ((getScheduledActionDescription() == null) ? 0 : getScheduledActionDescription().hashCode()); hashCode = prime * hashCode + ((getState() == null) ? 0 : getState().hashCode()); hashCode = prime * hashCode + ((getNextInvocations() == null) ? 0 : getNextInvocations().hashCode()); hashCode = prime * hashCode + ((getStartTime() == null) ? 0 : getStartTime().hashCode()); hashCode = prime * hashCode + ((getEndTime() == null) ? 0 : getEndTime().hashCode()); return hashCode; } @Override public CreateScheduledActionResult clone() { try { return (CreateScheduledActionResult) super.clone(); } catch (CloneNotSupportedException e) { throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e); } } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy