com.amazonaws.services.kendra.model.ConfluenceBlogConfiguration Maven / Gradle / Ivy
Show all versions of aws-java-sdk-kendra Show documentation
/*
* Copyright 2019-2024 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 com.amazonaws.services.kendra.model;
import java.io.Serializable;
import javax.annotation.Generated;
import com.amazonaws.protocol.StructuredPojo;
import com.amazonaws.protocol.ProtocolMarshaller;
/**
*
* Configuration of blog settings for the Confluence data source. Blogs are always indexed unless filtered from the
* index by the ExclusionPatterns
or InclusionPatterns
fields in the
* ConfluenceConfiguration
object.
*
*
* @see AWS
* API Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class ConfluenceBlogConfiguration implements Serializable, Cloneable, StructuredPojo {
/**
*
* Maps attributes or field names of Confluence blogs to Amazon Kendra index field names. To create custom fields,
* use the UpdateIndex
API before you map to Confluence fields. For more information, see Mapping data source fields. The
* Confluence data source field names must exist in your Confluence custom metadata.
*
*
* If you specify the BlogFieldMappings
parameter, you must specify at least one field mapping.
*
*/
private java.util.List blogFieldMappings;
/**
*
* Maps attributes or field names of Confluence blogs to Amazon Kendra index field names. To create custom fields,
* use the UpdateIndex
API before you map to Confluence fields. For more information, see Mapping data source fields. The
* Confluence data source field names must exist in your Confluence custom metadata.
*
*
* If you specify the BlogFieldMappings
parameter, you must specify at least one field mapping.
*
*
* @return Maps attributes or field names of Confluence blogs to Amazon Kendra index field names. To create custom
* fields, use the UpdateIndex
API before you map to Confluence fields. For more information,
* see Mapping data source
* fields. The Confluence data source field names must exist in your Confluence custom metadata.
*
* If you specify the BlogFieldMappings
parameter, you must specify at least one field mapping.
*/
public java.util.List getBlogFieldMappings() {
return blogFieldMappings;
}
/**
*
* Maps attributes or field names of Confluence blogs to Amazon Kendra index field names. To create custom fields,
* use the UpdateIndex
API before you map to Confluence fields. For more information, see Mapping data source fields. The
* Confluence data source field names must exist in your Confluence custom metadata.
*
*
* If you specify the BlogFieldMappings
parameter, you must specify at least one field mapping.
*
*
* @param blogFieldMappings
* Maps attributes or field names of Confluence blogs to Amazon Kendra index field names. To create custom
* fields, use the UpdateIndex
API before you map to Confluence fields. For more information,
* see Mapping data source
* fields. The Confluence data source field names must exist in your Confluence custom metadata.
*
* If you specify the BlogFieldMappings
parameter, you must specify at least one field mapping.
*/
public void setBlogFieldMappings(java.util.Collection blogFieldMappings) {
if (blogFieldMappings == null) {
this.blogFieldMappings = null;
return;
}
this.blogFieldMappings = new java.util.ArrayList(blogFieldMappings);
}
/**
*
* Maps attributes or field names of Confluence blogs to Amazon Kendra index field names. To create custom fields,
* use the UpdateIndex
API before you map to Confluence fields. For more information, see Mapping data source fields. The
* Confluence data source field names must exist in your Confluence custom metadata.
*
*
* If you specify the BlogFieldMappings
parameter, you must specify at least one field mapping.
*
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setBlogFieldMappings(java.util.Collection)} or {@link #withBlogFieldMappings(java.util.Collection)} if
* you want to override the existing values.
*
*
* @param blogFieldMappings
* Maps attributes or field names of Confluence blogs to Amazon Kendra index field names. To create custom
* fields, use the UpdateIndex
API before you map to Confluence fields. For more information,
* see Mapping data source
* fields. The Confluence data source field names must exist in your Confluence custom metadata.
*
* If you specify the BlogFieldMappings
parameter, you must specify at least one field mapping.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ConfluenceBlogConfiguration withBlogFieldMappings(ConfluenceBlogToIndexFieldMapping... blogFieldMappings) {
if (this.blogFieldMappings == null) {
setBlogFieldMappings(new java.util.ArrayList(blogFieldMappings.length));
}
for (ConfluenceBlogToIndexFieldMapping ele : blogFieldMappings) {
this.blogFieldMappings.add(ele);
}
return this;
}
/**
*
* Maps attributes or field names of Confluence blogs to Amazon Kendra index field names. To create custom fields,
* use the UpdateIndex
API before you map to Confluence fields. For more information, see Mapping data source fields. The
* Confluence data source field names must exist in your Confluence custom metadata.
*
*
* If you specify the BlogFieldMappings
parameter, you must specify at least one field mapping.
*
*
* @param blogFieldMappings
* Maps attributes or field names of Confluence blogs to Amazon Kendra index field names. To create custom
* fields, use the UpdateIndex
API before you map to Confluence fields. For more information,
* see Mapping data source
* fields. The Confluence data source field names must exist in your Confluence custom metadata.
*
* If you specify the BlogFieldMappings
parameter, you must specify at least one field mapping.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ConfluenceBlogConfiguration withBlogFieldMappings(java.util.Collection blogFieldMappings) {
setBlogFieldMappings(blogFieldMappings);
return this;
}
/**
* 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.
*
* @return A string representation of this object.
*
* @see java.lang.Object#toString()
*/
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("{");
if (getBlogFieldMappings() != null)
sb.append("BlogFieldMappings: ").append(getBlogFieldMappings());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof ConfluenceBlogConfiguration == false)
return false;
ConfluenceBlogConfiguration other = (ConfluenceBlogConfiguration) obj;
if (other.getBlogFieldMappings() == null ^ this.getBlogFieldMappings() == null)
return false;
if (other.getBlogFieldMappings() != null && other.getBlogFieldMappings().equals(this.getBlogFieldMappings()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getBlogFieldMappings() == null) ? 0 : getBlogFieldMappings().hashCode());
return hashCode;
}
@Override
public ConfluenceBlogConfiguration clone() {
try {
return (ConfluenceBlogConfiguration) super.clone();
} catch (CloneNotSupportedException e) {
throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e);
}
}
@com.amazonaws.annotation.SdkInternalApi
@Override
public void marshall(ProtocolMarshaller protocolMarshaller) {
com.amazonaws.services.kendra.model.transform.ConfluenceBlogConfigurationMarshaller.getInstance().marshall(this, protocolMarshaller);
}
}