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

com.amazonaws.services.kendra.model.SalesforceKnowledgeArticleConfiguration Maven / Gradle / Ivy

Go to download

The AWS Java SDK for AWSKendraFrontend module holds the client classes that are used for communicating with AWSKendraFrontend Service

There is a newer version: 1.12.780
Show newest version
/*
 * 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 the knowledge article types that Amazon Kendra indexes. Amazon Kendra * indexes standard knowledge articles and the standard fields of knowledge articles, or the custom fields of custom * knowledge articles, but not both *

* * @see AWS API Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class SalesforceKnowledgeArticleConfiguration implements Serializable, Cloneable, StructuredPojo { /** *

* Specifies the document states that should be included when Amazon Kendra indexes knowledge articles. You must * specify at least one state. *

*/ private java.util.List includedStates; /** *

* Configuration information for standard Salesforce knowledge articles. *

*/ private SalesforceStandardKnowledgeArticleTypeConfiguration standardKnowledgeArticleTypeConfiguration; /** *

* Configuration information for custom Salesforce knowledge articles. *

*/ private java.util.List customKnowledgeArticleTypeConfigurations; /** *

* Specifies the document states that should be included when Amazon Kendra indexes knowledge articles. You must * specify at least one state. *

* * @return Specifies the document states that should be included when Amazon Kendra indexes knowledge articles. You * must specify at least one state. * @see SalesforceKnowledgeArticleState */ public java.util.List getIncludedStates() { return includedStates; } /** *

* Specifies the document states that should be included when Amazon Kendra indexes knowledge articles. You must * specify at least one state. *

* * @param includedStates * Specifies the document states that should be included when Amazon Kendra indexes knowledge articles. You * must specify at least one state. * @see SalesforceKnowledgeArticleState */ public void setIncludedStates(java.util.Collection includedStates) { if (includedStates == null) { this.includedStates = null; return; } this.includedStates = new java.util.ArrayList(includedStates); } /** *

* Specifies the document states that should be included when Amazon Kendra indexes knowledge articles. You must * specify at least one state. *

*

* NOTE: This method appends the values to the existing list (if any). Use * {@link #setIncludedStates(java.util.Collection)} or {@link #withIncludedStates(java.util.Collection)} if you want * to override the existing values. *

* * @param includedStates * Specifies the document states that should be included when Amazon Kendra indexes knowledge articles. You * must specify at least one state. * @return Returns a reference to this object so that method calls can be chained together. * @see SalesforceKnowledgeArticleState */ public SalesforceKnowledgeArticleConfiguration withIncludedStates(String... includedStates) { if (this.includedStates == null) { setIncludedStates(new java.util.ArrayList(includedStates.length)); } for (String ele : includedStates) { this.includedStates.add(ele); } return this; } /** *

* Specifies the document states that should be included when Amazon Kendra indexes knowledge articles. You must * specify at least one state. *

* * @param includedStates * Specifies the document states that should be included when Amazon Kendra indexes knowledge articles. You * must specify at least one state. * @return Returns a reference to this object so that method calls can be chained together. * @see SalesforceKnowledgeArticleState */ public SalesforceKnowledgeArticleConfiguration withIncludedStates(java.util.Collection includedStates) { setIncludedStates(includedStates); return this; } /** *

* Specifies the document states that should be included when Amazon Kendra indexes knowledge articles. You must * specify at least one state. *

* * @param includedStates * Specifies the document states that should be included when Amazon Kendra indexes knowledge articles. You * must specify at least one state. * @return Returns a reference to this object so that method calls can be chained together. * @see SalesforceKnowledgeArticleState */ public SalesforceKnowledgeArticleConfiguration withIncludedStates(SalesforceKnowledgeArticleState... includedStates) { java.util.ArrayList includedStatesCopy = new java.util.ArrayList(includedStates.length); for (SalesforceKnowledgeArticleState value : includedStates) { includedStatesCopy.add(value.toString()); } if (getIncludedStates() == null) { setIncludedStates(includedStatesCopy); } else { getIncludedStates().addAll(includedStatesCopy); } return this; } /** *

* Configuration information for standard Salesforce knowledge articles. *

* * @param standardKnowledgeArticleTypeConfiguration * Configuration information for standard Salesforce knowledge articles. */ public void setStandardKnowledgeArticleTypeConfiguration(SalesforceStandardKnowledgeArticleTypeConfiguration standardKnowledgeArticleTypeConfiguration) { this.standardKnowledgeArticleTypeConfiguration = standardKnowledgeArticleTypeConfiguration; } /** *

* Configuration information for standard Salesforce knowledge articles. *

* * @return Configuration information for standard Salesforce knowledge articles. */ public SalesforceStandardKnowledgeArticleTypeConfiguration getStandardKnowledgeArticleTypeConfiguration() { return this.standardKnowledgeArticleTypeConfiguration; } /** *

* Configuration information for standard Salesforce knowledge articles. *

* * @param standardKnowledgeArticleTypeConfiguration * Configuration information for standard Salesforce knowledge articles. * @return Returns a reference to this object so that method calls can be chained together. */ public SalesforceKnowledgeArticleConfiguration withStandardKnowledgeArticleTypeConfiguration( SalesforceStandardKnowledgeArticleTypeConfiguration standardKnowledgeArticleTypeConfiguration) { setStandardKnowledgeArticleTypeConfiguration(standardKnowledgeArticleTypeConfiguration); return this; } /** *

* Configuration information for custom Salesforce knowledge articles. *

* * @return Configuration information for custom Salesforce knowledge articles. */ public java.util.List getCustomKnowledgeArticleTypeConfigurations() { return customKnowledgeArticleTypeConfigurations; } /** *

* Configuration information for custom Salesforce knowledge articles. *

* * @param customKnowledgeArticleTypeConfigurations * Configuration information for custom Salesforce knowledge articles. */ public void setCustomKnowledgeArticleTypeConfigurations( java.util.Collection customKnowledgeArticleTypeConfigurations) { if (customKnowledgeArticleTypeConfigurations == null) { this.customKnowledgeArticleTypeConfigurations = null; return; } this.customKnowledgeArticleTypeConfigurations = new java.util.ArrayList( customKnowledgeArticleTypeConfigurations); } /** *

* Configuration information for custom Salesforce knowledge articles. *

*

* NOTE: This method appends the values to the existing list (if any). Use * {@link #setCustomKnowledgeArticleTypeConfigurations(java.util.Collection)} or * {@link #withCustomKnowledgeArticleTypeConfigurations(java.util.Collection)} if you want to override the existing * values. *

* * @param customKnowledgeArticleTypeConfigurations * Configuration information for custom Salesforce knowledge articles. * @return Returns a reference to this object so that method calls can be chained together. */ public SalesforceKnowledgeArticleConfiguration withCustomKnowledgeArticleTypeConfigurations( SalesforceCustomKnowledgeArticleTypeConfiguration... customKnowledgeArticleTypeConfigurations) { if (this.customKnowledgeArticleTypeConfigurations == null) { setCustomKnowledgeArticleTypeConfigurations(new java.util.ArrayList( customKnowledgeArticleTypeConfigurations.length)); } for (SalesforceCustomKnowledgeArticleTypeConfiguration ele : customKnowledgeArticleTypeConfigurations) { this.customKnowledgeArticleTypeConfigurations.add(ele); } return this; } /** *

* Configuration information for custom Salesforce knowledge articles. *

* * @param customKnowledgeArticleTypeConfigurations * Configuration information for custom Salesforce knowledge articles. * @return Returns a reference to this object so that method calls can be chained together. */ public SalesforceKnowledgeArticleConfiguration withCustomKnowledgeArticleTypeConfigurations( java.util.Collection customKnowledgeArticleTypeConfigurations) { setCustomKnowledgeArticleTypeConfigurations(customKnowledgeArticleTypeConfigurations); 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 (getIncludedStates() != null) sb.append("IncludedStates: ").append(getIncludedStates()).append(","); if (getStandardKnowledgeArticleTypeConfiguration() != null) sb.append("StandardKnowledgeArticleTypeConfiguration: ").append(getStandardKnowledgeArticleTypeConfiguration()).append(","); if (getCustomKnowledgeArticleTypeConfigurations() != null) sb.append("CustomKnowledgeArticleTypeConfigurations: ").append(getCustomKnowledgeArticleTypeConfigurations()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof SalesforceKnowledgeArticleConfiguration == false) return false; SalesforceKnowledgeArticleConfiguration other = (SalesforceKnowledgeArticleConfiguration) obj; if (other.getIncludedStates() == null ^ this.getIncludedStates() == null) return false; if (other.getIncludedStates() != null && other.getIncludedStates().equals(this.getIncludedStates()) == false) return false; if (other.getStandardKnowledgeArticleTypeConfiguration() == null ^ this.getStandardKnowledgeArticleTypeConfiguration() == null) return false; if (other.getStandardKnowledgeArticleTypeConfiguration() != null && other.getStandardKnowledgeArticleTypeConfiguration().equals(this.getStandardKnowledgeArticleTypeConfiguration()) == false) return false; if (other.getCustomKnowledgeArticleTypeConfigurations() == null ^ this.getCustomKnowledgeArticleTypeConfigurations() == null) return false; if (other.getCustomKnowledgeArticleTypeConfigurations() != null && other.getCustomKnowledgeArticleTypeConfigurations().equals(this.getCustomKnowledgeArticleTypeConfigurations()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getIncludedStates() == null) ? 0 : getIncludedStates().hashCode()); hashCode = prime * hashCode + ((getStandardKnowledgeArticleTypeConfiguration() == null) ? 0 : getStandardKnowledgeArticleTypeConfiguration().hashCode()); hashCode = prime * hashCode + ((getCustomKnowledgeArticleTypeConfigurations() == null) ? 0 : getCustomKnowledgeArticleTypeConfigurations().hashCode()); return hashCode; } @Override public SalesforceKnowledgeArticleConfiguration clone() { try { return (SalesforceKnowledgeArticleConfiguration) 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.SalesforceKnowledgeArticleConfigurationMarshaller.getInstance().marshall(this, protocolMarshaller); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy