/* * 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.timestreamquery.model; import java.io.Serializable; import javax.annotation.Generated; import com.amazonaws.protocol.StructuredPojo; import com.amazonaws.protocol.ProtocolMarshaller; /** *
* Structure that describes scheduled query. *
* * @see AWS API Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class ScheduledQueryDescription implements Serializable, Cloneable, StructuredPojo { /** ** Scheduled query ARN. *
*/ private String arn; /** ** Name of the scheduled query. *
*/ private String name; /** ** The query to be run. *
*/ private String queryString; /** ** Creation time of the scheduled query. *
*/ private java.util.Date creationTime; /** ** State of the scheduled query. *
*/ private String state; /** ** Last time the query was run. *
*/ private java.util.Date previousInvocationTime; /** ** The next time the scheduled query is scheduled to run. *
*/ private java.util.Date nextInvocationTime; /** ** Schedule configuration. *
*/ private ScheduleConfiguration scheduleConfiguration; /** ** Notification configuration. *
*/ private NotificationConfiguration notificationConfiguration; /** ** Scheduled query target store configuration. *
*/ private TargetConfiguration targetConfiguration; /** ** IAM role that Timestream uses to run the schedule query. *
*/ private String scheduledQueryExecutionRoleArn; /** ** A customer provided KMS key used to encrypt the scheduled query resource. *
*/ private String kmsKeyId; /** ** Error-reporting configuration for the scheduled query. *
*/ private ErrorReportConfiguration errorReportConfiguration; /** ** Runtime summary for the last scheduled query run. *
*/ private ScheduledQueryRunSummary lastRunSummary; /** ** Runtime summary for the last five failed scheduled query runs. *
*/ private java.util.List* Scheduled query ARN. *
* * @param arn * Scheduled query ARN. */ public void setArn(String arn) { this.arn = arn; } /** ** Scheduled query ARN. *
* * @return Scheduled query ARN. */ public String getArn() { return this.arn; } /** ** Scheduled query ARN. *
* * @param arn * Scheduled query ARN. * @return Returns a reference to this object so that method calls can be chained together. */ public ScheduledQueryDescription withArn(String arn) { setArn(arn); return this; } /** ** Name of the scheduled query. *
* * @param name * Name of the scheduled query. */ public void setName(String name) { this.name = name; } /** ** Name of the scheduled query. *
* * @return Name of the scheduled query. */ public String getName() { return this.name; } /** ** Name of the scheduled query. *
* * @param name * Name of the scheduled query. * @return Returns a reference to this object so that method calls can be chained together. */ public ScheduledQueryDescription withName(String name) { setName(name); return this; } /** ** The query to be run. *
* * @param queryString * The query to be run. */ public void setQueryString(String queryString) { this.queryString = queryString; } /** ** The query to be run. *
* * @return The query to be run. */ public String getQueryString() { return this.queryString; } /** ** The query to be run. *
* * @param queryString * The query to be run. * @return Returns a reference to this object so that method calls can be chained together. */ public ScheduledQueryDescription withQueryString(String queryString) { setQueryString(queryString); return this; } /** ** Creation time of the scheduled query. *
* * @param creationTime * Creation time of the scheduled query. */ public void setCreationTime(java.util.Date creationTime) { this.creationTime = creationTime; } /** ** Creation time of the scheduled query. *
* * @return Creation time of the scheduled query. */ public java.util.Date getCreationTime() { return this.creationTime; } /** ** Creation time of the scheduled query. *
* * @param creationTime * Creation time of the scheduled query. * @return Returns a reference to this object so that method calls can be chained together. */ public ScheduledQueryDescription withCreationTime(java.util.Date creationTime) { setCreationTime(creationTime); return this; } /** ** State of the scheduled query. *
* * @param state * State of the scheduled query. * @see ScheduledQueryState */ public void setState(String state) { this.state = state; } /** ** State of the scheduled query. *
* * @return State of the scheduled query. * @see ScheduledQueryState */ public String getState() { return this.state; } /** ** State of the scheduled query. *
* * @param state * State of the scheduled query. * @return Returns a reference to this object so that method calls can be chained together. * @see ScheduledQueryState */ public ScheduledQueryDescription withState(String state) { setState(state); return this; } /** ** State of the scheduled query. *
* * @param state * State of the scheduled query. * @return Returns a reference to this object so that method calls can be chained together. * @see ScheduledQueryState */ public ScheduledQueryDescription withState(ScheduledQueryState state) { this.state = state.toString(); return this; } /** ** Last time the query was run. *
* * @param previousInvocationTime * Last time the query was run. */ public void setPreviousInvocationTime(java.util.Date previousInvocationTime) { this.previousInvocationTime = previousInvocationTime; } /** ** Last time the query was run. *
* * @return Last time the query was run. */ public java.util.Date getPreviousInvocationTime() { return this.previousInvocationTime; } /** ** Last time the query was run. *
* * @param previousInvocationTime * Last time the query was run. * @return Returns a reference to this object so that method calls can be chained together. */ public ScheduledQueryDescription withPreviousInvocationTime(java.util.Date previousInvocationTime) { setPreviousInvocationTime(previousInvocationTime); return this; } /** ** The next time the scheduled query is scheduled to run. *
* * @param nextInvocationTime * The next time the scheduled query is scheduled to run. */ public void setNextInvocationTime(java.util.Date nextInvocationTime) { this.nextInvocationTime = nextInvocationTime; } /** ** The next time the scheduled query is scheduled to run. *
* * @return The next time the scheduled query is scheduled to run. */ public java.util.Date getNextInvocationTime() { return this.nextInvocationTime; } /** ** The next time the scheduled query is scheduled to run. *
* * @param nextInvocationTime * The next time the scheduled query is scheduled to run. * @return Returns a reference to this object so that method calls can be chained together. */ public ScheduledQueryDescription withNextInvocationTime(java.util.Date nextInvocationTime) { setNextInvocationTime(nextInvocationTime); return this; } /** ** Schedule configuration. *
* * @param scheduleConfiguration * Schedule configuration. */ public void setScheduleConfiguration(ScheduleConfiguration scheduleConfiguration) { this.scheduleConfiguration = scheduleConfiguration; } /** ** Schedule configuration. *
* * @return Schedule configuration. */ public ScheduleConfiguration getScheduleConfiguration() { return this.scheduleConfiguration; } /** ** Schedule configuration. *
* * @param scheduleConfiguration * Schedule configuration. * @return Returns a reference to this object so that method calls can be chained together. */ public ScheduledQueryDescription withScheduleConfiguration(ScheduleConfiguration scheduleConfiguration) { setScheduleConfiguration(scheduleConfiguration); return this; } /** ** Notification configuration. *
* * @param notificationConfiguration * Notification configuration. */ public void setNotificationConfiguration(NotificationConfiguration notificationConfiguration) { this.notificationConfiguration = notificationConfiguration; } /** ** Notification configuration. *
* * @return Notification configuration. */ public NotificationConfiguration getNotificationConfiguration() { return this.notificationConfiguration; } /** ** Notification configuration. *
* * @param notificationConfiguration * Notification configuration. * @return Returns a reference to this object so that method calls can be chained together. */ public ScheduledQueryDescription withNotificationConfiguration(NotificationConfiguration notificationConfiguration) { setNotificationConfiguration(notificationConfiguration); return this; } /** ** Scheduled query target store configuration. *
* * @param targetConfiguration * Scheduled query target store configuration. */ public void setTargetConfiguration(TargetConfiguration targetConfiguration) { this.targetConfiguration = targetConfiguration; } /** ** Scheduled query target store configuration. *
* * @return Scheduled query target store configuration. */ public TargetConfiguration getTargetConfiguration() { return this.targetConfiguration; } /** ** Scheduled query target store configuration. *
* * @param targetConfiguration * Scheduled query target store configuration. * @return Returns a reference to this object so that method calls can be chained together. */ public ScheduledQueryDescription withTargetConfiguration(TargetConfiguration targetConfiguration) { setTargetConfiguration(targetConfiguration); return this; } /** ** IAM role that Timestream uses to run the schedule query. *
* * @param scheduledQueryExecutionRoleArn * IAM role that Timestream uses to run the schedule query. */ public void setScheduledQueryExecutionRoleArn(String scheduledQueryExecutionRoleArn) { this.scheduledQueryExecutionRoleArn = scheduledQueryExecutionRoleArn; } /** ** IAM role that Timestream uses to run the schedule query. *
* * @return IAM role that Timestream uses to run the schedule query. */ public String getScheduledQueryExecutionRoleArn() { return this.scheduledQueryExecutionRoleArn; } /** ** IAM role that Timestream uses to run the schedule query. *
* * @param scheduledQueryExecutionRoleArn * IAM role that Timestream uses to run the schedule query. * @return Returns a reference to this object so that method calls can be chained together. */ public ScheduledQueryDescription withScheduledQueryExecutionRoleArn(String scheduledQueryExecutionRoleArn) { setScheduledQueryExecutionRoleArn(scheduledQueryExecutionRoleArn); return this; } /** ** A customer provided KMS key used to encrypt the scheduled query resource. *
* * @param kmsKeyId * A customer provided KMS key used to encrypt the scheduled query resource. */ public void setKmsKeyId(String kmsKeyId) { this.kmsKeyId = kmsKeyId; } /** ** A customer provided KMS key used to encrypt the scheduled query resource. *
* * @return A customer provided KMS key used to encrypt the scheduled query resource. */ public String getKmsKeyId() { return this.kmsKeyId; } /** ** A customer provided KMS key used to encrypt the scheduled query resource. *
* * @param kmsKeyId * A customer provided KMS key used to encrypt the scheduled query resource. * @return Returns a reference to this object so that method calls can be chained together. */ public ScheduledQueryDescription withKmsKeyId(String kmsKeyId) { setKmsKeyId(kmsKeyId); return this; } /** ** Error-reporting configuration for the scheduled query. *
* * @param errorReportConfiguration * Error-reporting configuration for the scheduled query. */ public void setErrorReportConfiguration(ErrorReportConfiguration errorReportConfiguration) { this.errorReportConfiguration = errorReportConfiguration; } /** ** Error-reporting configuration for the scheduled query. *
* * @return Error-reporting configuration for the scheduled query. */ public ErrorReportConfiguration getErrorReportConfiguration() { return this.errorReportConfiguration; } /** ** Error-reporting configuration for the scheduled query. *
* * @param errorReportConfiguration * Error-reporting configuration for the scheduled query. * @return Returns a reference to this object so that method calls can be chained together. */ public ScheduledQueryDescription withErrorReportConfiguration(ErrorReportConfiguration errorReportConfiguration) { setErrorReportConfiguration(errorReportConfiguration); return this; } /** ** Runtime summary for the last scheduled query run. *
* * @param lastRunSummary * Runtime summary for the last scheduled query run. */ public void setLastRunSummary(ScheduledQueryRunSummary lastRunSummary) { this.lastRunSummary = lastRunSummary; } /** ** Runtime summary for the last scheduled query run. *
* * @return Runtime summary for the last scheduled query run. */ public ScheduledQueryRunSummary getLastRunSummary() { return this.lastRunSummary; } /** ** Runtime summary for the last scheduled query run. *
* * @param lastRunSummary * Runtime summary for the last scheduled query run. * @return Returns a reference to this object so that method calls can be chained together. */ public ScheduledQueryDescription withLastRunSummary(ScheduledQueryRunSummary lastRunSummary) { setLastRunSummary(lastRunSummary); return this; } /** ** Runtime summary for the last five failed scheduled query runs. *
* * @return Runtime summary for the last five failed scheduled query runs. */ public java.util.List* Runtime summary for the last five failed scheduled query runs. *
* * @param recentlyFailedRuns * Runtime summary for the last five failed scheduled query runs. */ public void setRecentlyFailedRuns(java.util.Collection* Runtime summary for the last five failed scheduled query runs. *
** NOTE: This method appends the values to the existing list (if any). Use * {@link #setRecentlyFailedRuns(java.util.Collection)} or {@link #withRecentlyFailedRuns(java.util.Collection)} if * you want to override the existing values. *
* * @param recentlyFailedRuns * Runtime summary for the last five failed scheduled query runs. * @return Returns a reference to this object so that method calls can be chained together. */ public ScheduledQueryDescription withRecentlyFailedRuns(ScheduledQueryRunSummary... recentlyFailedRuns) { if (this.recentlyFailedRuns == null) { setRecentlyFailedRuns(new java.util.ArrayList* Runtime summary for the last five failed scheduled query runs. *
* * @param recentlyFailedRuns * Runtime summary for the last five failed scheduled query runs. * @return Returns a reference to this object so that method calls can be chained together. */ public ScheduledQueryDescription withRecentlyFailedRuns(java.util.Collection