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

software.amazon.awssdk.services.kendra.model.ConfluenceConfiguration Maven / Gradle / Ivy

Go to download

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

There is a newer version: 2.29.15
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.kendra.model;

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

/**
 * 

* Provides the configuration information to connect to Confluence as your data source. *

*/ @Generated("software.amazon.awssdk:codegen") public final class ConfluenceConfiguration implements SdkPojo, Serializable, ToCopyableBuilder { private static final SdkField SERVER_URL_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("ServerUrl").getter(getter(ConfluenceConfiguration::serverUrl)).setter(setter(Builder::serverUrl)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("ServerUrl").build()).build(); private static final SdkField SECRET_ARN_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("SecretArn").getter(getter(ConfluenceConfiguration::secretArn)).setter(setter(Builder::secretArn)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("SecretArn").build()).build(); private static final SdkField VERSION_FIELD = SdkField. builder(MarshallingType.STRING).memberName("Version") .getter(getter(ConfluenceConfiguration::versionAsString)).setter(setter(Builder::version)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("Version").build()).build(); private static final SdkField SPACE_CONFIGURATION_FIELD = SdkField . builder(MarshallingType.SDK_POJO).memberName("SpaceConfiguration") .getter(getter(ConfluenceConfiguration::spaceConfiguration)).setter(setter(Builder::spaceConfiguration)) .constructor(ConfluenceSpaceConfiguration::builder) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("SpaceConfiguration").build()) .build(); private static final SdkField PAGE_CONFIGURATION_FIELD = SdkField . builder(MarshallingType.SDK_POJO).memberName("PageConfiguration") .getter(getter(ConfluenceConfiguration::pageConfiguration)).setter(setter(Builder::pageConfiguration)) .constructor(ConfluencePageConfiguration::builder) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("PageConfiguration").build()).build(); private static final SdkField BLOG_CONFIGURATION_FIELD = SdkField . builder(MarshallingType.SDK_POJO).memberName("BlogConfiguration") .getter(getter(ConfluenceConfiguration::blogConfiguration)).setter(setter(Builder::blogConfiguration)) .constructor(ConfluenceBlogConfiguration::builder) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("BlogConfiguration").build()).build(); private static final SdkField ATTACHMENT_CONFIGURATION_FIELD = SdkField . builder(MarshallingType.SDK_POJO).memberName("AttachmentConfiguration") .getter(getter(ConfluenceConfiguration::attachmentConfiguration)).setter(setter(Builder::attachmentConfiguration)) .constructor(ConfluenceAttachmentConfiguration::builder) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("AttachmentConfiguration").build()) .build(); private static final SdkField VPC_CONFIGURATION_FIELD = SdkField . builder(MarshallingType.SDK_POJO).memberName("VpcConfiguration") .getter(getter(ConfluenceConfiguration::vpcConfiguration)).setter(setter(Builder::vpcConfiguration)) .constructor(DataSourceVpcConfiguration::builder) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("VpcConfiguration").build()).build(); private static final SdkField> INCLUSION_PATTERNS_FIELD = SdkField .> builder(MarshallingType.LIST) .memberName("InclusionPatterns") .getter(getter(ConfluenceConfiguration::inclusionPatterns)) .setter(setter(Builder::inclusionPatterns)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("InclusionPatterns").build(), ListTrait .builder() .memberLocationName(null) .memberFieldInfo( SdkField. builder(MarshallingType.STRING) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD) .locationName("member").build()).build()).build()).build(); private static final SdkField> EXCLUSION_PATTERNS_FIELD = SdkField .> builder(MarshallingType.LIST) .memberName("ExclusionPatterns") .getter(getter(ConfluenceConfiguration::exclusionPatterns)) .setter(setter(Builder::exclusionPatterns)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("ExclusionPatterns").build(), ListTrait .builder() .memberLocationName(null) .memberFieldInfo( SdkField. builder(MarshallingType.STRING) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD) .locationName("member").build()).build()).build()).build(); private static final SdkField PROXY_CONFIGURATION_FIELD = SdkField . builder(MarshallingType.SDK_POJO).memberName("ProxyConfiguration") .getter(getter(ConfluenceConfiguration::proxyConfiguration)).setter(setter(Builder::proxyConfiguration)) .constructor(ProxyConfiguration::builder) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("ProxyConfiguration").build()) .build(); private static final SdkField AUTHENTICATION_TYPE_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("AuthenticationType").getter(getter(ConfluenceConfiguration::authenticationTypeAsString)) .setter(setter(Builder::authenticationType)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("AuthenticationType").build()) .build(); private static final List> SDK_FIELDS = Collections.unmodifiableList(Arrays.asList(SERVER_URL_FIELD, SECRET_ARN_FIELD, VERSION_FIELD, SPACE_CONFIGURATION_FIELD, PAGE_CONFIGURATION_FIELD, BLOG_CONFIGURATION_FIELD, ATTACHMENT_CONFIGURATION_FIELD, VPC_CONFIGURATION_FIELD, INCLUSION_PATTERNS_FIELD, EXCLUSION_PATTERNS_FIELD, PROXY_CONFIGURATION_FIELD, AUTHENTICATION_TYPE_FIELD)); private static final long serialVersionUID = 1L; private final String serverUrl; private final String secretArn; private final String version; private final ConfluenceSpaceConfiguration spaceConfiguration; private final ConfluencePageConfiguration pageConfiguration; private final ConfluenceBlogConfiguration blogConfiguration; private final ConfluenceAttachmentConfiguration attachmentConfiguration; private final DataSourceVpcConfiguration vpcConfiguration; private final List inclusionPatterns; private final List exclusionPatterns; private final ProxyConfiguration proxyConfiguration; private final String authenticationType; private ConfluenceConfiguration(BuilderImpl builder) { this.serverUrl = builder.serverUrl; this.secretArn = builder.secretArn; this.version = builder.version; this.spaceConfiguration = builder.spaceConfiguration; this.pageConfiguration = builder.pageConfiguration; this.blogConfiguration = builder.blogConfiguration; this.attachmentConfiguration = builder.attachmentConfiguration; this.vpcConfiguration = builder.vpcConfiguration; this.inclusionPatterns = builder.inclusionPatterns; this.exclusionPatterns = builder.exclusionPatterns; this.proxyConfiguration = builder.proxyConfiguration; this.authenticationType = builder.authenticationType; } /** *

* The URL of your Confluence instance. Use the full URL of the server. For example, * https://server.example.com:port/. You can also use an IP address, for example, * https://192.168.1.113/. *

* * @return The URL of your Confluence instance. Use the full URL of the server. For example, * https://server.example.com:port/. You can also use an IP address, for example, * https://192.168.1.113/. */ public final String serverUrl() { return serverUrl; } /** *

* The Amazon Resource Name (ARN) of an Secrets Manager secret that contains the user name and password required to * connect to the Confluence instance. If you use Confluence Cloud, you use a generated API token as the password. *

*

* You can also provide authentication credentials in the form of a personal access token. For more information, see * Using a Confluence data * source. *

* * @return The Amazon Resource Name (ARN) of an Secrets Manager secret that contains the user name and password * required to connect to the Confluence instance. If you use Confluence Cloud, you use a generated API * token as the password.

*

* You can also provide authentication credentials in the form of a personal access token. For more * information, see Using * a Confluence data source. */ public final String secretArn() { return secretArn; } /** *

* The version or the type of Confluence installation to connect to. *

*

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

* * @return The version or the type of Confluence installation to connect to. * @see ConfluenceVersion */ public final ConfluenceVersion version() { return ConfluenceVersion.fromValue(version); } /** *

* The version or the type of Confluence installation to connect to. *

*

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

* * @return The version or the type of Confluence installation to connect to. * @see ConfluenceVersion */ public final String versionAsString() { return version; } /** *

* Configuration information for indexing Confluence spaces. *

* * @return Configuration information for indexing Confluence spaces. */ public final ConfluenceSpaceConfiguration spaceConfiguration() { return spaceConfiguration; } /** *

* Configuration information for indexing Confluence pages. *

* * @return Configuration information for indexing Confluence pages. */ public final ConfluencePageConfiguration pageConfiguration() { return pageConfiguration; } /** *

* Configuration information for indexing Confluence blogs. *

* * @return Configuration information for indexing Confluence blogs. */ public final ConfluenceBlogConfiguration blogConfiguration() { return blogConfiguration; } /** *

* Configuration information for indexing attachments to Confluence blogs and pages. *

* * @return Configuration information for indexing attachments to Confluence blogs and pages. */ public final ConfluenceAttachmentConfiguration attachmentConfiguration() { return attachmentConfiguration; } /** *

* Configuration information for an Amazon Virtual Private Cloud to connect to your Confluence. For more * information, see Configuring a * VPC. *

* * @return Configuration information for an Amazon Virtual Private Cloud to connect to your Confluence. For more * information, see Configuring a VPC. */ public final DataSourceVpcConfiguration vpcConfiguration() { return vpcConfiguration; } /** * For responses, this returns true if the service returned a value for the InclusionPatterns 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 hasInclusionPatterns() { return inclusionPatterns != null && !(inclusionPatterns instanceof SdkAutoConstructList); } /** *

* A list of regular expression patterns to include certain blog posts, pages, spaces, or attachments in your * Confluence. Content that matches the patterns are included in the index. Content that doesn't match the patterns * is excluded from the index. If content matches both an inclusion and exclusion pattern, the exclusion pattern * takes precedence and the content isn't included in the index. *

*

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

* * @return A list of regular expression patterns to include certain blog posts, pages, spaces, or attachments in * your Confluence. Content that matches the patterns are included in the index. Content that doesn't match * the patterns is excluded from the index. If content matches both an inclusion and exclusion pattern, the * exclusion pattern takes precedence and the content isn't included in the index. */ public final List inclusionPatterns() { return inclusionPatterns; } /** * For responses, this returns true if the service returned a value for the ExclusionPatterns 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 hasExclusionPatterns() { return exclusionPatterns != null && !(exclusionPatterns instanceof SdkAutoConstructList); } /** *

* A list of regular expression patterns to exclude certain blog posts, pages, spaces, or attachments in your * Confluence. Content that matches the patterns are excluded from the index. Content that doesn't match the * patterns is included in the index. If content matches both an inclusion and exclusion pattern, the exclusion * pattern takes precedence and the content isn't included in the index. *

*

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

* * @return A list of regular expression patterns to exclude certain blog posts, pages, spaces, or attachments in * your Confluence. Content that matches the patterns are excluded from the index. Content that doesn't * match the patterns is included in the index. If content matches both an inclusion and exclusion pattern, * the exclusion pattern takes precedence and the content isn't included in the index. */ public final List exclusionPatterns() { return exclusionPatterns; } /** *

* Configuration information to connect to your Confluence URL instance via a web proxy. You can use this option for * Confluence Server. *

*

* You must provide the website host name and port number. For example, the host name of * https://a.example.com/page1.html is "a.example.com" and the port is 443, the standard port for HTTPS. *

*

* Web proxy credentials are optional and you can use them to connect to a web proxy server that requires basic * authentication of user name and password. To store web proxy credentials, you use a secret in Secrets Manager. *

*

* It is recommended that you follow best security practices when configuring your web proxy. This includes setting * up throttling, setting up logging and monitoring, and applying security patches on a regular basis. If you use * your web proxy with multiple data sources, sync jobs that occur at the same time could strain the load on your * proxy. It is recommended you prepare your proxy beforehand for any security and load requirements. *

* * @return Configuration information to connect to your Confluence URL instance via a web proxy. You can use this * option for Confluence Server.

*

* You must provide the website host name and port number. For example, the host name of * https://a.example.com/page1.html is "a.example.com" and the port is 443, the standard port for * HTTPS. *

*

* Web proxy credentials are optional and you can use them to connect to a web proxy server that requires * basic authentication of user name and password. To store web proxy credentials, you use a secret in * Secrets Manager. *

*

* It is recommended that you follow best security practices when configuring your web proxy. This includes * setting up throttling, setting up logging and monitoring, and applying security patches on a regular * basis. If you use your web proxy with multiple data sources, sync jobs that occur at the same time could * strain the load on your proxy. It is recommended you prepare your proxy beforehand for any security and * load requirements. */ public final ProxyConfiguration proxyConfiguration() { return proxyConfiguration; } /** *

* Whether you want to connect to Confluence using basic authentication of user name and password, or a personal * access token. You can use a personal access token for Confluence Server. *

*

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

* * @return Whether you want to connect to Confluence using basic authentication of user name and password, or a * personal access token. You can use a personal access token for Confluence Server. * @see ConfluenceAuthenticationType */ public final ConfluenceAuthenticationType authenticationType() { return ConfluenceAuthenticationType.fromValue(authenticationType); } /** *

* Whether you want to connect to Confluence using basic authentication of user name and password, or a personal * access token. You can use a personal access token for Confluence Server. *

*

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

* * @return Whether you want to connect to Confluence using basic authentication of user name and password, or a * personal access token. You can use a personal access token for Confluence Server. * @see ConfluenceAuthenticationType */ public final String authenticationTypeAsString() { return authenticationType; } @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 + Objects.hashCode(serverUrl()); hashCode = 31 * hashCode + Objects.hashCode(secretArn()); hashCode = 31 * hashCode + Objects.hashCode(versionAsString()); hashCode = 31 * hashCode + Objects.hashCode(spaceConfiguration()); hashCode = 31 * hashCode + Objects.hashCode(pageConfiguration()); hashCode = 31 * hashCode + Objects.hashCode(blogConfiguration()); hashCode = 31 * hashCode + Objects.hashCode(attachmentConfiguration()); hashCode = 31 * hashCode + Objects.hashCode(vpcConfiguration()); hashCode = 31 * hashCode + Objects.hashCode(hasInclusionPatterns() ? inclusionPatterns() : null); hashCode = 31 * hashCode + Objects.hashCode(hasExclusionPatterns() ? exclusionPatterns() : null); hashCode = 31 * hashCode + Objects.hashCode(proxyConfiguration()); hashCode = 31 * hashCode + Objects.hashCode(authenticationTypeAsString()); return hashCode; } @Override public final boolean equals(Object obj) { return equalsBySdkFields(obj); } @Override public final boolean equalsBySdkFields(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (!(obj instanceof ConfluenceConfiguration)) { return false; } ConfluenceConfiguration other = (ConfluenceConfiguration) obj; return Objects.equals(serverUrl(), other.serverUrl()) && Objects.equals(secretArn(), other.secretArn()) && Objects.equals(versionAsString(), other.versionAsString()) && Objects.equals(spaceConfiguration(), other.spaceConfiguration()) && Objects.equals(pageConfiguration(), other.pageConfiguration()) && Objects.equals(blogConfiguration(), other.blogConfiguration()) && Objects.equals(attachmentConfiguration(), other.attachmentConfiguration()) && Objects.equals(vpcConfiguration(), other.vpcConfiguration()) && hasInclusionPatterns() == other.hasInclusionPatterns() && Objects.equals(inclusionPatterns(), other.inclusionPatterns()) && hasExclusionPatterns() == other.hasExclusionPatterns() && Objects.equals(exclusionPatterns(), other.exclusionPatterns()) && Objects.equals(proxyConfiguration(), other.proxyConfiguration()) && Objects.equals(authenticationTypeAsString(), other.authenticationTypeAsString()); } /** * 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("ConfluenceConfiguration").add("ServerUrl", serverUrl()).add("SecretArn", secretArn()) .add("Version", versionAsString()).add("SpaceConfiguration", spaceConfiguration()) .add("PageConfiguration", pageConfiguration()).add("BlogConfiguration", blogConfiguration()) .add("AttachmentConfiguration", attachmentConfiguration()).add("VpcConfiguration", vpcConfiguration()) .add("InclusionPatterns", hasInclusionPatterns() ? inclusionPatterns() : null) .add("ExclusionPatterns", hasExclusionPatterns() ? exclusionPatterns() : null) .add("ProxyConfiguration", proxyConfiguration()).add("AuthenticationType", authenticationTypeAsString()).build(); } public final Optional getValueForField(String fieldName, Class clazz) { switch (fieldName) { case "ServerUrl": return Optional.ofNullable(clazz.cast(serverUrl())); case "SecretArn": return Optional.ofNullable(clazz.cast(secretArn())); case "Version": return Optional.ofNullable(clazz.cast(versionAsString())); case "SpaceConfiguration": return Optional.ofNullable(clazz.cast(spaceConfiguration())); case "PageConfiguration": return Optional.ofNullable(clazz.cast(pageConfiguration())); case "BlogConfiguration": return Optional.ofNullable(clazz.cast(blogConfiguration())); case "AttachmentConfiguration": return Optional.ofNullable(clazz.cast(attachmentConfiguration())); case "VpcConfiguration": return Optional.ofNullable(clazz.cast(vpcConfiguration())); case "InclusionPatterns": return Optional.ofNullable(clazz.cast(inclusionPatterns())); case "ExclusionPatterns": return Optional.ofNullable(clazz.cast(exclusionPatterns())); case "ProxyConfiguration": return Optional.ofNullable(clazz.cast(proxyConfiguration())); case "AuthenticationType": return Optional.ofNullable(clazz.cast(authenticationTypeAsString())); default: return Optional.empty(); } } @Override public final List> sdkFields() { return SDK_FIELDS; } private static Function getter(Function g) { return obj -> g.apply((ConfluenceConfiguration) obj); } private static BiConsumer setter(BiConsumer s) { return (obj, val) -> s.accept((Builder) obj, val); } public interface Builder extends SdkPojo, CopyableBuilder { /** *

* The URL of your Confluence instance. Use the full URL of the server. For example, * https://server.example.com:port/. You can also use an IP address, for example, * https://192.168.1.113/. *

* * @param serverUrl * The URL of your Confluence instance. Use the full URL of the server. For example, * https://server.example.com:port/. You can also use an IP address, for example, * https://192.168.1.113/. * @return Returns a reference to this object so that method calls can be chained together. */ Builder serverUrl(String serverUrl); /** *

* The Amazon Resource Name (ARN) of an Secrets Manager secret that contains the user name and password required * to connect to the Confluence instance. If you use Confluence Cloud, you use a generated API token as the * password. *

*

* You can also provide authentication credentials in the form of a personal access token. For more information, * see Using a Confluence * data source. *

* * @param secretArn * The Amazon Resource Name (ARN) of an Secrets Manager secret that contains the user name and password * required to connect to the Confluence instance. If you use Confluence Cloud, you use a generated API * token as the password.

*

* You can also provide authentication credentials in the form of a personal access token. For more * information, see Using a Confluence * data source. * @return Returns a reference to this object so that method calls can be chained together. */ Builder secretArn(String secretArn); /** *

* The version or the type of Confluence installation to connect to. *

* * @param version * The version or the type of Confluence installation to connect to. * @see ConfluenceVersion * @return Returns a reference to this object so that method calls can be chained together. * @see ConfluenceVersion */ Builder version(String version); /** *

* The version or the type of Confluence installation to connect to. *

* * @param version * The version or the type of Confluence installation to connect to. * @see ConfluenceVersion * @return Returns a reference to this object so that method calls can be chained together. * @see ConfluenceVersion */ Builder version(ConfluenceVersion version); /** *

* Configuration information for indexing Confluence spaces. *

* * @param spaceConfiguration * Configuration information for indexing Confluence spaces. * @return Returns a reference to this object so that method calls can be chained together. */ Builder spaceConfiguration(ConfluenceSpaceConfiguration spaceConfiguration); /** *

* Configuration information for indexing Confluence spaces. *

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

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

* Configuration information for indexing Confluence pages. *

* * @param pageConfiguration * Configuration information for indexing Confluence pages. * @return Returns a reference to this object so that method calls can be chained together. */ Builder pageConfiguration(ConfluencePageConfiguration pageConfiguration); /** *

* Configuration information for indexing Confluence pages. *

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

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

* Configuration information for indexing Confluence blogs. *

* * @param blogConfiguration * Configuration information for indexing Confluence blogs. * @return Returns a reference to this object so that method calls can be chained together. */ Builder blogConfiguration(ConfluenceBlogConfiguration blogConfiguration); /** *

* Configuration information for indexing Confluence blogs. *

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

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

* Configuration information for indexing attachments to Confluence blogs and pages. *

* * @param attachmentConfiguration * Configuration information for indexing attachments to Confluence blogs and pages. * @return Returns a reference to this object so that method calls can be chained together. */ Builder attachmentConfiguration(ConfluenceAttachmentConfiguration attachmentConfiguration); /** *

* Configuration information for indexing attachments to Confluence blogs and pages. *

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

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

* Configuration information for an Amazon Virtual Private Cloud to connect to your Confluence. For more * information, see Configuring a * VPC. *

* * @param vpcConfiguration * Configuration information for an Amazon Virtual Private Cloud to connect to your Confluence. For more * information, see Configuring a VPC. * @return Returns a reference to this object so that method calls can be chained together. */ Builder vpcConfiguration(DataSourceVpcConfiguration vpcConfiguration); /** *

* Configuration information for an Amazon Virtual Private Cloud to connect to your Confluence. For more * information, see Configuring a * VPC. *

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

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

* A list of regular expression patterns to include certain blog posts, pages, spaces, or attachments in your * Confluence. Content that matches the patterns are included in the index. Content that doesn't match the * patterns is excluded from the index. If content matches both an inclusion and exclusion pattern, the * exclusion pattern takes precedence and the content isn't included in the index. *

* * @param inclusionPatterns * A list of regular expression patterns to include certain blog posts, pages, spaces, or attachments in * your Confluence. Content that matches the patterns are included in the index. Content that doesn't * match the patterns is excluded from the index. If content matches both an inclusion and exclusion * pattern, the exclusion pattern takes precedence and the content isn't included in the index. * @return Returns a reference to this object so that method calls can be chained together. */ Builder inclusionPatterns(Collection inclusionPatterns); /** *

* A list of regular expression patterns to include certain blog posts, pages, spaces, or attachments in your * Confluence. Content that matches the patterns are included in the index. Content that doesn't match the * patterns is excluded from the index. If content matches both an inclusion and exclusion pattern, the * exclusion pattern takes precedence and the content isn't included in the index. *

* * @param inclusionPatterns * A list of regular expression patterns to include certain blog posts, pages, spaces, or attachments in * your Confluence. Content that matches the patterns are included in the index. Content that doesn't * match the patterns is excluded from the index. If content matches both an inclusion and exclusion * pattern, the exclusion pattern takes precedence and the content isn't included in the index. * @return Returns a reference to this object so that method calls can be chained together. */ Builder inclusionPatterns(String... inclusionPatterns); /** *

* A list of regular expression patterns to exclude certain blog posts, pages, spaces, or attachments in your * Confluence. Content that matches the patterns are excluded from the index. Content that doesn't match the * patterns is included in the index. If content matches both an inclusion and exclusion pattern, the exclusion * pattern takes precedence and the content isn't included in the index. *

* * @param exclusionPatterns * A list of regular expression patterns to exclude certain blog posts, pages, spaces, or attachments in * your Confluence. Content that matches the patterns are excluded from the index. Content that doesn't * match the patterns is included in the index. If content matches both an inclusion and exclusion * pattern, the exclusion pattern takes precedence and the content isn't included in the index. * @return Returns a reference to this object so that method calls can be chained together. */ Builder exclusionPatterns(Collection exclusionPatterns); /** *

* A list of regular expression patterns to exclude certain blog posts, pages, spaces, or attachments in your * Confluence. Content that matches the patterns are excluded from the index. Content that doesn't match the * patterns is included in the index. If content matches both an inclusion and exclusion pattern, the exclusion * pattern takes precedence and the content isn't included in the index. *

* * @param exclusionPatterns * A list of regular expression patterns to exclude certain blog posts, pages, spaces, or attachments in * your Confluence. Content that matches the patterns are excluded from the index. Content that doesn't * match the patterns is included in the index. If content matches both an inclusion and exclusion * pattern, the exclusion pattern takes precedence and the content isn't included in the index. * @return Returns a reference to this object so that method calls can be chained together. */ Builder exclusionPatterns(String... exclusionPatterns); /** *

* Configuration information to connect to your Confluence URL instance via a web proxy. You can use this option * for Confluence Server. *

*

* You must provide the website host name and port number. For example, the host name of * https://a.example.com/page1.html is "a.example.com" and the port is 443, the standard port for HTTPS. *

*

* Web proxy credentials are optional and you can use them to connect to a web proxy server that requires basic * authentication of user name and password. To store web proxy credentials, you use a secret in Secrets * Manager. *

*

* It is recommended that you follow best security practices when configuring your web proxy. This includes * setting up throttling, setting up logging and monitoring, and applying security patches on a regular basis. * If you use your web proxy with multiple data sources, sync jobs that occur at the same time could strain the * load on your proxy. It is recommended you prepare your proxy beforehand for any security and load * requirements. *

* * @param proxyConfiguration * Configuration information to connect to your Confluence URL instance via a web proxy. You can use this * option for Confluence Server.

*

* You must provide the website host name and port number. For example, the host name of * https://a.example.com/page1.html is "a.example.com" and the port is 443, the standard port for * HTTPS. *

*

* Web proxy credentials are optional and you can use them to connect to a web proxy server that requires * basic authentication of user name and password. To store web proxy credentials, you use a secret in * Secrets Manager. *

*

* It is recommended that you follow best security practices when configuring your web proxy. This * includes setting up throttling, setting up logging and monitoring, and applying security patches on a * regular basis. If you use your web proxy with multiple data sources, sync jobs that occur at the same * time could strain the load on your proxy. It is recommended you prepare your proxy beforehand for any * security and load requirements. * @return Returns a reference to this object so that method calls can be chained together. */ Builder proxyConfiguration(ProxyConfiguration proxyConfiguration); /** *

* Configuration information to connect to your Confluence URL instance via a web proxy. You can use this option * for Confluence Server. *

*

* You must provide the website host name and port number. For example, the host name of * https://a.example.com/page1.html is "a.example.com" and the port is 443, the standard port for HTTPS. *

*

* Web proxy credentials are optional and you can use them to connect to a web proxy server that requires basic * authentication of user name and password. To store web proxy credentials, you use a secret in Secrets * Manager. *

*

* It is recommended that you follow best security practices when configuring your web proxy. This includes * setting up throttling, setting up logging and monitoring, and applying security patches on a regular basis. * If you use your web proxy with multiple data sources, sync jobs that occur at the same time could strain the * load on your proxy. It is recommended you prepare your proxy beforehand for any security and load * requirements. *

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

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

* Whether you want to connect to Confluence using basic authentication of user name and password, or a personal * access token. You can use a personal access token for Confluence Server. *

* * @param authenticationType * Whether you want to connect to Confluence using basic authentication of user name and password, or a * personal access token. You can use a personal access token for Confluence Server. * @see ConfluenceAuthenticationType * @return Returns a reference to this object so that method calls can be chained together. * @see ConfluenceAuthenticationType */ Builder authenticationType(String authenticationType); /** *

* Whether you want to connect to Confluence using basic authentication of user name and password, or a personal * access token. You can use a personal access token for Confluence Server. *

* * @param authenticationType * Whether you want to connect to Confluence using basic authentication of user name and password, or a * personal access token. You can use a personal access token for Confluence Server. * @see ConfluenceAuthenticationType * @return Returns a reference to this object so that method calls can be chained together. * @see ConfluenceAuthenticationType */ Builder authenticationType(ConfluenceAuthenticationType authenticationType); } static final class BuilderImpl implements Builder { private String serverUrl; private String secretArn; private String version; private ConfluenceSpaceConfiguration spaceConfiguration; private ConfluencePageConfiguration pageConfiguration; private ConfluenceBlogConfiguration blogConfiguration; private ConfluenceAttachmentConfiguration attachmentConfiguration; private DataSourceVpcConfiguration vpcConfiguration; private List inclusionPatterns = DefaultSdkAutoConstructList.getInstance(); private List exclusionPatterns = DefaultSdkAutoConstructList.getInstance(); private ProxyConfiguration proxyConfiguration; private String authenticationType; private BuilderImpl() { } private BuilderImpl(ConfluenceConfiguration model) { serverUrl(model.serverUrl); secretArn(model.secretArn); version(model.version); spaceConfiguration(model.spaceConfiguration); pageConfiguration(model.pageConfiguration); blogConfiguration(model.blogConfiguration); attachmentConfiguration(model.attachmentConfiguration); vpcConfiguration(model.vpcConfiguration); inclusionPatterns(model.inclusionPatterns); exclusionPatterns(model.exclusionPatterns); proxyConfiguration(model.proxyConfiguration); authenticationType(model.authenticationType); } public final String getServerUrl() { return serverUrl; } public final void setServerUrl(String serverUrl) { this.serverUrl = serverUrl; } @Override public final Builder serverUrl(String serverUrl) { this.serverUrl = serverUrl; return this; } public final String getSecretArn() { return secretArn; } public final void setSecretArn(String secretArn) { this.secretArn = secretArn; } @Override public final Builder secretArn(String secretArn) { this.secretArn = secretArn; return this; } public final String getVersion() { return version; } public final void setVersion(String version) { this.version = version; } @Override public final Builder version(String version) { this.version = version; return this; } @Override public final Builder version(ConfluenceVersion version) { this.version(version == null ? null : version.toString()); return this; } public final ConfluenceSpaceConfiguration.Builder getSpaceConfiguration() { return spaceConfiguration != null ? spaceConfiguration.toBuilder() : null; } public final void setSpaceConfiguration(ConfluenceSpaceConfiguration.BuilderImpl spaceConfiguration) { this.spaceConfiguration = spaceConfiguration != null ? spaceConfiguration.build() : null; } @Override public final Builder spaceConfiguration(ConfluenceSpaceConfiguration spaceConfiguration) { this.spaceConfiguration = spaceConfiguration; return this; } public final ConfluencePageConfiguration.Builder getPageConfiguration() { return pageConfiguration != null ? pageConfiguration.toBuilder() : null; } public final void setPageConfiguration(ConfluencePageConfiguration.BuilderImpl pageConfiguration) { this.pageConfiguration = pageConfiguration != null ? pageConfiguration.build() : null; } @Override public final Builder pageConfiguration(ConfluencePageConfiguration pageConfiguration) { this.pageConfiguration = pageConfiguration; return this; } public final ConfluenceBlogConfiguration.Builder getBlogConfiguration() { return blogConfiguration != null ? blogConfiguration.toBuilder() : null; } public final void setBlogConfiguration(ConfluenceBlogConfiguration.BuilderImpl blogConfiguration) { this.blogConfiguration = blogConfiguration != null ? blogConfiguration.build() : null; } @Override public final Builder blogConfiguration(ConfluenceBlogConfiguration blogConfiguration) { this.blogConfiguration = blogConfiguration; return this; } public final ConfluenceAttachmentConfiguration.Builder getAttachmentConfiguration() { return attachmentConfiguration != null ? attachmentConfiguration.toBuilder() : null; } public final void setAttachmentConfiguration(ConfluenceAttachmentConfiguration.BuilderImpl attachmentConfiguration) { this.attachmentConfiguration = attachmentConfiguration != null ? attachmentConfiguration.build() : null; } @Override public final Builder attachmentConfiguration(ConfluenceAttachmentConfiguration attachmentConfiguration) { this.attachmentConfiguration = attachmentConfiguration; return this; } public final DataSourceVpcConfiguration.Builder getVpcConfiguration() { return vpcConfiguration != null ? vpcConfiguration.toBuilder() : null; } public final void setVpcConfiguration(DataSourceVpcConfiguration.BuilderImpl vpcConfiguration) { this.vpcConfiguration = vpcConfiguration != null ? vpcConfiguration.build() : null; } @Override public final Builder vpcConfiguration(DataSourceVpcConfiguration vpcConfiguration) { this.vpcConfiguration = vpcConfiguration; return this; } public final Collection getInclusionPatterns() { if (inclusionPatterns instanceof SdkAutoConstructList) { return null; } return inclusionPatterns; } public final void setInclusionPatterns(Collection inclusionPatterns) { this.inclusionPatterns = DataSourceInclusionsExclusionsStringsCopier.copy(inclusionPatterns); } @Override public final Builder inclusionPatterns(Collection inclusionPatterns) { this.inclusionPatterns = DataSourceInclusionsExclusionsStringsCopier.copy(inclusionPatterns); return this; } @Override @SafeVarargs public final Builder inclusionPatterns(String... inclusionPatterns) { inclusionPatterns(Arrays.asList(inclusionPatterns)); return this; } public final Collection getExclusionPatterns() { if (exclusionPatterns instanceof SdkAutoConstructList) { return null; } return exclusionPatterns; } public final void setExclusionPatterns(Collection exclusionPatterns) { this.exclusionPatterns = DataSourceInclusionsExclusionsStringsCopier.copy(exclusionPatterns); } @Override public final Builder exclusionPatterns(Collection exclusionPatterns) { this.exclusionPatterns = DataSourceInclusionsExclusionsStringsCopier.copy(exclusionPatterns); return this; } @Override @SafeVarargs public final Builder exclusionPatterns(String... exclusionPatterns) { exclusionPatterns(Arrays.asList(exclusionPatterns)); return this; } public final ProxyConfiguration.Builder getProxyConfiguration() { return proxyConfiguration != null ? proxyConfiguration.toBuilder() : null; } public final void setProxyConfiguration(ProxyConfiguration.BuilderImpl proxyConfiguration) { this.proxyConfiguration = proxyConfiguration != null ? proxyConfiguration.build() : null; } @Override public final Builder proxyConfiguration(ProxyConfiguration proxyConfiguration) { this.proxyConfiguration = proxyConfiguration; return this; } public final String getAuthenticationType() { return authenticationType; } public final void setAuthenticationType(String authenticationType) { this.authenticationType = authenticationType; } @Override public final Builder authenticationType(String authenticationType) { this.authenticationType = authenticationType; return this; } @Override public final Builder authenticationType(ConfluenceAuthenticationType authenticationType) { this.authenticationType(authenticationType == null ? null : authenticationType.toString()); return this; } @Override public ConfluenceConfiguration build() { return new ConfluenceConfiguration(this); } @Override public List> sdkFields() { return SDK_FIELDS; } } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy