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.opensearch.model.UpdateDomainConfigRequest Maven / Gradle / Ivy
Go to download
The AWS Java SDK for Open Search module holds the client classes that are used for
communicating with Open Search.
/*
* 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.opensearch.model;
import java.util.Arrays;
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 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.LocationTrait;
import software.amazon.awssdk.core.traits.MapTrait;
import software.amazon.awssdk.core.util.DefaultSdkAutoConstructMap;
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;
/**
*
* Container for the request parameters to the UpdateDomain
operation.
*
*/
@Generated("software.amazon.awssdk:codegen")
public final class UpdateDomainConfigRequest extends OpenSearchRequest implements
ToCopyableBuilder {
private static final SdkField DOMAIN_NAME_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("DomainName").getter(getter(UpdateDomainConfigRequest::domainName)).setter(setter(Builder::domainName))
.traits(LocationTrait.builder().location(MarshallLocation.PATH).locationName("DomainName").build()).build();
private static final SdkField CLUSTER_CONFIG_FIELD = SdkField
. builder(MarshallingType.SDK_POJO).memberName("ClusterConfig")
.getter(getter(UpdateDomainConfigRequest::clusterConfig)).setter(setter(Builder::clusterConfig))
.constructor(ClusterConfig::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("ClusterConfig").build()).build();
private static final SdkField EBS_OPTIONS_FIELD = SdkField. builder(MarshallingType.SDK_POJO)
.memberName("EBSOptions").getter(getter(UpdateDomainConfigRequest::ebsOptions)).setter(setter(Builder::ebsOptions))
.constructor(EBSOptions::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("EBSOptions").build()).build();
private static final SdkField SNAPSHOT_OPTIONS_FIELD = SdkField
. builder(MarshallingType.SDK_POJO).memberName("SnapshotOptions")
.getter(getter(UpdateDomainConfigRequest::snapshotOptions)).setter(setter(Builder::snapshotOptions))
.constructor(SnapshotOptions::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("SnapshotOptions").build()).build();
private static final SdkField VPC_OPTIONS_FIELD = SdkField. builder(MarshallingType.SDK_POJO)
.memberName("VPCOptions").getter(getter(UpdateDomainConfigRequest::vpcOptions)).setter(setter(Builder::vpcOptions))
.constructor(VPCOptions::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("VPCOptions").build()).build();
private static final SdkField COGNITO_OPTIONS_FIELD = SdkField
. builder(MarshallingType.SDK_POJO).memberName("CognitoOptions")
.getter(getter(UpdateDomainConfigRequest::cognitoOptions)).setter(setter(Builder::cognitoOptions))
.constructor(CognitoOptions::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("CognitoOptions").build()).build();
private static final SdkField> ADVANCED_OPTIONS_FIELD = SdkField
.> builder(MarshallingType.MAP)
.memberName("AdvancedOptions")
.getter(getter(UpdateDomainConfigRequest::advancedOptions))
.setter(setter(Builder::advancedOptions))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("AdvancedOptions").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 ACCESS_POLICIES_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("AccessPolicies").getter(getter(UpdateDomainConfigRequest::accessPolicies))
.setter(setter(Builder::accessPolicies))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("AccessPolicies").build()).build();
private static final SdkField> LOG_PUBLISHING_OPTIONS_FIELD = SdkField
.> builder(MarshallingType.MAP)
.memberName("LogPublishingOptions")
.getter(getter(UpdateDomainConfigRequest::logPublishingOptionsAsStrings))
.setter(setter(Builder::logPublishingOptionsWithStrings))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("LogPublishingOptions").build(),
MapTrait.builder()
.keyLocationName("key")
.valueLocationName("value")
.valueFieldInfo(
SdkField. builder(MarshallingType.SDK_POJO)
.constructor(LogPublishingOption::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD)
.locationName("value").build()).build()).build()).build();
private static final SdkField ENCRYPTION_AT_REST_OPTIONS_FIELD = SdkField
. builder(MarshallingType.SDK_POJO).memberName("EncryptionAtRestOptions")
.getter(getter(UpdateDomainConfigRequest::encryptionAtRestOptions)).setter(setter(Builder::encryptionAtRestOptions))
.constructor(EncryptionAtRestOptions::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("EncryptionAtRestOptions").build())
.build();
private static final SdkField DOMAIN_ENDPOINT_OPTIONS_FIELD = SdkField
. builder(MarshallingType.SDK_POJO).memberName("DomainEndpointOptions")
.getter(getter(UpdateDomainConfigRequest::domainEndpointOptions)).setter(setter(Builder::domainEndpointOptions))
.constructor(DomainEndpointOptions::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("DomainEndpointOptions").build())
.build();
private static final SdkField NODE_TO_NODE_ENCRYPTION_OPTIONS_FIELD = SdkField
. builder(MarshallingType.SDK_POJO)
.memberName("NodeToNodeEncryptionOptions")
.getter(getter(UpdateDomainConfigRequest::nodeToNodeEncryptionOptions))
.setter(setter(Builder::nodeToNodeEncryptionOptions))
.constructor(NodeToNodeEncryptionOptions::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("NodeToNodeEncryptionOptions")
.build()).build();
private static final SdkField ADVANCED_SECURITY_OPTIONS_FIELD = SdkField
. builder(MarshallingType.SDK_POJO).memberName("AdvancedSecurityOptions")
.getter(getter(UpdateDomainConfigRequest::advancedSecurityOptions)).setter(setter(Builder::advancedSecurityOptions))
.constructor(AdvancedSecurityOptionsInput::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("AdvancedSecurityOptions").build())
.build();
private static final SdkField AUTO_TUNE_OPTIONS_FIELD = SdkField
. builder(MarshallingType.SDK_POJO).memberName("AutoTuneOptions")
.getter(getter(UpdateDomainConfigRequest::autoTuneOptions)).setter(setter(Builder::autoTuneOptions))
.constructor(AutoTuneOptions::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("AutoTuneOptions").build()).build();
private static final SdkField DRY_RUN_FIELD = SdkField. builder(MarshallingType.BOOLEAN)
.memberName("DryRun").getter(getter(UpdateDomainConfigRequest::dryRun)).setter(setter(Builder::dryRun))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("DryRun").build()).build();
private static final SdkField DRY_RUN_MODE_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("DryRunMode").getter(getter(UpdateDomainConfigRequest::dryRunModeAsString))
.setter(setter(Builder::dryRunMode))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("DryRunMode").build()).build();
private static final SdkField OFF_PEAK_WINDOW_OPTIONS_FIELD = SdkField
. builder(MarshallingType.SDK_POJO).memberName("OffPeakWindowOptions")
.getter(getter(UpdateDomainConfigRequest::offPeakWindowOptions)).setter(setter(Builder::offPeakWindowOptions))
.constructor(OffPeakWindowOptions::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("OffPeakWindowOptions").build())
.build();
private static final SdkField SOFTWARE_UPDATE_OPTIONS_FIELD = SdkField
. builder(MarshallingType.SDK_POJO).memberName("SoftwareUpdateOptions")
.getter(getter(UpdateDomainConfigRequest::softwareUpdateOptions)).setter(setter(Builder::softwareUpdateOptions))
.constructor(SoftwareUpdateOptions::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("SoftwareUpdateOptions").build())
.build();
private static final List> SDK_FIELDS = Collections.unmodifiableList(Arrays.asList(DOMAIN_NAME_FIELD,
CLUSTER_CONFIG_FIELD, EBS_OPTIONS_FIELD, SNAPSHOT_OPTIONS_FIELD, VPC_OPTIONS_FIELD, COGNITO_OPTIONS_FIELD,
ADVANCED_OPTIONS_FIELD, ACCESS_POLICIES_FIELD, LOG_PUBLISHING_OPTIONS_FIELD, ENCRYPTION_AT_REST_OPTIONS_FIELD,
DOMAIN_ENDPOINT_OPTIONS_FIELD, NODE_TO_NODE_ENCRYPTION_OPTIONS_FIELD, ADVANCED_SECURITY_OPTIONS_FIELD,
AUTO_TUNE_OPTIONS_FIELD, DRY_RUN_FIELD, DRY_RUN_MODE_FIELD, OFF_PEAK_WINDOW_OPTIONS_FIELD,
SOFTWARE_UPDATE_OPTIONS_FIELD));
private final String domainName;
private final ClusterConfig clusterConfig;
private final EBSOptions ebsOptions;
private final SnapshotOptions snapshotOptions;
private final VPCOptions vpcOptions;
private final CognitoOptions cognitoOptions;
private final Map advancedOptions;
private final String accessPolicies;
private final Map logPublishingOptions;
private final EncryptionAtRestOptions encryptionAtRestOptions;
private final DomainEndpointOptions domainEndpointOptions;
private final NodeToNodeEncryptionOptions nodeToNodeEncryptionOptions;
private final AdvancedSecurityOptionsInput advancedSecurityOptions;
private final AutoTuneOptions autoTuneOptions;
private final Boolean dryRun;
private final String dryRunMode;
private final OffPeakWindowOptions offPeakWindowOptions;
private final SoftwareUpdateOptions softwareUpdateOptions;
private UpdateDomainConfigRequest(BuilderImpl builder) {
super(builder);
this.domainName = builder.domainName;
this.clusterConfig = builder.clusterConfig;
this.ebsOptions = builder.ebsOptions;
this.snapshotOptions = builder.snapshotOptions;
this.vpcOptions = builder.vpcOptions;
this.cognitoOptions = builder.cognitoOptions;
this.advancedOptions = builder.advancedOptions;
this.accessPolicies = builder.accessPolicies;
this.logPublishingOptions = builder.logPublishingOptions;
this.encryptionAtRestOptions = builder.encryptionAtRestOptions;
this.domainEndpointOptions = builder.domainEndpointOptions;
this.nodeToNodeEncryptionOptions = builder.nodeToNodeEncryptionOptions;
this.advancedSecurityOptions = builder.advancedSecurityOptions;
this.autoTuneOptions = builder.autoTuneOptions;
this.dryRun = builder.dryRun;
this.dryRunMode = builder.dryRunMode;
this.offPeakWindowOptions = builder.offPeakWindowOptions;
this.softwareUpdateOptions = builder.softwareUpdateOptions;
}
/**
*
* The name of the domain that you're updating.
*
*
* @return The name of the domain that you're updating.
*/
public final String domainName() {
return domainName;
}
/**
*
* Changes that you want to make to the cluster configuration, such as the instance type and number of EC2
* instances.
*
*
* @return Changes that you want to make to the cluster configuration, such as the instance type and number of EC2
* instances.
*/
public final ClusterConfig clusterConfig() {
return clusterConfig;
}
/**
*
* The type and size of the EBS volume to attach to instances in the domain.
*
*
* @return The type and size of the EBS volume to attach to instances in the domain.
*/
public final EBSOptions ebsOptions() {
return ebsOptions;
}
/**
*
* Option to set the time, in UTC format, for the daily automated snapshot. Default value is 0
hours.
*
*
* @return Option to set the time, in UTC format, for the daily automated snapshot. Default value is 0
* hours.
*/
public final SnapshotOptions snapshotOptions() {
return snapshotOptions;
}
/**
*
* Options to specify the subnets and security groups for a VPC endpoint. For more information, see Launching your Amazon
* OpenSearch Service domains using a VPC .
*
*
* @return Options to specify the subnets and security groups for a VPC endpoint. For more information, see Launching your
* Amazon OpenSearch Service domains using a VPC .
*/
public final VPCOptions vpcOptions() {
return vpcOptions;
}
/**
*
* Key-value pairs to configure Amazon Cognito authentication for OpenSearch Dashboards.
*
*
* @return Key-value pairs to configure Amazon Cognito authentication for OpenSearch Dashboards.
*/
public final CognitoOptions cognitoOptions() {
return cognitoOptions;
}
/**
* For responses, this returns true if the service returned a value for the AdvancedOptions 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 hasAdvancedOptions() {
return advancedOptions != null && !(advancedOptions instanceof SdkAutoConstructMap);
}
/**
*
* Key-value pairs to specify advanced configuration options. The following key-value pairs are supported:
*
*
*
*
* "rest.action.multi.allow_explicit_index": "true" | "false"
- Note the use of a string rather than a
* boolean. Specifies whether explicit references to indexes are allowed inside the body of HTTP requests. If you
* want to configure access policies for domain sub-resources, such as specific indexes and domain APIs, you must
* disable this property. Default is true.
*
*
*
*
* "indices.fielddata.cache.size": "80"
- Note the use of a string rather than a boolean. Specifies
* the percentage of heap space allocated to field data. Default is unbounded.
*
*
*
*
* "indices.query.bool.max_clause_count": "1024"
- Note the use of a string rather than a boolean.
* Specifies the maximum number of clauses allowed in a Lucene boolean query. Default is 1,024. Queries with more
* than the permitted number of clauses result in a TooManyClauses
error.
*
*
*
*
* "override_main_response_version": "true" | "false"
- Note the use of a string rather than a boolean.
* Specifies whether the domain reports its version as 7.10 to allow Elasticsearch OSS clients and plugins to
* continue working with it. Default is false when creating a domain and true when upgrading a domain.
*
*
*
*
* For more information, see Advanced cluster parameters .
*
*
* 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 #hasAdvancedOptions} method.
*
*
* @return Key-value pairs to specify advanced configuration options. The following key-value pairs are
* supported:
*
*
*
* "rest.action.multi.allow_explicit_index": "true" | "false"
- Note the use of a string rather
* than a boolean. Specifies whether explicit references to indexes are allowed inside the body of HTTP
* requests. If you want to configure access policies for domain sub-resources, such as specific indexes and
* domain APIs, you must disable this property. Default is true.
*
*
*
*
* "indices.fielddata.cache.size": "80"
- Note the use of a string rather than a boolean.
* Specifies the percentage of heap space allocated to field data. Default is unbounded.
*
*
*
*
* "indices.query.bool.max_clause_count": "1024"
- Note the use of a string rather than a
* boolean. Specifies the maximum number of clauses allowed in a Lucene boolean query. Default is 1,024.
* Queries with more than the permitted number of clauses result in a TooManyClauses
error.
*
*
*
*
* "override_main_response_version": "true" | "false"
- Note the use of a string rather than a
* boolean. Specifies whether the domain reports its version as 7.10 to allow Elasticsearch OSS clients and
* plugins to continue working with it. Default is false when creating a domain and true when upgrading a
* domain.
*
*
*
*
* For more information, see Advanced cluster parameters .
*/
public final Map advancedOptions() {
return advancedOptions;
}
/**
*
* Identity and Access Management (IAM) access policy as a JSON-formatted string.
*
*
* @return Identity and Access Management (IAM) access policy as a JSON-formatted string.
*/
public final String accessPolicies() {
return accessPolicies;
}
/**
*
* Options to publish OpenSearch logs to Amazon CloudWatch Logs.
*
*
* 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 #hasLogPublishingOptions} method.
*
*
* @return Options to publish OpenSearch logs to Amazon CloudWatch Logs.
*/
public final Map logPublishingOptions() {
return LogPublishingOptionsCopier.copyStringToEnum(logPublishingOptions);
}
/**
* For responses, this returns true if the service returned a value for the LogPublishingOptions 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 hasLogPublishingOptions() {
return logPublishingOptions != null && !(logPublishingOptions instanceof SdkAutoConstructMap);
}
/**
*
* Options to publish OpenSearch logs to Amazon CloudWatch Logs.
*
*
* 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 #hasLogPublishingOptions} method.
*
*
* @return Options to publish OpenSearch logs to Amazon CloudWatch Logs.
*/
public final Map logPublishingOptionsAsStrings() {
return logPublishingOptions;
}
/**
*
* Encryption at rest options for the domain.
*
*
* @return Encryption at rest options for the domain.
*/
public final EncryptionAtRestOptions encryptionAtRestOptions() {
return encryptionAtRestOptions;
}
/**
*
* Additional options for the domain endpoint, such as whether to require HTTPS for all traffic.
*
*
* @return Additional options for the domain endpoint, such as whether to require HTTPS for all traffic.
*/
public final DomainEndpointOptions domainEndpointOptions() {
return domainEndpointOptions;
}
/**
*
* Node-to-node encryption options for the domain.
*
*
* @return Node-to-node encryption options for the domain.
*/
public final NodeToNodeEncryptionOptions nodeToNodeEncryptionOptions() {
return nodeToNodeEncryptionOptions;
}
/**
*
* Options for fine-grained access control.
*
*
* @return Options for fine-grained access control.
*/
public final AdvancedSecurityOptionsInput advancedSecurityOptions() {
return advancedSecurityOptions;
}
/**
*
* Options for Auto-Tune.
*
*
* @return Options for Auto-Tune.
*/
public final AutoTuneOptions autoTuneOptions() {
return autoTuneOptions;
}
/**
*
* This flag, when set to True, specifies whether the UpdateDomain
request should return the results of
* a dry run analysis without actually applying the change. A dry run determines what type of deployment the update
* will cause.
*
*
* @return This flag, when set to True, specifies whether the UpdateDomain
request should return the
* results of a dry run analysis without actually applying the change. A dry run determines what type of
* deployment the update will cause.
*/
public final Boolean dryRun() {
return dryRun;
}
/**
*
* The type of dry run to perform.
*
*
*
*
* Basic
only returns the type of deployment (blue/green or dynamic) that the update will cause.
*
*
*
*
* Verbose
runs an additional check to validate the changes you're making. For more information, see Validating a domain update .
*
*
*
*
* If the service returns an enum value that is not available in the current SDK version, {@link #dryRunMode} will
* return {@link DryRunMode#UNKNOWN_TO_SDK_VERSION}. The raw value returned by the service is available from
* {@link #dryRunModeAsString}.
*
*
* @return The type of dry run to perform.
*
*
*
* Basic
only returns the type of deployment (blue/green or dynamic) that the update will
* cause.
*
*
*
*
* Verbose
runs an additional check to validate the changes you're making. For more
* information, see Validating a domain update .
*
*
* @see DryRunMode
*/
public final DryRunMode dryRunMode() {
return DryRunMode.fromValue(dryRunMode);
}
/**
*
* The type of dry run to perform.
*
*
*
*
* Basic
only returns the type of deployment (blue/green or dynamic) that the update will cause.
*
*
*
*
* Verbose
runs an additional check to validate the changes you're making. For more information, see Validating a domain update .
*
*
*
*
* If the service returns an enum value that is not available in the current SDK version, {@link #dryRunMode} will
* return {@link DryRunMode#UNKNOWN_TO_SDK_VERSION}. The raw value returned by the service is available from
* {@link #dryRunModeAsString}.
*
*
* @return The type of dry run to perform.
*
*
*
* Basic
only returns the type of deployment (blue/green or dynamic) that the update will
* cause.
*
*
*
*
* Verbose
runs an additional check to validate the changes you're making. For more
* information, see Validating a domain update .
*
*
* @see DryRunMode
*/
public final String dryRunModeAsString() {
return dryRunMode;
}
/**
*
* Off-peak window options for the domain.
*
*
* @return Off-peak window options for the domain.
*/
public final OffPeakWindowOptions offPeakWindowOptions() {
return offPeakWindowOptions;
}
/**
*
* Service software update options for the domain.
*
*
* @return Service software update options for the domain.
*/
public final SoftwareUpdateOptions softwareUpdateOptions() {
return softwareUpdateOptions;
}
@Override
public Builder toBuilder() {
return new BuilderImpl(this);
}
public static Builder builder() {
return new BuilderImpl();
}
public static Class extends Builder> serializableBuilderClass() {
return BuilderImpl.class;
}
@Override
public final int hashCode() {
int hashCode = 1;
hashCode = 31 * hashCode + super.hashCode();
hashCode = 31 * hashCode + Objects.hashCode(domainName());
hashCode = 31 * hashCode + Objects.hashCode(clusterConfig());
hashCode = 31 * hashCode + Objects.hashCode(ebsOptions());
hashCode = 31 * hashCode + Objects.hashCode(snapshotOptions());
hashCode = 31 * hashCode + Objects.hashCode(vpcOptions());
hashCode = 31 * hashCode + Objects.hashCode(cognitoOptions());
hashCode = 31 * hashCode + Objects.hashCode(hasAdvancedOptions() ? advancedOptions() : null);
hashCode = 31 * hashCode + Objects.hashCode(accessPolicies());
hashCode = 31 * hashCode + Objects.hashCode(hasLogPublishingOptions() ? logPublishingOptionsAsStrings() : null);
hashCode = 31 * hashCode + Objects.hashCode(encryptionAtRestOptions());
hashCode = 31 * hashCode + Objects.hashCode(domainEndpointOptions());
hashCode = 31 * hashCode + Objects.hashCode(nodeToNodeEncryptionOptions());
hashCode = 31 * hashCode + Objects.hashCode(advancedSecurityOptions());
hashCode = 31 * hashCode + Objects.hashCode(autoTuneOptions());
hashCode = 31 * hashCode + Objects.hashCode(dryRun());
hashCode = 31 * hashCode + Objects.hashCode(dryRunModeAsString());
hashCode = 31 * hashCode + Objects.hashCode(offPeakWindowOptions());
hashCode = 31 * hashCode + Objects.hashCode(softwareUpdateOptions());
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 UpdateDomainConfigRequest)) {
return false;
}
UpdateDomainConfigRequest other = (UpdateDomainConfigRequest) obj;
return Objects.equals(domainName(), other.domainName()) && Objects.equals(clusterConfig(), other.clusterConfig())
&& Objects.equals(ebsOptions(), other.ebsOptions()) && Objects.equals(snapshotOptions(), other.snapshotOptions())
&& Objects.equals(vpcOptions(), other.vpcOptions()) && Objects.equals(cognitoOptions(), other.cognitoOptions())
&& hasAdvancedOptions() == other.hasAdvancedOptions()
&& Objects.equals(advancedOptions(), other.advancedOptions())
&& Objects.equals(accessPolicies(), other.accessPolicies())
&& hasLogPublishingOptions() == other.hasLogPublishingOptions()
&& Objects.equals(logPublishingOptionsAsStrings(), other.logPublishingOptionsAsStrings())
&& Objects.equals(encryptionAtRestOptions(), other.encryptionAtRestOptions())
&& Objects.equals(domainEndpointOptions(), other.domainEndpointOptions())
&& Objects.equals(nodeToNodeEncryptionOptions(), other.nodeToNodeEncryptionOptions())
&& Objects.equals(advancedSecurityOptions(), other.advancedSecurityOptions())
&& Objects.equals(autoTuneOptions(), other.autoTuneOptions()) && Objects.equals(dryRun(), other.dryRun())
&& Objects.equals(dryRunModeAsString(), other.dryRunModeAsString())
&& Objects.equals(offPeakWindowOptions(), other.offPeakWindowOptions())
&& Objects.equals(softwareUpdateOptions(), other.softwareUpdateOptions());
}
/**
* 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("UpdateDomainConfigRequest").add("DomainName", domainName())
.add("ClusterConfig", clusterConfig()).add("EBSOptions", ebsOptions()).add("SnapshotOptions", snapshotOptions())
.add("VPCOptions", vpcOptions()).add("CognitoOptions", cognitoOptions())
.add("AdvancedOptions", hasAdvancedOptions() ? advancedOptions() : null).add("AccessPolicies", accessPolicies())
.add("LogPublishingOptions", hasLogPublishingOptions() ? logPublishingOptionsAsStrings() : null)
.add("EncryptionAtRestOptions", encryptionAtRestOptions()).add("DomainEndpointOptions", domainEndpointOptions())
.add("NodeToNodeEncryptionOptions", nodeToNodeEncryptionOptions())
.add("AdvancedSecurityOptions", advancedSecurityOptions()).add("AutoTuneOptions", autoTuneOptions())
.add("DryRun", dryRun()).add("DryRunMode", dryRunModeAsString())
.add("OffPeakWindowOptions", offPeakWindowOptions()).add("SoftwareUpdateOptions", softwareUpdateOptions())
.build();
}
public final Optional getValueForField(String fieldName, Class clazz) {
switch (fieldName) {
case "DomainName":
return Optional.ofNullable(clazz.cast(domainName()));
case "ClusterConfig":
return Optional.ofNullable(clazz.cast(clusterConfig()));
case "EBSOptions":
return Optional.ofNullable(clazz.cast(ebsOptions()));
case "SnapshotOptions":
return Optional.ofNullable(clazz.cast(snapshotOptions()));
case "VPCOptions":
return Optional.ofNullable(clazz.cast(vpcOptions()));
case "CognitoOptions":
return Optional.ofNullable(clazz.cast(cognitoOptions()));
case "AdvancedOptions":
return Optional.ofNullable(clazz.cast(advancedOptions()));
case "AccessPolicies":
return Optional.ofNullable(clazz.cast(accessPolicies()));
case "LogPublishingOptions":
return Optional.ofNullable(clazz.cast(logPublishingOptionsAsStrings()));
case "EncryptionAtRestOptions":
return Optional.ofNullable(clazz.cast(encryptionAtRestOptions()));
case "DomainEndpointOptions":
return Optional.ofNullable(clazz.cast(domainEndpointOptions()));
case "NodeToNodeEncryptionOptions":
return Optional.ofNullable(clazz.cast(nodeToNodeEncryptionOptions()));
case "AdvancedSecurityOptions":
return Optional.ofNullable(clazz.cast(advancedSecurityOptions()));
case "AutoTuneOptions":
return Optional.ofNullable(clazz.cast(autoTuneOptions()));
case "DryRun":
return Optional.ofNullable(clazz.cast(dryRun()));
case "DryRunMode":
return Optional.ofNullable(clazz.cast(dryRunModeAsString()));
case "OffPeakWindowOptions":
return Optional.ofNullable(clazz.cast(offPeakWindowOptions()));
case "SoftwareUpdateOptions":
return Optional.ofNullable(clazz.cast(softwareUpdateOptions()));
default:
return Optional.empty();
}
}
@Override
public final List> sdkFields() {
return SDK_FIELDS;
}
private static Function getter(Function g) {
return obj -> g.apply((UpdateDomainConfigRequest) obj);
}
private static BiConsumer setter(BiConsumer s) {
return (obj, val) -> s.accept((Builder) obj, val);
}
public interface Builder extends OpenSearchRequest.Builder, SdkPojo, CopyableBuilder {
/**
*
* The name of the domain that you're updating.
*
*
* @param domainName
* The name of the domain that you're updating.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder domainName(String domainName);
/**
*
* Changes that you want to make to the cluster configuration, such as the instance type and number of EC2
* instances.
*
*
* @param clusterConfig
* Changes that you want to make to the cluster configuration, such as the instance type and number of
* EC2 instances.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder clusterConfig(ClusterConfig clusterConfig);
/**
*
* Changes that you want to make to the cluster configuration, such as the instance type and number of EC2
* instances.
*
* This is a convenience method that creates an instance of the {@link ClusterConfig.Builder} avoiding the need
* to create one manually via {@link ClusterConfig#builder()}.
*
*
* When the {@link Consumer} completes, {@link ClusterConfig.Builder#build()} is called immediately and its
* result is passed to {@link #clusterConfig(ClusterConfig)}.
*
* @param clusterConfig
* a consumer that will call methods on {@link ClusterConfig.Builder}
* @return Returns a reference to this object so that method calls can be chained together.
* @see #clusterConfig(ClusterConfig)
*/
default Builder clusterConfig(Consumer clusterConfig) {
return clusterConfig(ClusterConfig.builder().applyMutation(clusterConfig).build());
}
/**
*
* The type and size of the EBS volume to attach to instances in the domain.
*
*
* @param ebsOptions
* The type and size of the EBS volume to attach to instances in the domain.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder ebsOptions(EBSOptions ebsOptions);
/**
*
* The type and size of the EBS volume to attach to instances in the domain.
*
* This is a convenience method that creates an instance of the {@link EBSOptions.Builder} avoiding the need to
* create one manually via {@link EBSOptions#builder()}.
*
*
* When the {@link Consumer} completes, {@link EBSOptions.Builder#build()} is called immediately and its result
* is passed to {@link #ebsOptions(EBSOptions)}.
*
* @param ebsOptions
* a consumer that will call methods on {@link EBSOptions.Builder}
* @return Returns a reference to this object so that method calls can be chained together.
* @see #ebsOptions(EBSOptions)
*/
default Builder ebsOptions(Consumer ebsOptions) {
return ebsOptions(EBSOptions.builder().applyMutation(ebsOptions).build());
}
/**
*
* Option to set the time, in UTC format, for the daily automated snapshot. Default value is 0
* hours.
*
*
* @param snapshotOptions
* Option to set the time, in UTC format, for the daily automated snapshot. Default value is
* 0
hours.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder snapshotOptions(SnapshotOptions snapshotOptions);
/**
*
* Option to set the time, in UTC format, for the daily automated snapshot. Default value is 0
* hours.
*
* This is a convenience method that creates an instance of the {@link SnapshotOptions.Builder} avoiding the
* need to create one manually via {@link SnapshotOptions#builder()}.
*
*
* When the {@link Consumer} completes, {@link SnapshotOptions.Builder#build()} is called immediately and its
* result is passed to {@link #snapshotOptions(SnapshotOptions)}.
*
* @param snapshotOptions
* a consumer that will call methods on {@link SnapshotOptions.Builder}
* @return Returns a reference to this object so that method calls can be chained together.
* @see #snapshotOptions(SnapshotOptions)
*/
default Builder snapshotOptions(Consumer snapshotOptions) {
return snapshotOptions(SnapshotOptions.builder().applyMutation(snapshotOptions).build());
}
/**
*
* Options to specify the subnets and security groups for a VPC endpoint. For more information, see Launching your Amazon
* OpenSearch Service domains using a VPC .
*
*
* @param vpcOptions
* Options to specify the subnets and security groups for a VPC endpoint. For more information, see Launching your
* Amazon OpenSearch Service domains using a VPC .
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder vpcOptions(VPCOptions vpcOptions);
/**
*
* Options to specify the subnets and security groups for a VPC endpoint. For more information, see Launching your Amazon
* OpenSearch Service domains using a VPC .
*
* This is a convenience method that creates an instance of the {@link VPCOptions.Builder} avoiding the need to
* create one manually via {@link VPCOptions#builder()}.
*
*
* When the {@link Consumer} completes, {@link VPCOptions.Builder#build()} is called immediately and its result
* is passed to {@link #vpcOptions(VPCOptions)}.
*
* @param vpcOptions
* a consumer that will call methods on {@link VPCOptions.Builder}
* @return Returns a reference to this object so that method calls can be chained together.
* @see #vpcOptions(VPCOptions)
*/
default Builder vpcOptions(Consumer vpcOptions) {
return vpcOptions(VPCOptions.builder().applyMutation(vpcOptions).build());
}
/**
*
* Key-value pairs to configure Amazon Cognito authentication for OpenSearch Dashboards.
*
*
* @param cognitoOptions
* Key-value pairs to configure Amazon Cognito authentication for OpenSearch Dashboards.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder cognitoOptions(CognitoOptions cognitoOptions);
/**
*
* Key-value pairs to configure Amazon Cognito authentication for OpenSearch Dashboards.
*
* This is a convenience method that creates an instance of the {@link CognitoOptions.Builder} avoiding the need
* to create one manually via {@link CognitoOptions#builder()}.
*
*
* When the {@link Consumer} completes, {@link CognitoOptions.Builder#build()} is called immediately and its
* result is passed to {@link #cognitoOptions(CognitoOptions)}.
*
* @param cognitoOptions
* a consumer that will call methods on {@link CognitoOptions.Builder}
* @return Returns a reference to this object so that method calls can be chained together.
* @see #cognitoOptions(CognitoOptions)
*/
default Builder cognitoOptions(Consumer cognitoOptions) {
return cognitoOptions(CognitoOptions.builder().applyMutation(cognitoOptions).build());
}
/**
*
* Key-value pairs to specify advanced configuration options. The following key-value pairs are supported:
*
*
*
*
* "rest.action.multi.allow_explicit_index": "true" | "false"
- Note the use of a string rather
* than a boolean. Specifies whether explicit references to indexes are allowed inside the body of HTTP
* requests. If you want to configure access policies for domain sub-resources, such as specific indexes and
* domain APIs, you must disable this property. Default is true.
*
*
*
*
* "indices.fielddata.cache.size": "80"
- Note the use of a string rather than a boolean.
* Specifies the percentage of heap space allocated to field data. Default is unbounded.
*
*
*
*
* "indices.query.bool.max_clause_count": "1024"
- Note the use of a string rather than a boolean.
* Specifies the maximum number of clauses allowed in a Lucene boolean query. Default is 1,024. Queries with
* more than the permitted number of clauses result in a TooManyClauses
error.
*
*
*
*
* "override_main_response_version": "true" | "false"
- Note the use of a string rather than a
* boolean. Specifies whether the domain reports its version as 7.10 to allow Elasticsearch OSS clients and
* plugins to continue working with it. Default is false when creating a domain and true when upgrading a
* domain.
*
*
*
*
* For more information, see Advanced cluster parameters .
*
*
* @param advancedOptions
* Key-value pairs to specify advanced configuration options. The following key-value pairs are
* supported:
*
*
*
* "rest.action.multi.allow_explicit_index": "true" | "false"
- Note the use of a string
* rather than a boolean. Specifies whether explicit references to indexes are allowed inside the body of
* HTTP requests. If you want to configure access policies for domain sub-resources, such as specific
* indexes and domain APIs, you must disable this property. Default is true.
*
*
*
*
* "indices.fielddata.cache.size": "80"
- Note the use of a string rather than a boolean.
* Specifies the percentage of heap space allocated to field data. Default is unbounded.
*
*
*
*
* "indices.query.bool.max_clause_count": "1024"
- Note the use of a string rather than a
* boolean. Specifies the maximum number of clauses allowed in a Lucene boolean query. Default is 1,024.
* Queries with more than the permitted number of clauses result in a TooManyClauses
error.
*
*
*
*
* "override_main_response_version": "true" | "false"
- Note the use of a string rather than
* a boolean. Specifies whether the domain reports its version as 7.10 to allow Elasticsearch OSS clients
* and plugins to continue working with it. Default is false when creating a domain and true when
* upgrading a domain.
*
*
*
*
* For more information, see Advanced cluster parameters .
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder advancedOptions(Map advancedOptions);
/**
*
* Identity and Access Management (IAM) access policy as a JSON-formatted string.
*
*
* @param accessPolicies
* Identity and Access Management (IAM) access policy as a JSON-formatted string.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder accessPolicies(String accessPolicies);
/**
*
* Options to publish OpenSearch logs to Amazon CloudWatch Logs.
*
*
* @param logPublishingOptions
* Options to publish OpenSearch logs to Amazon CloudWatch Logs.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder logPublishingOptionsWithStrings(Map logPublishingOptions);
/**
*
* Options to publish OpenSearch logs to Amazon CloudWatch Logs.
*
*
* @param logPublishingOptions
* Options to publish OpenSearch logs to Amazon CloudWatch Logs.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder logPublishingOptions(Map logPublishingOptions);
/**
*
* Encryption at rest options for the domain.
*
*
* @param encryptionAtRestOptions
* Encryption at rest options for the domain.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder encryptionAtRestOptions(EncryptionAtRestOptions encryptionAtRestOptions);
/**
*
* Encryption at rest options for the domain.
*
* This is a convenience method that creates an instance of the {@link EncryptionAtRestOptions.Builder} avoiding
* the need to create one manually via {@link EncryptionAtRestOptions#builder()}.
*
*
* When the {@link Consumer} completes, {@link EncryptionAtRestOptions.Builder#build()} is called immediately
* and its result is passed to {@link #encryptionAtRestOptions(EncryptionAtRestOptions)}.
*
* @param encryptionAtRestOptions
* a consumer that will call methods on {@link EncryptionAtRestOptions.Builder}
* @return Returns a reference to this object so that method calls can be chained together.
* @see #encryptionAtRestOptions(EncryptionAtRestOptions)
*/
default Builder encryptionAtRestOptions(Consumer encryptionAtRestOptions) {
return encryptionAtRestOptions(EncryptionAtRestOptions.builder().applyMutation(encryptionAtRestOptions).build());
}
/**
*
* Additional options for the domain endpoint, such as whether to require HTTPS for all traffic.
*
*
* @param domainEndpointOptions
* Additional options for the domain endpoint, such as whether to require HTTPS for all traffic.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder domainEndpointOptions(DomainEndpointOptions domainEndpointOptions);
/**
*
* Additional options for the domain endpoint, such as whether to require HTTPS for all traffic.
*
* This is a convenience method that creates an instance of the {@link DomainEndpointOptions.Builder} avoiding
* the need to create one manually via {@link DomainEndpointOptions#builder()}.
*
*
* When the {@link Consumer} completes, {@link DomainEndpointOptions.Builder#build()} is called immediately and
* its result is passed to {@link #domainEndpointOptions(DomainEndpointOptions)}.
*
* @param domainEndpointOptions
* a consumer that will call methods on {@link DomainEndpointOptions.Builder}
* @return Returns a reference to this object so that method calls can be chained together.
* @see #domainEndpointOptions(DomainEndpointOptions)
*/
default Builder domainEndpointOptions(Consumer domainEndpointOptions) {
return domainEndpointOptions(DomainEndpointOptions.builder().applyMutation(domainEndpointOptions).build());
}
/**
*
* Node-to-node encryption options for the domain.
*
*
* @param nodeToNodeEncryptionOptions
* Node-to-node encryption options for the domain.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder nodeToNodeEncryptionOptions(NodeToNodeEncryptionOptions nodeToNodeEncryptionOptions);
/**
*
* Node-to-node encryption options for the domain.
*
* This is a convenience method that creates an instance of the {@link NodeToNodeEncryptionOptions.Builder}
* avoiding the need to create one manually via {@link NodeToNodeEncryptionOptions#builder()}.
*
*
* When the {@link Consumer} completes, {@link NodeToNodeEncryptionOptions.Builder#build()} is called
* immediately and its result is passed to {@link #nodeToNodeEncryptionOptions(NodeToNodeEncryptionOptions)}.
*
* @param nodeToNodeEncryptionOptions
* a consumer that will call methods on {@link NodeToNodeEncryptionOptions.Builder}
* @return Returns a reference to this object so that method calls can be chained together.
* @see #nodeToNodeEncryptionOptions(NodeToNodeEncryptionOptions)
*/
default Builder nodeToNodeEncryptionOptions(Consumer nodeToNodeEncryptionOptions) {
return nodeToNodeEncryptionOptions(NodeToNodeEncryptionOptions.builder().applyMutation(nodeToNodeEncryptionOptions)
.build());
}
/**
*
* Options for fine-grained access control.
*
*
* @param advancedSecurityOptions
* Options for fine-grained access control.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder advancedSecurityOptions(AdvancedSecurityOptionsInput advancedSecurityOptions);
/**
*
* Options for fine-grained access control.
*
* This is a convenience method that creates an instance of the {@link AdvancedSecurityOptionsInput.Builder}
* avoiding the need to create one manually via {@link AdvancedSecurityOptionsInput#builder()}.
*
*
* When the {@link Consumer} completes, {@link AdvancedSecurityOptionsInput.Builder#build()} is called
* immediately and its result is passed to {@link #advancedSecurityOptions(AdvancedSecurityOptionsInput)}.
*
* @param advancedSecurityOptions
* a consumer that will call methods on {@link AdvancedSecurityOptionsInput.Builder}
* @return Returns a reference to this object so that method calls can be chained together.
* @see #advancedSecurityOptions(AdvancedSecurityOptionsInput)
*/
default Builder advancedSecurityOptions(Consumer advancedSecurityOptions) {
return advancedSecurityOptions(AdvancedSecurityOptionsInput.builder().applyMutation(advancedSecurityOptions).build());
}
/**
*
* Options for Auto-Tune.
*
*
* @param autoTuneOptions
* Options for Auto-Tune.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder autoTuneOptions(AutoTuneOptions autoTuneOptions);
/**
*
* Options for Auto-Tune.
*
* This is a convenience method that creates an instance of the {@link AutoTuneOptions.Builder} avoiding the
* need to create one manually via {@link AutoTuneOptions#builder()}.
*
*
* When the {@link Consumer} completes, {@link AutoTuneOptions.Builder#build()} is called immediately and its
* result is passed to {@link #autoTuneOptions(AutoTuneOptions)}.
*
* @param autoTuneOptions
* a consumer that will call methods on {@link AutoTuneOptions.Builder}
* @return Returns a reference to this object so that method calls can be chained together.
* @see #autoTuneOptions(AutoTuneOptions)
*/
default Builder autoTuneOptions(Consumer autoTuneOptions) {
return autoTuneOptions(AutoTuneOptions.builder().applyMutation(autoTuneOptions).build());
}
/**
*
* This flag, when set to True, specifies whether the UpdateDomain
request should return the
* results of a dry run analysis without actually applying the change. A dry run determines what type of
* deployment the update will cause.
*
*
* @param dryRun
* This flag, when set to True, specifies whether the UpdateDomain
request should return the
* results of a dry run analysis without actually applying the change. A dry run determines what type of
* deployment the update will cause.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder dryRun(Boolean dryRun);
/**
*
* The type of dry run to perform.
*
*
*
*
* Basic
only returns the type of deployment (blue/green or dynamic) that the update will cause.
*
*
*
*
* Verbose
runs an additional check to validate the changes you're making. For more information,
* see Validating a domain update .
*
*
*
*
* @param dryRunMode
* The type of dry run to perform.
*
*
*
* Basic
only returns the type of deployment (blue/green or dynamic) that the update will
* cause.
*
*
*
*
* Verbose
runs an additional check to validate the changes you're making. For more
* information, see Validating a domain update .
*
*
* @see DryRunMode
* @return Returns a reference to this object so that method calls can be chained together.
* @see DryRunMode
*/
Builder dryRunMode(String dryRunMode);
/**
*
* The type of dry run to perform.
*
*
*
*
* Basic
only returns the type of deployment (blue/green or dynamic) that the update will cause.
*
*
*
*
* Verbose
runs an additional check to validate the changes you're making. For more information,
* see Validating a domain update .
*
*
*
*
* @param dryRunMode
* The type of dry run to perform.
*
*
*
* Basic
only returns the type of deployment (blue/green or dynamic) that the update will
* cause.
*
*
*
*
* Verbose
runs an additional check to validate the changes you're making. For more
* information, see Validating a domain update .
*
*
* @see DryRunMode
* @return Returns a reference to this object so that method calls can be chained together.
* @see DryRunMode
*/
Builder dryRunMode(DryRunMode dryRunMode);
/**
*
* Off-peak window options for the domain.
*
*
* @param offPeakWindowOptions
* Off-peak window options for the domain.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder offPeakWindowOptions(OffPeakWindowOptions offPeakWindowOptions);
/**
*
* Off-peak window options for the domain.
*
* This is a convenience method that creates an instance of the {@link OffPeakWindowOptions.Builder} avoiding
* the need to create one manually via {@link OffPeakWindowOptions#builder()}.
*
*
* When the {@link Consumer} completes, {@link OffPeakWindowOptions.Builder#build()} is called immediately and
* its result is passed to {@link #offPeakWindowOptions(OffPeakWindowOptions)}.
*
* @param offPeakWindowOptions
* a consumer that will call methods on {@link OffPeakWindowOptions.Builder}
* @return Returns a reference to this object so that method calls can be chained together.
* @see #offPeakWindowOptions(OffPeakWindowOptions)
*/
default Builder offPeakWindowOptions(Consumer offPeakWindowOptions) {
return offPeakWindowOptions(OffPeakWindowOptions.builder().applyMutation(offPeakWindowOptions).build());
}
/**
*
* Service software update options for the domain.
*
*
* @param softwareUpdateOptions
* Service software update options for the domain.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder softwareUpdateOptions(SoftwareUpdateOptions softwareUpdateOptions);
/**
*
* Service software update options for the domain.
*
* This is a convenience method that creates an instance of the {@link SoftwareUpdateOptions.Builder} avoiding
* the need to create one manually via {@link SoftwareUpdateOptions#builder()}.
*
*
* When the {@link Consumer} completes, {@link SoftwareUpdateOptions.Builder#build()} is called immediately and
* its result is passed to {@link #softwareUpdateOptions(SoftwareUpdateOptions)}.
*
* @param softwareUpdateOptions
* a consumer that will call methods on {@link SoftwareUpdateOptions.Builder}
* @return Returns a reference to this object so that method calls can be chained together.
* @see #softwareUpdateOptions(SoftwareUpdateOptions)
*/
default Builder softwareUpdateOptions(Consumer softwareUpdateOptions) {
return softwareUpdateOptions(SoftwareUpdateOptions.builder().applyMutation(softwareUpdateOptions).build());
}
@Override
Builder overrideConfiguration(AwsRequestOverrideConfiguration overrideConfiguration);
@Override
Builder overrideConfiguration(Consumer builderConsumer);
}
static final class BuilderImpl extends OpenSearchRequest.BuilderImpl implements Builder {
private String domainName;
private ClusterConfig clusterConfig;
private EBSOptions ebsOptions;
private SnapshotOptions snapshotOptions;
private VPCOptions vpcOptions;
private CognitoOptions cognitoOptions;
private Map advancedOptions = DefaultSdkAutoConstructMap.getInstance();
private String accessPolicies;
private Map logPublishingOptions = DefaultSdkAutoConstructMap.getInstance();
private EncryptionAtRestOptions encryptionAtRestOptions;
private DomainEndpointOptions domainEndpointOptions;
private NodeToNodeEncryptionOptions nodeToNodeEncryptionOptions;
private AdvancedSecurityOptionsInput advancedSecurityOptions;
private AutoTuneOptions autoTuneOptions;
private Boolean dryRun;
private String dryRunMode;
private OffPeakWindowOptions offPeakWindowOptions;
private SoftwareUpdateOptions softwareUpdateOptions;
private BuilderImpl() {
}
private BuilderImpl(UpdateDomainConfigRequest model) {
super(model);
domainName(model.domainName);
clusterConfig(model.clusterConfig);
ebsOptions(model.ebsOptions);
snapshotOptions(model.snapshotOptions);
vpcOptions(model.vpcOptions);
cognitoOptions(model.cognitoOptions);
advancedOptions(model.advancedOptions);
accessPolicies(model.accessPolicies);
logPublishingOptionsWithStrings(model.logPublishingOptions);
encryptionAtRestOptions(model.encryptionAtRestOptions);
domainEndpointOptions(model.domainEndpointOptions);
nodeToNodeEncryptionOptions(model.nodeToNodeEncryptionOptions);
advancedSecurityOptions(model.advancedSecurityOptions);
autoTuneOptions(model.autoTuneOptions);
dryRun(model.dryRun);
dryRunMode(model.dryRunMode);
offPeakWindowOptions(model.offPeakWindowOptions);
softwareUpdateOptions(model.softwareUpdateOptions);
}
public final String getDomainName() {
return domainName;
}
public final void setDomainName(String domainName) {
this.domainName = domainName;
}
@Override
public final Builder domainName(String domainName) {
this.domainName = domainName;
return this;
}
public final ClusterConfig.Builder getClusterConfig() {
return clusterConfig != null ? clusterConfig.toBuilder() : null;
}
public final void setClusterConfig(ClusterConfig.BuilderImpl clusterConfig) {
this.clusterConfig = clusterConfig != null ? clusterConfig.build() : null;
}
@Override
public final Builder clusterConfig(ClusterConfig clusterConfig) {
this.clusterConfig = clusterConfig;
return this;
}
public final EBSOptions.Builder getEbsOptions() {
return ebsOptions != null ? ebsOptions.toBuilder() : null;
}
public final void setEbsOptions(EBSOptions.BuilderImpl ebsOptions) {
this.ebsOptions = ebsOptions != null ? ebsOptions.build() : null;
}
@Override
public final Builder ebsOptions(EBSOptions ebsOptions) {
this.ebsOptions = ebsOptions;
return this;
}
public final SnapshotOptions.Builder getSnapshotOptions() {
return snapshotOptions != null ? snapshotOptions.toBuilder() : null;
}
public final void setSnapshotOptions(SnapshotOptions.BuilderImpl snapshotOptions) {
this.snapshotOptions = snapshotOptions != null ? snapshotOptions.build() : null;
}
@Override
public final Builder snapshotOptions(SnapshotOptions snapshotOptions) {
this.snapshotOptions = snapshotOptions;
return this;
}
public final VPCOptions.Builder getVpcOptions() {
return vpcOptions != null ? vpcOptions.toBuilder() : null;
}
public final void setVpcOptions(VPCOptions.BuilderImpl vpcOptions) {
this.vpcOptions = vpcOptions != null ? vpcOptions.build() : null;
}
@Override
public final Builder vpcOptions(VPCOptions vpcOptions) {
this.vpcOptions = vpcOptions;
return this;
}
public final CognitoOptions.Builder getCognitoOptions() {
return cognitoOptions != null ? cognitoOptions.toBuilder() : null;
}
public final void setCognitoOptions(CognitoOptions.BuilderImpl cognitoOptions) {
this.cognitoOptions = cognitoOptions != null ? cognitoOptions.build() : null;
}
@Override
public final Builder cognitoOptions(CognitoOptions cognitoOptions) {
this.cognitoOptions = cognitoOptions;
return this;
}
public final Map getAdvancedOptions() {
if (advancedOptions instanceof SdkAutoConstructMap) {
return null;
}
return advancedOptions;
}
public final void setAdvancedOptions(Map advancedOptions) {
this.advancedOptions = AdvancedOptionsCopier.copy(advancedOptions);
}
@Override
public final Builder advancedOptions(Map advancedOptions) {
this.advancedOptions = AdvancedOptionsCopier.copy(advancedOptions);
return this;
}
public final String getAccessPolicies() {
return accessPolicies;
}
public final void setAccessPolicies(String accessPolicies) {
this.accessPolicies = accessPolicies;
}
@Override
public final Builder accessPolicies(String accessPolicies) {
this.accessPolicies = accessPolicies;
return this;
}
public final Map getLogPublishingOptions() {
Map result = LogPublishingOptionsCopier.copyToBuilder(this.logPublishingOptions);
if (result instanceof SdkAutoConstructMap) {
return null;
}
return result;
}
public final void setLogPublishingOptions(Map logPublishingOptions) {
this.logPublishingOptions = LogPublishingOptionsCopier.copyFromBuilder(logPublishingOptions);
}
@Override
public final Builder logPublishingOptionsWithStrings(Map logPublishingOptions) {
this.logPublishingOptions = LogPublishingOptionsCopier.copy(logPublishingOptions);
return this;
}
@Override
public final Builder logPublishingOptions(Map logPublishingOptions) {
this.logPublishingOptions = LogPublishingOptionsCopier.copyEnumToString(logPublishingOptions);
return this;
}
public final EncryptionAtRestOptions.Builder getEncryptionAtRestOptions() {
return encryptionAtRestOptions != null ? encryptionAtRestOptions.toBuilder() : null;
}
public final void setEncryptionAtRestOptions(EncryptionAtRestOptions.BuilderImpl encryptionAtRestOptions) {
this.encryptionAtRestOptions = encryptionAtRestOptions != null ? encryptionAtRestOptions.build() : null;
}
@Override
public final Builder encryptionAtRestOptions(EncryptionAtRestOptions encryptionAtRestOptions) {
this.encryptionAtRestOptions = encryptionAtRestOptions;
return this;
}
public final DomainEndpointOptions.Builder getDomainEndpointOptions() {
return domainEndpointOptions != null ? domainEndpointOptions.toBuilder() : null;
}
public final void setDomainEndpointOptions(DomainEndpointOptions.BuilderImpl domainEndpointOptions) {
this.domainEndpointOptions = domainEndpointOptions != null ? domainEndpointOptions.build() : null;
}
@Override
public final Builder domainEndpointOptions(DomainEndpointOptions domainEndpointOptions) {
this.domainEndpointOptions = domainEndpointOptions;
return this;
}
public final NodeToNodeEncryptionOptions.Builder getNodeToNodeEncryptionOptions() {
return nodeToNodeEncryptionOptions != null ? nodeToNodeEncryptionOptions.toBuilder() : null;
}
public final void setNodeToNodeEncryptionOptions(NodeToNodeEncryptionOptions.BuilderImpl nodeToNodeEncryptionOptions) {
this.nodeToNodeEncryptionOptions = nodeToNodeEncryptionOptions != null ? nodeToNodeEncryptionOptions.build() : null;
}
@Override
public final Builder nodeToNodeEncryptionOptions(NodeToNodeEncryptionOptions nodeToNodeEncryptionOptions) {
this.nodeToNodeEncryptionOptions = nodeToNodeEncryptionOptions;
return this;
}
public final AdvancedSecurityOptionsInput.Builder getAdvancedSecurityOptions() {
return advancedSecurityOptions != null ? advancedSecurityOptions.toBuilder() : null;
}
public final void setAdvancedSecurityOptions(AdvancedSecurityOptionsInput.BuilderImpl advancedSecurityOptions) {
this.advancedSecurityOptions = advancedSecurityOptions != null ? advancedSecurityOptions.build() : null;
}
@Override
public final Builder advancedSecurityOptions(AdvancedSecurityOptionsInput advancedSecurityOptions) {
this.advancedSecurityOptions = advancedSecurityOptions;
return this;
}
public final AutoTuneOptions.Builder getAutoTuneOptions() {
return autoTuneOptions != null ? autoTuneOptions.toBuilder() : null;
}
public final void setAutoTuneOptions(AutoTuneOptions.BuilderImpl autoTuneOptions) {
this.autoTuneOptions = autoTuneOptions != null ? autoTuneOptions.build() : null;
}
@Override
public final Builder autoTuneOptions(AutoTuneOptions autoTuneOptions) {
this.autoTuneOptions = autoTuneOptions;
return this;
}
public final Boolean getDryRun() {
return dryRun;
}
public final void setDryRun(Boolean dryRun) {
this.dryRun = dryRun;
}
@Override
public final Builder dryRun(Boolean dryRun) {
this.dryRun = dryRun;
return this;
}
public final String getDryRunMode() {
return dryRunMode;
}
public final void setDryRunMode(String dryRunMode) {
this.dryRunMode = dryRunMode;
}
@Override
public final Builder dryRunMode(String dryRunMode) {
this.dryRunMode = dryRunMode;
return this;
}
@Override
public final Builder dryRunMode(DryRunMode dryRunMode) {
this.dryRunMode(dryRunMode == null ? null : dryRunMode.toString());
return this;
}
public final OffPeakWindowOptions.Builder getOffPeakWindowOptions() {
return offPeakWindowOptions != null ? offPeakWindowOptions.toBuilder() : null;
}
public final void setOffPeakWindowOptions(OffPeakWindowOptions.BuilderImpl offPeakWindowOptions) {
this.offPeakWindowOptions = offPeakWindowOptions != null ? offPeakWindowOptions.build() : null;
}
@Override
public final Builder offPeakWindowOptions(OffPeakWindowOptions offPeakWindowOptions) {
this.offPeakWindowOptions = offPeakWindowOptions;
return this;
}
public final SoftwareUpdateOptions.Builder getSoftwareUpdateOptions() {
return softwareUpdateOptions != null ? softwareUpdateOptions.toBuilder() : null;
}
public final void setSoftwareUpdateOptions(SoftwareUpdateOptions.BuilderImpl softwareUpdateOptions) {
this.softwareUpdateOptions = softwareUpdateOptions != null ? softwareUpdateOptions.build() : null;
}
@Override
public final Builder softwareUpdateOptions(SoftwareUpdateOptions softwareUpdateOptions) {
this.softwareUpdateOptions = softwareUpdateOptions;
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 UpdateDomainConfigRequest build() {
return new UpdateDomainConfigRequest(this);
}
@Override
public List> sdkFields() {
return SDK_FIELDS;
}
}
}