/* * 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.imagebuilder.model; import java.io.Serializable; import javax.annotation.Generated; import com.amazonaws.protocol.StructuredPojo; import com.amazonaws.protocol.ProtocolMarshaller; /** *
* Defines a custom base AMI and block device mapping configurations of an instance used for building and testing * container images. *
* * @see AWS * API Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class InstanceConfiguration implements Serializable, Cloneable, StructuredPojo { /** ** The AMI ID to use as the base image for a container build and test instance. If not specified, Image Builder will * use the appropriate ECS-optimized AMI as a base image. *
*/ private String image; /** ** Defines the block devices to attach for building an instance from this Image Builder AMI. *
*/ private java.util.List* The AMI ID to use as the base image for a container build and test instance. If not specified, Image Builder will * use the appropriate ECS-optimized AMI as a base image. *
* * @param image * The AMI ID to use as the base image for a container build and test instance. If not specified, Image * Builder will use the appropriate ECS-optimized AMI as a base image. */ public void setImage(String image) { this.image = image; } /** ** The AMI ID to use as the base image for a container build and test instance. If not specified, Image Builder will * use the appropriate ECS-optimized AMI as a base image. *
* * @return The AMI ID to use as the base image for a container build and test instance. If not specified, Image * Builder will use the appropriate ECS-optimized AMI as a base image. */ public String getImage() { return this.image; } /** ** The AMI ID to use as the base image for a container build and test instance. If not specified, Image Builder will * use the appropriate ECS-optimized AMI as a base image. *
* * @param image * The AMI ID to use as the base image for a container build and test instance. If not specified, Image * Builder will use the appropriate ECS-optimized AMI as a base image. * @return Returns a reference to this object so that method calls can be chained together. */ public InstanceConfiguration withImage(String image) { setImage(image); return this; } /** ** Defines the block devices to attach for building an instance from this Image Builder AMI. *
* * @return Defines the block devices to attach for building an instance from this Image Builder AMI. */ public java.util.List* Defines the block devices to attach for building an instance from this Image Builder AMI. *
* * @param blockDeviceMappings * Defines the block devices to attach for building an instance from this Image Builder AMI. */ public void setBlockDeviceMappings(java.util.Collection* Defines the block devices to attach for building an instance from this Image Builder AMI. *
** NOTE: This method appends the values to the existing list (if any). Use * {@link #setBlockDeviceMappings(java.util.Collection)} or {@link #withBlockDeviceMappings(java.util.Collection)} * if you want to override the existing values. *
* * @param blockDeviceMappings * Defines the block devices to attach for building an instance from this Image Builder AMI. * @return Returns a reference to this object so that method calls can be chained together. */ public InstanceConfiguration withBlockDeviceMappings(InstanceBlockDeviceMapping... blockDeviceMappings) { if (this.blockDeviceMappings == null) { setBlockDeviceMappings(new java.util.ArrayList* Defines the block devices to attach for building an instance from this Image Builder AMI. *
* * @param blockDeviceMappings * Defines the block devices to attach for building an instance from this Image Builder AMI. * @return Returns a reference to this object so that method calls can be chained together. */ public InstanceConfiguration withBlockDeviceMappings(java.util.Collection