All Downloads are FREE. Search and download functionalities are using the official Maven repository.

software.amazon.awssdk.services.opsworks.model.CreateInstanceRequest Maven / Gradle / Ivy

/*
 * Copyright 2014-2019 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 software.amazon.awssdk.services.opsworks.model;

import java.util.Arrays;
import java.util.Collection;
import java.util.Collections;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
import java.util.function.BiConsumer;
import java.util.function.Consumer;
import java.util.function.Function;
import java.util.stream.Collectors;
import java.util.stream.Stream;
import software.amazon.awssdk.annotations.Generated;
import software.amazon.awssdk.awscore.AwsRequestOverrideConfiguration;
import software.amazon.awssdk.core.SdkField;
import software.amazon.awssdk.core.SdkPojo;
import software.amazon.awssdk.core.protocol.MarshallLocation;
import software.amazon.awssdk.core.protocol.MarshallingType;
import software.amazon.awssdk.core.traits.ListTrait;
import software.amazon.awssdk.core.traits.LocationTrait;
import software.amazon.awssdk.core.util.DefaultSdkAutoConstructList;
import software.amazon.awssdk.utils.ToString;
import software.amazon.awssdk.utils.builder.CopyableBuilder;
import software.amazon.awssdk.utils.builder.ToCopyableBuilder;

/**
 */
@Generated("software.amazon.awssdk:codegen")
public final class CreateInstanceRequest extends OpsWorksRequest implements
        ToCopyableBuilder {
    private static final SdkField STACK_ID_FIELD = SdkField. builder(MarshallingType.STRING)
            .getter(getter(CreateInstanceRequest::stackId)).setter(setter(Builder::stackId))
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("StackId").build()).build();

    private static final SdkField> LAYER_IDS_FIELD = SdkField
            .> builder(MarshallingType.LIST)
            .getter(getter(CreateInstanceRequest::layerIds))
            .setter(setter(Builder::layerIds))
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("LayerIds").build(),
                    ListTrait
                            .builder()
                            .memberLocationName(null)
                            .memberFieldInfo(
                                    SdkField. builder(MarshallingType.STRING)
                                            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD)
                                                    .locationName("member").build()).build()).build()).build();

    private static final SdkField INSTANCE_TYPE_FIELD = SdkField. builder(MarshallingType.STRING)
            .getter(getter(CreateInstanceRequest::instanceType)).setter(setter(Builder::instanceType))
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("InstanceType").build()).build();

    private static final SdkField AUTO_SCALING_TYPE_FIELD = SdkField. builder(MarshallingType.STRING)
            .getter(getter(CreateInstanceRequest::autoScalingTypeAsString)).setter(setter(Builder::autoScalingType))
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("AutoScalingType").build()).build();

    private static final SdkField HOSTNAME_FIELD = SdkField. builder(MarshallingType.STRING)
            .getter(getter(CreateInstanceRequest::hostname)).setter(setter(Builder::hostname))
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("Hostname").build()).build();

    private static final SdkField OS_FIELD = SdkField. builder(MarshallingType.STRING)
            .getter(getter(CreateInstanceRequest::os)).setter(setter(Builder::os))
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("Os").build()).build();

    private static final SdkField AMI_ID_FIELD = SdkField. builder(MarshallingType.STRING)
            .getter(getter(CreateInstanceRequest::amiId)).setter(setter(Builder::amiId))
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("AmiId").build()).build();

    private static final SdkField SSH_KEY_NAME_FIELD = SdkField. builder(MarshallingType.STRING)
            .getter(getter(CreateInstanceRequest::sshKeyName)).setter(setter(Builder::sshKeyName))
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("SshKeyName").build()).build();

    private static final SdkField AVAILABILITY_ZONE_FIELD = SdkField. builder(MarshallingType.STRING)
            .getter(getter(CreateInstanceRequest::availabilityZone)).setter(setter(Builder::availabilityZone))
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("AvailabilityZone").build()).build();

    private static final SdkField VIRTUALIZATION_TYPE_FIELD = SdkField. builder(MarshallingType.STRING)
            .getter(getter(CreateInstanceRequest::virtualizationType)).setter(setter(Builder::virtualizationType))
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("VirtualizationType").build())
            .build();

    private static final SdkField SUBNET_ID_FIELD = SdkField. builder(MarshallingType.STRING)
            .getter(getter(CreateInstanceRequest::subnetId)).setter(setter(Builder::subnetId))
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("SubnetId").build()).build();

    private static final SdkField ARCHITECTURE_FIELD = SdkField. builder(MarshallingType.STRING)
            .getter(getter(CreateInstanceRequest::architectureAsString)).setter(setter(Builder::architecture))
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("Architecture").build()).build();

    private static final SdkField ROOT_DEVICE_TYPE_FIELD = SdkField. builder(MarshallingType.STRING)
            .getter(getter(CreateInstanceRequest::rootDeviceTypeAsString)).setter(setter(Builder::rootDeviceType))
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("RootDeviceType").build()).build();

    private static final SdkField> BLOCK_DEVICE_MAPPINGS_FIELD = SdkField
            .> builder(MarshallingType.LIST)
            .getter(getter(CreateInstanceRequest::blockDeviceMappings))
            .setter(setter(Builder::blockDeviceMappings))
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("BlockDeviceMappings").build(),
                    ListTrait
                            .builder()
                            .memberLocationName(null)
                            .memberFieldInfo(
                                    SdkField. builder(MarshallingType.SDK_POJO)
                                            .constructor(BlockDeviceMapping::builder)
                                            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD)
                                                    .locationName("member").build()).build()).build()).build();

    private static final SdkField INSTALL_UPDATES_ON_BOOT_FIELD = SdkField. builder(MarshallingType.BOOLEAN)
            .getter(getter(CreateInstanceRequest::installUpdatesOnBoot)).setter(setter(Builder::installUpdatesOnBoot))
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("InstallUpdatesOnBoot").build())
            .build();

    private static final SdkField EBS_OPTIMIZED_FIELD = SdkField. builder(MarshallingType.BOOLEAN)
            .getter(getter(CreateInstanceRequest::ebsOptimized)).setter(setter(Builder::ebsOptimized))
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("EbsOptimized").build()).build();

    private static final SdkField AGENT_VERSION_FIELD = SdkField. builder(MarshallingType.STRING)
            .getter(getter(CreateInstanceRequest::agentVersion)).setter(setter(Builder::agentVersion))
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("AgentVersion").build()).build();

    private static final SdkField TENANCY_FIELD = SdkField. builder(MarshallingType.STRING)
            .getter(getter(CreateInstanceRequest::tenancy)).setter(setter(Builder::tenancy))
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("Tenancy").build()).build();

    private static final List> SDK_FIELDS = Collections.unmodifiableList(Arrays.asList(STACK_ID_FIELD,
            LAYER_IDS_FIELD, INSTANCE_TYPE_FIELD, AUTO_SCALING_TYPE_FIELD, HOSTNAME_FIELD, OS_FIELD, AMI_ID_FIELD,
            SSH_KEY_NAME_FIELD, AVAILABILITY_ZONE_FIELD, VIRTUALIZATION_TYPE_FIELD, SUBNET_ID_FIELD, ARCHITECTURE_FIELD,
            ROOT_DEVICE_TYPE_FIELD, BLOCK_DEVICE_MAPPINGS_FIELD, INSTALL_UPDATES_ON_BOOT_FIELD, EBS_OPTIMIZED_FIELD,
            AGENT_VERSION_FIELD, TENANCY_FIELD));

    private final String stackId;

    private final List layerIds;

    private final String instanceType;

    private final String autoScalingType;

    private final String hostname;

    private final String os;

    private final String amiId;

    private final String sshKeyName;

    private final String availabilityZone;

    private final String virtualizationType;

    private final String subnetId;

    private final String architecture;

    private final String rootDeviceType;

    private final List blockDeviceMappings;

    private final Boolean installUpdatesOnBoot;

    private final Boolean ebsOptimized;

    private final String agentVersion;

    private final String tenancy;

    private CreateInstanceRequest(BuilderImpl builder) {
        super(builder);
        this.stackId = builder.stackId;
        this.layerIds = builder.layerIds;
        this.instanceType = builder.instanceType;
        this.autoScalingType = builder.autoScalingType;
        this.hostname = builder.hostname;
        this.os = builder.os;
        this.amiId = builder.amiId;
        this.sshKeyName = builder.sshKeyName;
        this.availabilityZone = builder.availabilityZone;
        this.virtualizationType = builder.virtualizationType;
        this.subnetId = builder.subnetId;
        this.architecture = builder.architecture;
        this.rootDeviceType = builder.rootDeviceType;
        this.blockDeviceMappings = builder.blockDeviceMappings;
        this.installUpdatesOnBoot = builder.installUpdatesOnBoot;
        this.ebsOptimized = builder.ebsOptimized;
        this.agentVersion = builder.agentVersion;
        this.tenancy = builder.tenancy;
    }

    /**
     * 

* The stack ID. *

* * @return The stack ID. */ public String stackId() { return stackId; } /** *

* An array that contains the instance's layer IDs. *

*

* Attempts to modify the collection returned by this method will result in an UnsupportedOperationException. *

* * @return An array that contains the instance's layer IDs. */ public List layerIds() { return layerIds; } /** *

* The instance type, such as t2.micro. For a list of supported instance types, open the stack in the * console, choose Instances, and choose + Instance. The Size list contains the currently * supported types. For more information, see Instance Families and Types. * The parameter values that you use to specify the various types are in the API Name column of the * Available Instance Types table. *

* * @return The instance type, such as t2.micro. For a list of supported instance types, open the stack * in the console, choose Instances, and choose + Instance. The Size list contains the * currently supported types. For more information, see Instance Families and * Types. The parameter values that you use to specify the various types are in the API Name * column of the Available Instance Types table. */ public String instanceType() { return instanceType; } /** *

* For load-based or time-based instances, the type. Windows stacks can use only time-based instances. *

*

* If the service returns an enum value that is not available in the current SDK version, {@link #autoScalingType} * will return {@link AutoScalingType#UNKNOWN_TO_SDK_VERSION}. The raw value returned by the service is available * from {@link #autoScalingTypeAsString}. *

* * @return For load-based or time-based instances, the type. Windows stacks can use only time-based instances. * @see AutoScalingType */ public AutoScalingType autoScalingType() { return AutoScalingType.fromValue(autoScalingType); } /** *

* For load-based or time-based instances, the type. Windows stacks can use only time-based instances. *

*

* If the service returns an enum value that is not available in the current SDK version, {@link #autoScalingType} * will return {@link AutoScalingType#UNKNOWN_TO_SDK_VERSION}. The raw value returned by the service is available * from {@link #autoScalingTypeAsString}. *

* * @return For load-based or time-based instances, the type. Windows stacks can use only time-based instances. * @see AutoScalingType */ public String autoScalingTypeAsString() { return autoScalingType; } /** *

* The instance host name. *

* * @return The instance host name. */ public String hostname() { return hostname; } /** *

* The instance's operating system, which must be set to one of the following. *

*
    *
  • *

    * A supported Linux operating system: An Amazon Linux version, such as Amazon Linux 2017.09, * Amazon Linux 2017.03, Amazon Linux 2016.09, Amazon Linux 2016.03, * Amazon Linux 2015.09, or Amazon Linux 2015.03. *

    *
  • *
  • *

    * A supported Ubuntu operating system, such as Ubuntu 16.04 LTS, Ubuntu 14.04 LTS, or * Ubuntu 12.04 LTS. *

    *
  • *
  • *

    * CentOS Linux 7 *

    *
  • *
  • *

    * Red Hat Enterprise Linux 7 *

    *
  • *
  • *

    * A supported Windows operating system, such as Microsoft Windows Server 2012 R2 Base, * Microsoft Windows Server 2012 R2 with SQL Server Express, * Microsoft Windows Server 2012 R2 with SQL Server Standard, or * Microsoft Windows Server 2012 R2 with SQL Server Web. *

    *
  • *
  • *

    * A custom AMI: Custom. *

    *
  • *
*

* For more information about the supported operating systems, see AWS OpsWorks Stacks * Operating Systems. *

*

* The default option is the current Amazon Linux version. If you set this parameter to Custom, you * must use the CreateInstance action's AmiId parameter to specify the custom AMI that you want to use. Block * device mappings are not supported if the value is Custom. For more information about supported * operating systems, see Operating SystemsFor * more information about how to use custom AMIs with AWS OpsWorks Stacks, see Using Custom * AMIs. *

* * @return The instance's operating system, which must be set to one of the following.

*
    *
  • *

    * A supported Linux operating system: An Amazon Linux version, such as Amazon Linux 2017.09, * Amazon Linux 2017.03, Amazon Linux 2016.09, Amazon Linux 2016.03, * Amazon Linux 2015.09, or Amazon Linux 2015.03. *

    *
  • *
  • *

    * A supported Ubuntu operating system, such as Ubuntu 16.04 LTS, Ubuntu 14.04 LTS * , or Ubuntu 12.04 LTS. *

    *
  • *
  • *

    * CentOS Linux 7 *

    *
  • *
  • *

    * Red Hat Enterprise Linux 7 *

    *
  • *
  • *

    * A supported Windows operating system, such as Microsoft Windows Server 2012 R2 Base, * Microsoft Windows Server 2012 R2 with SQL Server Express, * Microsoft Windows Server 2012 R2 with SQL Server Standard, or * Microsoft Windows Server 2012 R2 with SQL Server Web. *

    *
  • *
  • *

    * A custom AMI: Custom. *

    *
  • *
*

* For more information about the supported operating systems, see AWS OpsWorks Stacks * Operating Systems. *

*

* The default option is the current Amazon Linux version. If you set this parameter to Custom, * you must use the CreateInstance action's AmiId parameter to specify the custom AMI that you want * to use. Block device mappings are not supported if the value is Custom. For more information * about supported operating systems, see Operating * SystemsFor more information about how to use custom AMIs with AWS OpsWorks Stacks, see Using Custom * AMIs. */ public String os() { return os; } /** *

* A custom AMI ID to be used to create the instance. The AMI should be based on one of the supported operating * systems. For more information, see Using Custom * AMIs. *

* *

* If you specify a custom AMI, you must set Os to Custom. *

*
* * @return A custom AMI ID to be used to create the instance. The AMI should be based on one of the supported * operating systems. For more information, see Using Custom * AMIs.

*

* If you specify a custom AMI, you must set Os to Custom. *

*/ public String amiId() { return amiId; } /** *

* The instance's Amazon EC2 key-pair name. *

* * @return The instance's Amazon EC2 key-pair name. */ public String sshKeyName() { return sshKeyName; } /** *

* The instance Availability Zone. For more information, see Regions and Endpoints. *

* * @return The instance Availability Zone. For more information, see Regions and Endpoints. */ public String availabilityZone() { return availabilityZone; } /** *

* The instance's virtualization type, paravirtual or hvm. *

* * @return The instance's virtualization type, paravirtual or hvm. */ public String virtualizationType() { return virtualizationType; } /** *

* The ID of the instance's subnet. If the stack is running in a VPC, you can use this parameter to override the * stack's default subnet ID value and direct AWS OpsWorks Stacks to launch the instance in a different subnet. *

* * @return The ID of the instance's subnet. If the stack is running in a VPC, you can use this parameter to override * the stack's default subnet ID value and direct AWS OpsWorks Stacks to launch the instance in a different * subnet. */ public String subnetId() { return subnetId; } /** *

* The instance architecture. The default option is x86_64. Instance types do not necessarily support * both architectures. For a list of the architectures that are supported by the different instance types, see Instance Families and Types. *

*

* If the service returns an enum value that is not available in the current SDK version, {@link #architecture} will * return {@link Architecture#UNKNOWN_TO_SDK_VERSION}. The raw value returned by the service is available from * {@link #architectureAsString}. *

* * @return The instance architecture. The default option is x86_64. Instance types do not necessarily * support both architectures. For a list of the architectures that are supported by the different instance * types, see Instance * Families and Types. * @see Architecture */ public Architecture architecture() { return Architecture.fromValue(architecture); } /** *

* The instance architecture. The default option is x86_64. Instance types do not necessarily support * both architectures. For a list of the architectures that are supported by the different instance types, see Instance Families and Types. *

*

* If the service returns an enum value that is not available in the current SDK version, {@link #architecture} will * return {@link Architecture#UNKNOWN_TO_SDK_VERSION}. The raw value returned by the service is available from * {@link #architectureAsString}. *

* * @return The instance architecture. The default option is x86_64. Instance types do not necessarily * support both architectures. For a list of the architectures that are supported by the different instance * types, see Instance * Families and Types. * @see Architecture */ public String architectureAsString() { return architecture; } /** *

* The instance root device type. For more information, see Storage * for the Root Device. *

*

* If the service returns an enum value that is not available in the current SDK version, {@link #rootDeviceType} * will return {@link RootDeviceType#UNKNOWN_TO_SDK_VERSION}. The raw value returned by the service is available * from {@link #rootDeviceTypeAsString}. *

* * @return The instance root device type. For more information, see Storage for the Root Device. * @see RootDeviceType */ public RootDeviceType rootDeviceType() { return RootDeviceType.fromValue(rootDeviceType); } /** *

* The instance root device type. For more information, see Storage * for the Root Device. *

*

* If the service returns an enum value that is not available in the current SDK version, {@link #rootDeviceType} * will return {@link RootDeviceType#UNKNOWN_TO_SDK_VERSION}. The raw value returned by the service is available * from {@link #rootDeviceTypeAsString}. *

* * @return The instance root device type. For more information, see Storage for the Root Device. * @see RootDeviceType */ public String rootDeviceTypeAsString() { return rootDeviceType; } /** *

* An array of BlockDeviceMapping objects that specify the instance's block devices. For more * information, see Block Device * Mapping. Note that block device mappings are not supported for custom AMIs. *

*

* Attempts to modify the collection returned by this method will result in an UnsupportedOperationException. *

* * @return An array of BlockDeviceMapping objects that specify the instance's block devices. For more * information, see Block Device * Mapping. Note that block device mappings are not supported for custom AMIs. */ public List blockDeviceMappings() { return blockDeviceMappings; } /** *

* Whether to install operating system and package updates when the instance boots. The default value is * true. To control when updates are installed, set this value to false. You must then * update your instances manually by using CreateDeployment to run the update_dependencies stack * command or by manually running yum (Amazon Linux) or apt-get (Ubuntu) on the instances. *

* *

* We strongly recommend using the default value of true to ensure that your instances have the latest * security updates. *

*
* * @return Whether to install operating system and package updates when the instance boots. The default value is * true. To control when updates are installed, set this value to false. You must * then update your instances manually by using CreateDeployment to run the * update_dependencies stack command or by manually running yum (Amazon Linux) or * apt-get (Ubuntu) on the instances.

*

* We strongly recommend using the default value of true to ensure that your instances have the * latest security updates. *

*/ public Boolean installUpdatesOnBoot() { return installUpdatesOnBoot; } /** *

* Whether to create an Amazon EBS-optimized instance. *

* * @return Whether to create an Amazon EBS-optimized instance. */ public Boolean ebsOptimized() { return ebsOptimized; } /** *

* The default AWS OpsWorks Stacks agent version. You have the following options: *

*
    *
  • *

    * INHERIT - Use the stack's default agent version setting. *

    *
  • *
  • *

    * version_number - Use the specified agent version. This value overrides the stack's default setting. To * update the agent version, edit the instance configuration and specify a new version. AWS OpsWorks Stacks then * automatically installs that version on the instance. *

    *
  • *
*

* The default setting is INHERIT. To specify an agent version, you must use the complete version * number, not the abbreviated number shown on the console. For a list of available agent version numbers, call * DescribeAgentVersions. AgentVersion cannot be set to Chef 12.2. *

* * @return The default AWS OpsWorks Stacks agent version. You have the following options:

*
    *
  • *

    * INHERIT - Use the stack's default agent version setting. *

    *
  • *
  • *

    * version_number - Use the specified agent version. This value overrides the stack's default * setting. To update the agent version, edit the instance configuration and specify a new version. AWS * OpsWorks Stacks then automatically installs that version on the instance. *

    *
  • *
*

* The default setting is INHERIT. To specify an agent version, you must use the complete * version number, not the abbreviated number shown on the console. For a list of available agent version * numbers, call DescribeAgentVersions. AgentVersion cannot be set to Chef 12.2. */ public String agentVersion() { return agentVersion; } /** *

* The instance's tenancy option. The default option is no tenancy, or if the instance is running in a VPC, inherit * tenancy settings from the VPC. The following are valid values for this parameter: dedicated, * default, or host. Because there are costs associated with changes in tenancy options, * we recommend that you research tenancy options before choosing them for your instances. For more information * about dedicated hosts, see Dedicated Hosts Overview and * Amazon EC2 Dedicated Hosts. For more information about * dedicated instances, see Dedicated Instances and * Amazon EC2 Dedicated Instances. *

* * @return The instance's tenancy option. The default option is no tenancy, or if the instance is running in a VPC, * inherit tenancy settings from the VPC. The following are valid values for this parameter: * dedicated, default, or host. Because there are costs associated * with changes in tenancy options, we recommend that you research tenancy options before choosing them for * your instances. For more information about dedicated hosts, see Dedicated Hosts Overview and Amazon EC2 Dedicated Hosts. For more information * about dedicated instances, see Dedicated * Instances and Amazon EC2 * Dedicated Instances. */ public String tenancy() { return tenancy; } @Override public Builder toBuilder() { return new BuilderImpl(this); } public static Builder builder() { return new BuilderImpl(); } public static Class serializableBuilderClass() { return BuilderImpl.class; } @Override public int hashCode() { int hashCode = 1; hashCode = 31 * hashCode + Objects.hashCode(stackId()); hashCode = 31 * hashCode + Objects.hashCode(layerIds()); hashCode = 31 * hashCode + Objects.hashCode(instanceType()); hashCode = 31 * hashCode + Objects.hashCode(autoScalingTypeAsString()); hashCode = 31 * hashCode + Objects.hashCode(hostname()); hashCode = 31 * hashCode + Objects.hashCode(os()); hashCode = 31 * hashCode + Objects.hashCode(amiId()); hashCode = 31 * hashCode + Objects.hashCode(sshKeyName()); hashCode = 31 * hashCode + Objects.hashCode(availabilityZone()); hashCode = 31 * hashCode + Objects.hashCode(virtualizationType()); hashCode = 31 * hashCode + Objects.hashCode(subnetId()); hashCode = 31 * hashCode + Objects.hashCode(architectureAsString()); hashCode = 31 * hashCode + Objects.hashCode(rootDeviceTypeAsString()); hashCode = 31 * hashCode + Objects.hashCode(blockDeviceMappings()); hashCode = 31 * hashCode + Objects.hashCode(installUpdatesOnBoot()); hashCode = 31 * hashCode + Objects.hashCode(ebsOptimized()); hashCode = 31 * hashCode + Objects.hashCode(agentVersion()); hashCode = 31 * hashCode + Objects.hashCode(tenancy()); return hashCode; } @Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (!(obj instanceof CreateInstanceRequest)) { return false; } CreateInstanceRequest other = (CreateInstanceRequest) obj; return Objects.equals(stackId(), other.stackId()) && Objects.equals(layerIds(), other.layerIds()) && Objects.equals(instanceType(), other.instanceType()) && Objects.equals(autoScalingTypeAsString(), other.autoScalingTypeAsString()) && Objects.equals(hostname(), other.hostname()) && Objects.equals(os(), other.os()) && Objects.equals(amiId(), other.amiId()) && Objects.equals(sshKeyName(), other.sshKeyName()) && Objects.equals(availabilityZone(), other.availabilityZone()) && Objects.equals(virtualizationType(), other.virtualizationType()) && Objects.equals(subnetId(), other.subnetId()) && Objects.equals(architectureAsString(), other.architectureAsString()) && Objects.equals(rootDeviceTypeAsString(), other.rootDeviceTypeAsString()) && Objects.equals(blockDeviceMappings(), other.blockDeviceMappings()) && Objects.equals(installUpdatesOnBoot(), other.installUpdatesOnBoot()) && Objects.equals(ebsOptimized(), other.ebsOptimized()) && Objects.equals(agentVersion(), other.agentVersion()) && Objects.equals(tenancy(), other.tenancy()); } /** * 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. */ @Override public String toString() { return ToString.builder("CreateInstanceRequest").add("StackId", stackId()).add("LayerIds", layerIds()) .add("InstanceType", instanceType()).add("AutoScalingType", autoScalingTypeAsString()) .add("Hostname", hostname()).add("Os", os()).add("AmiId", amiId()).add("SshKeyName", sshKeyName()) .add("AvailabilityZone", availabilityZone()).add("VirtualizationType", virtualizationType()) .add("SubnetId", subnetId()).add("Architecture", architectureAsString()) .add("RootDeviceType", rootDeviceTypeAsString()).add("BlockDeviceMappings", blockDeviceMappings()) .add("InstallUpdatesOnBoot", installUpdatesOnBoot()).add("EbsOptimized", ebsOptimized()) .add("AgentVersion", agentVersion()).add("Tenancy", tenancy()).build(); } public Optional getValueForField(String fieldName, Class clazz) { switch (fieldName) { case "StackId": return Optional.ofNullable(clazz.cast(stackId())); case "LayerIds": return Optional.ofNullable(clazz.cast(layerIds())); case "InstanceType": return Optional.ofNullable(clazz.cast(instanceType())); case "AutoScalingType": return Optional.ofNullable(clazz.cast(autoScalingTypeAsString())); case "Hostname": return Optional.ofNullable(clazz.cast(hostname())); case "Os": return Optional.ofNullable(clazz.cast(os())); case "AmiId": return Optional.ofNullable(clazz.cast(amiId())); case "SshKeyName": return Optional.ofNullable(clazz.cast(sshKeyName())); case "AvailabilityZone": return Optional.ofNullable(clazz.cast(availabilityZone())); case "VirtualizationType": return Optional.ofNullable(clazz.cast(virtualizationType())); case "SubnetId": return Optional.ofNullable(clazz.cast(subnetId())); case "Architecture": return Optional.ofNullable(clazz.cast(architectureAsString())); case "RootDeviceType": return Optional.ofNullable(clazz.cast(rootDeviceTypeAsString())); case "BlockDeviceMappings": return Optional.ofNullable(clazz.cast(blockDeviceMappings())); case "InstallUpdatesOnBoot": return Optional.ofNullable(clazz.cast(installUpdatesOnBoot())); case "EbsOptimized": return Optional.ofNullable(clazz.cast(ebsOptimized())); case "AgentVersion": return Optional.ofNullable(clazz.cast(agentVersion())); case "Tenancy": return Optional.ofNullable(clazz.cast(tenancy())); default: return Optional.empty(); } } @Override public List> sdkFields() { return SDK_FIELDS; } private static Function getter(Function g) { return obj -> g.apply((CreateInstanceRequest) obj); } private static BiConsumer setter(BiConsumer s) { return (obj, val) -> s.accept((Builder) obj, val); } public interface Builder extends OpsWorksRequest.Builder, SdkPojo, CopyableBuilder { /** *

* The stack ID. *

* * @param stackId * The stack ID. * @return Returns a reference to this object so that method calls can be chained together. */ Builder stackId(String stackId); /** *

* An array that contains the instance's layer IDs. *

* * @param layerIds * An array that contains the instance's layer IDs. * @return Returns a reference to this object so that method calls can be chained together. */ Builder layerIds(Collection layerIds); /** *

* An array that contains the instance's layer IDs. *

* * @param layerIds * An array that contains the instance's layer IDs. * @return Returns a reference to this object so that method calls can be chained together. */ Builder layerIds(String... layerIds); /** *

* The instance type, such as t2.micro. For a list of supported instance types, open the stack in * the console, choose Instances, and choose + Instance. The Size list contains the * currently supported types. For more information, see Instance Families and * Types. The parameter values that you use to specify the various types are in the API Name column * of the Available Instance Types table. *

* * @param instanceType * The instance type, such as t2.micro. For a list of supported instance types, open the * stack in the console, choose Instances, and choose + Instance. The Size list * contains the currently supported types. For more information, see Instance Families and * Types. The parameter values that you use to specify the various types are in the API Name * column of the Available Instance Types table. * @return Returns a reference to this object so that method calls can be chained together. */ Builder instanceType(String instanceType); /** *

* For load-based or time-based instances, the type. Windows stacks can use only time-based instances. *

* * @param autoScalingType * For load-based or time-based instances, the type. Windows stacks can use only time-based instances. * @see AutoScalingType * @return Returns a reference to this object so that method calls can be chained together. * @see AutoScalingType */ Builder autoScalingType(String autoScalingType); /** *

* For load-based or time-based instances, the type. Windows stacks can use only time-based instances. *

* * @param autoScalingType * For load-based or time-based instances, the type. Windows stacks can use only time-based instances. * @see AutoScalingType * @return Returns a reference to this object so that method calls can be chained together. * @see AutoScalingType */ Builder autoScalingType(AutoScalingType autoScalingType); /** *

* The instance host name. *

* * @param hostname * The instance host name. * @return Returns a reference to this object so that method calls can be chained together. */ Builder hostname(String hostname); /** *

* The instance's operating system, which must be set to one of the following. *

*
    *
  • *

    * A supported Linux operating system: An Amazon Linux version, such as Amazon Linux 2017.09, * Amazon Linux 2017.03, Amazon Linux 2016.09, Amazon Linux 2016.03, * Amazon Linux 2015.09, or Amazon Linux 2015.03. *

    *
  • *
  • *

    * A supported Ubuntu operating system, such as Ubuntu 16.04 LTS, Ubuntu 14.04 LTS, or * Ubuntu 12.04 LTS. *

    *
  • *
  • *

    * CentOS Linux 7 *

    *
  • *
  • *

    * Red Hat Enterprise Linux 7 *

    *
  • *
  • *

    * A supported Windows operating system, such as Microsoft Windows Server 2012 R2 Base, * Microsoft Windows Server 2012 R2 with SQL Server Express, * Microsoft Windows Server 2012 R2 with SQL Server Standard, or * Microsoft Windows Server 2012 R2 with SQL Server Web. *

    *
  • *
  • *

    * A custom AMI: Custom. *

    *
  • *
*

* For more information about the supported operating systems, see AWS OpsWorks Stacks * Operating Systems. *

*

* The default option is the current Amazon Linux version. If you set this parameter to Custom, you * must use the CreateInstance action's AmiId parameter to specify the custom AMI that you want to use. * Block device mappings are not supported if the value is Custom. For more information about * supported operating systems, see Operating SystemsFor * more information about how to use custom AMIs with AWS OpsWorks Stacks, see Using Custom * AMIs. *

* * @param os * The instance's operating system, which must be set to one of the following.

*
    *
  • *

    * A supported Linux operating system: An Amazon Linux version, such as Amazon Linux 2017.09, Amazon Linux 2017.03, Amazon Linux 2016.09, * Amazon Linux 2016.03, Amazon Linux 2015.09, or * Amazon Linux 2015.03. *

    *
  • *
  • *

    * A supported Ubuntu operating system, such as Ubuntu 16.04 LTS, * Ubuntu 14.04 LTS, or Ubuntu 12.04 LTS. *

    *
  • *
  • *

    * CentOS Linux 7 *

    *
  • *
  • *

    * Red Hat Enterprise Linux 7 *

    *
  • *
  • *

    * A supported Windows operating system, such as Microsoft Windows Server 2012 R2 Base, * Microsoft Windows Server 2012 R2 with SQL Server Express, * Microsoft Windows Server 2012 R2 with SQL Server Standard, or * Microsoft Windows Server 2012 R2 with SQL Server Web. *

    *
  • *
  • *

    * A custom AMI: Custom. *

    *
  • *
*

* For more information about the supported operating systems, see AWS OpsWorks * Stacks Operating Systems. *

*

* The default option is the current Amazon Linux version. If you set this parameter to * Custom, you must use the CreateInstance action's AmiId parameter to specify the * custom AMI that you want to use. Block device mappings are not supported if the value is * Custom. For more information about supported operating systems, see Operating * SystemsFor more information about how to use custom AMIs with AWS OpsWorks Stacks, see Using * Custom AMIs. * @return Returns a reference to this object so that method calls can be chained together. */ Builder os(String os); /** *

* A custom AMI ID to be used to create the instance. The AMI should be based on one of the supported operating * systems. For more information, see Using Custom * AMIs. *

* *

* If you specify a custom AMI, you must set Os to Custom. *

*
* * @param amiId * A custom AMI ID to be used to create the instance. The AMI should be based on one of the supported * operating systems. For more information, see Using * Custom AMIs.

*

* If you specify a custom AMI, you must set Os to Custom. *

* @return Returns a reference to this object so that method calls can be chained together. */ Builder amiId(String amiId); /** *

* The instance's Amazon EC2 key-pair name. *

* * @param sshKeyName * The instance's Amazon EC2 key-pair name. * @return Returns a reference to this object so that method calls can be chained together. */ Builder sshKeyName(String sshKeyName); /** *

* The instance Availability Zone. For more information, see Regions and Endpoints. *

* * @param availabilityZone * The instance Availability Zone. For more information, see Regions and Endpoints. * @return Returns a reference to this object so that method calls can be chained together. */ Builder availabilityZone(String availabilityZone); /** *

* The instance's virtualization type, paravirtual or hvm. *

* * @param virtualizationType * The instance's virtualization type, paravirtual or hvm. * @return Returns a reference to this object so that method calls can be chained together. */ Builder virtualizationType(String virtualizationType); /** *

* The ID of the instance's subnet. If the stack is running in a VPC, you can use this parameter to override the * stack's default subnet ID value and direct AWS OpsWorks Stacks to launch the instance in a different subnet. *

* * @param subnetId * The ID of the instance's subnet. If the stack is running in a VPC, you can use this parameter to * override the stack's default subnet ID value and direct AWS OpsWorks Stacks to launch the instance in * a different subnet. * @return Returns a reference to this object so that method calls can be chained together. */ Builder subnetId(String subnetId); /** *

* The instance architecture. The default option is x86_64. Instance types do not necessarily * support both architectures. For a list of the architectures that are supported by the different instance * types, see Instance Families * and Types. *

* * @param architecture * The instance architecture. The default option is x86_64. Instance types do not * necessarily support both architectures. For a list of the architectures that are supported by the * different instance types, see Instance Families and * Types. * @see Architecture * @return Returns a reference to this object so that method calls can be chained together. * @see Architecture */ Builder architecture(String architecture); /** *

* The instance architecture. The default option is x86_64. Instance types do not necessarily * support both architectures. For a list of the architectures that are supported by the different instance * types, see Instance Families * and Types. *

* * @param architecture * The instance architecture. The default option is x86_64. Instance types do not * necessarily support both architectures. For a list of the architectures that are supported by the * different instance types, see Instance Families and * Types. * @see Architecture * @return Returns a reference to this object so that method calls can be chained together. * @see Architecture */ Builder architecture(Architecture architecture); /** *

* The instance root device type. For more information, see Storage for the Root Device. *

* * @param rootDeviceType * The instance root device type. For more information, see Storage for the Root Device. * @see RootDeviceType * @return Returns a reference to this object so that method calls can be chained together. * @see RootDeviceType */ Builder rootDeviceType(String rootDeviceType); /** *

* The instance root device type. For more information, see Storage for the Root Device. *

* * @param rootDeviceType * The instance root device type. For more information, see Storage for the Root Device. * @see RootDeviceType * @return Returns a reference to this object so that method calls can be chained together. * @see RootDeviceType */ Builder rootDeviceType(RootDeviceType rootDeviceType); /** *

* An array of BlockDeviceMapping objects that specify the instance's block devices. For more * information, see Block Device * Mapping. Note that block device mappings are not supported for custom AMIs. *

* * @param blockDeviceMappings * An array of BlockDeviceMapping objects that specify the instance's block devices. For * more information, see Block * Device Mapping. Note that block device mappings are not supported for custom AMIs. * @return Returns a reference to this object so that method calls can be chained together. */ Builder blockDeviceMappings(Collection blockDeviceMappings); /** *

* An array of BlockDeviceMapping objects that specify the instance's block devices. For more * information, see Block Device * Mapping. Note that block device mappings are not supported for custom AMIs. *

* * @param blockDeviceMappings * An array of BlockDeviceMapping objects that specify the instance's block devices. For * more information, see Block * Device Mapping. Note that block device mappings are not supported for custom AMIs. * @return Returns a reference to this object so that method calls can be chained together. */ Builder blockDeviceMappings(BlockDeviceMapping... blockDeviceMappings); /** *

* An array of BlockDeviceMapping objects that specify the instance's block devices. For more * information, see Block Device * Mapping. Note that block device mappings are not supported for custom AMIs. *

* This is a convenience that creates an instance of the {@link List.Builder} avoiding the * need to create one manually via {@link List#builder()}. * * When the {@link Consumer} completes, {@link List.Builder#build()} is called immediately * and its result is passed to {@link #blockDeviceMappings(List)}. * * @param blockDeviceMappings * a consumer that will call methods on {@link List.Builder} * @return Returns a reference to this object so that method calls can be chained together. * @see #blockDeviceMappings(List) */ Builder blockDeviceMappings(Consumer... blockDeviceMappings); /** *

* Whether to install operating system and package updates when the instance boots. The default value is * true. To control when updates are installed, set this value to false. You must then * update your instances manually by using CreateDeployment to run the update_dependencies * stack command or by manually running yum (Amazon Linux) or apt-get (Ubuntu) on the * instances. *

* *

* We strongly recommend using the default value of true to ensure that your instances have the * latest security updates. *

*
* * @param installUpdatesOnBoot * Whether to install operating system and package updates when the instance boots. The default value is * true. To control when updates are installed, set this value to false. You * must then update your instances manually by using CreateDeployment to run the * update_dependencies stack command or by manually running yum (Amazon Linux) * or apt-get (Ubuntu) on the instances.

*

* We strongly recommend using the default value of true to ensure that your instances have * the latest security updates. *

* @return Returns a reference to this object so that method calls can be chained together. */ Builder installUpdatesOnBoot(Boolean installUpdatesOnBoot); /** *

* Whether to create an Amazon EBS-optimized instance. *

* * @param ebsOptimized * Whether to create an Amazon EBS-optimized instance. * @return Returns a reference to this object so that method calls can be chained together. */ Builder ebsOptimized(Boolean ebsOptimized); /** *

* The default AWS OpsWorks Stacks agent version. You have the following options: *

*
    *
  • *

    * INHERIT - Use the stack's default agent version setting. *

    *
  • *
  • *

    * version_number - Use the specified agent version. This value overrides the stack's default setting. To * update the agent version, edit the instance configuration and specify a new version. AWS OpsWorks Stacks then * automatically installs that version on the instance. *

    *
  • *
*

* The default setting is INHERIT. To specify an agent version, you must use the complete version * number, not the abbreviated number shown on the console. For a list of available agent version numbers, call * DescribeAgentVersions. AgentVersion cannot be set to Chef 12.2. *

* * @param agentVersion * The default AWS OpsWorks Stacks agent version. You have the following options:

*
    *
  • *

    * INHERIT - Use the stack's default agent version setting. *

    *
  • *
  • *

    * version_number - Use the specified agent version. This value overrides the stack's default * setting. To update the agent version, edit the instance configuration and specify a new version. AWS * OpsWorks Stacks then automatically installs that version on the instance. *

    *
  • *
*

* The default setting is INHERIT. To specify an agent version, you must use the complete * version number, not the abbreviated number shown on the console. For a list of available agent version * numbers, call DescribeAgentVersions. AgentVersion cannot be set to Chef 12.2. * @return Returns a reference to this object so that method calls can be chained together. */ Builder agentVersion(String agentVersion); /** *

* The instance's tenancy option. The default option is no tenancy, or if the instance is running in a VPC, * inherit tenancy settings from the VPC. The following are valid values for this parameter: * dedicated, default, or host. Because there are costs associated with * changes in tenancy options, we recommend that you research tenancy options before choosing them for your * instances. For more information about dedicated hosts, see Dedicated Hosts Overview and Amazon EC2 Dedicated Hosts. For more information about * dedicated instances, see Dedicated Instances * and Amazon EC2 Dedicated * Instances. *

* * @param tenancy * The instance's tenancy option. The default option is no tenancy, or if the instance is running in a * VPC, inherit tenancy settings from the VPC. The following are valid values for this parameter: * dedicated, default, or host. Because there are costs associated * with changes in tenancy options, we recommend that you research tenancy options before choosing them * for your instances. For more information about dedicated hosts, see Dedicated Hosts Overview and Amazon EC2 Dedicated Hosts. For more information * about dedicated instances, see Dedicated * Instances and Amazon * EC2 Dedicated Instances. * @return Returns a reference to this object so that method calls can be chained together. */ Builder tenancy(String tenancy); @Override Builder overrideConfiguration(AwsRequestOverrideConfiguration overrideConfiguration); @Override Builder overrideConfiguration(Consumer builderConsumer); } static final class BuilderImpl extends OpsWorksRequest.BuilderImpl implements Builder { private String stackId; private List layerIds = DefaultSdkAutoConstructList.getInstance(); private String instanceType; private String autoScalingType; private String hostname; private String os; private String amiId; private String sshKeyName; private String availabilityZone; private String virtualizationType; private String subnetId; private String architecture; private String rootDeviceType; private List blockDeviceMappings = DefaultSdkAutoConstructList.getInstance(); private Boolean installUpdatesOnBoot; private Boolean ebsOptimized; private String agentVersion; private String tenancy; private BuilderImpl() { } private BuilderImpl(CreateInstanceRequest model) { super(model); stackId(model.stackId); layerIds(model.layerIds); instanceType(model.instanceType); autoScalingType(model.autoScalingType); hostname(model.hostname); os(model.os); amiId(model.amiId); sshKeyName(model.sshKeyName); availabilityZone(model.availabilityZone); virtualizationType(model.virtualizationType); subnetId(model.subnetId); architecture(model.architecture); rootDeviceType(model.rootDeviceType); blockDeviceMappings(model.blockDeviceMappings); installUpdatesOnBoot(model.installUpdatesOnBoot); ebsOptimized(model.ebsOptimized); agentVersion(model.agentVersion); tenancy(model.tenancy); } public final String getStackId() { return stackId; } @Override public final Builder stackId(String stackId) { this.stackId = stackId; return this; } public final void setStackId(String stackId) { this.stackId = stackId; } public final Collection getLayerIds() { return layerIds; } @Override public final Builder layerIds(Collection layerIds) { this.layerIds = StringsCopier.copy(layerIds); return this; } @Override @SafeVarargs public final Builder layerIds(String... layerIds) { layerIds(Arrays.asList(layerIds)); return this; } public final void setLayerIds(Collection layerIds) { this.layerIds = StringsCopier.copy(layerIds); } public final String getInstanceType() { return instanceType; } @Override public final Builder instanceType(String instanceType) { this.instanceType = instanceType; return this; } public final void setInstanceType(String instanceType) { this.instanceType = instanceType; } public final String getAutoScalingTypeAsString() { return autoScalingType; } @Override public final Builder autoScalingType(String autoScalingType) { this.autoScalingType = autoScalingType; return this; } @Override public final Builder autoScalingType(AutoScalingType autoScalingType) { this.autoScalingType(autoScalingType.toString()); return this; } public final void setAutoScalingType(String autoScalingType) { this.autoScalingType = autoScalingType; } public final String getHostname() { return hostname; } @Override public final Builder hostname(String hostname) { this.hostname = hostname; return this; } public final void setHostname(String hostname) { this.hostname = hostname; } public final String getOs() { return os; } @Override public final Builder os(String os) { this.os = os; return this; } public final void setOs(String os) { this.os = os; } public final String getAmiId() { return amiId; } @Override public final Builder amiId(String amiId) { this.amiId = amiId; return this; } public final void setAmiId(String amiId) { this.amiId = amiId; } public final String getSshKeyName() { return sshKeyName; } @Override public final Builder sshKeyName(String sshKeyName) { this.sshKeyName = sshKeyName; return this; } public final void setSshKeyName(String sshKeyName) { this.sshKeyName = sshKeyName; } public final String getAvailabilityZone() { return availabilityZone; } @Override public final Builder availabilityZone(String availabilityZone) { this.availabilityZone = availabilityZone; return this; } public final void setAvailabilityZone(String availabilityZone) { this.availabilityZone = availabilityZone; } public final String getVirtualizationType() { return virtualizationType; } @Override public final Builder virtualizationType(String virtualizationType) { this.virtualizationType = virtualizationType; return this; } public final void setVirtualizationType(String virtualizationType) { this.virtualizationType = virtualizationType; } public final String getSubnetId() { return subnetId; } @Override public final Builder subnetId(String subnetId) { this.subnetId = subnetId; return this; } public final void setSubnetId(String subnetId) { this.subnetId = subnetId; } public final String getArchitectureAsString() { return architecture; } @Override public final Builder architecture(String architecture) { this.architecture = architecture; return this; } @Override public final Builder architecture(Architecture architecture) { this.architecture(architecture.toString()); return this; } public final void setArchitecture(String architecture) { this.architecture = architecture; } public final String getRootDeviceTypeAsString() { return rootDeviceType; } @Override public final Builder rootDeviceType(String rootDeviceType) { this.rootDeviceType = rootDeviceType; return this; } @Override public final Builder rootDeviceType(RootDeviceType rootDeviceType) { this.rootDeviceType(rootDeviceType.toString()); return this; } public final void setRootDeviceType(String rootDeviceType) { this.rootDeviceType = rootDeviceType; } public final Collection getBlockDeviceMappings() { return blockDeviceMappings != null ? blockDeviceMappings.stream().map(BlockDeviceMapping::toBuilder) .collect(Collectors.toList()) : null; } @Override public final Builder blockDeviceMappings(Collection blockDeviceMappings) { this.blockDeviceMappings = BlockDeviceMappingsCopier.copy(blockDeviceMappings); return this; } @Override @SafeVarargs public final Builder blockDeviceMappings(BlockDeviceMapping... blockDeviceMappings) { blockDeviceMappings(Arrays.asList(blockDeviceMappings)); return this; } @Override @SafeVarargs public final Builder blockDeviceMappings(Consumer... blockDeviceMappings) { blockDeviceMappings(Stream.of(blockDeviceMappings).map(c -> BlockDeviceMapping.builder().applyMutation(c).build()) .collect(Collectors.toList())); return this; } public final void setBlockDeviceMappings(Collection blockDeviceMappings) { this.blockDeviceMappings = BlockDeviceMappingsCopier.copyFromBuilder(blockDeviceMappings); } public final Boolean getInstallUpdatesOnBoot() { return installUpdatesOnBoot; } @Override public final Builder installUpdatesOnBoot(Boolean installUpdatesOnBoot) { this.installUpdatesOnBoot = installUpdatesOnBoot; return this; } public final void setInstallUpdatesOnBoot(Boolean installUpdatesOnBoot) { this.installUpdatesOnBoot = installUpdatesOnBoot; } public final Boolean getEbsOptimized() { return ebsOptimized; } @Override public final Builder ebsOptimized(Boolean ebsOptimized) { this.ebsOptimized = ebsOptimized; return this; } public final void setEbsOptimized(Boolean ebsOptimized) { this.ebsOptimized = ebsOptimized; } public final String getAgentVersion() { return agentVersion; } @Override public final Builder agentVersion(String agentVersion) { this.agentVersion = agentVersion; return this; } public final void setAgentVersion(String agentVersion) { this.agentVersion = agentVersion; } public final String getTenancy() { return tenancy; } @Override public final Builder tenancy(String tenancy) { this.tenancy = tenancy; return this; } public final void setTenancy(String tenancy) { this.tenancy = tenancy; } @Override public Builder overrideConfiguration(AwsRequestOverrideConfiguration overrideConfiguration) { super.overrideConfiguration(overrideConfiguration); return this; } @Override public Builder overrideConfiguration(Consumer builderConsumer) { super.overrideConfiguration(builderConsumer); return this; } @Override public CreateInstanceRequest build() { return new CreateInstanceRequest(this); } @Override public List> sdkFields() { return SDK_FIELDS; } } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy