Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  /*
   * Copyright 2010-2015 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.autoscaling.model;
 
 
Container for the parameters to the PutScheduledUpdateGroupAction operation.

Creates or updates a scheduled scaling action for an Auto Scaling group. When updating a scheduled scaling action, if you leave a parameter unspecified, the corresponding value remains unchanged in the affected Auto Scaling group.

For more information, see Scheduled Scaling in the Auto Scaling Developer Guide .

NOTE: Auto Scaling supports the date and time expressed in "YYYY-MM-DDThh:mm:ssZ" format in UTC/GMT only.

 
 public class PutScheduledUpdateGroupActionRequest extends AmazonWebServiceRequest implements SerializableCloneable {

    
The name or Amazon Resource Name (ARN) of the Auto Scaling group.

Constraints:
Length: 1 - 1600
Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

 
     private String autoScalingGroupName;

    
The name of this scaling action.

Constraints:
Length: 1 - 255
Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

 
     private String scheduledActionName;

    
Time is deprecated.

The time for this action to start. Time is an alias for StartTime and can be specified instead of StartTime, or vice versa. If both Time and StartTime are specified, their values should be identical. Otherwise, PutScheduledUpdateGroupAction will return an error.

 
     private java.util.Date time;

    
The time for this action to start, as in --start-time 2010-06-01T00:00:00Z.

If you try to schedule your action in the past, Auto Scaling returns an error message.

When StartTime and EndTime are specified with Recurrence, they form the boundaries of when the recurring action will start and stop.

 
     private java.util.Date startTime;

    
The time for this action to end.
 
     private java.util.Date endTime;

    
The time when recurring future actions will start. Start time is specified by the user following the Unix cron syntax format. For information about cron syntax, go to Wikipedia, The Free Encyclopedia.

When StartTime and EndTime are specified with Recurrence, they form the boundaries of when the recurring action will start and stop.

Constraints:
Length: 1 - 255
Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

 
     private String recurrence;

    
The minimum size for the new Auto Scaling group.
    private Integer minSize;

    
The maximum size for the Auto Scaling group.
    private Integer maxSize;

    
The number of Amazon EC2 instances that should be running in the group.
    private Integer desiredCapacity;

    
The name or Amazon Resource Name (ARN) of the Auto Scaling group.

Constraints:
Length: 1 - 1600
Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

Returns:
The name or Amazon Resource Name (ARN) of the Auto Scaling group.
    public String getAutoScalingGroupName() {
        return ;
    }
    
    
The name or Amazon Resource Name (ARN) of the Auto Scaling group.

Constraints:
Length: 1 - 1600
Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

Parameters:
autoScalingGroupName The name or Amazon Resource Name (ARN) of the Auto Scaling group.
    public void setAutoScalingGroupName(String autoScalingGroupName) {
        this. = autoScalingGroupName;
    }
    
    
The name or Amazon Resource Name (ARN) of the Auto Scaling group.

Returns a reference to this object so that method calls can be chained together.

Constraints:
Length: 1 - 1600
Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

Parameters:
autoScalingGroupName The name or Amazon Resource Name (ARN) of the Auto Scaling group.
Returns:
A reference to this updated object so that method calls can be chained together.
        this. = autoScalingGroupName;
        return this;
    }

    
The name of this scaling action.

Constraints:
Length: 1 - 255
Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

Returns:
The name of this scaling action.
    public String getScheduledActionName() {
        return ;
    }
    
    
The name of this scaling action.

Constraints:
Length: 1 - 255
Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

Parameters:
scheduledActionName The name of this scaling action.
    public void setScheduledActionName(String scheduledActionName) {
        this. = scheduledActionName;
    }
    
    
The name of this scaling action.

Returns a reference to this object so that method calls can be chained together.

Constraints:
Length: 1 - 255
Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

Parameters:
scheduledActionName The name of this scaling action.
Returns:
A reference to this updated object so that method calls can be chained together.
        this. = scheduledActionName;
        return this;
    }

    
Time is deprecated.

The time for this action to start. Time is an alias for StartTime and can be specified instead of StartTime, or vice versa. If both Time and StartTime are specified, their values should be identical. Otherwise, PutScheduledUpdateGroupAction will return an error.

Returns:
Time is deprecated.

The time for this action to start. Time is an alias for StartTime and can be specified instead of StartTime, or vice versa. If both Time and StartTime are specified, their values should be identical. Otherwise, PutScheduledUpdateGroupAction will return an error.

    public java.util.Date getTime() {
        return ;
    }
    
    
Time is deprecated.

The time for this action to start. Time is an alias for StartTime and can be specified instead of StartTime, or vice versa. If both Time and StartTime are specified, their values should be identical. Otherwise, PutScheduledUpdateGroupAction will return an error.

Parameters:
time Time is deprecated.

The time for this action to start. Time is an alias for StartTime and can be specified instead of StartTime, or vice versa. If both Time and StartTime are specified, their values should be identical. Otherwise, PutScheduledUpdateGroupAction will return an error.

    public void setTime(java.util.Date time) {
        this. = time;
    }
    
    
Time is deprecated.

The time for this action to start. Time is an alias for StartTime and can be specified instead of StartTime, or vice versa. If both Time and StartTime are specified, their values should be identical. Otherwise, PutScheduledUpdateGroupAction will return an error.

Returns a reference to this object so that method calls can be chained together.

Parameters:
time Time is deprecated.

The time for this action to start. Time is an alias for StartTime and can be specified instead of StartTime, or vice versa. If both Time and StartTime are specified, their values should be identical. Otherwise, PutScheduledUpdateGroupAction will return an error.

Returns:
A reference to this updated object so that method calls can be chained together.
        this. = time;
        return this;
    }

    
The time for this action to start, as in --start-time 2010-06-01T00:00:00Z.

If you try to schedule your action in the past, Auto Scaling returns an error message.

When StartTime and EndTime are specified with Recurrence, they form the boundaries of when the recurring action will start and stop.

Returns:
The time for this action to start, as in --start-time 2010-06-01T00:00:00Z.

If you try to schedule your action in the past, Auto Scaling returns an error message.

When StartTime and EndTime are specified with Recurrence, they form the boundaries of when the recurring action will start and stop.

    public java.util.Date getStartTime() {
        return ;
    }
    
    
The time for this action to start, as in --start-time 2010-06-01T00:00:00Z.

If you try to schedule your action in the past, Auto Scaling returns an error message.

When StartTime and EndTime are specified with Recurrence, they form the boundaries of when the recurring action will start and stop.

Parameters:
startTime The time for this action to start, as in --start-time 2010-06-01T00:00:00Z.

If you try to schedule your action in the past, Auto Scaling returns an error message.

When StartTime and EndTime are specified with Recurrence, they form the boundaries of when the recurring action will start and stop.

    public void setStartTime(java.util.Date startTime) {
        this. = startTime;
    }
    
    
The time for this action to start, as in --start-time 2010-06-01T00:00:00Z.

If you try to schedule your action in the past, Auto Scaling returns an error message.

When StartTime and EndTime are specified with Recurrence, they form the boundaries of when the recurring action will start and stop.

Returns a reference to this object so that method calls can be chained together.

Parameters:
startTime The time for this action to start, as in --start-time 2010-06-01T00:00:00Z.

If you try to schedule your action in the past, Auto Scaling returns an error message.

When StartTime and EndTime are specified with Recurrence, they form the boundaries of when the recurring action will start and stop.

Returns:
A reference to this updated object so that method calls can be chained together.
        this. = startTime;
        return this;
    }

    
The time for this action to end.

Returns:
The time for this action to end.
    public java.util.Date getEndTime() {
        return ;
    }
    
    
The time for this action to end.

Parameters:
endTime The time for this action to end.
    public void setEndTime(java.util.Date endTime) {
        this. = endTime;
    }
    
    
The time for this action to end.

Returns a reference to this object so that method calls can be chained together.

Parameters:
endTime The time for this action to end.
Returns:
A reference to this updated object so that method calls can be chained together.
        this. = endTime;
        return this;
    }

    
The time when recurring future actions will start. Start time is specified by the user following the Unix cron syntax format. For information about cron syntax, go to Wikipedia, The Free Encyclopedia.

When StartTime and EndTime are specified with Recurrence, they form the boundaries of when the recurring action will start and stop.

Constraints:
Length: 1 - 255
Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

Returns:
The time when recurring future actions will start. Start time is specified by the user following the Unix cron syntax format. For information about cron syntax, go to Wikipedia, The Free Encyclopedia.

When StartTime and EndTime are specified with Recurrence, they form the boundaries of when the recurring action will start and stop.

    public String getRecurrence() {
        return ;
    }
    
    
The time when recurring future actions will start. Start time is specified by the user following the Unix cron syntax format. For information about cron syntax, go to Wikipedia, The Free Encyclopedia.

When StartTime and EndTime are specified with Recurrence, they form the boundaries of when the recurring action will start and stop.

Constraints:
Length: 1 - 255
Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

Parameters:
recurrence The time when recurring future actions will start. Start time is specified by the user following the Unix cron syntax format. For information about cron syntax, go to Wikipedia, The Free Encyclopedia.

When StartTime and EndTime are specified with Recurrence, they form the boundaries of when the recurring action will start and stop.

    public void setRecurrence(String recurrence) {
        this. = recurrence;
    }
    
    
The time when recurring future actions will start. Start time is specified by the user following the Unix cron syntax format. For information about cron syntax, go to Wikipedia, The Free Encyclopedia.

When StartTime and EndTime are specified with Recurrence, they form the boundaries of when the recurring action will start and stop.

Returns a reference to this object so that method calls can be chained together.

Constraints:
Length: 1 - 255
Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

Parameters:
recurrence The time when recurring future actions will start. Start time is specified by the user following the Unix cron syntax format. For information about cron syntax, go to Wikipedia, The Free Encyclopedia.

When StartTime and EndTime are specified with Recurrence, they form the boundaries of when the recurring action will start and stop.

Returns:
A reference to this updated object so that method calls can be chained together.
        this. = recurrence;
        return this;
    }

    
The minimum size for the new Auto Scaling group.

Returns:
The minimum size for the new Auto Scaling group.
    public Integer getMinSize() {
        return ;
    }
    
    
The minimum size for the new Auto Scaling group.

Parameters:
minSize The minimum size for the new Auto Scaling group.
    public void setMinSize(Integer minSize) {
        this. = minSize;
    }
    
    
The minimum size for the new Auto Scaling group.

Returns a reference to this object so that method calls can be chained together.

Parameters:
minSize The minimum size for the new Auto Scaling group.
Returns:
A reference to this updated object so that method calls can be chained together.
        this. = minSize;
        return this;
    }

    
The maximum size for the Auto Scaling group.

Returns:
The maximum size for the Auto Scaling group.
    public Integer getMaxSize() {
        return ;
    }
    
    
The maximum size for the Auto Scaling group.

Parameters:
maxSize The maximum size for the Auto Scaling group.
    public void setMaxSize(Integer maxSize) {
        this. = maxSize;
    }
    
    
The maximum size for the Auto Scaling group.

Returns a reference to this object so that method calls can be chained together.

Parameters:
maxSize The maximum size for the Auto Scaling group.
Returns:
A reference to this updated object so that method calls can be chained together.
        this. = maxSize;
        return this;
    }

    
The number of Amazon EC2 instances that should be running in the group.

Returns:
The number of Amazon EC2 instances that should be running in the group.
    public Integer getDesiredCapacity() {
        return ;
    }
    
    
The number of Amazon EC2 instances that should be running in the group.

Parameters:
desiredCapacity The number of Amazon EC2 instances that should be running in the group.
    public void setDesiredCapacity(Integer desiredCapacity) {
        this. = desiredCapacity;
    }
    
    
The number of Amazon EC2 instances that should be running in the group.

Returns a reference to this object so that method calls can be chained together.

Parameters:
desiredCapacity The number of Amazon EC2 instances that should be running in the group.
Returns:
A reference to this updated object so that method calls can be chained together.
        this. = desiredCapacity;
        return this;
    }

    
Returns a string representation of this object; useful for testing and debugging.

Returns:
A string representation of this object.
See also:
java.lang.Object.toString()
    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append("{");
        if (getAutoScalingGroupName() != nullsb.append("AutoScalingGroupName: " + getAutoScalingGroupName() + ",");
        if (getScheduledActionName() != nullsb.append("ScheduledActionName: " + getScheduledActionName() + ",");
        if (getTime() != nullsb.append("Time: " + getTime() + ",");
        if (getStartTime() != nullsb.append("StartTime: " + getStartTime() + ",");
        if (getEndTime() != nullsb.append("EndTime: " + getEndTime() + ",");
        if (getRecurrence() != nullsb.append("Recurrence: " + getRecurrence() + ",");
        if (getMinSize() != nullsb.append("MinSize: " + getMinSize() + ",");
        if (getMaxSize() != nullsb.append("MaxSize: " + getMaxSize() + ",");
        if (getDesiredCapacity() != nullsb.append("DesiredCapacity: " + getDesiredCapacity() );
        sb.append("}");
        return sb.toString();
    }
    
    @Override
    public int hashCode() {
        final int prime = 31;
        int hashCode = 1;
        
        hashCode = prime * hashCode + ((getAutoScalingGroupName() == null) ? 0 : getAutoScalingGroupName().hashCode()); 
        hashCode = prime * hashCode + ((getScheduledActionName() == null) ? 0 : getScheduledActionName().hashCode()); 
        hashCode = prime * hashCode + ((getTime() == null) ? 0 : getTime().hashCode()); 
        hashCode = prime * hashCode + ((getStartTime() == null) ? 0 : getStartTime().hashCode()); 
        hashCode = prime * hashCode + ((getEndTime() == null) ? 0 : getEndTime().hashCode()); 
        hashCode = prime * hashCode + ((getRecurrence() == null) ? 0 : getRecurrence().hashCode()); 
        hashCode = prime * hashCode + ((getMinSize() == null) ? 0 : getMinSize().hashCode()); 
        hashCode = prime * hashCode + ((getMaxSize() == null) ? 0 : getMaxSize().hashCode()); 
        hashCode = prime * hashCode + ((getDesiredCapacity() == null) ? 0 : getDesiredCapacity().hashCode()); 
        return hashCode;
    }
    
    @Override
    public boolean equals(Object obj) {
        if (this == objreturn true;
        if (obj == nullreturn false;
        if (obj instanceof PutScheduledUpdateGroupActionRequest == falsereturn false;
        
        if (other.getAutoScalingGroupName() == null ^ this.getAutoScalingGroupName() == nullreturn false;
        if (other.getAutoScalingGroupName() != null && other.getAutoScalingGroupName().equals(this.getAutoScalingGroupName()) == falsereturn false
        if (other.getScheduledActionName() == null ^ this.getScheduledActionName() == nullreturn false;
        if (other.getScheduledActionName() != null && other.getScheduledActionName().equals(this.getScheduledActionName()) == falsereturn false
        if (other.getTime() == null ^ this.getTime() == nullreturn false;
        if (other.getTime() != null && other.getTime().equals(this.getTime()) == falsereturn false
        if (other.getStartTime() == null ^ this.getStartTime() == nullreturn false;
        if (other.getStartTime() != null && other.getStartTime().equals(this.getStartTime()) == falsereturn false
        if (other.getEndTime() == null ^ this.getEndTime() == nullreturn false;
        if (other.getEndTime() != null && other.getEndTime().equals(this.getEndTime()) == falsereturn false
        if (other.getRecurrence() == null ^ this.getRecurrence() == nullreturn false;
        if (other.getRecurrence() != null && other.getRecurrence().equals(this.getRecurrence()) == falsereturn false
        if (other.getMinSize() == null ^ this.getMinSize() == nullreturn false;
        if (other.getMinSize() != null && other.getMinSize().equals(this.getMinSize()) == falsereturn false
        if (other.getMaxSize() == null ^ this.getMaxSize() == nullreturn false;
        if (other.getMaxSize() != null && other.getMaxSize().equals(this.getMaxSize()) == falsereturn false
        if (other.getDesiredCapacity() == null ^ this.getDesiredCapacity() == nullreturn false;
        if (other.getDesiredCapacity() != null && other.getDesiredCapacity().equals(this.getDesiredCapacity()) == falsereturn false
        return true;
    }
    
    @Override
        
            return (PutScheduledUpdateGroupActionRequestsuper.clone();
    }
}
    
New to GrepCode? Check out our FAQ X