com.amazonaws.services.kendra.model.ServiceNowServiceCatalogConfiguration 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;
/**
*
* Provides the configuration information for crawling service catalog items in the ServiceNow site
*
*
* @see AWS API Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class ServiceNowServiceCatalogConfiguration implements Serializable, Cloneable, StructuredPojo {
/**
*
* TRUE
to index attachments to service catalog items.
*
*/
private Boolean crawlAttachments;
/**
*
* A list of regular expression patterns to include certain attachments of catalogs in your ServiceNow. Item that
* match the patterns are included in the index. Items that don't match the patterns are excluded from the index. If
* an item matches both an inclusion and exclusion pattern, the exclusion pattern takes precedence and the item
* isn't included in the index.
*
*
* The regex is applied to the file name of the attachment.
*
*/
private java.util.List includeAttachmentFilePatterns;
/**
*
* A list of regular expression patterns to exclude certain attachments of catalogs in your ServiceNow. Item that
* match the patterns are excluded from the index. Items that don't match the patterns are included in the index. If
* an item matches both an inclusion and exclusion pattern, the exclusion pattern takes precedence and the item
* isn't included in the index.
*
*
* The regex is applied to the file name of the attachment.
*
*/
private java.util.List excludeAttachmentFilePatterns;
/**
*
* The name of the ServiceNow field that is mapped to the index document contents field in the Amazon Kendra index.
*
*/
private String documentDataFieldName;
/**
*
* The name of the ServiceNow field that is mapped to the index document title field.
*
*/
private String documentTitleFieldName;
/**
*
* Maps attributes or field names of catalogs to Amazon Kendra index field names. To create custom fields, use the
* UpdateIndex
API before you map to ServiceNow fields. For more information, see Mapping data source fields. The
* ServiceNow data source field names must exist in your ServiceNow custom metadata.
*
*/
private java.util.List fieldMappings;
/**
*
* TRUE
to index attachments to service catalog items.
*
*
* @param crawlAttachments
* TRUE
to index attachments to service catalog items.
*/
public void setCrawlAttachments(Boolean crawlAttachments) {
this.crawlAttachments = crawlAttachments;
}
/**
*
* TRUE
to index attachments to service catalog items.
*
*
* @return TRUE
to index attachments to service catalog items.
*/
public Boolean getCrawlAttachments() {
return this.crawlAttachments;
}
/**
*
* TRUE
to index attachments to service catalog items.
*
*
* @param crawlAttachments
* TRUE
to index attachments to service catalog items.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ServiceNowServiceCatalogConfiguration withCrawlAttachments(Boolean crawlAttachments) {
setCrawlAttachments(crawlAttachments);
return this;
}
/**
*
* TRUE
to index attachments to service catalog items.
*
*
* @return TRUE
to index attachments to service catalog items.
*/
public Boolean isCrawlAttachments() {
return this.crawlAttachments;
}
/**
*
* A list of regular expression patterns to include certain attachments of catalogs in your ServiceNow. Item that
* match the patterns are included in the index. Items that don't match the patterns are excluded from the index. If
* an item matches both an inclusion and exclusion pattern, the exclusion pattern takes precedence and the item
* isn't included in the index.
*
*
* The regex is applied to the file name of the attachment.
*
*
* @return A list of regular expression patterns to include certain attachments of catalogs in your ServiceNow. Item
* that match the patterns are included in the index. Items that don't match the patterns are excluded from
* the index. If an item matches both an inclusion and exclusion pattern, the exclusion pattern takes
* precedence and the item isn't included in the index.
*
* The regex is applied to the file name of the attachment.
*/
public java.util.List getIncludeAttachmentFilePatterns() {
return includeAttachmentFilePatterns;
}
/**
*
* A list of regular expression patterns to include certain attachments of catalogs in your ServiceNow. Item that
* match the patterns are included in the index. Items that don't match the patterns are excluded from the index. If
* an item matches both an inclusion and exclusion pattern, the exclusion pattern takes precedence and the item
* isn't included in the index.
*
*
* The regex is applied to the file name of the attachment.
*
*
* @param includeAttachmentFilePatterns
* A list of regular expression patterns to include certain attachments of catalogs in your ServiceNow. Item
* that match the patterns are included in the index. Items that don't match the patterns are excluded from
* the index. If an item matches both an inclusion and exclusion pattern, the exclusion pattern takes
* precedence and the item isn't included in the index.
*
* The regex is applied to the file name of the attachment.
*/
public void setIncludeAttachmentFilePatterns(java.util.Collection includeAttachmentFilePatterns) {
if (includeAttachmentFilePatterns == null) {
this.includeAttachmentFilePatterns = null;
return;
}
this.includeAttachmentFilePatterns = new java.util.ArrayList(includeAttachmentFilePatterns);
}
/**
*
* A list of regular expression patterns to include certain attachments of catalogs in your ServiceNow. Item that
* match the patterns are included in the index. Items that don't match the patterns are excluded from the index. If
* an item matches both an inclusion and exclusion pattern, the exclusion pattern takes precedence and the item
* isn't included in the index.
*
*
* The regex is applied to the file name of the attachment.
*
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setIncludeAttachmentFilePatterns(java.util.Collection)} or
* {@link #withIncludeAttachmentFilePatterns(java.util.Collection)} if you want to override the existing values.
*
*
* @param includeAttachmentFilePatterns
* A list of regular expression patterns to include certain attachments of catalogs in your ServiceNow. Item
* that match the patterns are included in the index. Items that don't match the patterns are excluded from
* the index. If an item matches both an inclusion and exclusion pattern, the exclusion pattern takes
* precedence and the item isn't included in the index.
*
* The regex is applied to the file name of the attachment.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ServiceNowServiceCatalogConfiguration withIncludeAttachmentFilePatterns(String... includeAttachmentFilePatterns) {
if (this.includeAttachmentFilePatterns == null) {
setIncludeAttachmentFilePatterns(new java.util.ArrayList(includeAttachmentFilePatterns.length));
}
for (String ele : includeAttachmentFilePatterns) {
this.includeAttachmentFilePatterns.add(ele);
}
return this;
}
/**
*
* A list of regular expression patterns to include certain attachments of catalogs in your ServiceNow. Item that
* match the patterns are included in the index. Items that don't match the patterns are excluded from the index. If
* an item matches both an inclusion and exclusion pattern, the exclusion pattern takes precedence and the item
* isn't included in the index.
*
*
* The regex is applied to the file name of the attachment.
*
*
* @param includeAttachmentFilePatterns
* A list of regular expression patterns to include certain attachments of catalogs in your ServiceNow. Item
* that match the patterns are included in the index. Items that don't match the patterns are excluded from
* the index. If an item matches both an inclusion and exclusion pattern, the exclusion pattern takes
* precedence and the item isn't included in the index.
*
* The regex is applied to the file name of the attachment.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ServiceNowServiceCatalogConfiguration withIncludeAttachmentFilePatterns(java.util.Collection includeAttachmentFilePatterns) {
setIncludeAttachmentFilePatterns(includeAttachmentFilePatterns);
return this;
}
/**
*
* A list of regular expression patterns to exclude certain attachments of catalogs in your ServiceNow. Item that
* match the patterns are excluded from the index. Items that don't match the patterns are included in the index. If
* an item matches both an inclusion and exclusion pattern, the exclusion pattern takes precedence and the item
* isn't included in the index.
*
*
* The regex is applied to the file name of the attachment.
*
*
* @return A list of regular expression patterns to exclude certain attachments of catalogs in your ServiceNow. Item
* that match the patterns are excluded from the index. Items that don't match the patterns are included in
* the index. If an item matches both an inclusion and exclusion pattern, the exclusion pattern takes
* precedence and the item isn't included in the index.
*
* The regex is applied to the file name of the attachment.
*/
public java.util.List getExcludeAttachmentFilePatterns() {
return excludeAttachmentFilePatterns;
}
/**
*
* A list of regular expression patterns to exclude certain attachments of catalogs in your ServiceNow. Item that
* match the patterns are excluded from the index. Items that don't match the patterns are included in the index. If
* an item matches both an inclusion and exclusion pattern, the exclusion pattern takes precedence and the item
* isn't included in the index.
*
*
* The regex is applied to the file name of the attachment.
*
*
* @param excludeAttachmentFilePatterns
* A list of regular expression patterns to exclude certain attachments of catalogs in your ServiceNow. Item
* that match the patterns are excluded from the index. Items that don't match the patterns are included in
* the index. If an item matches both an inclusion and exclusion pattern, the exclusion pattern takes
* precedence and the item isn't included in the index.
*
* The regex is applied to the file name of the attachment.
*/
public void setExcludeAttachmentFilePatterns(java.util.Collection excludeAttachmentFilePatterns) {
if (excludeAttachmentFilePatterns == null) {
this.excludeAttachmentFilePatterns = null;
return;
}
this.excludeAttachmentFilePatterns = new java.util.ArrayList(excludeAttachmentFilePatterns);
}
/**
*
* A list of regular expression patterns to exclude certain attachments of catalogs in your ServiceNow. Item that
* match the patterns are excluded from the index. Items that don't match the patterns are included in the index. If
* an item matches both an inclusion and exclusion pattern, the exclusion pattern takes precedence and the item
* isn't included in the index.
*
*
* The regex is applied to the file name of the attachment.
*
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setExcludeAttachmentFilePatterns(java.util.Collection)} or
* {@link #withExcludeAttachmentFilePatterns(java.util.Collection)} if you want to override the existing values.
*
*
* @param excludeAttachmentFilePatterns
* A list of regular expression patterns to exclude certain attachments of catalogs in your ServiceNow. Item
* that match the patterns are excluded from the index. Items that don't match the patterns are included in
* the index. If an item matches both an inclusion and exclusion pattern, the exclusion pattern takes
* precedence and the item isn't included in the index.
*
* The regex is applied to the file name of the attachment.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ServiceNowServiceCatalogConfiguration withExcludeAttachmentFilePatterns(String... excludeAttachmentFilePatterns) {
if (this.excludeAttachmentFilePatterns == null) {
setExcludeAttachmentFilePatterns(new java.util.ArrayList(excludeAttachmentFilePatterns.length));
}
for (String ele : excludeAttachmentFilePatterns) {
this.excludeAttachmentFilePatterns.add(ele);
}
return this;
}
/**
*
* A list of regular expression patterns to exclude certain attachments of catalogs in your ServiceNow. Item that
* match the patterns are excluded from the index. Items that don't match the patterns are included in the index. If
* an item matches both an inclusion and exclusion pattern, the exclusion pattern takes precedence and the item
* isn't included in the index.
*
*
* The regex is applied to the file name of the attachment.
*
*
* @param excludeAttachmentFilePatterns
* A list of regular expression patterns to exclude certain attachments of catalogs in your ServiceNow. Item
* that match the patterns are excluded from the index. Items that don't match the patterns are included in
* the index. If an item matches both an inclusion and exclusion pattern, the exclusion pattern takes
* precedence and the item isn't included in the index.
*
* The regex is applied to the file name of the attachment.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ServiceNowServiceCatalogConfiguration withExcludeAttachmentFilePatterns(java.util.Collection excludeAttachmentFilePatterns) {
setExcludeAttachmentFilePatterns(excludeAttachmentFilePatterns);
return this;
}
/**
*
* The name of the ServiceNow field that is mapped to the index document contents field in the Amazon Kendra index.
*
*
* @param documentDataFieldName
* The name of the ServiceNow field that is mapped to the index document contents field in the Amazon Kendra
* index.
*/
public void setDocumentDataFieldName(String documentDataFieldName) {
this.documentDataFieldName = documentDataFieldName;
}
/**
*
* The name of the ServiceNow field that is mapped to the index document contents field in the Amazon Kendra index.
*
*
* @return The name of the ServiceNow field that is mapped to the index document contents field in the Amazon Kendra
* index.
*/
public String getDocumentDataFieldName() {
return this.documentDataFieldName;
}
/**
*
* The name of the ServiceNow field that is mapped to the index document contents field in the Amazon Kendra index.
*
*
* @param documentDataFieldName
* The name of the ServiceNow field that is mapped to the index document contents field in the Amazon Kendra
* index.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ServiceNowServiceCatalogConfiguration withDocumentDataFieldName(String documentDataFieldName) {
setDocumentDataFieldName(documentDataFieldName);
return this;
}
/**
*
* The name of the ServiceNow field that is mapped to the index document title field.
*
*
* @param documentTitleFieldName
* The name of the ServiceNow field that is mapped to the index document title field.
*/
public void setDocumentTitleFieldName(String documentTitleFieldName) {
this.documentTitleFieldName = documentTitleFieldName;
}
/**
*
* The name of the ServiceNow field that is mapped to the index document title field.
*
*
* @return The name of the ServiceNow field that is mapped to the index document title field.
*/
public String getDocumentTitleFieldName() {
return this.documentTitleFieldName;
}
/**
*
* The name of the ServiceNow field that is mapped to the index document title field.
*
*
* @param documentTitleFieldName
* The name of the ServiceNow field that is mapped to the index document title field.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ServiceNowServiceCatalogConfiguration withDocumentTitleFieldName(String documentTitleFieldName) {
setDocumentTitleFieldName(documentTitleFieldName);
return this;
}
/**
*
* Maps attributes or field names of catalogs to Amazon Kendra index field names. To create custom fields, use the
* UpdateIndex
API before you map to ServiceNow fields. For more information, see Mapping data source fields. The
* ServiceNow data source field names must exist in your ServiceNow custom metadata.
*
*
* @return Maps attributes or field names of catalogs to Amazon Kendra index field names. To create custom fields,
* use the UpdateIndex
API before you map to ServiceNow fields. For more information, see Mapping data source fields.
* The ServiceNow data source field names must exist in your ServiceNow custom metadata.
*/
public java.util.List getFieldMappings() {
return fieldMappings;
}
/**
*
* Maps attributes or field names of catalogs to Amazon Kendra index field names. To create custom fields, use the
* UpdateIndex
API before you map to ServiceNow fields. For more information, see Mapping data source fields. The
* ServiceNow data source field names must exist in your ServiceNow custom metadata.
*
*
* @param fieldMappings
* Maps attributes or field names of catalogs to Amazon Kendra index field names. To create custom fields,
* use the UpdateIndex
API before you map to ServiceNow fields. For more information, see Mapping data source fields. The
* ServiceNow data source field names must exist in your ServiceNow custom metadata.
*/
public void setFieldMappings(java.util.Collection fieldMappings) {
if (fieldMappings == null) {
this.fieldMappings = null;
return;
}
this.fieldMappings = new java.util.ArrayList(fieldMappings);
}
/**
*
* Maps attributes or field names of catalogs to Amazon Kendra index field names. To create custom fields, use the
* UpdateIndex
API before you map to ServiceNow fields. For more information, see Mapping data source fields. The
* ServiceNow data source field names must exist in your ServiceNow custom metadata.
*
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setFieldMappings(java.util.Collection)} or {@link #withFieldMappings(java.util.Collection)} if you want
* to override the existing values.
*
*
* @param fieldMappings
* Maps attributes or field names of catalogs to Amazon Kendra index field names. To create custom fields,
* use the UpdateIndex
API before you map to ServiceNow fields. For more information, see Mapping data source fields. The
* ServiceNow data source field names must exist in your ServiceNow custom metadata.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ServiceNowServiceCatalogConfiguration withFieldMappings(DataSourceToIndexFieldMapping... fieldMappings) {
if (this.fieldMappings == null) {
setFieldMappings(new java.util.ArrayList(fieldMappings.length));
}
for (DataSourceToIndexFieldMapping ele : fieldMappings) {
this.fieldMappings.add(ele);
}
return this;
}
/**
*
* Maps attributes or field names of catalogs to Amazon Kendra index field names. To create custom fields, use the
* UpdateIndex
API before you map to ServiceNow fields. For more information, see Mapping data source fields. The
* ServiceNow data source field names must exist in your ServiceNow custom metadata.
*
*
* @param fieldMappings
* Maps attributes or field names of catalogs to Amazon Kendra index field names. To create custom fields,
* use the UpdateIndex
API before you map to ServiceNow fields. For more information, see Mapping data source fields. The
* ServiceNow data source field names must exist in your ServiceNow custom metadata.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ServiceNowServiceCatalogConfiguration withFieldMappings(java.util.Collection fieldMappings) {
setFieldMappings(fieldMappings);
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 (getCrawlAttachments() != null)
sb.append("CrawlAttachments: ").append(getCrawlAttachments()).append(",");
if (getIncludeAttachmentFilePatterns() != null)
sb.append("IncludeAttachmentFilePatterns: ").append(getIncludeAttachmentFilePatterns()).append(",");
if (getExcludeAttachmentFilePatterns() != null)
sb.append("ExcludeAttachmentFilePatterns: ").append(getExcludeAttachmentFilePatterns()).append(",");
if (getDocumentDataFieldName() != null)
sb.append("DocumentDataFieldName: ").append(getDocumentDataFieldName()).append(",");
if (getDocumentTitleFieldName() != null)
sb.append("DocumentTitleFieldName: ").append(getDocumentTitleFieldName()).append(",");
if (getFieldMappings() != null)
sb.append("FieldMappings: ").append(getFieldMappings());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof ServiceNowServiceCatalogConfiguration == false)
return false;
ServiceNowServiceCatalogConfiguration other = (ServiceNowServiceCatalogConfiguration) obj;
if (other.getCrawlAttachments() == null ^ this.getCrawlAttachments() == null)
return false;
if (other.getCrawlAttachments() != null && other.getCrawlAttachments().equals(this.getCrawlAttachments()) == false)
return false;
if (other.getIncludeAttachmentFilePatterns() == null ^ this.getIncludeAttachmentFilePatterns() == null)
return false;
if (other.getIncludeAttachmentFilePatterns() != null
&& other.getIncludeAttachmentFilePatterns().equals(this.getIncludeAttachmentFilePatterns()) == false)
return false;
if (other.getExcludeAttachmentFilePatterns() == null ^ this.getExcludeAttachmentFilePatterns() == null)
return false;
if (other.getExcludeAttachmentFilePatterns() != null
&& other.getExcludeAttachmentFilePatterns().equals(this.getExcludeAttachmentFilePatterns()) == false)
return false;
if (other.getDocumentDataFieldName() == null ^ this.getDocumentDataFieldName() == null)
return false;
if (other.getDocumentDataFieldName() != null && other.getDocumentDataFieldName().equals(this.getDocumentDataFieldName()) == false)
return false;
if (other.getDocumentTitleFieldName() == null ^ this.getDocumentTitleFieldName() == null)
return false;
if (other.getDocumentTitleFieldName() != null && other.getDocumentTitleFieldName().equals(this.getDocumentTitleFieldName()) == false)
return false;
if (other.getFieldMappings() == null ^ this.getFieldMappings() == null)
return false;
if (other.getFieldMappings() != null && other.getFieldMappings().equals(this.getFieldMappings()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getCrawlAttachments() == null) ? 0 : getCrawlAttachments().hashCode());
hashCode = prime * hashCode + ((getIncludeAttachmentFilePatterns() == null) ? 0 : getIncludeAttachmentFilePatterns().hashCode());
hashCode = prime * hashCode + ((getExcludeAttachmentFilePatterns() == null) ? 0 : getExcludeAttachmentFilePatterns().hashCode());
hashCode = prime * hashCode + ((getDocumentDataFieldName() == null) ? 0 : getDocumentDataFieldName().hashCode());
hashCode = prime * hashCode + ((getDocumentTitleFieldName() == null) ? 0 : getDocumentTitleFieldName().hashCode());
hashCode = prime * hashCode + ((getFieldMappings() == null) ? 0 : getFieldMappings().hashCode());
return hashCode;
}
@Override
public ServiceNowServiceCatalogConfiguration clone() {
try {
return (ServiceNowServiceCatalogConfiguration) 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.ServiceNowServiceCatalogConfigurationMarshaller.getInstance().marshall(this, protocolMarshaller);
}
}