com.amazonaws.services.ec2.model.DisableFastLaunchResult Maven / Gradle / Ivy
Show all versions of aws-java-sdk-ec2 Show documentation
/*
* 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.ec2.model;
import java.io.Serializable;
import javax.annotation.Generated;
import com.amazonaws.AmazonWebServiceResult;
/**
*
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class DisableFastLaunchResult extends com.amazonaws.AmazonWebServiceResult implements Serializable, Cloneable {
/**
*
* The ID of the image for which Windows fast launch was disabled.
*
*/
private String imageId;
/**
*
* The pre-provisioning resource type that must be cleaned after turning off Windows fast launch for the Windows
* AMI. Supported values include: snapshot
.
*
*/
private String resourceType;
/**
*
* Parameters that were used for Windows fast launch for the Windows AMI before Windows fast launch was disabled.
* This informs the clean-up process.
*
*/
private FastLaunchSnapshotConfigurationResponse snapshotConfiguration;
/**
*
* The launch template that was used to launch Windows instances from pre-provisioned snapshots.
*
*/
private FastLaunchLaunchTemplateSpecificationResponse launchTemplate;
/**
*
* The maximum number of instances that Amazon EC2 can launch at the same time to create pre-provisioned snapshots
* for Windows fast launch.
*
*/
private Integer maxParallelLaunches;
/**
*
* The owner of the Windows AMI for which Windows fast launch was disabled.
*
*/
private String ownerId;
/**
*
* The current state of Windows fast launch for the specified Windows AMI.
*
*/
private String state;
/**
*
* The reason that the state changed for Windows fast launch for the Windows AMI.
*
*/
private String stateTransitionReason;
/**
*
* The time that the state changed for Windows fast launch for the Windows AMI.
*
*/
private java.util.Date stateTransitionTime;
/**
*
* The ID of the image for which Windows fast launch was disabled.
*
*
* @param imageId
* The ID of the image for which Windows fast launch was disabled.
*/
public void setImageId(String imageId) {
this.imageId = imageId;
}
/**
*
* The ID of the image for which Windows fast launch was disabled.
*
*
* @return The ID of the image for which Windows fast launch was disabled.
*/
public String getImageId() {
return this.imageId;
}
/**
*
* The ID of the image for which Windows fast launch was disabled.
*
*
* @param imageId
* The ID of the image for which Windows fast launch was disabled.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public DisableFastLaunchResult withImageId(String imageId) {
setImageId(imageId);
return this;
}
/**
*
* The pre-provisioning resource type that must be cleaned after turning off Windows fast launch for the Windows
* AMI. Supported values include: snapshot
.
*
*
* @param resourceType
* The pre-provisioning resource type that must be cleaned after turning off Windows fast launch for the
* Windows AMI. Supported values include: snapshot
.
* @see FastLaunchResourceType
*/
public void setResourceType(String resourceType) {
this.resourceType = resourceType;
}
/**
*
* The pre-provisioning resource type that must be cleaned after turning off Windows fast launch for the Windows
* AMI. Supported values include: snapshot
.
*
*
* @return The pre-provisioning resource type that must be cleaned after turning off Windows fast launch for the
* Windows AMI. Supported values include: snapshot
.
* @see FastLaunchResourceType
*/
public String getResourceType() {
return this.resourceType;
}
/**
*
* The pre-provisioning resource type that must be cleaned after turning off Windows fast launch for the Windows
* AMI. Supported values include: snapshot
.
*
*
* @param resourceType
* The pre-provisioning resource type that must be cleaned after turning off Windows fast launch for the
* Windows AMI. Supported values include: snapshot
.
* @return Returns a reference to this object so that method calls can be chained together.
* @see FastLaunchResourceType
*/
public DisableFastLaunchResult withResourceType(String resourceType) {
setResourceType(resourceType);
return this;
}
/**
*
* The pre-provisioning resource type that must be cleaned after turning off Windows fast launch for the Windows
* AMI. Supported values include: snapshot
.
*
*
* @param resourceType
* The pre-provisioning resource type that must be cleaned after turning off Windows fast launch for the
* Windows AMI. Supported values include: snapshot
.
* @return Returns a reference to this object so that method calls can be chained together.
* @see FastLaunchResourceType
*/
public DisableFastLaunchResult withResourceType(FastLaunchResourceType resourceType) {
this.resourceType = resourceType.toString();
return this;
}
/**
*
* Parameters that were used for Windows fast launch for the Windows AMI before Windows fast launch was disabled.
* This informs the clean-up process.
*
*
* @param snapshotConfiguration
* Parameters that were used for Windows fast launch for the Windows AMI before Windows fast launch was
* disabled. This informs the clean-up process.
*/
public void setSnapshotConfiguration(FastLaunchSnapshotConfigurationResponse snapshotConfiguration) {
this.snapshotConfiguration = snapshotConfiguration;
}
/**
*
* Parameters that were used for Windows fast launch for the Windows AMI before Windows fast launch was disabled.
* This informs the clean-up process.
*
*
* @return Parameters that were used for Windows fast launch for the Windows AMI before Windows fast launch was
* disabled. This informs the clean-up process.
*/
public FastLaunchSnapshotConfigurationResponse getSnapshotConfiguration() {
return this.snapshotConfiguration;
}
/**
*
* Parameters that were used for Windows fast launch for the Windows AMI before Windows fast launch was disabled.
* This informs the clean-up process.
*
*
* @param snapshotConfiguration
* Parameters that were used for Windows fast launch for the Windows AMI before Windows fast launch was
* disabled. This informs the clean-up process.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public DisableFastLaunchResult withSnapshotConfiguration(FastLaunchSnapshotConfigurationResponse snapshotConfiguration) {
setSnapshotConfiguration(snapshotConfiguration);
return this;
}
/**
*
* The launch template that was used to launch Windows instances from pre-provisioned snapshots.
*
*
* @param launchTemplate
* The launch template that was used to launch Windows instances from pre-provisioned snapshots.
*/
public void setLaunchTemplate(FastLaunchLaunchTemplateSpecificationResponse launchTemplate) {
this.launchTemplate = launchTemplate;
}
/**
*
* The launch template that was used to launch Windows instances from pre-provisioned snapshots.
*
*
* @return The launch template that was used to launch Windows instances from pre-provisioned snapshots.
*/
public FastLaunchLaunchTemplateSpecificationResponse getLaunchTemplate() {
return this.launchTemplate;
}
/**
*
* The launch template that was used to launch Windows instances from pre-provisioned snapshots.
*
*
* @param launchTemplate
* The launch template that was used to launch Windows instances from pre-provisioned snapshots.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public DisableFastLaunchResult withLaunchTemplate(FastLaunchLaunchTemplateSpecificationResponse launchTemplate) {
setLaunchTemplate(launchTemplate);
return this;
}
/**
*
* The maximum number of instances that Amazon EC2 can launch at the same time to create pre-provisioned snapshots
* for Windows fast launch.
*
*
* @param maxParallelLaunches
* The maximum number of instances that Amazon EC2 can launch at the same time to create pre-provisioned
* snapshots for Windows fast launch.
*/
public void setMaxParallelLaunches(Integer maxParallelLaunches) {
this.maxParallelLaunches = maxParallelLaunches;
}
/**
*
* The maximum number of instances that Amazon EC2 can launch at the same time to create pre-provisioned snapshots
* for Windows fast launch.
*
*
* @return The maximum number of instances that Amazon EC2 can launch at the same time to create pre-provisioned
* snapshots for Windows fast launch.
*/
public Integer getMaxParallelLaunches() {
return this.maxParallelLaunches;
}
/**
*
* The maximum number of instances that Amazon EC2 can launch at the same time to create pre-provisioned snapshots
* for Windows fast launch.
*
*
* @param maxParallelLaunches
* The maximum number of instances that Amazon EC2 can launch at the same time to create pre-provisioned
* snapshots for Windows fast launch.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public DisableFastLaunchResult withMaxParallelLaunches(Integer maxParallelLaunches) {
setMaxParallelLaunches(maxParallelLaunches);
return this;
}
/**
*
* The owner of the Windows AMI for which Windows fast launch was disabled.
*
*
* @param ownerId
* The owner of the Windows AMI for which Windows fast launch was disabled.
*/
public void setOwnerId(String ownerId) {
this.ownerId = ownerId;
}
/**
*
* The owner of the Windows AMI for which Windows fast launch was disabled.
*
*
* @return The owner of the Windows AMI for which Windows fast launch was disabled.
*/
public String getOwnerId() {
return this.ownerId;
}
/**
*
* The owner of the Windows AMI for which Windows fast launch was disabled.
*
*
* @param ownerId
* The owner of the Windows AMI for which Windows fast launch was disabled.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public DisableFastLaunchResult withOwnerId(String ownerId) {
setOwnerId(ownerId);
return this;
}
/**
*
* The current state of Windows fast launch for the specified Windows AMI.
*
*
* @param state
* The current state of Windows fast launch for the specified Windows AMI.
* @see FastLaunchStateCode
*/
public void setState(String state) {
this.state = state;
}
/**
*
* The current state of Windows fast launch for the specified Windows AMI.
*
*
* @return The current state of Windows fast launch for the specified Windows AMI.
* @see FastLaunchStateCode
*/
public String getState() {
return this.state;
}
/**
*
* The current state of Windows fast launch for the specified Windows AMI.
*
*
* @param state
* The current state of Windows fast launch for the specified Windows AMI.
* @return Returns a reference to this object so that method calls can be chained together.
* @see FastLaunchStateCode
*/
public DisableFastLaunchResult withState(String state) {
setState(state);
return this;
}
/**
*
* The current state of Windows fast launch for the specified Windows AMI.
*
*
* @param state
* The current state of Windows fast launch for the specified Windows AMI.
* @return Returns a reference to this object so that method calls can be chained together.
* @see FastLaunchStateCode
*/
public DisableFastLaunchResult withState(FastLaunchStateCode state) {
this.state = state.toString();
return this;
}
/**
*
* The reason that the state changed for Windows fast launch for the Windows AMI.
*
*
* @param stateTransitionReason
* The reason that the state changed for Windows fast launch for the Windows AMI.
*/
public void setStateTransitionReason(String stateTransitionReason) {
this.stateTransitionReason = stateTransitionReason;
}
/**
*
* The reason that the state changed for Windows fast launch for the Windows AMI.
*
*
* @return The reason that the state changed for Windows fast launch for the Windows AMI.
*/
public String getStateTransitionReason() {
return this.stateTransitionReason;
}
/**
*
* The reason that the state changed for Windows fast launch for the Windows AMI.
*
*
* @param stateTransitionReason
* The reason that the state changed for Windows fast launch for the Windows AMI.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public DisableFastLaunchResult withStateTransitionReason(String stateTransitionReason) {
setStateTransitionReason(stateTransitionReason);
return this;
}
/**
*
* The time that the state changed for Windows fast launch for the Windows AMI.
*
*
* @param stateTransitionTime
* The time that the state changed for Windows fast launch for the Windows AMI.
*/
public void setStateTransitionTime(java.util.Date stateTransitionTime) {
this.stateTransitionTime = stateTransitionTime;
}
/**
*
* The time that the state changed for Windows fast launch for the Windows AMI.
*
*
* @return The time that the state changed for Windows fast launch for the Windows AMI.
*/
public java.util.Date getStateTransitionTime() {
return this.stateTransitionTime;
}
/**
*
* The time that the state changed for Windows fast launch for the Windows AMI.
*
*
* @param stateTransitionTime
* The time that the state changed for Windows fast launch for the Windows AMI.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public DisableFastLaunchResult withStateTransitionTime(java.util.Date stateTransitionTime) {
setStateTransitionTime(stateTransitionTime);
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 (getImageId() != null)
sb.append("ImageId: ").append(getImageId()).append(",");
if (getResourceType() != null)
sb.append("ResourceType: ").append(getResourceType()).append(",");
if (getSnapshotConfiguration() != null)
sb.append("SnapshotConfiguration: ").append(getSnapshotConfiguration()).append(",");
if (getLaunchTemplate() != null)
sb.append("LaunchTemplate: ").append(getLaunchTemplate()).append(",");
if (getMaxParallelLaunches() != null)
sb.append("MaxParallelLaunches: ").append(getMaxParallelLaunches()).append(",");
if (getOwnerId() != null)
sb.append("OwnerId: ").append(getOwnerId()).append(",");
if (getState() != null)
sb.append("State: ").append(getState()).append(",");
if (getStateTransitionReason() != null)
sb.append("StateTransitionReason: ").append(getStateTransitionReason()).append(",");
if (getStateTransitionTime() != null)
sb.append("StateTransitionTime: ").append(getStateTransitionTime());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof DisableFastLaunchResult == false)
return false;
DisableFastLaunchResult other = (DisableFastLaunchResult) obj;
if (other.getImageId() == null ^ this.getImageId() == null)
return false;
if (other.getImageId() != null && other.getImageId().equals(this.getImageId()) == false)
return false;
if (other.getResourceType() == null ^ this.getResourceType() == null)
return false;
if (other.getResourceType() != null && other.getResourceType().equals(this.getResourceType()) == false)
return false;
if (other.getSnapshotConfiguration() == null ^ this.getSnapshotConfiguration() == null)
return false;
if (other.getSnapshotConfiguration() != null && other.getSnapshotConfiguration().equals(this.getSnapshotConfiguration()) == false)
return false;
if (other.getLaunchTemplate() == null ^ this.getLaunchTemplate() == null)
return false;
if (other.getLaunchTemplate() != null && other.getLaunchTemplate().equals(this.getLaunchTemplate()) == false)
return false;
if (other.getMaxParallelLaunches() == null ^ this.getMaxParallelLaunches() == null)
return false;
if (other.getMaxParallelLaunches() != null && other.getMaxParallelLaunches().equals(this.getMaxParallelLaunches()) == false)
return false;
if (other.getOwnerId() == null ^ this.getOwnerId() == null)
return false;
if (other.getOwnerId() != null && other.getOwnerId().equals(this.getOwnerId()) == 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.getStateTransitionReason() == null ^ this.getStateTransitionReason() == null)
return false;
if (other.getStateTransitionReason() != null && other.getStateTransitionReason().equals(this.getStateTransitionReason()) == false)
return false;
if (other.getStateTransitionTime() == null ^ this.getStateTransitionTime() == null)
return false;
if (other.getStateTransitionTime() != null && other.getStateTransitionTime().equals(this.getStateTransitionTime()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getImageId() == null) ? 0 : getImageId().hashCode());
hashCode = prime * hashCode + ((getResourceType() == null) ? 0 : getResourceType().hashCode());
hashCode = prime * hashCode + ((getSnapshotConfiguration() == null) ? 0 : getSnapshotConfiguration().hashCode());
hashCode = prime * hashCode + ((getLaunchTemplate() == null) ? 0 : getLaunchTemplate().hashCode());
hashCode = prime * hashCode + ((getMaxParallelLaunches() == null) ? 0 : getMaxParallelLaunches().hashCode());
hashCode = prime * hashCode + ((getOwnerId() == null) ? 0 : getOwnerId().hashCode());
hashCode = prime * hashCode + ((getState() == null) ? 0 : getState().hashCode());
hashCode = prime * hashCode + ((getStateTransitionReason() == null) ? 0 : getStateTransitionReason().hashCode());
hashCode = prime * hashCode + ((getStateTransitionTime() == null) ? 0 : getStateTransitionTime().hashCode());
return hashCode;
}
@Override
public DisableFastLaunchResult clone() {
try {
return (DisableFastLaunchResult) super.clone();
} catch (CloneNotSupportedException e) {
throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e);
}
}
}