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

com.amazonaws.services.kendra.model.DocumentAttributeTarget 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;

/**
 * 

* The target document attribute or metadata field you want to alter when ingesting documents into Amazon Kendra. *

*

* For example, you can delete customer identification numbers associated with the documents, stored in the document * metadata field called 'Customer_ID'. You set the target key as 'Customer_ID' and the deletion flag to * TRUE. This removes all customer ID values in the field 'Customer_ID'. This would scrub personally * identifiable information from each document's metadata. *

*

* Amazon Kendra cannot create a target field if it has not already been created as an index field. After you create * your index field, you can create a document metadata field using DocumentAttributeTarget. Amazon Kendra * then will map your newly created metadata field to your index field. *

*

* You can also use this with * DocumentAttributeCondition. *

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

* The identifier of the target document attribute or metadata field. *

*

* For example, 'Department' could be an identifier for the target attribute or metadata field that includes the * department names associated with the documents. *

*/ private String targetDocumentAttributeKey; /** *

* TRUE to delete the existing target value for your specified target attribute key. You cannot create * a target value and set this to TRUE. To create a target value ( * TargetDocumentAttributeValue), set this to FALSE. *

*/ private Boolean targetDocumentAttributeValueDeletion; /** *

* The target value you want to create for the target attribute. *

*

* For example, 'Finance' could be the target value for the target attribute key 'Department'. *

*/ private DocumentAttributeValue targetDocumentAttributeValue; /** *

* The identifier of the target document attribute or metadata field. *

*

* For example, 'Department' could be an identifier for the target attribute or metadata field that includes the * department names associated with the documents. *

* * @param targetDocumentAttributeKey * The identifier of the target document attribute or metadata field.

*

* For example, 'Department' could be an identifier for the target attribute or metadata field that includes * the department names associated with the documents. */ public void setTargetDocumentAttributeKey(String targetDocumentAttributeKey) { this.targetDocumentAttributeKey = targetDocumentAttributeKey; } /** *

* The identifier of the target document attribute or metadata field. *

*

* For example, 'Department' could be an identifier for the target attribute or metadata field that includes the * department names associated with the documents. *

* * @return The identifier of the target document attribute or metadata field.

*

* For example, 'Department' could be an identifier for the target attribute or metadata field that includes * the department names associated with the documents. */ public String getTargetDocumentAttributeKey() { return this.targetDocumentAttributeKey; } /** *

* The identifier of the target document attribute or metadata field. *

*

* For example, 'Department' could be an identifier for the target attribute or metadata field that includes the * department names associated with the documents. *

* * @param targetDocumentAttributeKey * The identifier of the target document attribute or metadata field.

*

* For example, 'Department' could be an identifier for the target attribute or metadata field that includes * the department names associated with the documents. * @return Returns a reference to this object so that method calls can be chained together. */ public DocumentAttributeTarget withTargetDocumentAttributeKey(String targetDocumentAttributeKey) { setTargetDocumentAttributeKey(targetDocumentAttributeKey); return this; } /** *

* TRUE to delete the existing target value for your specified target attribute key. You cannot create * a target value and set this to TRUE. To create a target value ( * TargetDocumentAttributeValue), set this to FALSE. *

* * @param targetDocumentAttributeValueDeletion * TRUE to delete the existing target value for your specified target attribute key. You cannot * create a target value and set this to TRUE. To create a target value ( * TargetDocumentAttributeValue), set this to FALSE. */ public void setTargetDocumentAttributeValueDeletion(Boolean targetDocumentAttributeValueDeletion) { this.targetDocumentAttributeValueDeletion = targetDocumentAttributeValueDeletion; } /** *

* TRUE to delete the existing target value for your specified target attribute key. You cannot create * a target value and set this to TRUE. To create a target value ( * TargetDocumentAttributeValue), set this to FALSE. *

* * @return TRUE to delete the existing target value for your specified target attribute key. You cannot * create a target value and set this to TRUE. To create a target value ( * TargetDocumentAttributeValue), set this to FALSE. */ public Boolean getTargetDocumentAttributeValueDeletion() { return this.targetDocumentAttributeValueDeletion; } /** *

* TRUE to delete the existing target value for your specified target attribute key. You cannot create * a target value and set this to TRUE. To create a target value ( * TargetDocumentAttributeValue), set this to FALSE. *

* * @param targetDocumentAttributeValueDeletion * TRUE to delete the existing target value for your specified target attribute key. You cannot * create a target value and set this to TRUE. To create a target value ( * TargetDocumentAttributeValue), set this to FALSE. * @return Returns a reference to this object so that method calls can be chained together. */ public DocumentAttributeTarget withTargetDocumentAttributeValueDeletion(Boolean targetDocumentAttributeValueDeletion) { setTargetDocumentAttributeValueDeletion(targetDocumentAttributeValueDeletion); return this; } /** *

* TRUE to delete the existing target value for your specified target attribute key. You cannot create * a target value and set this to TRUE. To create a target value ( * TargetDocumentAttributeValue), set this to FALSE. *

* * @return TRUE to delete the existing target value for your specified target attribute key. You cannot * create a target value and set this to TRUE. To create a target value ( * TargetDocumentAttributeValue), set this to FALSE. */ public Boolean isTargetDocumentAttributeValueDeletion() { return this.targetDocumentAttributeValueDeletion; } /** *

* The target value you want to create for the target attribute. *

*

* For example, 'Finance' could be the target value for the target attribute key 'Department'. *

* * @param targetDocumentAttributeValue * The target value you want to create for the target attribute.

*

* For example, 'Finance' could be the target value for the target attribute key 'Department'. */ public void setTargetDocumentAttributeValue(DocumentAttributeValue targetDocumentAttributeValue) { this.targetDocumentAttributeValue = targetDocumentAttributeValue; } /** *

* The target value you want to create for the target attribute. *

*

* For example, 'Finance' could be the target value for the target attribute key 'Department'. *

* * @return The target value you want to create for the target attribute.

*

* For example, 'Finance' could be the target value for the target attribute key 'Department'. */ public DocumentAttributeValue getTargetDocumentAttributeValue() { return this.targetDocumentAttributeValue; } /** *

* The target value you want to create for the target attribute. *

*

* For example, 'Finance' could be the target value for the target attribute key 'Department'. *

* * @param targetDocumentAttributeValue * The target value you want to create for the target attribute.

*

* For example, 'Finance' could be the target value for the target attribute key 'Department'. * @return Returns a reference to this object so that method calls can be chained together. */ public DocumentAttributeTarget withTargetDocumentAttributeValue(DocumentAttributeValue targetDocumentAttributeValue) { setTargetDocumentAttributeValue(targetDocumentAttributeValue); 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 (getTargetDocumentAttributeKey() != null) sb.append("TargetDocumentAttributeKey: ").append(getTargetDocumentAttributeKey()).append(","); if (getTargetDocumentAttributeValueDeletion() != null) sb.append("TargetDocumentAttributeValueDeletion: ").append(getTargetDocumentAttributeValueDeletion()).append(","); if (getTargetDocumentAttributeValue() != null) sb.append("TargetDocumentAttributeValue: ").append(getTargetDocumentAttributeValue()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof DocumentAttributeTarget == false) return false; DocumentAttributeTarget other = (DocumentAttributeTarget) obj; if (other.getTargetDocumentAttributeKey() == null ^ this.getTargetDocumentAttributeKey() == null) return false; if (other.getTargetDocumentAttributeKey() != null && other.getTargetDocumentAttributeKey().equals(this.getTargetDocumentAttributeKey()) == false) return false; if (other.getTargetDocumentAttributeValueDeletion() == null ^ this.getTargetDocumentAttributeValueDeletion() == null) return false; if (other.getTargetDocumentAttributeValueDeletion() != null && other.getTargetDocumentAttributeValueDeletion().equals(this.getTargetDocumentAttributeValueDeletion()) == false) return false; if (other.getTargetDocumentAttributeValue() == null ^ this.getTargetDocumentAttributeValue() == null) return false; if (other.getTargetDocumentAttributeValue() != null && other.getTargetDocumentAttributeValue().equals(this.getTargetDocumentAttributeValue()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getTargetDocumentAttributeKey() == null) ? 0 : getTargetDocumentAttributeKey().hashCode()); hashCode = prime * hashCode + ((getTargetDocumentAttributeValueDeletion() == null) ? 0 : getTargetDocumentAttributeValueDeletion().hashCode()); hashCode = prime * hashCode + ((getTargetDocumentAttributeValue() == null) ? 0 : getTargetDocumentAttributeValue().hashCode()); return hashCode; } @Override public DocumentAttributeTarget clone() { try { return (DocumentAttributeTarget) 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.DocumentAttributeTargetMarshaller.getInstance().marshall(this, protocolMarshaller); } }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy