/* * Copyright 2018-2023 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; /** *
* Updates the configuration information for the document fields/attributes that you want to base query suggestions on. *
*
* To deactivate using documents fields for query suggestions, set the mode to INACTIVE
. You must also set
* SuggestionTypes
as either QUERY
or DOCUMENT_ATTRIBUTES
and then call GetQuerySuggestions. If you set
* to QUERY
, then Amazon Kendra uses the query history to base suggestions on. If you set to
* DOCUMENT_ATTRIBUTES
, then Amazon Kendra uses the contents of document fields to base suggestions on.
*
* The list of fields/attributes that you want to set as suggestible for query suggestions. *
*/ private java.util.List
* You can set the mode to ACTIVE
or INACTIVE
. You must also set
* SuggestionTypes
as either QUERY
or DOCUMENT_ATTRIBUTES
and then call GetQuerySuggestions. If
* Mode
to use query history is set to ENABLED
when calling UpdateQuerySuggestionsConfig and AttributeSuggestionsMode
to use fields/attributes is set to
* ACTIVE
, and you haven't set your SuggestionTypes
preference to
* DOCUMENT_ATTRIBUTES
, then Amazon Kendra uses the query history.
*
* The list of fields/attributes that you want to set as suggestible for query suggestions. *
* * @return The list of fields/attributes that you want to set as suggestible for query suggestions. */ public java.util.List* The list of fields/attributes that you want to set as suggestible for query suggestions. *
* * @param suggestableConfigList * The list of fields/attributes that you want to set as suggestible for query suggestions. */ public void setSuggestableConfigList(java.util.Collection* The list of fields/attributes that you want to set as suggestible for query suggestions. *
** NOTE: This method appends the values to the existing list (if any). Use * {@link #setSuggestableConfigList(java.util.Collection)} or * {@link #withSuggestableConfigList(java.util.Collection)} if you want to override the existing values. *
* * @param suggestableConfigList * The list of fields/attributes that you want to set as suggestible for query suggestions. * @return Returns a reference to this object so that method calls can be chained together. */ public AttributeSuggestionsUpdateConfig withSuggestableConfigList(SuggestableConfig... suggestableConfigList) { if (this.suggestableConfigList == null) { setSuggestableConfigList(new java.util.ArrayList* The list of fields/attributes that you want to set as suggestible for query suggestions. *
* * @param suggestableConfigList * The list of fields/attributes that you want to set as suggestible for query suggestions. * @return Returns a reference to this object so that method calls can be chained together. */ public AttributeSuggestionsUpdateConfig withSuggestableConfigList(java.util.Collection
* You can set the mode to ACTIVE
or INACTIVE
. You must also set
* SuggestionTypes
as either QUERY
or DOCUMENT_ATTRIBUTES
and then call GetQuerySuggestions. If
* Mode
to use query history is set to ENABLED
when calling UpdateQuerySuggestionsConfig and AttributeSuggestionsMode
to use fields/attributes is set to
* ACTIVE
, and you haven't set your SuggestionTypes
preference to
* DOCUMENT_ATTRIBUTES
, then Amazon Kendra uses the query history.
*
ACTIVE
or INACTIVE
. You must also set
* SuggestionTypes
as either QUERY
or DOCUMENT_ATTRIBUTES
and then
* call GetQuerySuggestions.
* If Mode
to use query history is set to ENABLED
when calling UpdateQuerySuggestionsConfig and AttributeSuggestionsMode
to use fields/attributes is
* set to ACTIVE
, and you haven't set your SuggestionTypes
preference to
* DOCUMENT_ATTRIBUTES
, then Amazon Kendra uses the query history.
* @see AttributeSuggestionsMode
*/
public void setAttributeSuggestionsMode(String attributeSuggestionsMode) {
this.attributeSuggestionsMode = attributeSuggestionsMode;
}
/**
*
* You can set the mode to ACTIVE
or INACTIVE
. You must also set
* SuggestionTypes
as either QUERY
or DOCUMENT_ATTRIBUTES
and then call GetQuerySuggestions. If
* Mode
to use query history is set to ENABLED
when calling UpdateQuerySuggestionsConfig and AttributeSuggestionsMode
to use fields/attributes is set to
* ACTIVE
, and you haven't set your SuggestionTypes
preference to
* DOCUMENT_ATTRIBUTES
, then Amazon Kendra uses the query history.
*
ACTIVE
or INACTIVE
. You must also set
* SuggestionTypes
as either QUERY
or DOCUMENT_ATTRIBUTES
and then
* call GetQuerySuggestions.
* If Mode
to use query history is set to ENABLED
when calling UpdateQuerySuggestionsConfig and AttributeSuggestionsMode
to use fields/attributes is
* set to ACTIVE
, and you haven't set your SuggestionTypes
preference to
* DOCUMENT_ATTRIBUTES
, then Amazon Kendra uses the query history.
* @see AttributeSuggestionsMode
*/
public String getAttributeSuggestionsMode() {
return this.attributeSuggestionsMode;
}
/**
*
* You can set the mode to ACTIVE
or INACTIVE
. You must also set
* SuggestionTypes
as either QUERY
or DOCUMENT_ATTRIBUTES
and then call GetQuerySuggestions. If
* Mode
to use query history is set to ENABLED
when calling UpdateQuerySuggestionsConfig and AttributeSuggestionsMode
to use fields/attributes is set to
* ACTIVE
, and you haven't set your SuggestionTypes
preference to
* DOCUMENT_ATTRIBUTES
, then Amazon Kendra uses the query history.
*
ACTIVE
or INACTIVE
. You must also set
* SuggestionTypes
as either QUERY
or DOCUMENT_ATTRIBUTES
and then
* call GetQuerySuggestions.
* If Mode
to use query history is set to ENABLED
when calling UpdateQuerySuggestionsConfig and AttributeSuggestionsMode
to use fields/attributes is
* set to ACTIVE
, and you haven't set your SuggestionTypes
preference to
* DOCUMENT_ATTRIBUTES
, then Amazon Kendra uses the query history.
* @return Returns a reference to this object so that method calls can be chained together.
* @see AttributeSuggestionsMode
*/
public AttributeSuggestionsUpdateConfig withAttributeSuggestionsMode(String attributeSuggestionsMode) {
setAttributeSuggestionsMode(attributeSuggestionsMode);
return this;
}
/**
*
* You can set the mode to ACTIVE
or INACTIVE
. You must also set
* SuggestionTypes
as either QUERY
or DOCUMENT_ATTRIBUTES
and then call GetQuerySuggestions. If
* Mode
to use query history is set to ENABLED
when calling UpdateQuerySuggestionsConfig and AttributeSuggestionsMode
to use fields/attributes is set to
* ACTIVE
, and you haven't set your SuggestionTypes
preference to
* DOCUMENT_ATTRIBUTES
, then Amazon Kendra uses the query history.
*
ACTIVE
or INACTIVE
. You must also set
* SuggestionTypes
as either QUERY
or DOCUMENT_ATTRIBUTES
and then
* call GetQuerySuggestions.
* If Mode
to use query history is set to ENABLED
when calling UpdateQuerySuggestionsConfig and AttributeSuggestionsMode
to use fields/attributes is
* set to ACTIVE
, and you haven't set your SuggestionTypes
preference to
* DOCUMENT_ATTRIBUTES
, then Amazon Kendra uses the query history.
* @return Returns a reference to this object so that method calls can be chained together.
* @see AttributeSuggestionsMode
*/
public AttributeSuggestionsUpdateConfig withAttributeSuggestionsMode(AttributeSuggestionsMode attributeSuggestionsMode) {
this.attributeSuggestionsMode = attributeSuggestionsMode.toString();
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 (getSuggestableConfigList() != null)
sb.append("SuggestableConfigList: ").append(getSuggestableConfigList()).append(",");
if (getAttributeSuggestionsMode() != null)
sb.append("AttributeSuggestionsMode: ").append(getAttributeSuggestionsMode());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof AttributeSuggestionsUpdateConfig == false)
return false;
AttributeSuggestionsUpdateConfig other = (AttributeSuggestionsUpdateConfig) obj;
if (other.getSuggestableConfigList() == null ^ this.getSuggestableConfigList() == null)
return false;
if (other.getSuggestableConfigList() != null && other.getSuggestableConfigList().equals(this.getSuggestableConfigList()) == false)
return false;
if (other.getAttributeSuggestionsMode() == null ^ this.getAttributeSuggestionsMode() == null)
return false;
if (other.getAttributeSuggestionsMode() != null && other.getAttributeSuggestionsMode().equals(this.getAttributeSuggestionsMode()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getSuggestableConfigList() == null) ? 0 : getSuggestableConfigList().hashCode());
hashCode = prime * hashCode + ((getAttributeSuggestionsMode() == null) ? 0 : getAttributeSuggestionsMode().hashCode());
return hashCode;
}
@Override
public AttributeSuggestionsUpdateConfig clone() {
try {
return (AttributeSuggestionsUpdateConfig) 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.AttributeSuggestionsUpdateConfigMarshaller.getInstance().marshall(this, protocolMarshaller);
}
}