Please wait. This can take some minutes ...
Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance.
Project price only 1 $
You can buy this project and download/modify it how often you want.
software.amazon.awssdk.services.opsworks.model.CreateLayerRequest Maven / Gradle / Ivy
Go to download
The AWS Java SDK for AWS OpsWorks module holds the client classes that are used for communicating with
AWS OpsWorks Service
/*
* Copyright 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.Map;
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.traits.MapTrait;
import software.amazon.awssdk.core.util.DefaultSdkAutoConstructList;
import software.amazon.awssdk.core.util.DefaultSdkAutoConstructMap;
import software.amazon.awssdk.core.util.SdkAutoConstructList;
import software.amazon.awssdk.core.util.SdkAutoConstructMap;
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 CreateLayerRequest extends OpsWorksRequest implements
ToCopyableBuilder {
private static final SdkField STACK_ID_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("StackId").getter(getter(CreateLayerRequest::stackId)).setter(setter(Builder::stackId))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("StackId").build()).build();
private static final SdkField TYPE_FIELD = SdkField. builder(MarshallingType.STRING).memberName("Type")
.getter(getter(CreateLayerRequest::typeAsString)).setter(setter(Builder::type))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("Type").build()).build();
private static final SdkField NAME_FIELD = SdkField. builder(MarshallingType.STRING).memberName("Name")
.getter(getter(CreateLayerRequest::name)).setter(setter(Builder::name))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("Name").build()).build();
private static final SdkField SHORTNAME_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("Shortname").getter(getter(CreateLayerRequest::shortname)).setter(setter(Builder::shortname))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("Shortname").build()).build();
private static final SdkField> ATTRIBUTES_FIELD = SdkField
.> builder(MarshallingType.MAP)
.memberName("Attributes")
.getter(getter(CreateLayerRequest::attributesAsStrings))
.setter(setter(Builder::attributesWithStrings))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("Attributes").build(),
MapTrait.builder()
.keyLocationName("key")
.valueLocationName("value")
.valueFieldInfo(
SdkField. builder(MarshallingType.STRING)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD)
.locationName("value").build()).build()).build()).build();
private static final SdkField CLOUD_WATCH_LOGS_CONFIGURATION_FIELD = SdkField
. builder(MarshallingType.SDK_POJO)
.memberName("CloudWatchLogsConfiguration")
.getter(getter(CreateLayerRequest::cloudWatchLogsConfiguration))
.setter(setter(Builder::cloudWatchLogsConfiguration))
.constructor(CloudWatchLogsConfiguration::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("CloudWatchLogsConfiguration")
.build()).build();
private static final SdkField CUSTOM_INSTANCE_PROFILE_ARN_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("CustomInstanceProfileArn").getter(getter(CreateLayerRequest::customInstanceProfileArn))
.setter(setter(Builder::customInstanceProfileArn))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("CustomInstanceProfileArn").build())
.build();
private static final SdkField CUSTOM_JSON_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("CustomJson").getter(getter(CreateLayerRequest::customJson)).setter(setter(Builder::customJson))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("CustomJson").build()).build();
private static final SdkField> CUSTOM_SECURITY_GROUP_IDS_FIELD = SdkField
.> builder(MarshallingType.LIST)
.memberName("CustomSecurityGroupIds")
.getter(getter(CreateLayerRequest::customSecurityGroupIds))
.setter(setter(Builder::customSecurityGroupIds))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("CustomSecurityGroupIds").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> PACKAGES_FIELD = SdkField
.> builder(MarshallingType.LIST)
.memberName("Packages")
.getter(getter(CreateLayerRequest::packages))
.setter(setter(Builder::packages))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("Packages").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> VOLUME_CONFIGURATIONS_FIELD = SdkField
.> builder(MarshallingType.LIST)
.memberName("VolumeConfigurations")
.getter(getter(CreateLayerRequest::volumeConfigurations))
.setter(setter(Builder::volumeConfigurations))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("VolumeConfigurations").build(),
ListTrait
.builder()
.memberLocationName(null)
.memberFieldInfo(
SdkField. builder(MarshallingType.SDK_POJO)
.constructor(VolumeConfiguration::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD)
.locationName("member").build()).build()).build()).build();
private static final SdkField ENABLE_AUTO_HEALING_FIELD = SdkField. builder(MarshallingType.BOOLEAN)
.memberName("EnableAutoHealing").getter(getter(CreateLayerRequest::enableAutoHealing))
.setter(setter(Builder::enableAutoHealing))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("EnableAutoHealing").build()).build();
private static final SdkField AUTO_ASSIGN_ELASTIC_IPS_FIELD = SdkField. builder(MarshallingType.BOOLEAN)
.memberName("AutoAssignElasticIps").getter(getter(CreateLayerRequest::autoAssignElasticIps))
.setter(setter(Builder::autoAssignElasticIps))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("AutoAssignElasticIps").build())
.build();
private static final SdkField AUTO_ASSIGN_PUBLIC_IPS_FIELD = SdkField. builder(MarshallingType.BOOLEAN)
.memberName("AutoAssignPublicIps").getter(getter(CreateLayerRequest::autoAssignPublicIps))
.setter(setter(Builder::autoAssignPublicIps))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("AutoAssignPublicIps").build())
.build();
private static final SdkField CUSTOM_RECIPES_FIELD = SdkField. builder(MarshallingType.SDK_POJO)
.memberName("CustomRecipes").getter(getter(CreateLayerRequest::customRecipes)).setter(setter(Builder::customRecipes))
.constructor(Recipes::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("CustomRecipes").build()).build();
private static final SdkField INSTALL_UPDATES_ON_BOOT_FIELD = SdkField. builder(MarshallingType.BOOLEAN)
.memberName("InstallUpdatesOnBoot").getter(getter(CreateLayerRequest::installUpdatesOnBoot))
.setter(setter(Builder::installUpdatesOnBoot))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("InstallUpdatesOnBoot").build())
.build();
private static final SdkField USE_EBS_OPTIMIZED_INSTANCES_FIELD = SdkField
. builder(MarshallingType.BOOLEAN).memberName("UseEbsOptimizedInstances")
.getter(getter(CreateLayerRequest::useEbsOptimizedInstances)).setter(setter(Builder::useEbsOptimizedInstances))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("UseEbsOptimizedInstances").build())
.build();
private static final SdkField LIFECYCLE_EVENT_CONFIGURATION_FIELD = SdkField
. builder(MarshallingType.SDK_POJO)
.memberName("LifecycleEventConfiguration")
.getter(getter(CreateLayerRequest::lifecycleEventConfiguration))
.setter(setter(Builder::lifecycleEventConfiguration))
.constructor(LifecycleEventConfiguration::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("LifecycleEventConfiguration")
.build()).build();
private static final List> SDK_FIELDS = Collections.unmodifiableList(Arrays.asList(STACK_ID_FIELD, TYPE_FIELD,
NAME_FIELD, SHORTNAME_FIELD, ATTRIBUTES_FIELD, CLOUD_WATCH_LOGS_CONFIGURATION_FIELD,
CUSTOM_INSTANCE_PROFILE_ARN_FIELD, CUSTOM_JSON_FIELD, CUSTOM_SECURITY_GROUP_IDS_FIELD, PACKAGES_FIELD,
VOLUME_CONFIGURATIONS_FIELD, ENABLE_AUTO_HEALING_FIELD, AUTO_ASSIGN_ELASTIC_IPS_FIELD, AUTO_ASSIGN_PUBLIC_IPS_FIELD,
CUSTOM_RECIPES_FIELD, INSTALL_UPDATES_ON_BOOT_FIELD, USE_EBS_OPTIMIZED_INSTANCES_FIELD,
LIFECYCLE_EVENT_CONFIGURATION_FIELD));
private final String stackId;
private final String type;
private final String name;
private final String shortname;
private final Map attributes;
private final CloudWatchLogsConfiguration cloudWatchLogsConfiguration;
private final String customInstanceProfileArn;
private final String customJson;
private final List customSecurityGroupIds;
private final List packages;
private final List volumeConfigurations;
private final Boolean enableAutoHealing;
private final Boolean autoAssignElasticIps;
private final Boolean autoAssignPublicIps;
private final Recipes customRecipes;
private final Boolean installUpdatesOnBoot;
private final Boolean useEbsOptimizedInstances;
private final LifecycleEventConfiguration lifecycleEventConfiguration;
private CreateLayerRequest(BuilderImpl builder) {
super(builder);
this.stackId = builder.stackId;
this.type = builder.type;
this.name = builder.name;
this.shortname = builder.shortname;
this.attributes = builder.attributes;
this.cloudWatchLogsConfiguration = builder.cloudWatchLogsConfiguration;
this.customInstanceProfileArn = builder.customInstanceProfileArn;
this.customJson = builder.customJson;
this.customSecurityGroupIds = builder.customSecurityGroupIds;
this.packages = builder.packages;
this.volumeConfigurations = builder.volumeConfigurations;
this.enableAutoHealing = builder.enableAutoHealing;
this.autoAssignElasticIps = builder.autoAssignElasticIps;
this.autoAssignPublicIps = builder.autoAssignPublicIps;
this.customRecipes = builder.customRecipes;
this.installUpdatesOnBoot = builder.installUpdatesOnBoot;
this.useEbsOptimizedInstances = builder.useEbsOptimizedInstances;
this.lifecycleEventConfiguration = builder.lifecycleEventConfiguration;
}
/**
*
* The layer stack ID.
*
*
* @return The layer stack ID.
*/
public final String stackId() {
return stackId;
}
/**
*
* The layer type. A stack cannot have more than one built-in layer of the same type. It can have any number of
* custom layers. Built-in layers are not available in Chef 12 stacks.
*
*
* If the service returns an enum value that is not available in the current SDK version, {@link #type} will return
* {@link LayerType#UNKNOWN_TO_SDK_VERSION}. The raw value returned by the service is available from
* {@link #typeAsString}.
*
*
* @return The layer type. A stack cannot have more than one built-in layer of the same type. It can have any number
* of custom layers. Built-in layers are not available in Chef 12 stacks.
* @see LayerType
*/
public final LayerType type() {
return LayerType.fromValue(type);
}
/**
*
* The layer type. A stack cannot have more than one built-in layer of the same type. It can have any number of
* custom layers. Built-in layers are not available in Chef 12 stacks.
*
*
* If the service returns an enum value that is not available in the current SDK version, {@link #type} will return
* {@link LayerType#UNKNOWN_TO_SDK_VERSION}. The raw value returned by the service is available from
* {@link #typeAsString}.
*
*
* @return The layer type. A stack cannot have more than one built-in layer of the same type. It can have any number
* of custom layers. Built-in layers are not available in Chef 12 stacks.
* @see LayerType
*/
public final String typeAsString() {
return type;
}
/**
*
* The layer name, which is used by the console. Layer names can be a maximum of 32 characters.
*
*
* @return The layer name, which is used by the console. Layer names can be a maximum of 32 characters.
*/
public final String name() {
return name;
}
/**
*
* For custom layers only, use this parameter to specify the layer's short name, which is used internally by
* OpsWorks Stacks and by Chef recipes. The short name is also used as the name for the directory where your app
* files are installed. It can have a maximum of 32 characters, which are limited to the alphanumeric characters,
* '-', '_', and '.'.
*
*
* Built-in layer short names are defined by OpsWorks Stacks. For more information, see the Layer Reference .
*
*
* @return For custom layers only, use this parameter to specify the layer's short name, which is used internally by
* OpsWorks Stacks and by Chef recipes. The short name is also used as the name for the directory where your
* app files are installed. It can have a maximum of 32 characters, which are limited to the alphanumeric
* characters, '-', '_', and '.'.
*
* Built-in layer short names are defined by OpsWorks Stacks. For more information, see the Layer Reference .
*/
public final String shortname() {
return shortname;
}
/**
*
* One or more user-defined key-value pairs to be added to the stack attributes.
*
*
* To create a cluster layer, set the EcsClusterArn
attribute to the cluster's ARN.
*
*
* Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
*
*
* This method will never return null. If you would like to know whether the service returned this field (so that
* you can differentiate between null and empty), you can use the {@link #hasAttributes} method.
*
*
* @return One or more user-defined key-value pairs to be added to the stack attributes.
*
* To create a cluster layer, set the EcsClusterArn
attribute to the cluster's ARN.
*/
public final Map attributes() {
return LayerAttributesCopier.copyStringToEnum(attributes);
}
/**
* For responses, this returns true if the service returned a value for the Attributes property. This DOES NOT check
* that the value is non-empty (for which, you should check the {@code isEmpty()} method on the property). This is
* useful because the SDK will never return a null collection or map, but you may need to differentiate between the
* service returning nothing (or null) and the service returning an empty collection or map. For requests, this
* returns true if a value for the property was specified in the request builder, and false if a value was not
* specified.
*/
public final boolean hasAttributes() {
return attributes != null && !(attributes instanceof SdkAutoConstructMap);
}
/**
*
* One or more user-defined key-value pairs to be added to the stack attributes.
*
*
* To create a cluster layer, set the EcsClusterArn
attribute to the cluster's ARN.
*
*
* Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
*
*
* This method will never return null. If you would like to know whether the service returned this field (so that
* you can differentiate between null and empty), you can use the {@link #hasAttributes} method.
*
*
* @return One or more user-defined key-value pairs to be added to the stack attributes.
*
* To create a cluster layer, set the EcsClusterArn
attribute to the cluster's ARN.
*/
public final Map attributesAsStrings() {
return attributes;
}
/**
*
* Specifies CloudWatch Logs configuration options for the layer. For more information, see
* CloudWatchLogsLogStream .
*
*
* @return Specifies CloudWatch Logs configuration options for the layer. For more information, see
* CloudWatchLogsLogStream .
*/
public final CloudWatchLogsConfiguration cloudWatchLogsConfiguration() {
return cloudWatchLogsConfiguration;
}
/**
*
* The ARN of an IAM profile to be used for the layer's EC2 instances. For more information about IAM ARNs, see Using Identifiers .
*
*
* @return The ARN of an IAM profile to be used for the layer's EC2 instances. For more information about IAM ARNs,
* see Using
* Identifiers .
*/
public final String customInstanceProfileArn() {
return customInstanceProfileArn;
}
/**
*
* A JSON-formatted string containing custom stack configuration and deployment attributes to be installed on the
* layer's instances. For more information, see Using Custom
* JSON . This feature is supported as of version 1.7.42 of the CLI.
*
*
* @return A JSON-formatted string containing custom stack configuration and deployment attributes to be installed
* on the layer's instances. For more information, see Using
* Custom JSON . This feature is supported as of version 1.7.42 of the CLI.
*/
public final String customJson() {
return customJson;
}
/**
* For responses, this returns true if the service returned a value for the CustomSecurityGroupIds property. This
* DOES NOT check that the value is non-empty (for which, you should check the {@code isEmpty()} method on the
* property). This is useful because the SDK will never return a null collection or map, but you may need to
* differentiate between the service returning nothing (or null) and the service returning an empty collection or
* map. For requests, this returns true if a value for the property was specified in the request builder, and false
* if a value was not specified.
*/
public final boolean hasCustomSecurityGroupIds() {
return customSecurityGroupIds != null && !(customSecurityGroupIds instanceof SdkAutoConstructList);
}
/**
*
* An array containing the layer custom security group IDs.
*
*
* Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
*
*
* This method will never return null. If you would like to know whether the service returned this field (so that
* you can differentiate between null and empty), you can use the {@link #hasCustomSecurityGroupIds} method.
*
*
* @return An array containing the layer custom security group IDs.
*/
public final List customSecurityGroupIds() {
return customSecurityGroupIds;
}
/**
* For responses, this returns true if the service returned a value for the Packages property. This DOES NOT check
* that the value is non-empty (for which, you should check the {@code isEmpty()} method on the property). This is
* useful because the SDK will never return a null collection or map, but you may need to differentiate between the
* service returning nothing (or null) and the service returning an empty collection or map. For requests, this
* returns true if a value for the property was specified in the request builder, and false if a value was not
* specified.
*/
public final boolean hasPackages() {
return packages != null && !(packages instanceof SdkAutoConstructList);
}
/**
*
* An array of Package
objects that describes the layer packages.
*
*
* Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
*
*
* This method will never return null. If you would like to know whether the service returned this field (so that
* you can differentiate between null and empty), you can use the {@link #hasPackages} method.
*
*
* @return An array of Package
objects that describes the layer packages.
*/
public final List packages() {
return packages;
}
/**
* For responses, this returns true if the service returned a value for the VolumeConfigurations property. This DOES
* NOT check that the value is non-empty (for which, you should check the {@code isEmpty()} method on the property).
* This is useful because the SDK will never return a null collection or map, but you may need to differentiate
* between the service returning nothing (or null) and the service returning an empty collection or map. For
* requests, this returns true if a value for the property was specified in the request builder, and false if a
* value was not specified.
*/
public final boolean hasVolumeConfigurations() {
return volumeConfigurations != null && !(volumeConfigurations instanceof SdkAutoConstructList);
}
/**
*
* A VolumeConfigurations
object that describes the layer's Amazon EBS volumes.
*
*
* Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
*
*
* This method will never return null. If you would like to know whether the service returned this field (so that
* you can differentiate between null and empty), you can use the {@link #hasVolumeConfigurations} method.
*
*
* @return A VolumeConfigurations
object that describes the layer's Amazon EBS volumes.
*/
public final List volumeConfigurations() {
return volumeConfigurations;
}
/**
*
* Whether to disable auto healing for the layer.
*
*
* @return Whether to disable auto healing for the layer.
*/
public final Boolean enableAutoHealing() {
return enableAutoHealing;
}
/**
*
* Whether to automatically assign an Elastic IP address
* to the layer's instances. For more information, see How to Edit a
* Layer .
*
*
* @return Whether to automatically assign an Elastic IP
* address to the layer's instances. For more information, see How to Edit a
* Layer .
*/
public final Boolean autoAssignElasticIps() {
return autoAssignElasticIps;
}
/**
*
* For stacks that are running in a VPC, whether to automatically assign a public IP address to the layer's
* instances. For more information, see How to Edit a
* Layer .
*
*
* @return For stacks that are running in a VPC, whether to automatically assign a public IP address to the layer's
* instances. For more information, see How to Edit a
* Layer .
*/
public final Boolean autoAssignPublicIps() {
return autoAssignPublicIps;
}
/**
*
* A LayerCustomRecipes
object that specifies the layer custom recipes.
*
*
* @return A LayerCustomRecipes
object that specifies the layer custom recipes.
*/
public final Recipes customRecipes() {
return customRecipes;
}
/**
*
* 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.
*
*
*
* To ensure that your instances have the latest security updates, we strongly recommend using the default value of
* true
.
*
*
*
* @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.
*
* To ensure that your instances have the latest security updates, we strongly recommend using the default
* value of true
.
*
*/
public final Boolean installUpdatesOnBoot() {
return installUpdatesOnBoot;
}
/**
*
* Whether to use Amazon EBS-optimized instances.
*
*
* @return Whether to use Amazon EBS-optimized instances.
*/
public final Boolean useEbsOptimizedInstances() {
return useEbsOptimizedInstances;
}
/**
*
* A LifeCycleEventConfiguration
object that you can use to configure the Shutdown event to specify an
* execution timeout and enable or disable Elastic Load Balancer connection draining.
*
*
* @return A LifeCycleEventConfiguration
object that you can use to configure the Shutdown event to
* specify an execution timeout and enable or disable Elastic Load Balancer connection draining.
*/
public final LifecycleEventConfiguration lifecycleEventConfiguration() {
return lifecycleEventConfiguration;
}
@Override
public Builder toBuilder() {
return new BuilderImpl(this);
}
public static Builder builder() {
return new BuilderImpl();
}
public static Class serializableBuilderClass() {
return BuilderImpl.class;
}
@Override
public final int hashCode() {
int hashCode = 1;
hashCode = 31 * hashCode + super.hashCode();
hashCode = 31 * hashCode + Objects.hashCode(stackId());
hashCode = 31 * hashCode + Objects.hashCode(typeAsString());
hashCode = 31 * hashCode + Objects.hashCode(name());
hashCode = 31 * hashCode + Objects.hashCode(shortname());
hashCode = 31 * hashCode + Objects.hashCode(hasAttributes() ? attributesAsStrings() : null);
hashCode = 31 * hashCode + Objects.hashCode(cloudWatchLogsConfiguration());
hashCode = 31 * hashCode + Objects.hashCode(customInstanceProfileArn());
hashCode = 31 * hashCode + Objects.hashCode(customJson());
hashCode = 31 * hashCode + Objects.hashCode(hasCustomSecurityGroupIds() ? customSecurityGroupIds() : null);
hashCode = 31 * hashCode + Objects.hashCode(hasPackages() ? packages() : null);
hashCode = 31 * hashCode + Objects.hashCode(hasVolumeConfigurations() ? volumeConfigurations() : null);
hashCode = 31 * hashCode + Objects.hashCode(enableAutoHealing());
hashCode = 31 * hashCode + Objects.hashCode(autoAssignElasticIps());
hashCode = 31 * hashCode + Objects.hashCode(autoAssignPublicIps());
hashCode = 31 * hashCode + Objects.hashCode(customRecipes());
hashCode = 31 * hashCode + Objects.hashCode(installUpdatesOnBoot());
hashCode = 31 * hashCode + Objects.hashCode(useEbsOptimizedInstances());
hashCode = 31 * hashCode + Objects.hashCode(lifecycleEventConfiguration());
return hashCode;
}
@Override
public final boolean equals(Object obj) {
return super.equals(obj) && equalsBySdkFields(obj);
}
@Override
public final boolean equalsBySdkFields(Object obj) {
if (this == obj) {
return true;
}
if (obj == null) {
return false;
}
if (!(obj instanceof CreateLayerRequest)) {
return false;
}
CreateLayerRequest other = (CreateLayerRequest) obj;
return Objects.equals(stackId(), other.stackId()) && Objects.equals(typeAsString(), other.typeAsString())
&& Objects.equals(name(), other.name()) && Objects.equals(shortname(), other.shortname())
&& hasAttributes() == other.hasAttributes() && Objects.equals(attributesAsStrings(), other.attributesAsStrings())
&& Objects.equals(cloudWatchLogsConfiguration(), other.cloudWatchLogsConfiguration())
&& Objects.equals(customInstanceProfileArn(), other.customInstanceProfileArn())
&& Objects.equals(customJson(), other.customJson())
&& hasCustomSecurityGroupIds() == other.hasCustomSecurityGroupIds()
&& Objects.equals(customSecurityGroupIds(), other.customSecurityGroupIds())
&& hasPackages() == other.hasPackages() && Objects.equals(packages(), other.packages())
&& hasVolumeConfigurations() == other.hasVolumeConfigurations()
&& Objects.equals(volumeConfigurations(), other.volumeConfigurations())
&& Objects.equals(enableAutoHealing(), other.enableAutoHealing())
&& Objects.equals(autoAssignElasticIps(), other.autoAssignElasticIps())
&& Objects.equals(autoAssignPublicIps(), other.autoAssignPublicIps())
&& Objects.equals(customRecipes(), other.customRecipes())
&& Objects.equals(installUpdatesOnBoot(), other.installUpdatesOnBoot())
&& Objects.equals(useEbsOptimizedInstances(), other.useEbsOptimizedInstances())
&& Objects.equals(lifecycleEventConfiguration(), other.lifecycleEventConfiguration());
}
/**
* 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 final String toString() {
return ToString.builder("CreateLayerRequest").add("StackId", stackId()).add("Type", typeAsString()).add("Name", name())
.add("Shortname", shortname()).add("Attributes", hasAttributes() ? attributesAsStrings() : null)
.add("CloudWatchLogsConfiguration", cloudWatchLogsConfiguration())
.add("CustomInstanceProfileArn", customInstanceProfileArn()).add("CustomJson", customJson())
.add("CustomSecurityGroupIds", hasCustomSecurityGroupIds() ? customSecurityGroupIds() : null)
.add("Packages", hasPackages() ? packages() : null)
.add("VolumeConfigurations", hasVolumeConfigurations() ? volumeConfigurations() : null)
.add("EnableAutoHealing", enableAutoHealing()).add("AutoAssignElasticIps", autoAssignElasticIps())
.add("AutoAssignPublicIps", autoAssignPublicIps()).add("CustomRecipes", customRecipes())
.add("InstallUpdatesOnBoot", installUpdatesOnBoot()).add("UseEbsOptimizedInstances", useEbsOptimizedInstances())
.add("LifecycleEventConfiguration", lifecycleEventConfiguration()).build();
}
public final Optional getValueForField(String fieldName, Class clazz) {
switch (fieldName) {
case "StackId":
return Optional.ofNullable(clazz.cast(stackId()));
case "Type":
return Optional.ofNullable(clazz.cast(typeAsString()));
case "Name":
return Optional.ofNullable(clazz.cast(name()));
case "Shortname":
return Optional.ofNullable(clazz.cast(shortname()));
case "Attributes":
return Optional.ofNullable(clazz.cast(attributesAsStrings()));
case "CloudWatchLogsConfiguration":
return Optional.ofNullable(clazz.cast(cloudWatchLogsConfiguration()));
case "CustomInstanceProfileArn":
return Optional.ofNullable(clazz.cast(customInstanceProfileArn()));
case "CustomJson":
return Optional.ofNullable(clazz.cast(customJson()));
case "CustomSecurityGroupIds":
return Optional.ofNullable(clazz.cast(customSecurityGroupIds()));
case "Packages":
return Optional.ofNullable(clazz.cast(packages()));
case "VolumeConfigurations":
return Optional.ofNullable(clazz.cast(volumeConfigurations()));
case "EnableAutoHealing":
return Optional.ofNullable(clazz.cast(enableAutoHealing()));
case "AutoAssignElasticIps":
return Optional.ofNullable(clazz.cast(autoAssignElasticIps()));
case "AutoAssignPublicIps":
return Optional.ofNullable(clazz.cast(autoAssignPublicIps()));
case "CustomRecipes":
return Optional.ofNullable(clazz.cast(customRecipes()));
case "InstallUpdatesOnBoot":
return Optional.ofNullable(clazz.cast(installUpdatesOnBoot()));
case "UseEbsOptimizedInstances":
return Optional.ofNullable(clazz.cast(useEbsOptimizedInstances()));
case "LifecycleEventConfiguration":
return Optional.ofNullable(clazz.cast(lifecycleEventConfiguration()));
default:
return Optional.empty();
}
}
@Override
public final List> sdkFields() {
return SDK_FIELDS;
}
private static Function getter(Function g) {
return obj -> g.apply((CreateLayerRequest) obj);
}
private static BiConsumer setter(BiConsumer s) {
return (obj, val) -> s.accept((Builder) obj, val);
}
public interface Builder extends OpsWorksRequest.Builder, SdkPojo, CopyableBuilder {
/**
*
* The layer stack ID.
*
*
* @param stackId
* The layer stack ID.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder stackId(String stackId);
/**
*
* The layer type. A stack cannot have more than one built-in layer of the same type. It can have any number of
* custom layers. Built-in layers are not available in Chef 12 stacks.
*
*
* @param type
* The layer type. A stack cannot have more than one built-in layer of the same type. It can have any
* number of custom layers. Built-in layers are not available in Chef 12 stacks.
* @see LayerType
* @return Returns a reference to this object so that method calls can be chained together.
* @see LayerType
*/
Builder type(String type);
/**
*
* The layer type. A stack cannot have more than one built-in layer of the same type. It can have any number of
* custom layers. Built-in layers are not available in Chef 12 stacks.
*
*
* @param type
* The layer type. A stack cannot have more than one built-in layer of the same type. It can have any
* number of custom layers. Built-in layers are not available in Chef 12 stacks.
* @see LayerType
* @return Returns a reference to this object so that method calls can be chained together.
* @see LayerType
*/
Builder type(LayerType type);
/**
*
* The layer name, which is used by the console. Layer names can be a maximum of 32 characters.
*
*
* @param name
* The layer name, which is used by the console. Layer names can be a maximum of 32 characters.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder name(String name);
/**
*
* For custom layers only, use this parameter to specify the layer's short name, which is used internally by
* OpsWorks Stacks and by Chef recipes. The short name is also used as the name for the directory where your app
* files are installed. It can have a maximum of 32 characters, which are limited to the alphanumeric
* characters, '-', '_', and '.'.
*
*
* Built-in layer short names are defined by OpsWorks Stacks. For more information, see the Layer Reference .
*
*
* @param shortname
* For custom layers only, use this parameter to specify the layer's short name, which is used internally
* by OpsWorks Stacks and by Chef recipes. The short name is also used as the name for the directory
* where your app files are installed. It can have a maximum of 32 characters, which are limited to the
* alphanumeric characters, '-', '_', and '.'.
*
* Built-in layer short names are defined by OpsWorks Stacks. For more information, see the Layer Reference .
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder shortname(String shortname);
/**
*
* One or more user-defined key-value pairs to be added to the stack attributes.
*
*
* To create a cluster layer, set the EcsClusterArn
attribute to the cluster's ARN.
*
*
* @param attributes
* One or more user-defined key-value pairs to be added to the stack attributes.
*
* To create a cluster layer, set the EcsClusterArn
attribute to the cluster's ARN.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder attributesWithStrings(Map attributes);
/**
*
* One or more user-defined key-value pairs to be added to the stack attributes.
*
*
* To create a cluster layer, set the EcsClusterArn
attribute to the cluster's ARN.
*
*
* @param attributes
* One or more user-defined key-value pairs to be added to the stack attributes.
*
* To create a cluster layer, set the EcsClusterArn
attribute to the cluster's ARN.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder attributes(Map attributes);
/**
*
* Specifies CloudWatch Logs configuration options for the layer. For more information, see
* CloudWatchLogsLogStream .
*
*
* @param cloudWatchLogsConfiguration
* Specifies CloudWatch Logs configuration options for the layer. For more information, see
* CloudWatchLogsLogStream .
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder cloudWatchLogsConfiguration(CloudWatchLogsConfiguration cloudWatchLogsConfiguration);
/**
*
* Specifies CloudWatch Logs configuration options for the layer. For more information, see
* CloudWatchLogsLogStream .
*
* This is a convenience method that creates an instance of the {@link CloudWatchLogsConfiguration.Builder}
* avoiding the need to create one manually via {@link CloudWatchLogsConfiguration#builder()}.
*
*
* When the {@link Consumer} completes, {@link CloudWatchLogsConfiguration.Builder#build()} is called
* immediately and its result is passed to {@link #cloudWatchLogsConfiguration(CloudWatchLogsConfiguration)}.
*
* @param cloudWatchLogsConfiguration
* a consumer that will call methods on {@link CloudWatchLogsConfiguration.Builder}
* @return Returns a reference to this object so that method calls can be chained together.
* @see #cloudWatchLogsConfiguration(CloudWatchLogsConfiguration)
*/
default Builder cloudWatchLogsConfiguration(Consumer cloudWatchLogsConfiguration) {
return cloudWatchLogsConfiguration(CloudWatchLogsConfiguration.builder().applyMutation(cloudWatchLogsConfiguration)
.build());
}
/**
*
* The ARN of an IAM profile to be used for the layer's EC2 instances. For more information about IAM ARNs, see
* Using Identifiers .
*
*
* @param customInstanceProfileArn
* The ARN of an IAM profile to be used for the layer's EC2 instances. For more information about IAM
* ARNs, see Using
* Identifiers .
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder customInstanceProfileArn(String customInstanceProfileArn);
/**
*
* A JSON-formatted string containing custom stack configuration and deployment attributes to be installed on
* the layer's instances. For more information, see Using Custom
* JSON . This feature is supported as of version 1.7.42 of the CLI.
*
*
* @param customJson
* A JSON-formatted string containing custom stack configuration and deployment attributes to be
* installed on the layer's instances. For more information, see Using
* Custom JSON . This feature is supported as of version 1.7.42 of the CLI.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder customJson(String customJson);
/**
*
* An array containing the layer custom security group IDs.
*
*
* @param customSecurityGroupIds
* An array containing the layer custom security group IDs.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder customSecurityGroupIds(Collection customSecurityGroupIds);
/**
*
* An array containing the layer custom security group IDs.
*
*
* @param customSecurityGroupIds
* An array containing the layer custom security group IDs.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder customSecurityGroupIds(String... customSecurityGroupIds);
/**
*
* An array of Package
objects that describes the layer packages.
*
*
* @param packages
* An array of Package
objects that describes the layer packages.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder packages(Collection packages);
/**
*
* An array of Package
objects that describes the layer packages.
*
*
* @param packages
* An array of Package
objects that describes the layer packages.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder packages(String... packages);
/**
*
* A VolumeConfigurations
object that describes the layer's Amazon EBS volumes.
*
*
* @param volumeConfigurations
* A VolumeConfigurations
object that describes the layer's Amazon EBS volumes.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder volumeConfigurations(Collection volumeConfigurations);
/**
*
* A VolumeConfigurations
object that describes the layer's Amazon EBS volumes.
*
*
* @param volumeConfigurations
* A VolumeConfigurations
object that describes the layer's Amazon EBS volumes.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder volumeConfigurations(VolumeConfiguration... volumeConfigurations);
/**
*
* A VolumeConfigurations
object that describes the layer's Amazon EBS volumes.
*
* This is a convenience method that creates an instance of the
* {@link software.amazon.awssdk.services.opsworks.model.VolumeConfiguration.Builder} avoiding the need to
* create one manually via {@link software.amazon.awssdk.services.opsworks.model.VolumeConfiguration#builder()}.
*
*
* When the {@link Consumer} completes,
* {@link software.amazon.awssdk.services.opsworks.model.VolumeConfiguration.Builder#build()} is called
* immediately and its result is passed to {@link #volumeConfigurations(List)}.
*
* @param volumeConfigurations
* a consumer that will call methods on
* {@link software.amazon.awssdk.services.opsworks.model.VolumeConfiguration.Builder}
* @return Returns a reference to this object so that method calls can be chained together.
* @see #volumeConfigurations(java.util.Collection)
*/
Builder volumeConfigurations(Consumer... volumeConfigurations);
/**
*
* Whether to disable auto healing for the layer.
*
*
* @param enableAutoHealing
* Whether to disable auto healing for the layer.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder enableAutoHealing(Boolean enableAutoHealing);
/**
*
* Whether to automatically assign an Elastic IP
* address to the layer's instances. For more information, see How to Edit a
* Layer .
*
*
* @param autoAssignElasticIps
* Whether to automatically assign an Elastic IP
* address to the layer's instances. For more information, see How to
* Edit a Layer .
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder autoAssignElasticIps(Boolean autoAssignElasticIps);
/**
*
* For stacks that are running in a VPC, whether to automatically assign a public IP address to the layer's
* instances. For more information, see How to Edit a
* Layer .
*
*
* @param autoAssignPublicIps
* For stacks that are running in a VPC, whether to automatically assign a public IP address to the
* layer's instances. For more information, see How to
* Edit a Layer .
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder autoAssignPublicIps(Boolean autoAssignPublicIps);
/**
*
* A LayerCustomRecipes
object that specifies the layer custom recipes.
*
*
* @param customRecipes
* A LayerCustomRecipes
object that specifies the layer custom recipes.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder customRecipes(Recipes customRecipes);
/**
*
* A LayerCustomRecipes
object that specifies the layer custom recipes.
*
* This is a convenience method that creates an instance of the {@link Recipes.Builder} avoiding the need to
* create one manually via {@link Recipes#builder()}.
*
*
* When the {@link Consumer} completes, {@link Recipes.Builder#build()} is called immediately and its result is
* passed to {@link #customRecipes(Recipes)}.
*
* @param customRecipes
* a consumer that will call methods on {@link Recipes.Builder}
* @return Returns a reference to this object so that method calls can be chained together.
* @see #customRecipes(Recipes)
*/
default Builder customRecipes(Consumer customRecipes) {
return customRecipes(Recipes.builder().applyMutation(customRecipes).build());
}
/**
*
* 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.
*
*
*
* To ensure that your instances have the latest security updates, we strongly recommend using the default value
* of true
.
*
*
*
* @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.
*
* To ensure that your instances have the latest security updates, we strongly recommend using the
* default value of true
.
*
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder installUpdatesOnBoot(Boolean installUpdatesOnBoot);
/**
*
* Whether to use Amazon EBS-optimized instances.
*
*
* @param useEbsOptimizedInstances
* Whether to use Amazon EBS-optimized instances.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder useEbsOptimizedInstances(Boolean useEbsOptimizedInstances);
/**
*
* A LifeCycleEventConfiguration
object that you can use to configure the Shutdown event to specify
* an execution timeout and enable or disable Elastic Load Balancer connection draining.
*
*
* @param lifecycleEventConfiguration
* A LifeCycleEventConfiguration
object that you can use to configure the Shutdown event to
* specify an execution timeout and enable or disable Elastic Load Balancer connection draining.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder lifecycleEventConfiguration(LifecycleEventConfiguration lifecycleEventConfiguration);
/**
*
* A LifeCycleEventConfiguration
object that you can use to configure the Shutdown event to specify
* an execution timeout and enable or disable Elastic Load Balancer connection draining.
*
* This is a convenience method that creates an instance of the {@link LifecycleEventConfiguration.Builder}
* avoiding the need to create one manually via {@link LifecycleEventConfiguration#builder()}.
*
*
* When the {@link Consumer} completes, {@link LifecycleEventConfiguration.Builder#build()} is called
* immediately and its result is passed to {@link #lifecycleEventConfiguration(LifecycleEventConfiguration)}.
*
* @param lifecycleEventConfiguration
* a consumer that will call methods on {@link LifecycleEventConfiguration.Builder}
* @return Returns a reference to this object so that method calls can be chained together.
* @see #lifecycleEventConfiguration(LifecycleEventConfiguration)
*/
default Builder lifecycleEventConfiguration(Consumer lifecycleEventConfiguration) {
return lifecycleEventConfiguration(LifecycleEventConfiguration.builder().applyMutation(lifecycleEventConfiguration)
.build());
}
@Override
Builder overrideConfiguration(AwsRequestOverrideConfiguration overrideConfiguration);
@Override
Builder overrideConfiguration(Consumer builderConsumer);
}
static final class BuilderImpl extends OpsWorksRequest.BuilderImpl implements Builder {
private String stackId;
private String type;
private String name;
private String shortname;
private Map attributes = DefaultSdkAutoConstructMap.getInstance();
private CloudWatchLogsConfiguration cloudWatchLogsConfiguration;
private String customInstanceProfileArn;
private String customJson;
private List customSecurityGroupIds = DefaultSdkAutoConstructList.getInstance();
private List packages = DefaultSdkAutoConstructList.getInstance();
private List volumeConfigurations = DefaultSdkAutoConstructList.getInstance();
private Boolean enableAutoHealing;
private Boolean autoAssignElasticIps;
private Boolean autoAssignPublicIps;
private Recipes customRecipes;
private Boolean installUpdatesOnBoot;
private Boolean useEbsOptimizedInstances;
private LifecycleEventConfiguration lifecycleEventConfiguration;
private BuilderImpl() {
}
private BuilderImpl(CreateLayerRequest model) {
super(model);
stackId(model.stackId);
type(model.type);
name(model.name);
shortname(model.shortname);
attributesWithStrings(model.attributes);
cloudWatchLogsConfiguration(model.cloudWatchLogsConfiguration);
customInstanceProfileArn(model.customInstanceProfileArn);
customJson(model.customJson);
customSecurityGroupIds(model.customSecurityGroupIds);
packages(model.packages);
volumeConfigurations(model.volumeConfigurations);
enableAutoHealing(model.enableAutoHealing);
autoAssignElasticIps(model.autoAssignElasticIps);
autoAssignPublicIps(model.autoAssignPublicIps);
customRecipes(model.customRecipes);
installUpdatesOnBoot(model.installUpdatesOnBoot);
useEbsOptimizedInstances(model.useEbsOptimizedInstances);
lifecycleEventConfiguration(model.lifecycleEventConfiguration);
}
public final String getStackId() {
return stackId;
}
public final void setStackId(String stackId) {
this.stackId = stackId;
}
@Override
public final Builder stackId(String stackId) {
this.stackId = stackId;
return this;
}
public final String getType() {
return type;
}
public final void setType(String type) {
this.type = type;
}
@Override
public final Builder type(String type) {
this.type = type;
return this;
}
@Override
public final Builder type(LayerType type) {
this.type(type == null ? null : type.toString());
return this;
}
public final String getName() {
return name;
}
public final void setName(String name) {
this.name = name;
}
@Override
public final Builder name(String name) {
this.name = name;
return this;
}
public final String getShortname() {
return shortname;
}
public final void setShortname(String shortname) {
this.shortname = shortname;
}
@Override
public final Builder shortname(String shortname) {
this.shortname = shortname;
return this;
}
public final Map getAttributes() {
if (attributes instanceof SdkAutoConstructMap) {
return null;
}
return attributes;
}
public final void setAttributes(Map attributes) {
this.attributes = LayerAttributesCopier.copy(attributes);
}
@Override
public final Builder attributesWithStrings(Map attributes) {
this.attributes = LayerAttributesCopier.copy(attributes);
return this;
}
@Override
public final Builder attributes(Map attributes) {
this.attributes = LayerAttributesCopier.copyEnumToString(attributes);
return this;
}
public final CloudWatchLogsConfiguration.Builder getCloudWatchLogsConfiguration() {
return cloudWatchLogsConfiguration != null ? cloudWatchLogsConfiguration.toBuilder() : null;
}
public final void setCloudWatchLogsConfiguration(CloudWatchLogsConfiguration.BuilderImpl cloudWatchLogsConfiguration) {
this.cloudWatchLogsConfiguration = cloudWatchLogsConfiguration != null ? cloudWatchLogsConfiguration.build() : null;
}
@Override
public final Builder cloudWatchLogsConfiguration(CloudWatchLogsConfiguration cloudWatchLogsConfiguration) {
this.cloudWatchLogsConfiguration = cloudWatchLogsConfiguration;
return this;
}
public final String getCustomInstanceProfileArn() {
return customInstanceProfileArn;
}
public final void setCustomInstanceProfileArn(String customInstanceProfileArn) {
this.customInstanceProfileArn = customInstanceProfileArn;
}
@Override
public final Builder customInstanceProfileArn(String customInstanceProfileArn) {
this.customInstanceProfileArn = customInstanceProfileArn;
return this;
}
public final String getCustomJson() {
return customJson;
}
public final void setCustomJson(String customJson) {
this.customJson = customJson;
}
@Override
public final Builder customJson(String customJson) {
this.customJson = customJson;
return this;
}
public final Collection getCustomSecurityGroupIds() {
if (customSecurityGroupIds instanceof SdkAutoConstructList) {
return null;
}
return customSecurityGroupIds;
}
public final void setCustomSecurityGroupIds(Collection customSecurityGroupIds) {
this.customSecurityGroupIds = StringsCopier.copy(customSecurityGroupIds);
}
@Override
public final Builder customSecurityGroupIds(Collection customSecurityGroupIds) {
this.customSecurityGroupIds = StringsCopier.copy(customSecurityGroupIds);
return this;
}
@Override
@SafeVarargs
public final Builder customSecurityGroupIds(String... customSecurityGroupIds) {
customSecurityGroupIds(Arrays.asList(customSecurityGroupIds));
return this;
}
public final Collection getPackages() {
if (packages instanceof SdkAutoConstructList) {
return null;
}
return packages;
}
public final void setPackages(Collection packages) {
this.packages = StringsCopier.copy(packages);
}
@Override
public final Builder packages(Collection packages) {
this.packages = StringsCopier.copy(packages);
return this;
}
@Override
@SafeVarargs
public final Builder packages(String... packages) {
packages(Arrays.asList(packages));
return this;
}
public final List getVolumeConfigurations() {
List result = VolumeConfigurationsCopier.copyToBuilder(this.volumeConfigurations);
if (result instanceof SdkAutoConstructList) {
return null;
}
return result;
}
public final void setVolumeConfigurations(Collection volumeConfigurations) {
this.volumeConfigurations = VolumeConfigurationsCopier.copyFromBuilder(volumeConfigurations);
}
@Override
public final Builder volumeConfigurations(Collection volumeConfigurations) {
this.volumeConfigurations = VolumeConfigurationsCopier.copy(volumeConfigurations);
return this;
}
@Override
@SafeVarargs
public final Builder volumeConfigurations(VolumeConfiguration... volumeConfigurations) {
volumeConfigurations(Arrays.asList(volumeConfigurations));
return this;
}
@Override
@SafeVarargs
public final Builder volumeConfigurations(Consumer... volumeConfigurations) {
volumeConfigurations(Stream.of(volumeConfigurations).map(c -> VolumeConfiguration.builder().applyMutation(c).build())
.collect(Collectors.toList()));
return this;
}
public final Boolean getEnableAutoHealing() {
return enableAutoHealing;
}
public final void setEnableAutoHealing(Boolean enableAutoHealing) {
this.enableAutoHealing = enableAutoHealing;
}
@Override
public final Builder enableAutoHealing(Boolean enableAutoHealing) {
this.enableAutoHealing = enableAutoHealing;
return this;
}
public final Boolean getAutoAssignElasticIps() {
return autoAssignElasticIps;
}
public final void setAutoAssignElasticIps(Boolean autoAssignElasticIps) {
this.autoAssignElasticIps = autoAssignElasticIps;
}
@Override
public final Builder autoAssignElasticIps(Boolean autoAssignElasticIps) {
this.autoAssignElasticIps = autoAssignElasticIps;
return this;
}
public final Boolean getAutoAssignPublicIps() {
return autoAssignPublicIps;
}
public final void setAutoAssignPublicIps(Boolean autoAssignPublicIps) {
this.autoAssignPublicIps = autoAssignPublicIps;
}
@Override
public final Builder autoAssignPublicIps(Boolean autoAssignPublicIps) {
this.autoAssignPublicIps = autoAssignPublicIps;
return this;
}
public final Recipes.Builder getCustomRecipes() {
return customRecipes != null ? customRecipes.toBuilder() : null;
}
public final void setCustomRecipes(Recipes.BuilderImpl customRecipes) {
this.customRecipes = customRecipes != null ? customRecipes.build() : null;
}
@Override
public final Builder customRecipes(Recipes customRecipes) {
this.customRecipes = customRecipes;
return this;
}
public final Boolean getInstallUpdatesOnBoot() {
return installUpdatesOnBoot;
}
public final void setInstallUpdatesOnBoot(Boolean installUpdatesOnBoot) {
this.installUpdatesOnBoot = installUpdatesOnBoot;
}
@Override
public final Builder installUpdatesOnBoot(Boolean installUpdatesOnBoot) {
this.installUpdatesOnBoot = installUpdatesOnBoot;
return this;
}
public final Boolean getUseEbsOptimizedInstances() {
return useEbsOptimizedInstances;
}
public final void setUseEbsOptimizedInstances(Boolean useEbsOptimizedInstances) {
this.useEbsOptimizedInstances = useEbsOptimizedInstances;
}
@Override
public final Builder useEbsOptimizedInstances(Boolean useEbsOptimizedInstances) {
this.useEbsOptimizedInstances = useEbsOptimizedInstances;
return this;
}
public final LifecycleEventConfiguration.Builder getLifecycleEventConfiguration() {
return lifecycleEventConfiguration != null ? lifecycleEventConfiguration.toBuilder() : null;
}
public final void setLifecycleEventConfiguration(LifecycleEventConfiguration.BuilderImpl lifecycleEventConfiguration) {
this.lifecycleEventConfiguration = lifecycleEventConfiguration != null ? lifecycleEventConfiguration.build() : null;
}
@Override
public final Builder lifecycleEventConfiguration(LifecycleEventConfiguration lifecycleEventConfiguration) {
this.lifecycleEventConfiguration = lifecycleEventConfiguration;
return this;
}
@Override
public Builder overrideConfiguration(AwsRequestOverrideConfiguration overrideConfiguration) {
super.overrideConfiguration(overrideConfiguration);
return this;
}
@Override
public Builder overrideConfiguration(Consumer builderConsumer) {
super.overrideConfiguration(builderConsumer);
return this;
}
@Override
public CreateLayerRequest build() {
return new CreateLayerRequest(this);
}
@Override
public List> sdkFields() {
return SDK_FIELDS;
}
}
}