/* * 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.applicationautoscaling.model; import java.io.Serializable; import javax.annotation.Generated; import com.amazonaws.protocol.StructuredPojo; import com.amazonaws.protocol.ProtocolMarshaller; /** *

* Represents a scheduled action. *

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

* The name of the scheduled action. *

*/ private String scheduledActionName; /** *

* The Amazon Resource Name (ARN) of the scheduled action. *

*/ private String scheduledActionARN; /** *

* The namespace of the Amazon Web Services service that provides the resource, or a custom-resource. *

*/ private String serviceNamespace; /** *

* The schedule for this action. The following formats are supported: *

* *

* At expressions are useful for one-time schedules. Cron expressions are useful for scheduled actions that run * periodically at a specified date and time, and rate expressions are useful for scheduled actions that run at a * regular interval. *

*

* At and cron expressions use Universal Coordinated Time (UTC) by default. *

*

* The cron format consists of six fields separated by white spaces: [Minutes] [Hours] [Day_of_Month] [Month] * [Day_of_Week] [Year]. *

*

* For rate expressions, value is a positive integer and unit is minute | * minutes | hour | hours | day | days. *

*

* For more information and examples, see Example * scheduled actions for Application Auto Scaling in the Application Auto Scaling User Guide. *

*/ private String schedule; /** *

* The time zone used when referring to the date and time of a scheduled action, when the scheduled action uses an * at or cron expression. *

*/ private String timezone; /** *

* The identifier of the resource associated with the scaling policy. This string consists of the resource type and * unique identifier. *

* */ private String resourceId; /** *

* The scalable dimension. This string consists of the service namespace, resource type, and scaling property. *

* */ private String scalableDimension; /** *

* The date and time that the action is scheduled to begin, in UTC. *

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

* The date and time that the action is scheduled to end, in UTC. *

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

* The new minimum and maximum capacity. You can set both values or just one. At the scheduled time, if the current * capacity is below the minimum capacity, Application Auto Scaling scales out to the minimum capacity. If the * current capacity is above the maximum capacity, Application Auto Scaling scales in to the maximum capacity. *

*/ private ScalableTargetAction scalableTargetAction; /** *

* The date and time that the scheduled action was created. *

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

* 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 ScheduledAction withScheduledActionName(String scheduledActionName) { setScheduledActionName(scheduledActionName); return this; } /** *

* The Amazon Resource Name (ARN) of the scheduled action. *

* * @param scheduledActionARN * The Amazon Resource Name (ARN) of the scheduled action. */ public void setScheduledActionARN(String scheduledActionARN) { this.scheduledActionARN = scheduledActionARN; } /** *

* The Amazon Resource Name (ARN) of the scheduled action. *

* * @return The Amazon Resource Name (ARN) of the scheduled action. */ public String getScheduledActionARN() { return this.scheduledActionARN; } /** *

* The Amazon Resource Name (ARN) of the scheduled action. *

* * @param scheduledActionARN * The Amazon Resource Name (ARN) of the scheduled action. * @return Returns a reference to this object so that method calls can be chained together. */ public ScheduledAction withScheduledActionARN(String scheduledActionARN) { setScheduledActionARN(scheduledActionARN); return this; } /** *

* The namespace of the Amazon Web Services service that provides the resource, or a custom-resource. *

* * @param serviceNamespace * The namespace of the Amazon Web Services service that provides the resource, or a * custom-resource. * @see ServiceNamespace */ public void setServiceNamespace(String serviceNamespace) { this.serviceNamespace = serviceNamespace; } /** *

* The namespace of the Amazon Web Services service that provides the resource, or a custom-resource. *

* * @return The namespace of the Amazon Web Services service that provides the resource, or a * custom-resource. * @see ServiceNamespace */ public String getServiceNamespace() { return this.serviceNamespace; } /** *

* The namespace of the Amazon Web Services service that provides the resource, or a custom-resource. *

* * @param serviceNamespace * The namespace of the Amazon Web Services service that provides the resource, or a * custom-resource. * @return Returns a reference to this object so that method calls can be chained together. * @see ServiceNamespace */ public ScheduledAction withServiceNamespace(String serviceNamespace) { setServiceNamespace(serviceNamespace); return this; } /** *

* The namespace of the Amazon Web Services service that provides the resource, or a custom-resource. *

* * @param serviceNamespace * The namespace of the Amazon Web Services service that provides the resource, or a * custom-resource. * @return Returns a reference to this object so that method calls can be chained together. * @see ServiceNamespace */ public ScheduledAction withServiceNamespace(ServiceNamespace serviceNamespace) { this.serviceNamespace = serviceNamespace.toString(); return this; } /** *

* The schedule for this action. The following formats are supported: *

* *

* At expressions are useful for one-time schedules. Cron expressions are useful for scheduled actions that run * periodically at a specified date and time, and rate expressions are useful for scheduled actions that run at a * regular interval. *

*

* At and cron expressions use Universal Coordinated Time (UTC) by default. *

*

* The cron format consists of six fields separated by white spaces: [Minutes] [Hours] [Day_of_Month] [Month] * [Day_of_Week] [Year]. *

*

* For rate expressions, value is a positive integer and unit is minute | * minutes | hour | hours | day | days. *

*

* For more information and examples, see Example * scheduled actions for Application Auto Scaling in the Application Auto Scaling User Guide. *

* * @param schedule * The schedule for this action. The following formats are supported:

* *

* At expressions are useful for one-time schedules. Cron expressions are useful for scheduled actions that * run periodically at a specified date and time, and rate expressions are useful for scheduled actions that * run at a regular interval. *

*

* At and cron expressions use Universal Coordinated Time (UTC) by default. *

*

* The cron format consists of six fields separated by white spaces: [Minutes] [Hours] [Day_of_Month] [Month] * [Day_of_Week] [Year]. *

*

* For rate expressions, value is a positive integer and unit is minute | * minutes | hour | hours | day | days. *

*

* For more information and examples, see Example scheduled actions for Application Auto Scaling in the Application Auto Scaling User * Guide. */ public void setSchedule(String schedule) { this.schedule = schedule; } /** *

* The schedule for this action. The following formats are supported: *

* *

* At expressions are useful for one-time schedules. Cron expressions are useful for scheduled actions that run * periodically at a specified date and time, and rate expressions are useful for scheduled actions that run at a * regular interval. *

*

* At and cron expressions use Universal Coordinated Time (UTC) by default. *

*

* The cron format consists of six fields separated by white spaces: [Minutes] [Hours] [Day_of_Month] [Month] * [Day_of_Week] [Year]. *

*

* For rate expressions, value is a positive integer and unit is minute | * minutes | hour | hours | day | days. *

*

* For more information and examples, see Example * scheduled actions for Application Auto Scaling in the Application Auto Scaling User Guide. *

* * @return The schedule for this action. The following formats are supported:

* *

* At expressions are useful for one-time schedules. Cron expressions are useful for scheduled actions that * run periodically at a specified date and time, and rate expressions are useful for scheduled actions that * run at a regular interval. *

*

* At and cron expressions use Universal Coordinated Time (UTC) by default. *

*

* The cron format consists of six fields separated by white spaces: [Minutes] [Hours] [Day_of_Month] * [Month] [Day_of_Week] [Year]. *

*

* For rate expressions, value is a positive integer and unit is minute | * minutes | hour | hours | day | days. *

*

* For more information and examples, see Example scheduled actions for Application Auto Scaling in the Application Auto Scaling User * Guide. */ public String getSchedule() { return this.schedule; } /** *

* The schedule for this action. The following formats are supported: *

* *

* At expressions are useful for one-time schedules. Cron expressions are useful for scheduled actions that run * periodically at a specified date and time, and rate expressions are useful for scheduled actions that run at a * regular interval. *

*

* At and cron expressions use Universal Coordinated Time (UTC) by default. *

*

* The cron format consists of six fields separated by white spaces: [Minutes] [Hours] [Day_of_Month] [Month] * [Day_of_Week] [Year]. *

*

* For rate expressions, value is a positive integer and unit is minute | * minutes | hour | hours | day | days. *

*

* For more information and examples, see Example * scheduled actions for Application Auto Scaling in the Application Auto Scaling User Guide. *

* * @param schedule * The schedule for this action. The following formats are supported:

* *

* At expressions are useful for one-time schedules. Cron expressions are useful for scheduled actions that * run periodically at a specified date and time, and rate expressions are useful for scheduled actions that * run at a regular interval. *

*

* At and cron expressions use Universal Coordinated Time (UTC) by default. *

*

* The cron format consists of six fields separated by white spaces: [Minutes] [Hours] [Day_of_Month] [Month] * [Day_of_Week] [Year]. *

*

* For rate expressions, value is a positive integer and unit is minute | * minutes | hour | hours | day | days. *

*

* For more information and examples, see Example scheduled actions for Application Auto Scaling in the Application Auto Scaling User * Guide. * @return Returns a reference to this object so that method calls can be chained together. */ public ScheduledAction withSchedule(String schedule) { setSchedule(schedule); return this; } /** *

* The time zone used when referring to the date and time of a scheduled action, when the scheduled action uses an * at or cron expression. *

* * @param timezone * The time zone used when referring to the date and time of a scheduled action, when the scheduled action * uses an at or cron expression. */ public void setTimezone(String timezone) { this.timezone = timezone; } /** *

* The time zone used when referring to the date and time of a scheduled action, when the scheduled action uses an * at or cron expression. *

* * @return The time zone used when referring to the date and time of a scheduled action, when the scheduled action * uses an at or cron expression. */ public String getTimezone() { return this.timezone; } /** *

* The time zone used when referring to the date and time of a scheduled action, when the scheduled action uses an * at or cron expression. *

* * @param timezone * The time zone used when referring to the date and time of a scheduled action, when the scheduled action * uses an at or cron expression. * @return Returns a reference to this object so that method calls can be chained together. */ public ScheduledAction withTimezone(String timezone) { setTimezone(timezone); return this; } /** *

* The identifier of the resource associated with the scaling policy. This string consists of the resource type and * unique identifier. *

* * * @param resourceId * The identifier of the resource associated with the scaling policy. This string consists of the resource * type and unique identifier.

*