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

software.amazon.awssdk.services.neptunegraph.model.CreateGraphUsingImportTaskRequest Maven / Gradle / Ivy

Go to download

The AWS Java SDK for Neptune Graph module holds the client classes that are used for communicating with Neptune Graph.

There is a newer version: 2.29.39
Show newest version
/*
 * 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.neptunegraph.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;

/**
 */
@Generated("software.amazon.awssdk:codegen")
public final class CreateGraphUsingImportTaskRequest extends NeptuneGraphRequest implements
        ToCopyableBuilder {
    private static final SdkField GRAPH_NAME_FIELD = SdkField. builder(MarshallingType.STRING)
            .memberName("graphName").getter(getter(CreateGraphUsingImportTaskRequest::graphName))
            .setter(setter(Builder::graphName))
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("graphName").build()).build();

    private static final SdkField> TAGS_FIELD = SdkField
            .> builder(MarshallingType.MAP)
            .memberName("tags")
            .getter(getter(CreateGraphUsingImportTaskRequest::tags))
            .setter(setter(Builder::tags))
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("tags").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 PUBLIC_CONNECTIVITY_FIELD = SdkField. builder(MarshallingType.BOOLEAN)
            .memberName("publicConnectivity").getter(getter(CreateGraphUsingImportTaskRequest::publicConnectivity))
            .setter(setter(Builder::publicConnectivity))
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("publicConnectivity").build())
            .build();

    private static final SdkField KMS_KEY_IDENTIFIER_FIELD = SdkField. builder(MarshallingType.STRING)
            .memberName("kmsKeyIdentifier").getter(getter(CreateGraphUsingImportTaskRequest::kmsKeyIdentifier))
            .setter(setter(Builder::kmsKeyIdentifier))
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("kmsKeyIdentifier").build()).build();

    private static final SdkField VECTOR_SEARCH_CONFIGURATION_FIELD = SdkField
            . builder(MarshallingType.SDK_POJO).memberName("vectorSearchConfiguration")
            .getter(getter(CreateGraphUsingImportTaskRequest::vectorSearchConfiguration))
            .setter(setter(Builder::vectorSearchConfiguration)).constructor(VectorSearchConfiguration::builder)
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("vectorSearchConfiguration").build())
            .build();

    private static final SdkField REPLICA_COUNT_FIELD = SdkField. builder(MarshallingType.INTEGER)
            .memberName("replicaCount").getter(getter(CreateGraphUsingImportTaskRequest::replicaCount))
            .setter(setter(Builder::replicaCount))
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("replicaCount").build()).build();

    private static final SdkField DELETION_PROTECTION_FIELD = SdkField. builder(MarshallingType.BOOLEAN)
            .memberName("deletionProtection").getter(getter(CreateGraphUsingImportTaskRequest::deletionProtection))
            .setter(setter(Builder::deletionProtection))
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("deletionProtection").build())
            .build();

    private static final SdkField IMPORT_OPTIONS_FIELD = SdkField
            . builder(MarshallingType.SDK_POJO).memberName("importOptions")
            .getter(getter(CreateGraphUsingImportTaskRequest::importOptions)).setter(setter(Builder::importOptions))
            .constructor(ImportOptions::builder)
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("importOptions").build()).build();

    private static final SdkField MAX_PROVISIONED_MEMORY_FIELD = SdkField. builder(MarshallingType.INTEGER)
            .memberName("maxProvisionedMemory").getter(getter(CreateGraphUsingImportTaskRequest::maxProvisionedMemory))
            .setter(setter(Builder::maxProvisionedMemory))
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("maxProvisionedMemory").build())
            .build();

    private static final SdkField MIN_PROVISIONED_MEMORY_FIELD = SdkField. builder(MarshallingType.INTEGER)
            .memberName("minProvisionedMemory").getter(getter(CreateGraphUsingImportTaskRequest::minProvisionedMemory))
            .setter(setter(Builder::minProvisionedMemory))
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("minProvisionedMemory").build())
            .build();

    private static final SdkField FAIL_ON_ERROR_FIELD = SdkField. builder(MarshallingType.BOOLEAN)
            .memberName("failOnError").getter(getter(CreateGraphUsingImportTaskRequest::failOnError))
            .setter(setter(Builder::failOnError))
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("failOnError").build()).build();

    private static final SdkField SOURCE_FIELD = SdkField. builder(MarshallingType.STRING).memberName("source")
            .getter(getter(CreateGraphUsingImportTaskRequest::source)).setter(setter(Builder::source))
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("source").build()).build();

    private static final SdkField FORMAT_FIELD = SdkField. builder(MarshallingType.STRING).memberName("format")
            .getter(getter(CreateGraphUsingImportTaskRequest::formatAsString)).setter(setter(Builder::format))
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("format").build()).build();

    private static final SdkField ROLE_ARN_FIELD = SdkField. builder(MarshallingType.STRING)
            .memberName("roleArn").getter(getter(CreateGraphUsingImportTaskRequest::roleArn)).setter(setter(Builder::roleArn))
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("roleArn").build()).build();

    private static final List> SDK_FIELDS = Collections.unmodifiableList(Arrays.asList(GRAPH_NAME_FIELD, TAGS_FIELD,
            PUBLIC_CONNECTIVITY_FIELD, KMS_KEY_IDENTIFIER_FIELD, VECTOR_SEARCH_CONFIGURATION_FIELD, REPLICA_COUNT_FIELD,
            DELETION_PROTECTION_FIELD, IMPORT_OPTIONS_FIELD, MAX_PROVISIONED_MEMORY_FIELD, MIN_PROVISIONED_MEMORY_FIELD,
            FAIL_ON_ERROR_FIELD, SOURCE_FIELD, FORMAT_FIELD, ROLE_ARN_FIELD));

    private final String graphName;

    private final Map tags;

    private final Boolean publicConnectivity;

    private final String kmsKeyIdentifier;

    private final VectorSearchConfiguration vectorSearchConfiguration;

    private final Integer replicaCount;

    private final Boolean deletionProtection;

    private final ImportOptions importOptions;

    private final Integer maxProvisionedMemory;

    private final Integer minProvisionedMemory;

    private final Boolean failOnError;

    private final String source;

    private final String format;

    private final String roleArn;

    private CreateGraphUsingImportTaskRequest(BuilderImpl builder) {
        super(builder);
        this.graphName = builder.graphName;
        this.tags = builder.tags;
        this.publicConnectivity = builder.publicConnectivity;
        this.kmsKeyIdentifier = builder.kmsKeyIdentifier;
        this.vectorSearchConfiguration = builder.vectorSearchConfiguration;
        this.replicaCount = builder.replicaCount;
        this.deletionProtection = builder.deletionProtection;
        this.importOptions = builder.importOptions;
        this.maxProvisionedMemory = builder.maxProvisionedMemory;
        this.minProvisionedMemory = builder.minProvisionedMemory;
        this.failOnError = builder.failOnError;
        this.source = builder.source;
        this.format = builder.format;
        this.roleArn = builder.roleArn;
    }

    /**
     * 

* A name for the new Neptune Analytics graph to be created. *

*

* The name must contain from 1 to 63 letters, numbers, or hyphens, and its first character must be a letter. It * cannot end with a hyphen or contain two consecutive hyphens. *

* * @return A name for the new Neptune Analytics graph to be created.

*

* The name must contain from 1 to 63 letters, numbers, or hyphens, and its first character must be a * letter. It cannot end with a hyphen or contain two consecutive hyphens. */ public final String graphName() { return graphName; } /** * For responses, this returns true if the service returned a value for the Tags 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 hasTags() { return tags != null && !(tags instanceof SdkAutoConstructMap); } /** *

* Adds metadata tags to the new graph. These tags can also be used with cost allocation reporting, or used in a * Condition statement in an IAM policy. *

*

* 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 #hasTags} method. *

* * @return Adds metadata tags to the new graph. These tags can also be used with cost allocation reporting, or used * in a Condition statement in an IAM policy. */ public final Map tags() { return tags; } /** *

* Specifies whether or not the graph can be reachable over the internet. All access to graphs is IAM authenticated. * (true to enable, or false to disable). *

* * @return Specifies whether or not the graph can be reachable over the internet. All access to graphs is IAM * authenticated. (true to enable, or false to disable). */ public final Boolean publicConnectivity() { return publicConnectivity; } /** *

* Specifies a KMS key to use to encrypt data imported into the new graph. *

* * @return Specifies a KMS key to use to encrypt data imported into the new graph. */ public final String kmsKeyIdentifier() { return kmsKeyIdentifier; } /** *

* Specifies the number of dimensions for vector embeddings that will be loaded into the graph. The value is * specified as dimension=value. Max = 65,535 *

* * @return Specifies the number of dimensions for vector embeddings that will be loaded into the graph. The value is * specified as dimension=value. Max = 65,535 */ public final VectorSearchConfiguration vectorSearchConfiguration() { return vectorSearchConfiguration; } /** *

* The number of replicas in other AZs to provision on the new graph after import. Default = 0, Min = 0, Max = 2. *

* *

* Additional charges equivalent to the m-NCUs selected for the graph apply for each replica. *

*
* * @return The number of replicas in other AZs to provision on the new graph after import. Default = 0, Min = 0, Max * = 2.

*

* Additional charges equivalent to the m-NCUs selected for the graph apply for each replica. *

*/ public final Integer replicaCount() { return replicaCount; } /** *

* Indicates whether or not to enable deletion protection on the graph. The graph can’t be deleted when deletion * protection is enabled. (true or false). *

* * @return Indicates whether or not to enable deletion protection on the graph. The graph can’t be deleted when * deletion protection is enabled. (true or false). */ public final Boolean deletionProtection() { return deletionProtection; } /** *

* Contains options for controlling the import process. For example, if the failOnError key is set to * false, the import skips problem data and attempts to continue (whereas if set to true, * the default, or if omitted, the import operation halts immediately when an error is encountered. *

* * @return Contains options for controlling the import process. For example, if the failOnError key is * set to false, the import skips problem data and attempts to continue (whereas if set to * true, the default, or if omitted, the import operation halts immediately when an error is * encountered. */ public final ImportOptions importOptions() { return importOptions; } /** *

* The maximum provisioned memory-optimized Neptune Capacity Units (m-NCUs) to use for the graph. Default: 1024, or * the approved upper limit for your account. *

*

* If both the minimum and maximum values are specified, the max of the min-provisioned-memory and * max-provisioned memory is used to create the graph. If neither value is specified 128 m-NCUs are * used. *

* * @return The maximum provisioned memory-optimized Neptune Capacity Units (m-NCUs) to use for the graph. Default: * 1024, or the approved upper limit for your account.

*

* If both the minimum and maximum values are specified, the max of the min-provisioned-memory * and max-provisioned memory is used to create the graph. If neither value is specified 128 * m-NCUs are used. */ public final Integer maxProvisionedMemory() { return maxProvisionedMemory; } /** *

* The minimum provisioned memory-optimized Neptune Capacity Units (m-NCUs) to use for the graph. Default: 128 *

* * @return The minimum provisioned memory-optimized Neptune Capacity Units (m-NCUs) to use for the graph. Default: * 128 */ public final Integer minProvisionedMemory() { return minProvisionedMemory; } /** *

* If set to true, the task halts when an import error is encountered. If set to false, * the task skips the data that caused the error and continues if possible. *

* * @return If set to true, the task halts when an import error is encountered. If set to * false, the task skips the data that caused the error and continues if possible. */ public final Boolean failOnError() { return failOnError; } /** *

* A URL identifying to the location of the data to be imported. This can be an Amazon S3 path, or can point to a * Neptune database endpoint or snapshot. *

* * @return A URL identifying to the location of the data to be imported. This can be an Amazon S3 path, or can point * to a Neptune database endpoint or snapshot. */ public final String source() { return source; } /** *

* Specifies the format of S3 data to be imported. Valid values are CSV, which identifies the Gremlin CSV * format or OPENCYPHER, which identies the openCypher * load format. *

*

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

* * @return Specifies the format of S3 data to be imported. Valid values are CSV, which identifies the * * Gremlin CSV format or OPENCYPHER, which identies the openCypher load format. * @see Format */ public final Format format() { return Format.fromValue(format); } /** *

* Specifies the format of S3 data to be imported. Valid values are CSV, which identifies the Gremlin CSV * format or OPENCYPHER, which identies the openCypher * load format. *

*

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

* * @return Specifies the format of S3 data to be imported. Valid values are CSV, which identifies the * * Gremlin CSV format or OPENCYPHER, which identies the openCypher load format. * @see Format */ public final String formatAsString() { return format; } /** *

* The ARN of the IAM role that will allow access to the data that is to be imported. *

* * @return The ARN of the IAM role that will allow access to the data that is to be imported. */ public final String roleArn() { return roleArn; } @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(graphName()); hashCode = 31 * hashCode + Objects.hashCode(hasTags() ? tags() : null); hashCode = 31 * hashCode + Objects.hashCode(publicConnectivity()); hashCode = 31 * hashCode + Objects.hashCode(kmsKeyIdentifier()); hashCode = 31 * hashCode + Objects.hashCode(vectorSearchConfiguration()); hashCode = 31 * hashCode + Objects.hashCode(replicaCount()); hashCode = 31 * hashCode + Objects.hashCode(deletionProtection()); hashCode = 31 * hashCode + Objects.hashCode(importOptions()); hashCode = 31 * hashCode + Objects.hashCode(maxProvisionedMemory()); hashCode = 31 * hashCode + Objects.hashCode(minProvisionedMemory()); hashCode = 31 * hashCode + Objects.hashCode(failOnError()); hashCode = 31 * hashCode + Objects.hashCode(source()); hashCode = 31 * hashCode + Objects.hashCode(formatAsString()); hashCode = 31 * hashCode + Objects.hashCode(roleArn()); 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 CreateGraphUsingImportTaskRequest)) { return false; } CreateGraphUsingImportTaskRequest other = (CreateGraphUsingImportTaskRequest) obj; return Objects.equals(graphName(), other.graphName()) && hasTags() == other.hasTags() && Objects.equals(tags(), other.tags()) && Objects.equals(publicConnectivity(), other.publicConnectivity()) && Objects.equals(kmsKeyIdentifier(), other.kmsKeyIdentifier()) && Objects.equals(vectorSearchConfiguration(), other.vectorSearchConfiguration()) && Objects.equals(replicaCount(), other.replicaCount()) && Objects.equals(deletionProtection(), other.deletionProtection()) && Objects.equals(importOptions(), other.importOptions()) && Objects.equals(maxProvisionedMemory(), other.maxProvisionedMemory()) && Objects.equals(minProvisionedMemory(), other.minProvisionedMemory()) && Objects.equals(failOnError(), other.failOnError()) && Objects.equals(source(), other.source()) && Objects.equals(formatAsString(), other.formatAsString()) && Objects.equals(roleArn(), other.roleArn()); } /** * 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("CreateGraphUsingImportTaskRequest").add("GraphName", graphName()) .add("Tags", hasTags() ? tags() : null).add("PublicConnectivity", publicConnectivity()) .add("KmsKeyIdentifier", kmsKeyIdentifier()).add("VectorSearchConfiguration", vectorSearchConfiguration()) .add("ReplicaCount", replicaCount()).add("DeletionProtection", deletionProtection()) .add("ImportOptions", importOptions()).add("MaxProvisionedMemory", maxProvisionedMemory()) .add("MinProvisionedMemory", minProvisionedMemory()).add("FailOnError", failOnError()).add("Source", source()) .add("Format", formatAsString()).add("RoleArn", roleArn()).build(); } public final Optional getValueForField(String fieldName, Class clazz) { switch (fieldName) { case "graphName": return Optional.ofNullable(clazz.cast(graphName())); case "tags": return Optional.ofNullable(clazz.cast(tags())); case "publicConnectivity": return Optional.ofNullable(clazz.cast(publicConnectivity())); case "kmsKeyIdentifier": return Optional.ofNullable(clazz.cast(kmsKeyIdentifier())); case "vectorSearchConfiguration": return Optional.ofNullable(clazz.cast(vectorSearchConfiguration())); case "replicaCount": return Optional.ofNullable(clazz.cast(replicaCount())); case "deletionProtection": return Optional.ofNullable(clazz.cast(deletionProtection())); case "importOptions": return Optional.ofNullable(clazz.cast(importOptions())); case "maxProvisionedMemory": return Optional.ofNullable(clazz.cast(maxProvisionedMemory())); case "minProvisionedMemory": return Optional.ofNullable(clazz.cast(minProvisionedMemory())); case "failOnError": return Optional.ofNullable(clazz.cast(failOnError())); case "source": return Optional.ofNullable(clazz.cast(source())); case "format": return Optional.ofNullable(clazz.cast(formatAsString())); case "roleArn": return Optional.ofNullable(clazz.cast(roleArn())); default: return Optional.empty(); } } @Override public final List> sdkFields() { return SDK_FIELDS; } private static Function getter(Function g) { return obj -> g.apply((CreateGraphUsingImportTaskRequest) obj); } private static BiConsumer setter(BiConsumer s) { return (obj, val) -> s.accept((Builder) obj, val); } public interface Builder extends NeptuneGraphRequest.Builder, SdkPojo, CopyableBuilder { /** *

* A name for the new Neptune Analytics graph to be created. *

*

* The name must contain from 1 to 63 letters, numbers, or hyphens, and its first character must be a letter. It * cannot end with a hyphen or contain two consecutive hyphens. *

* * @param graphName * A name for the new Neptune Analytics graph to be created.

*

* The name must contain from 1 to 63 letters, numbers, or hyphens, and its first character must be a * letter. It cannot end with a hyphen or contain two consecutive hyphens. * @return Returns a reference to this object so that method calls can be chained together. */ Builder graphName(String graphName); /** *

* Adds metadata tags to the new graph. These tags can also be used with cost allocation reporting, or used in a * Condition statement in an IAM policy. *

* * @param tags * Adds metadata tags to the new graph. These tags can also be used with cost allocation reporting, or * used in a Condition statement in an IAM policy. * @return Returns a reference to this object so that method calls can be chained together. */ Builder tags(Map tags); /** *

* Specifies whether or not the graph can be reachable over the internet. All access to graphs is IAM * authenticated. (true to enable, or false to disable). *

* * @param publicConnectivity * Specifies whether or not the graph can be reachable over the internet. All access to graphs is IAM * authenticated. (true to enable, or false to disable). * @return Returns a reference to this object so that method calls can be chained together. */ Builder publicConnectivity(Boolean publicConnectivity); /** *

* Specifies a KMS key to use to encrypt data imported into the new graph. *

* * @param kmsKeyIdentifier * Specifies a KMS key to use to encrypt data imported into the new graph. * @return Returns a reference to this object so that method calls can be chained together. */ Builder kmsKeyIdentifier(String kmsKeyIdentifier); /** *

* Specifies the number of dimensions for vector embeddings that will be loaded into the graph. The value is * specified as dimension=value. Max = 65,535 *

* * @param vectorSearchConfiguration * Specifies the number of dimensions for vector embeddings that will be loaded into the graph. The value * is specified as dimension=value. Max = 65,535 * @return Returns a reference to this object so that method calls can be chained together. */ Builder vectorSearchConfiguration(VectorSearchConfiguration vectorSearchConfiguration); /** *

* Specifies the number of dimensions for vector embeddings that will be loaded into the graph. The value is * specified as dimension=value. Max = 65,535 *

* This is a convenience method that creates an instance of the {@link VectorSearchConfiguration.Builder} * avoiding the need to create one manually via {@link VectorSearchConfiguration#builder()}. * *

* When the {@link Consumer} completes, {@link VectorSearchConfiguration.Builder#build()} is called immediately * and its result is passed to {@link #vectorSearchConfiguration(VectorSearchConfiguration)}. * * @param vectorSearchConfiguration * a consumer that will call methods on {@link VectorSearchConfiguration.Builder} * @return Returns a reference to this object so that method calls can be chained together. * @see #vectorSearchConfiguration(VectorSearchConfiguration) */ default Builder vectorSearchConfiguration(Consumer vectorSearchConfiguration) { return vectorSearchConfiguration(VectorSearchConfiguration.builder().applyMutation(vectorSearchConfiguration).build()); } /** *

* The number of replicas in other AZs to provision on the new graph after import. Default = 0, Min = 0, Max = * 2. *

* *

* Additional charges equivalent to the m-NCUs selected for the graph apply for each replica. *

*
* * @param replicaCount * The number of replicas in other AZs to provision on the new graph after import. Default = 0, Min = 0, * Max = 2.

*

* Additional charges equivalent to the m-NCUs selected for the graph apply for each replica. *

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

* Indicates whether or not to enable deletion protection on the graph. The graph can’t be deleted when deletion * protection is enabled. (true or false). *

* * @param deletionProtection * Indicates whether or not to enable deletion protection on the graph. The graph can’t be deleted when * deletion protection is enabled. (true or false). * @return Returns a reference to this object so that method calls can be chained together. */ Builder deletionProtection(Boolean deletionProtection); /** *

* Contains options for controlling the import process. For example, if the failOnError key is set * to false, the import skips problem data and attempts to continue (whereas if set to * true, the default, or if omitted, the import operation halts immediately when an error is * encountered. *

* * @param importOptions * Contains options for controlling the import process. For example, if the failOnError key * is set to false, the import skips problem data and attempts to continue (whereas if set * to true, the default, or if omitted, the import operation halts immediately when an error * is encountered. * @return Returns a reference to this object so that method calls can be chained together. */ Builder importOptions(ImportOptions importOptions); /** *

* Contains options for controlling the import process. For example, if the failOnError key is set * to false, the import skips problem data and attempts to continue (whereas if set to * true, the default, or if omitted, the import operation halts immediately when an error is * encountered. *

* This is a convenience method that creates an instance of the {@link ImportOptions.Builder} avoiding the need * to create one manually via {@link ImportOptions#builder()}. * *

* When the {@link Consumer} completes, {@link ImportOptions.Builder#build()} is called immediately and its * result is passed to {@link #importOptions(ImportOptions)}. * * @param importOptions * a consumer that will call methods on {@link ImportOptions.Builder} * @return Returns a reference to this object so that method calls can be chained together. * @see #importOptions(ImportOptions) */ default Builder importOptions(Consumer importOptions) { return importOptions(ImportOptions.builder().applyMutation(importOptions).build()); } /** *

* The maximum provisioned memory-optimized Neptune Capacity Units (m-NCUs) to use for the graph. Default: 1024, * or the approved upper limit for your account. *

*

* If both the minimum and maximum values are specified, the max of the min-provisioned-memory and * max-provisioned memory is used to create the graph. If neither value is specified 128 m-NCUs are * used. *

* * @param maxProvisionedMemory * The maximum provisioned memory-optimized Neptune Capacity Units (m-NCUs) to use for the graph. * Default: 1024, or the approved upper limit for your account.

*

* If both the minimum and maximum values are specified, the max of the * min-provisioned-memory and max-provisioned memory is used to create the * graph. If neither value is specified 128 m-NCUs are used. * @return Returns a reference to this object so that method calls can be chained together. */ Builder maxProvisionedMemory(Integer maxProvisionedMemory); /** *

* The minimum provisioned memory-optimized Neptune Capacity Units (m-NCUs) to use for the graph. Default: 128 *

* * @param minProvisionedMemory * The minimum provisioned memory-optimized Neptune Capacity Units (m-NCUs) to use for the graph. * Default: 128 * @return Returns a reference to this object so that method calls can be chained together. */ Builder minProvisionedMemory(Integer minProvisionedMemory); /** *

* If set to true, the task halts when an import error is encountered. If set to false * , the task skips the data that caused the error and continues if possible. *

* * @param failOnError * If set to true, the task halts when an import error is encountered. If set to * false, the task skips the data that caused the error and continues if possible. * @return Returns a reference to this object so that method calls can be chained together. */ Builder failOnError(Boolean failOnError); /** *

* A URL identifying to the location of the data to be imported. This can be an Amazon S3 path, or can point to * a Neptune database endpoint or snapshot. *

* * @param source * A URL identifying to the location of the data to be imported. This can be an Amazon S3 path, or can * point to a Neptune database endpoint or snapshot. * @return Returns a reference to this object so that method calls can be chained together. */ Builder source(String source); /** *

* Specifies the format of S3 data to be imported. Valid values are CSV, which identifies the Gremlin * CSV format or OPENCYPHER, which identies the openCypher load format. *

* * @param format * Specifies the format of S3 data to be imported. Valid values are CSV, which identifies * the Gremlin CSV format or OPENCYPHER, which identies the openCypher load format. * @see Format * @return Returns a reference to this object so that method calls can be chained together. * @see Format */ Builder format(String format); /** *

* Specifies the format of S3 data to be imported. Valid values are CSV, which identifies the Gremlin * CSV format or OPENCYPHER, which identies the openCypher load format. *

* * @param format * Specifies the format of S3 data to be imported. Valid values are CSV, which identifies * the Gremlin CSV format or OPENCYPHER, which identies the openCypher load format. * @see Format * @return Returns a reference to this object so that method calls can be chained together. * @see Format */ Builder format(Format format); /** *

* The ARN of the IAM role that will allow access to the data that is to be imported. *

* * @param roleArn * The ARN of the IAM role that will allow access to the data that is to be imported. * @return Returns a reference to this object so that method calls can be chained together. */ Builder roleArn(String roleArn); @Override Builder overrideConfiguration(AwsRequestOverrideConfiguration overrideConfiguration); @Override Builder overrideConfiguration(Consumer builderConsumer); } static final class BuilderImpl extends NeptuneGraphRequest.BuilderImpl implements Builder { private String graphName; private Map tags = DefaultSdkAutoConstructMap.getInstance(); private Boolean publicConnectivity; private String kmsKeyIdentifier; private VectorSearchConfiguration vectorSearchConfiguration; private Integer replicaCount; private Boolean deletionProtection; private ImportOptions importOptions; private Integer maxProvisionedMemory; private Integer minProvisionedMemory; private Boolean failOnError; private String source; private String format; private String roleArn; private BuilderImpl() { } private BuilderImpl(CreateGraphUsingImportTaskRequest model) { super(model); graphName(model.graphName); tags(model.tags); publicConnectivity(model.publicConnectivity); kmsKeyIdentifier(model.kmsKeyIdentifier); vectorSearchConfiguration(model.vectorSearchConfiguration); replicaCount(model.replicaCount); deletionProtection(model.deletionProtection); importOptions(model.importOptions); maxProvisionedMemory(model.maxProvisionedMemory); minProvisionedMemory(model.minProvisionedMemory); failOnError(model.failOnError); source(model.source); format(model.format); roleArn(model.roleArn); } public final String getGraphName() { return graphName; } public final void setGraphName(String graphName) { this.graphName = graphName; } @Override public final Builder graphName(String graphName) { this.graphName = graphName; return this; } public final Map getTags() { if (tags instanceof SdkAutoConstructMap) { return null; } return tags; } public final void setTags(Map tags) { this.tags = TagMapCopier.copy(tags); } @Override public final Builder tags(Map tags) { this.tags = TagMapCopier.copy(tags); return this; } public final Boolean getPublicConnectivity() { return publicConnectivity; } public final void setPublicConnectivity(Boolean publicConnectivity) { this.publicConnectivity = publicConnectivity; } @Override public final Builder publicConnectivity(Boolean publicConnectivity) { this.publicConnectivity = publicConnectivity; return this; } public final String getKmsKeyIdentifier() { return kmsKeyIdentifier; } public final void setKmsKeyIdentifier(String kmsKeyIdentifier) { this.kmsKeyIdentifier = kmsKeyIdentifier; } @Override public final Builder kmsKeyIdentifier(String kmsKeyIdentifier) { this.kmsKeyIdentifier = kmsKeyIdentifier; return this; } public final VectorSearchConfiguration.Builder getVectorSearchConfiguration() { return vectorSearchConfiguration != null ? vectorSearchConfiguration.toBuilder() : null; } public final void setVectorSearchConfiguration(VectorSearchConfiguration.BuilderImpl vectorSearchConfiguration) { this.vectorSearchConfiguration = vectorSearchConfiguration != null ? vectorSearchConfiguration.build() : null; } @Override public final Builder vectorSearchConfiguration(VectorSearchConfiguration vectorSearchConfiguration) { this.vectorSearchConfiguration = vectorSearchConfiguration; return this; } public final Integer getReplicaCount() { return replicaCount; } public final void setReplicaCount(Integer replicaCount) { this.replicaCount = replicaCount; } @Override public final Builder replicaCount(Integer replicaCount) { this.replicaCount = replicaCount; return this; } public final Boolean getDeletionProtection() { return deletionProtection; } public final void setDeletionProtection(Boolean deletionProtection) { this.deletionProtection = deletionProtection; } @Override public final Builder deletionProtection(Boolean deletionProtection) { this.deletionProtection = deletionProtection; return this; } public final ImportOptions.Builder getImportOptions() { return importOptions != null ? importOptions.toBuilder() : null; } public final void setImportOptions(ImportOptions.BuilderImpl importOptions) { this.importOptions = importOptions != null ? importOptions.build() : null; } @Override public final Builder importOptions(ImportOptions importOptions) { this.importOptions = importOptions; return this; } public final Integer getMaxProvisionedMemory() { return maxProvisionedMemory; } public final void setMaxProvisionedMemory(Integer maxProvisionedMemory) { this.maxProvisionedMemory = maxProvisionedMemory; } @Override public final Builder maxProvisionedMemory(Integer maxProvisionedMemory) { this.maxProvisionedMemory = maxProvisionedMemory; return this; } public final Integer getMinProvisionedMemory() { return minProvisionedMemory; } public final void setMinProvisionedMemory(Integer minProvisionedMemory) { this.minProvisionedMemory = minProvisionedMemory; } @Override public final Builder minProvisionedMemory(Integer minProvisionedMemory) { this.minProvisionedMemory = minProvisionedMemory; return this; } public final Boolean getFailOnError() { return failOnError; } public final void setFailOnError(Boolean failOnError) { this.failOnError = failOnError; } @Override public final Builder failOnError(Boolean failOnError) { this.failOnError = failOnError; return this; } public final String getSource() { return source; } public final void setSource(String source) { this.source = source; } @Override public final Builder source(String source) { this.source = source; return this; } public final String getFormat() { return format; } public final void setFormat(String format) { this.format = format; } @Override public final Builder format(String format) { this.format = format; return this; } @Override public final Builder format(Format format) { this.format(format == null ? null : format.toString()); return this; } public final String getRoleArn() { return roleArn; } public final void setRoleArn(String roleArn) { this.roleArn = roleArn; } @Override public final Builder roleArn(String roleArn) { this.roleArn = roleArn; 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 CreateGraphUsingImportTaskRequest build() { return new CreateGraphUsingImportTaskRequest(this); } @Override public List> sdkFields() { return SDK_FIELDS; } } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy