
com.amazonaws.services.lightsail.model.CreateInstancesFromSnapshotRequest Maven / Gradle / Ivy
/*
* 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.lightsail.model;
import java.io.Serializable;
import javax.annotation.Generated;
import com.amazonaws.AmazonWebServiceRequest;
/**
*
* @see AWS API Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class CreateInstancesFromSnapshotRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable {
/**
*
* The names for your new instances.
*
*/
private java.util.List instanceNames;
/**
*
* An object containing information about one or more disk mappings.
*
*/
private java.util.Map> attachedDiskMapping;
/**
*
* The Availability Zone where you want to create your instances. Use the following formatting:
* us-east-2a
(case sensitive). You can get a list of Availability Zones by using the get regions
* operation. Be sure to add the include Availability Zones
parameter to your request.
*
*/
private String availabilityZone;
/**
*
* The name of the instance snapshot on which you are basing your new instances. Use the get instance snapshots
* operation to return information about your existing snapshots.
*
*
* Constraint:
*
*
* -
*
* This parameter cannot be defined together with the source instance name
parameter. The
* instance snapshot name
and source instance name
parameters are mutually exclusive.
*
*
*
*/
private String instanceSnapshotName;
/**
*
* The bundle of specification information for your virtual private server (or instance), including the
* pricing plan (e.g., micro_1_0
).
*
*/
private String bundleId;
/**
*
* You can create a launch script that configures a server with additional user data. For example,
* apt-get -y update
.
*
*
*
* Depending on the machine image you choose, the command to get software on your instance varies. Amazon Linux and
* CentOS use yum
, Debian and Ubuntu use apt-get
, and FreeBSD uses pkg
. For a
* complete list, see the Amazon Lightsail Developer Guide.
*
*
*/
private String userData;
/**
*
* The name for your key pair.
*
*/
private String keyPairName;
/**
*
* The tag keys and optional values to add to the resource during create.
*
*
* Use the TagResource
action to tag a resource after it's created.
*
*/
private java.util.List tags;
/**
*
* An array of objects representing the add-ons to enable for the new instance.
*
*/
private java.util.List addOns;
/**
*
* The IP address type for the instance.
*
*
* The possible values are ipv4
for IPv4 only, and dualstack
for IPv4 and IPv6.
*
*
* The default value is dualstack
.
*
*/
private String ipAddressType;
/**
*
* The name of the source instance from which the source automatic snapshot was created.
*
*
* Constraints:
*
*
* -
*
* This parameter cannot be defined together with the instance snapshot name
parameter. The
* source instance name
and instance snapshot name
parameters are mutually exclusive.
*
*
* -
*
* Define this parameter only when creating a new instance from an automatic snapshot. For more information, see the
* Amazon Lightsail Developer Guide.
*
*
*
*/
private String sourceInstanceName;
/**
*
* The date of the automatic snapshot to use for the new instance. Use the get auto snapshots
operation
* to identify the dates of the available automatic snapshots.
*
*
* Constraints:
*
*
* -
*
* Must be specified in YYYY-MM-DD
format.
*
*
* -
*
* This parameter cannot be defined together with the use latest restorable auto snapshot
parameter.
* The restore date
and use latest restorable auto snapshot
parameters are mutually
* exclusive.
*
*
* -
*
* Define this parameter only when creating a new instance from an automatic snapshot. For more information, see the
* Amazon Lightsail Developer Guide.
*
*
*
*/
private String restoreDate;
/**
*
* A Boolean value to indicate whether to use the latest available automatic snapshot.
*
*
* Constraints:
*
*
* -
*
* This parameter cannot be defined together with the restore date
parameter. The
* use latest restorable auto snapshot
and restore date
parameters are mutually exclusive.
*
*
* -
*
* Define this parameter only when creating a new instance from an automatic snapshot. For more information, see the
* Amazon Lightsail Developer Guide.
*
*
*
*/
private Boolean useLatestRestorableAutoSnapshot;
/**
*
* The names for your new instances.
*
*
* @return The names for your new instances.
*/
public java.util.List getInstanceNames() {
return instanceNames;
}
/**
*
* The names for your new instances.
*
*
* @param instanceNames
* The names for your new instances.
*/
public void setInstanceNames(java.util.Collection instanceNames) {
if (instanceNames == null) {
this.instanceNames = null;
return;
}
this.instanceNames = new java.util.ArrayList(instanceNames);
}
/**
*
* The names for your new instances.
*
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setInstanceNames(java.util.Collection)} or {@link #withInstanceNames(java.util.Collection)} if you want
* to override the existing values.
*
*
* @param instanceNames
* The names for your new instances.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateInstancesFromSnapshotRequest withInstanceNames(String... instanceNames) {
if (this.instanceNames == null) {
setInstanceNames(new java.util.ArrayList(instanceNames.length));
}
for (String ele : instanceNames) {
this.instanceNames.add(ele);
}
return this;
}
/**
*
* The names for your new instances.
*
*
* @param instanceNames
* The names for your new instances.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateInstancesFromSnapshotRequest withInstanceNames(java.util.Collection instanceNames) {
setInstanceNames(instanceNames);
return this;
}
/**
*
* An object containing information about one or more disk mappings.
*
*
* @return An object containing information about one or more disk mappings.
*/
public java.util.Map> getAttachedDiskMapping() {
return attachedDiskMapping;
}
/**
*
* An object containing information about one or more disk mappings.
*
*
* @param attachedDiskMapping
* An object containing information about one or more disk mappings.
*/
public void setAttachedDiskMapping(java.util.Map> attachedDiskMapping) {
this.attachedDiskMapping = attachedDiskMapping;
}
/**
*
* An object containing information about one or more disk mappings.
*
*
* @param attachedDiskMapping
* An object containing information about one or more disk mappings.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateInstancesFromSnapshotRequest withAttachedDiskMapping(java.util.Map> attachedDiskMapping) {
setAttachedDiskMapping(attachedDiskMapping);
return this;
}
/**
* Add a single AttachedDiskMapping entry
*
* @see CreateInstancesFromSnapshotRequest#withAttachedDiskMapping
* @returns a reference to this object so that method calls can be chained together.
*/
public CreateInstancesFromSnapshotRequest addAttachedDiskMappingEntry(String key, java.util.List value) {
if (null == this.attachedDiskMapping) {
this.attachedDiskMapping = new java.util.HashMap>();
}
if (this.attachedDiskMapping.containsKey(key))
throw new IllegalArgumentException("Duplicated keys (" + key.toString() + ") are provided.");
this.attachedDiskMapping.put(key, value);
return this;
}
/**
* Removes all the entries added into AttachedDiskMapping.
*
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateInstancesFromSnapshotRequest clearAttachedDiskMappingEntries() {
this.attachedDiskMapping = null;
return this;
}
/**
*
* The Availability Zone where you want to create your instances. Use the following formatting:
* us-east-2a
(case sensitive). You can get a list of Availability Zones by using the get regions
* operation. Be sure to add the include Availability Zones
parameter to your request.
*
*
* @param availabilityZone
* The Availability Zone where you want to create your instances. Use the following formatting:
* us-east-2a
(case sensitive). You can get a list of Availability Zones by using the get regions
* operation. Be sure to add the include Availability Zones
parameter to your request.
*/
public void setAvailabilityZone(String availabilityZone) {
this.availabilityZone = availabilityZone;
}
/**
*
* The Availability Zone where you want to create your instances. Use the following formatting:
* us-east-2a
(case sensitive). You can get a list of Availability Zones by using the get regions
* operation. Be sure to add the include Availability Zones
parameter to your request.
*
*
* @return The Availability Zone where you want to create your instances. Use the following formatting:
* us-east-2a
(case sensitive). You can get a list of Availability Zones by using the get regions
* operation. Be sure to add the include Availability Zones
parameter to your request.
*/
public String getAvailabilityZone() {
return this.availabilityZone;
}
/**
*
* The Availability Zone where you want to create your instances. Use the following formatting:
* us-east-2a
(case sensitive). You can get a list of Availability Zones by using the get regions
* operation. Be sure to add the include Availability Zones
parameter to your request.
*
*
* @param availabilityZone
* The Availability Zone where you want to create your instances. Use the following formatting:
* us-east-2a
(case sensitive). You can get a list of Availability Zones by using the get regions
* operation. Be sure to add the include Availability Zones
parameter to your request.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateInstancesFromSnapshotRequest withAvailabilityZone(String availabilityZone) {
setAvailabilityZone(availabilityZone);
return this;
}
/**
*
* The name of the instance snapshot on which you are basing your new instances. Use the get instance snapshots
* operation to return information about your existing snapshots.
*
*
* Constraint:
*
*
* -
*
* This parameter cannot be defined together with the source instance name
parameter. The
* instance snapshot name
and source instance name
parameters are mutually exclusive.
*
*
*
*
* @param instanceSnapshotName
* The name of the instance snapshot on which you are basing your new instances. Use the get instance
* snapshots operation to return information about your existing snapshots.
*
* Constraint:
*
*
* -
*
* This parameter cannot be defined together with the source instance name
parameter. The
* instance snapshot name
and source instance name
parameters are mutually
* exclusive.
*
*
*/
public void setInstanceSnapshotName(String instanceSnapshotName) {
this.instanceSnapshotName = instanceSnapshotName;
}
/**
*
* The name of the instance snapshot on which you are basing your new instances. Use the get instance snapshots
* operation to return information about your existing snapshots.
*
*
* Constraint:
*
*
* -
*
* This parameter cannot be defined together with the source instance name
parameter. The
* instance snapshot name
and source instance name
parameters are mutually exclusive.
*
*
*
*
* @return The name of the instance snapshot on which you are basing your new instances. Use the get instance
* snapshots operation to return information about your existing snapshots.
*
* Constraint:
*
*
* -
*
* This parameter cannot be defined together with the source instance name
parameter. The
* instance snapshot name
and source instance name
parameters are mutually
* exclusive.
*
*
*/
public String getInstanceSnapshotName() {
return this.instanceSnapshotName;
}
/**
*
* The name of the instance snapshot on which you are basing your new instances. Use the get instance snapshots
* operation to return information about your existing snapshots.
*
*
* Constraint:
*
*
* -
*
* This parameter cannot be defined together with the source instance name
parameter. The
* instance snapshot name
and source instance name
parameters are mutually exclusive.
*
*
*
*
* @param instanceSnapshotName
* The name of the instance snapshot on which you are basing your new instances. Use the get instance
* snapshots operation to return information about your existing snapshots.
*
* Constraint:
*
*
* -
*
* This parameter cannot be defined together with the source instance name
parameter. The
* instance snapshot name
and source instance name
parameters are mutually
* exclusive.
*
*
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateInstancesFromSnapshotRequest withInstanceSnapshotName(String instanceSnapshotName) {
setInstanceSnapshotName(instanceSnapshotName);
return this;
}
/**
*
* The bundle of specification information for your virtual private server (or instance), including the
* pricing plan (e.g., micro_1_0
).
*
*
* @param bundleId
* The bundle of specification information for your virtual private server (or instance), including
* the pricing plan (e.g., micro_1_0
).
*/
public void setBundleId(String bundleId) {
this.bundleId = bundleId;
}
/**
*
* The bundle of specification information for your virtual private server (or instance), including the
* pricing plan (e.g., micro_1_0
).
*
*
* @return The bundle of specification information for your virtual private server (or instance), including
* the pricing plan (e.g., micro_1_0
).
*/
public String getBundleId() {
return this.bundleId;
}
/**
*
* The bundle of specification information for your virtual private server (or instance), including the
* pricing plan (e.g., micro_1_0
).
*
*
* @param bundleId
* The bundle of specification information for your virtual private server (or instance), including
* the pricing plan (e.g., micro_1_0
).
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateInstancesFromSnapshotRequest withBundleId(String bundleId) {
setBundleId(bundleId);
return this;
}
/**
*
* You can create a launch script that configures a server with additional user data. For example,
* apt-get -y update
.
*
*
*
* Depending on the machine image you choose, the command to get software on your instance varies. Amazon Linux and
* CentOS use yum
, Debian and Ubuntu use apt-get
, and FreeBSD uses pkg
. For a
* complete list, see the Amazon Lightsail Developer Guide.
*
*
*
* @param userData
* You can create a launch script that configures a server with additional user data. For example,
* apt-get -y update
.
*
* Depending on the machine image you choose, the command to get software on your instance varies. Amazon
* Linux and CentOS use yum
, Debian and Ubuntu use apt-get
, and FreeBSD uses
* pkg
. For a complete list, see the Amazon Lightsail Developer Guide.
*
*/
public void setUserData(String userData) {
this.userData = userData;
}
/**
*
* You can create a launch script that configures a server with additional user data. For example,
* apt-get -y update
.
*
*
*
* Depending on the machine image you choose, the command to get software on your instance varies. Amazon Linux and
* CentOS use yum
, Debian and Ubuntu use apt-get
, and FreeBSD uses pkg
. For a
* complete list, see the Amazon Lightsail Developer Guide.
*
*
*
* @return You can create a launch script that configures a server with additional user data. For example,
* apt-get -y update
.
*
* Depending on the machine image you choose, the command to get software on your instance varies. Amazon
* Linux and CentOS use yum
, Debian and Ubuntu use apt-get
, and FreeBSD uses
* pkg
. For a complete list, see the Amazon Lightsail Developer Guide.
*
*/
public String getUserData() {
return this.userData;
}
/**
*
* You can create a launch script that configures a server with additional user data. For example,
* apt-get -y update
.
*
*
*
* Depending on the machine image you choose, the command to get software on your instance varies. Amazon Linux and
* CentOS use yum
, Debian and Ubuntu use apt-get
, and FreeBSD uses pkg
. For a
* complete list, see the Amazon Lightsail Developer Guide.
*
*
*
* @param userData
* You can create a launch script that configures a server with additional user data. For example,
* apt-get -y update
.
*
* Depending on the machine image you choose, the command to get software on your instance varies. Amazon
* Linux and CentOS use yum
, Debian and Ubuntu use apt-get
, and FreeBSD uses
* pkg
. For a complete list, see the Amazon Lightsail Developer Guide.
*
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateInstancesFromSnapshotRequest withUserData(String userData) {
setUserData(userData);
return this;
}
/**
*
* The name for your key pair.
*
*
* @param keyPairName
* The name for your key pair.
*/
public void setKeyPairName(String keyPairName) {
this.keyPairName = keyPairName;
}
/**
*
* The name for your key pair.
*
*
* @return The name for your key pair.
*/
public String getKeyPairName() {
return this.keyPairName;
}
/**
*
* The name for your key pair.
*
*
* @param keyPairName
* The name for your key pair.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateInstancesFromSnapshotRequest withKeyPairName(String keyPairName) {
setKeyPairName(keyPairName);
return this;
}
/**
*
* The tag keys and optional values to add to the resource during create.
*
*
* Use the TagResource
action to tag a resource after it's created.
*
*
* @return The tag keys and optional values to add to the resource during create.
*
* Use the TagResource
action to tag a resource after it's created.
*/
public java.util.List getTags() {
return tags;
}
/**
*
* The tag keys and optional values to add to the resource during create.
*
*
* Use the TagResource
action to tag a resource after it's created.
*
*
* @param tags
* The tag keys and optional values to add to the resource during create.
*
* Use the TagResource
action to tag a resource after it's created.
*/
public void setTags(java.util.Collection tags) {
if (tags == null) {
this.tags = null;
return;
}
this.tags = new java.util.ArrayList(tags);
}
/**
*
* The tag keys and optional values to add to the resource during create.
*
*
* Use the TagResource
action to tag a resource after it's created.
*
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setTags(java.util.Collection)} or {@link #withTags(java.util.Collection)} if you want to override the
* existing values.
*
*
* @param tags
* The tag keys and optional values to add to the resource during create.
*
* Use the TagResource
action to tag a resource after it's created.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateInstancesFromSnapshotRequest withTags(Tag... tags) {
if (this.tags == null) {
setTags(new java.util.ArrayList(tags.length));
}
for (Tag ele : tags) {
this.tags.add(ele);
}
return this;
}
/**
*
* The tag keys and optional values to add to the resource during create.
*
*
* Use the TagResource
action to tag a resource after it's created.
*
*
* @param tags
* The tag keys and optional values to add to the resource during create.
*
* Use the TagResource
action to tag a resource after it's created.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateInstancesFromSnapshotRequest withTags(java.util.Collection tags) {
setTags(tags);
return this;
}
/**
*
* An array of objects representing the add-ons to enable for the new instance.
*
*
* @return An array of objects representing the add-ons to enable for the new instance.
*/
public java.util.List getAddOns() {
return addOns;
}
/**
*
* An array of objects representing the add-ons to enable for the new instance.
*
*
* @param addOns
* An array of objects representing the add-ons to enable for the new instance.
*/
public void setAddOns(java.util.Collection addOns) {
if (addOns == null) {
this.addOns = null;
return;
}
this.addOns = new java.util.ArrayList(addOns);
}
/**
*
* An array of objects representing the add-ons to enable for the new instance.
*
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setAddOns(java.util.Collection)} or {@link #withAddOns(java.util.Collection)} if you want to override the
* existing values.
*
*
* @param addOns
* An array of objects representing the add-ons to enable for the new instance.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateInstancesFromSnapshotRequest withAddOns(AddOnRequest... addOns) {
if (this.addOns == null) {
setAddOns(new java.util.ArrayList(addOns.length));
}
for (AddOnRequest ele : addOns) {
this.addOns.add(ele);
}
return this;
}
/**
*
* An array of objects representing the add-ons to enable for the new instance.
*
*
* @param addOns
* An array of objects representing the add-ons to enable for the new instance.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateInstancesFromSnapshotRequest withAddOns(java.util.Collection addOns) {
setAddOns(addOns);
return this;
}
/**
*
* The IP address type for the instance.
*
*
* The possible values are ipv4
for IPv4 only, and dualstack
for IPv4 and IPv6.
*
*
* The default value is dualstack
.
*
*
* @param ipAddressType
* The IP address type for the instance.
*
* The possible values are ipv4
for IPv4 only, and dualstack
for IPv4 and IPv6.
*
*
* The default value is dualstack
.
* @see IpAddressType
*/
public void setIpAddressType(String ipAddressType) {
this.ipAddressType = ipAddressType;
}
/**
*
* The IP address type for the instance.
*
*
* The possible values are ipv4
for IPv4 only, and dualstack
for IPv4 and IPv6.
*
*
* The default value is dualstack
.
*
*
* @return The IP address type for the instance.
*
* The possible values are ipv4
for IPv4 only, and dualstack
for IPv4 and IPv6.
*
*
* The default value is dualstack
.
* @see IpAddressType
*/
public String getIpAddressType() {
return this.ipAddressType;
}
/**
*
* The IP address type for the instance.
*
*
* The possible values are ipv4
for IPv4 only, and dualstack
for IPv4 and IPv6.
*
*
* The default value is dualstack
.
*
*
* @param ipAddressType
* The IP address type for the instance.
*
* The possible values are ipv4
for IPv4 only, and dualstack
for IPv4 and IPv6.
*
*
* The default value is dualstack
.
* @return Returns a reference to this object so that method calls can be chained together.
* @see IpAddressType
*/
public CreateInstancesFromSnapshotRequest withIpAddressType(String ipAddressType) {
setIpAddressType(ipAddressType);
return this;
}
/**
*
* The IP address type for the instance.
*
*
* The possible values are ipv4
for IPv4 only, and dualstack
for IPv4 and IPv6.
*
*
* The default value is dualstack
.
*
*
* @param ipAddressType
* The IP address type for the instance.
*
* The possible values are ipv4
for IPv4 only, and dualstack
for IPv4 and IPv6.
*
*
* The default value is dualstack
.
* @return Returns a reference to this object so that method calls can be chained together.
* @see IpAddressType
*/
public CreateInstancesFromSnapshotRequest withIpAddressType(IpAddressType ipAddressType) {
this.ipAddressType = ipAddressType.toString();
return this;
}
/**
*
* The name of the source instance from which the source automatic snapshot was created.
*
*
* Constraints:
*
*
* -
*
* This parameter cannot be defined together with the instance snapshot name
parameter. The
* source instance name
and instance snapshot name
parameters are mutually exclusive.
*
*
* -
*
* Define this parameter only when creating a new instance from an automatic snapshot. For more information, see the
* Amazon Lightsail Developer Guide.
*
*
*
*
* @param sourceInstanceName
* The name of the source instance from which the source automatic snapshot was created.
*
* Constraints:
*
*
* -
*
* This parameter cannot be defined together with the instance snapshot name
parameter. The
* source instance name
and instance snapshot name
parameters are mutually
* exclusive.
*
*
* -
*
* Define this parameter only when creating a new instance from an automatic snapshot. For more information,
* see the Amazon Lightsail Developer Guide.
*
*
*/
public void setSourceInstanceName(String sourceInstanceName) {
this.sourceInstanceName = sourceInstanceName;
}
/**
*
* The name of the source instance from which the source automatic snapshot was created.
*
*
* Constraints:
*
*
* -
*
* This parameter cannot be defined together with the instance snapshot name
parameter. The
* source instance name
and instance snapshot name
parameters are mutually exclusive.
*
*
* -
*
* Define this parameter only when creating a new instance from an automatic snapshot. For more information, see the
* Amazon Lightsail Developer Guide.
*
*
*
*
* @return The name of the source instance from which the source automatic snapshot was created.
*
* Constraints:
*
*
* -
*
* This parameter cannot be defined together with the instance snapshot name
parameter. The
* source instance name
and instance snapshot name
parameters are mutually
* exclusive.
*
*
* -
*
* Define this parameter only when creating a new instance from an automatic snapshot. For more information,
* see the Amazon Lightsail Developer Guide.
*
*
*/
public String getSourceInstanceName() {
return this.sourceInstanceName;
}
/**
*
* The name of the source instance from which the source automatic snapshot was created.
*
*
* Constraints:
*
*
* -
*
* This parameter cannot be defined together with the instance snapshot name
parameter. The
* source instance name
and instance snapshot name
parameters are mutually exclusive.
*
*
* -
*
* Define this parameter only when creating a new instance from an automatic snapshot. For more information, see the
* Amazon Lightsail Developer Guide.
*
*
*
*
* @param sourceInstanceName
* The name of the source instance from which the source automatic snapshot was created.
*
* Constraints:
*
*
* -
*
* This parameter cannot be defined together with the instance snapshot name
parameter. The
* source instance name
and instance snapshot name
parameters are mutually
* exclusive.
*
*
* -
*
* Define this parameter only when creating a new instance from an automatic snapshot. For more information,
* see the Amazon Lightsail Developer Guide.
*
*
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateInstancesFromSnapshotRequest withSourceInstanceName(String sourceInstanceName) {
setSourceInstanceName(sourceInstanceName);
return this;
}
/**
*
* The date of the automatic snapshot to use for the new instance. Use the get auto snapshots
operation
* to identify the dates of the available automatic snapshots.
*
*
* Constraints:
*
*
* -
*
* Must be specified in YYYY-MM-DD
format.
*
*
* -
*
* This parameter cannot be defined together with the use latest restorable auto snapshot
parameter.
* The restore date
and use latest restorable auto snapshot
parameters are mutually
* exclusive.
*
*
* -
*
* Define this parameter only when creating a new instance from an automatic snapshot. For more information, see the
* Amazon Lightsail Developer Guide.
*
*
*
*
* @param restoreDate
* The date of the automatic snapshot to use for the new instance. Use the get auto snapshots
* operation to identify the dates of the available automatic snapshots.
*
* Constraints:
*
*
* -
*
* Must be specified in YYYY-MM-DD
format.
*
*
* -
*
* This parameter cannot be defined together with the use latest restorable auto snapshot
* parameter. The restore date
and use latest restorable auto snapshot
parameters
* are mutually exclusive.
*
*
* -
*
* Define this parameter only when creating a new instance from an automatic snapshot. For more information,
* see the Amazon Lightsail Developer Guide.
*
*
*/
public void setRestoreDate(String restoreDate) {
this.restoreDate = restoreDate;
}
/**
*
* The date of the automatic snapshot to use for the new instance. Use the get auto snapshots
operation
* to identify the dates of the available automatic snapshots.
*
*
* Constraints:
*
*
* -
*
* Must be specified in YYYY-MM-DD
format.
*
*
* -
*
* This parameter cannot be defined together with the use latest restorable auto snapshot
parameter.
* The restore date
and use latest restorable auto snapshot
parameters are mutually
* exclusive.
*
*
* -
*
* Define this parameter only when creating a new instance from an automatic snapshot. For more information, see the
* Amazon Lightsail Developer Guide.
*
*
*
*
* @return The date of the automatic snapshot to use for the new instance. Use the get auto snapshots
* operation to identify the dates of the available automatic snapshots.
*
* Constraints:
*
*
* -
*
* Must be specified in YYYY-MM-DD
format.
*
*
* -
*
* This parameter cannot be defined together with the use latest restorable auto snapshot
* parameter. The restore date
and use latest restorable auto snapshot
parameters
* are mutually exclusive.
*
*
* -
*
* Define this parameter only when creating a new instance from an automatic snapshot. For more information,
* see the Amazon Lightsail Developer Guide.
*
*
*/
public String getRestoreDate() {
return this.restoreDate;
}
/**
*
* The date of the automatic snapshot to use for the new instance. Use the get auto snapshots
operation
* to identify the dates of the available automatic snapshots.
*
*
* Constraints:
*
*
* -
*
* Must be specified in YYYY-MM-DD
format.
*
*
* -
*
* This parameter cannot be defined together with the use latest restorable auto snapshot
parameter.
* The restore date
and use latest restorable auto snapshot
parameters are mutually
* exclusive.
*
*
* -
*
* Define this parameter only when creating a new instance from an automatic snapshot. For more information, see the
* Amazon Lightsail Developer Guide.
*
*
*
*
* @param restoreDate
* The date of the automatic snapshot to use for the new instance. Use the get auto snapshots
* operation to identify the dates of the available automatic snapshots.
*
* Constraints:
*
*
* -
*
* Must be specified in YYYY-MM-DD
format.
*
*
* -
*
* This parameter cannot be defined together with the use latest restorable auto snapshot
* parameter. The restore date
and use latest restorable auto snapshot
parameters
* are mutually exclusive.
*
*
* -
*
* Define this parameter only when creating a new instance from an automatic snapshot. For more information,
* see the Amazon Lightsail Developer Guide.
*
*
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateInstancesFromSnapshotRequest withRestoreDate(String restoreDate) {
setRestoreDate(restoreDate);
return this;
}
/**
*
* A Boolean value to indicate whether to use the latest available automatic snapshot.
*
*
* Constraints:
*
*
* -
*
* This parameter cannot be defined together with the restore date
parameter. The
* use latest restorable auto snapshot
and restore date
parameters are mutually exclusive.
*
*
* -
*
* Define this parameter only when creating a new instance from an automatic snapshot. For more information, see the
* Amazon Lightsail Developer Guide.
*
*
*
*
* @param useLatestRestorableAutoSnapshot
* A Boolean value to indicate whether to use the latest available automatic snapshot.
*
* Constraints:
*
*
* -
*
* This parameter cannot be defined together with the restore date
parameter. The
* use latest restorable auto snapshot
and restore date
parameters are mutually
* exclusive.
*
*
* -
*
* Define this parameter only when creating a new instance from an automatic snapshot. For more information,
* see the Amazon Lightsail Developer Guide.
*
*
*/
public void setUseLatestRestorableAutoSnapshot(Boolean useLatestRestorableAutoSnapshot) {
this.useLatestRestorableAutoSnapshot = useLatestRestorableAutoSnapshot;
}
/**
*
* A Boolean value to indicate whether to use the latest available automatic snapshot.
*
*
* Constraints:
*
*
* -
*
* This parameter cannot be defined together with the restore date
parameter. The
* use latest restorable auto snapshot
and restore date
parameters are mutually exclusive.
*
*
* -
*
* Define this parameter only when creating a new instance from an automatic snapshot. For more information, see the
* Amazon Lightsail Developer Guide.
*
*
*
*
* @return A Boolean value to indicate whether to use the latest available automatic snapshot.
*
* Constraints:
*
*
* -
*
* This parameter cannot be defined together with the restore date
parameter. The
* use latest restorable auto snapshot
and restore date
parameters are mutually
* exclusive.
*
*
* -
*
* Define this parameter only when creating a new instance from an automatic snapshot. For more information,
* see the Amazon Lightsail Developer Guide.
*
*
*/
public Boolean getUseLatestRestorableAutoSnapshot() {
return this.useLatestRestorableAutoSnapshot;
}
/**
*
* A Boolean value to indicate whether to use the latest available automatic snapshot.
*
*
* Constraints:
*
*
* -
*
* This parameter cannot be defined together with the restore date
parameter. The
* use latest restorable auto snapshot
and restore date
parameters are mutually exclusive.
*
*
* -
*
* Define this parameter only when creating a new instance from an automatic snapshot. For more information, see the
* Amazon Lightsail Developer Guide.
*
*
*
*
* @param useLatestRestorableAutoSnapshot
* A Boolean value to indicate whether to use the latest available automatic snapshot.
*
* Constraints:
*
*
* -
*
* This parameter cannot be defined together with the restore date
parameter. The
* use latest restorable auto snapshot
and restore date
parameters are mutually
* exclusive.
*
*
* -
*
* Define this parameter only when creating a new instance from an automatic snapshot. For more information,
* see the Amazon Lightsail Developer Guide.
*
*
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateInstancesFromSnapshotRequest withUseLatestRestorableAutoSnapshot(Boolean useLatestRestorableAutoSnapshot) {
setUseLatestRestorableAutoSnapshot(useLatestRestorableAutoSnapshot);
return this;
}
/**
*
* A Boolean value to indicate whether to use the latest available automatic snapshot.
*
*
* Constraints:
*
*
* -
*
* This parameter cannot be defined together with the restore date
parameter. The
* use latest restorable auto snapshot
and restore date
parameters are mutually exclusive.
*
*
* -
*
* Define this parameter only when creating a new instance from an automatic snapshot. For more information, see the
* Amazon Lightsail Developer Guide.
*
*
*
*
* @return A Boolean value to indicate whether to use the latest available automatic snapshot.
*
* Constraints:
*
*
* -
*
* This parameter cannot be defined together with the restore date
parameter. The
* use latest restorable auto snapshot
and restore date
parameters are mutually
* exclusive.
*
*
* -
*
* Define this parameter only when creating a new instance from an automatic snapshot. For more information,
* see the Amazon Lightsail Developer Guide.
*
*
*/
public Boolean isUseLatestRestorableAutoSnapshot() {
return this.useLatestRestorableAutoSnapshot;
}
/**
* 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 (getInstanceNames() != null)
sb.append("InstanceNames: ").append(getInstanceNames()).append(",");
if (getAttachedDiskMapping() != null)
sb.append("AttachedDiskMapping: ").append(getAttachedDiskMapping()).append(",");
if (getAvailabilityZone() != null)
sb.append("AvailabilityZone: ").append(getAvailabilityZone()).append(",");
if (getInstanceSnapshotName() != null)
sb.append("InstanceSnapshotName: ").append(getInstanceSnapshotName()).append(",");
if (getBundleId() != null)
sb.append("BundleId: ").append(getBundleId()).append(",");
if (getUserData() != null)
sb.append("UserData: ").append(getUserData()).append(",");
if (getKeyPairName() != null)
sb.append("KeyPairName: ").append(getKeyPairName()).append(",");
if (getTags() != null)
sb.append("Tags: ").append(getTags()).append(",");
if (getAddOns() != null)
sb.append("AddOns: ").append(getAddOns()).append(",");
if (getIpAddressType() != null)
sb.append("IpAddressType: ").append(getIpAddressType()).append(",");
if (getSourceInstanceName() != null)
sb.append("SourceInstanceName: ").append(getSourceInstanceName()).append(",");
if (getRestoreDate() != null)
sb.append("RestoreDate: ").append(getRestoreDate()).append(",");
if (getUseLatestRestorableAutoSnapshot() != null)
sb.append("UseLatestRestorableAutoSnapshot: ").append(getUseLatestRestorableAutoSnapshot());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof CreateInstancesFromSnapshotRequest == false)
return false;
CreateInstancesFromSnapshotRequest other = (CreateInstancesFromSnapshotRequest) obj;
if (other.getInstanceNames() == null ^ this.getInstanceNames() == null)
return false;
if (other.getInstanceNames() != null && other.getInstanceNames().equals(this.getInstanceNames()) == false)
return false;
if (other.getAttachedDiskMapping() == null ^ this.getAttachedDiskMapping() == null)
return false;
if (other.getAttachedDiskMapping() != null && other.getAttachedDiskMapping().equals(this.getAttachedDiskMapping()) == false)
return false;
if (other.getAvailabilityZone() == null ^ this.getAvailabilityZone() == null)
return false;
if (other.getAvailabilityZone() != null && other.getAvailabilityZone().equals(this.getAvailabilityZone()) == false)
return false;
if (other.getInstanceSnapshotName() == null ^ this.getInstanceSnapshotName() == null)
return false;
if (other.getInstanceSnapshotName() != null && other.getInstanceSnapshotName().equals(this.getInstanceSnapshotName()) == false)
return false;
if (other.getBundleId() == null ^ this.getBundleId() == null)
return false;
if (other.getBundleId() != null && other.getBundleId().equals(this.getBundleId()) == false)
return false;
if (other.getUserData() == null ^ this.getUserData() == null)
return false;
if (other.getUserData() != null && other.getUserData().equals(this.getUserData()) == false)
return false;
if (other.getKeyPairName() == null ^ this.getKeyPairName() == null)
return false;
if (other.getKeyPairName() != null && other.getKeyPairName().equals(this.getKeyPairName()) == false)
return false;
if (other.getTags() == null ^ this.getTags() == null)
return false;
if (other.getTags() != null && other.getTags().equals(this.getTags()) == false)
return false;
if (other.getAddOns() == null ^ this.getAddOns() == null)
return false;
if (other.getAddOns() != null && other.getAddOns().equals(this.getAddOns()) == false)
return false;
if (other.getIpAddressType() == null ^ this.getIpAddressType() == null)
return false;
if (other.getIpAddressType() != null && other.getIpAddressType().equals(this.getIpAddressType()) == false)
return false;
if (other.getSourceInstanceName() == null ^ this.getSourceInstanceName() == null)
return false;
if (other.getSourceInstanceName() != null && other.getSourceInstanceName().equals(this.getSourceInstanceName()) == false)
return false;
if (other.getRestoreDate() == null ^ this.getRestoreDate() == null)
return false;
if (other.getRestoreDate() != null && other.getRestoreDate().equals(this.getRestoreDate()) == false)
return false;
if (other.getUseLatestRestorableAutoSnapshot() == null ^ this.getUseLatestRestorableAutoSnapshot() == null)
return false;
if (other.getUseLatestRestorableAutoSnapshot() != null
&& other.getUseLatestRestorableAutoSnapshot().equals(this.getUseLatestRestorableAutoSnapshot()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getInstanceNames() == null) ? 0 : getInstanceNames().hashCode());
hashCode = prime * hashCode + ((getAttachedDiskMapping() == null) ? 0 : getAttachedDiskMapping().hashCode());
hashCode = prime * hashCode + ((getAvailabilityZone() == null) ? 0 : getAvailabilityZone().hashCode());
hashCode = prime * hashCode + ((getInstanceSnapshotName() == null) ? 0 : getInstanceSnapshotName().hashCode());
hashCode = prime * hashCode + ((getBundleId() == null) ? 0 : getBundleId().hashCode());
hashCode = prime * hashCode + ((getUserData() == null) ? 0 : getUserData().hashCode());
hashCode = prime * hashCode + ((getKeyPairName() == null) ? 0 : getKeyPairName().hashCode());
hashCode = prime * hashCode + ((getTags() == null) ? 0 : getTags().hashCode());
hashCode = prime * hashCode + ((getAddOns() == null) ? 0 : getAddOns().hashCode());
hashCode = prime * hashCode + ((getIpAddressType() == null) ? 0 : getIpAddressType().hashCode());
hashCode = prime * hashCode + ((getSourceInstanceName() == null) ? 0 : getSourceInstanceName().hashCode());
hashCode = prime * hashCode + ((getRestoreDate() == null) ? 0 : getRestoreDate().hashCode());
hashCode = prime * hashCode + ((getUseLatestRestorableAutoSnapshot() == null) ? 0 : getUseLatestRestorableAutoSnapshot().hashCode());
return hashCode;
}
@Override
public CreateInstancesFromSnapshotRequest clone() {
return (CreateInstancesFromSnapshotRequest) super.clone();
}
}