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

com.amazonaws.services.bedrockagentruntime.model.KnowledgeBaseRetrieveAndGenerateConfiguration Maven / Gradle / Ivy

/*
 * 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.bedrockagentruntime.model;

import java.io.Serializable;
import javax.annotation.Generated;
import com.amazonaws.protocol.StructuredPojo;
import com.amazonaws.protocol.ProtocolMarshaller;

/**
 * 

* Contains details about the resource being queried. *

*

* This data type is used in the following API operations: *

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

* Contains configurations for response generation based on the knowledge base query results. *

*/ private GenerationConfiguration generationConfiguration; /** *

* The unique identifier of the knowledge base that is queried and the foundation model used for generation. *

*/ private String knowledgeBaseId; /** *

* The ARN of the foundation model used to generate a response. *

*/ private String modelArn; /** *

* Settings for how the model processes the prompt prior to retrieval and generation. *

*/ private OrchestrationConfiguration orchestrationConfiguration; /** *

* Contains configurations for how to retrieve and return the knowledge base query. *

*/ private KnowledgeBaseRetrievalConfiguration retrievalConfiguration; /** *

* Contains configurations for response generation based on the knowledge base query results. *

* * @param generationConfiguration * Contains configurations for response generation based on the knowledge base query results. */ public void setGenerationConfiguration(GenerationConfiguration generationConfiguration) { this.generationConfiguration = generationConfiguration; } /** *

* Contains configurations for response generation based on the knowledge base query results. *

* * @return Contains configurations for response generation based on the knowledge base query results. */ public GenerationConfiguration getGenerationConfiguration() { return this.generationConfiguration; } /** *

* Contains configurations for response generation based on the knowledge base query results. *

* * @param generationConfiguration * Contains configurations for response generation based on the knowledge base query results. * @return Returns a reference to this object so that method calls can be chained together. */ public KnowledgeBaseRetrieveAndGenerateConfiguration withGenerationConfiguration(GenerationConfiguration generationConfiguration) { setGenerationConfiguration(generationConfiguration); return this; } /** *

* The unique identifier of the knowledge base that is queried and the foundation model used for generation. *

* * @param knowledgeBaseId * The unique identifier of the knowledge base that is queried and the foundation model used for generation. */ public void setKnowledgeBaseId(String knowledgeBaseId) { this.knowledgeBaseId = knowledgeBaseId; } /** *

* The unique identifier of the knowledge base that is queried and the foundation model used for generation. *

* * @return The unique identifier of the knowledge base that is queried and the foundation model used for generation. */ public String getKnowledgeBaseId() { return this.knowledgeBaseId; } /** *

* The unique identifier of the knowledge base that is queried and the foundation model used for generation. *

* * @param knowledgeBaseId * The unique identifier of the knowledge base that is queried and the foundation model used for generation. * @return Returns a reference to this object so that method calls can be chained together. */ public KnowledgeBaseRetrieveAndGenerateConfiguration withKnowledgeBaseId(String knowledgeBaseId) { setKnowledgeBaseId(knowledgeBaseId); return this; } /** *

* The ARN of the foundation model used to generate a response. *

* * @param modelArn * The ARN of the foundation model used to generate a response. */ public void setModelArn(String modelArn) { this.modelArn = modelArn; } /** *

* The ARN of the foundation model used to generate a response. *

* * @return The ARN of the foundation model used to generate a response. */ public String getModelArn() { return this.modelArn; } /** *

* The ARN of the foundation model used to generate a response. *

* * @param modelArn * The ARN of the foundation model used to generate a response. * @return Returns a reference to this object so that method calls can be chained together. */ public KnowledgeBaseRetrieveAndGenerateConfiguration withModelArn(String modelArn) { setModelArn(modelArn); return this; } /** *

* Settings for how the model processes the prompt prior to retrieval and generation. *

* * @param orchestrationConfiguration * Settings for how the model processes the prompt prior to retrieval and generation. */ public void setOrchestrationConfiguration(OrchestrationConfiguration orchestrationConfiguration) { this.orchestrationConfiguration = orchestrationConfiguration; } /** *

* Settings for how the model processes the prompt prior to retrieval and generation. *

* * @return Settings for how the model processes the prompt prior to retrieval and generation. */ public OrchestrationConfiguration getOrchestrationConfiguration() { return this.orchestrationConfiguration; } /** *

* Settings for how the model processes the prompt prior to retrieval and generation. *

* * @param orchestrationConfiguration * Settings for how the model processes the prompt prior to retrieval and generation. * @return Returns a reference to this object so that method calls can be chained together. */ public KnowledgeBaseRetrieveAndGenerateConfiguration withOrchestrationConfiguration(OrchestrationConfiguration orchestrationConfiguration) { setOrchestrationConfiguration(orchestrationConfiguration); return this; } /** *

* Contains configurations for how to retrieve and return the knowledge base query. *

* * @param retrievalConfiguration * Contains configurations for how to retrieve and return the knowledge base query. */ public void setRetrievalConfiguration(KnowledgeBaseRetrievalConfiguration retrievalConfiguration) { this.retrievalConfiguration = retrievalConfiguration; } /** *

* Contains configurations for how to retrieve and return the knowledge base query. *

* * @return Contains configurations for how to retrieve and return the knowledge base query. */ public KnowledgeBaseRetrievalConfiguration getRetrievalConfiguration() { return this.retrievalConfiguration; } /** *

* Contains configurations for how to retrieve and return the knowledge base query. *

* * @param retrievalConfiguration * Contains configurations for how to retrieve and return the knowledge base query. * @return Returns a reference to this object so that method calls can be chained together. */ public KnowledgeBaseRetrieveAndGenerateConfiguration withRetrievalConfiguration(KnowledgeBaseRetrievalConfiguration retrievalConfiguration) { setRetrievalConfiguration(retrievalConfiguration); 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 (getGenerationConfiguration() != null) sb.append("GenerationConfiguration: ").append(getGenerationConfiguration()).append(","); if (getKnowledgeBaseId() != null) sb.append("KnowledgeBaseId: ").append(getKnowledgeBaseId()).append(","); if (getModelArn() != null) sb.append("ModelArn: ").append(getModelArn()).append(","); if (getOrchestrationConfiguration() != null) sb.append("OrchestrationConfiguration: ").append(getOrchestrationConfiguration()).append(","); if (getRetrievalConfiguration() != null) sb.append("RetrievalConfiguration: ").append(getRetrievalConfiguration()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof KnowledgeBaseRetrieveAndGenerateConfiguration == false) return false; KnowledgeBaseRetrieveAndGenerateConfiguration other = (KnowledgeBaseRetrieveAndGenerateConfiguration) obj; if (other.getGenerationConfiguration() == null ^ this.getGenerationConfiguration() == null) return false; if (other.getGenerationConfiguration() != null && other.getGenerationConfiguration().equals(this.getGenerationConfiguration()) == false) return false; if (other.getKnowledgeBaseId() == null ^ this.getKnowledgeBaseId() == null) return false; if (other.getKnowledgeBaseId() != null && other.getKnowledgeBaseId().equals(this.getKnowledgeBaseId()) == false) return false; if (other.getModelArn() == null ^ this.getModelArn() == null) return false; if (other.getModelArn() != null && other.getModelArn().equals(this.getModelArn()) == false) return false; if (other.getOrchestrationConfiguration() == null ^ this.getOrchestrationConfiguration() == null) return false; if (other.getOrchestrationConfiguration() != null && other.getOrchestrationConfiguration().equals(this.getOrchestrationConfiguration()) == false) return false; if (other.getRetrievalConfiguration() == null ^ this.getRetrievalConfiguration() == null) return false; if (other.getRetrievalConfiguration() != null && other.getRetrievalConfiguration().equals(this.getRetrievalConfiguration()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getGenerationConfiguration() == null) ? 0 : getGenerationConfiguration().hashCode()); hashCode = prime * hashCode + ((getKnowledgeBaseId() == null) ? 0 : getKnowledgeBaseId().hashCode()); hashCode = prime * hashCode + ((getModelArn() == null) ? 0 : getModelArn().hashCode()); hashCode = prime * hashCode + ((getOrchestrationConfiguration() == null) ? 0 : getOrchestrationConfiguration().hashCode()); hashCode = prime * hashCode + ((getRetrievalConfiguration() == null) ? 0 : getRetrievalConfiguration().hashCode()); return hashCode; } @Override public KnowledgeBaseRetrieveAndGenerateConfiguration clone() { try { return (KnowledgeBaseRetrieveAndGenerateConfiguration) 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.bedrockagentruntime.model.transform.KnowledgeBaseRetrieveAndGenerateConfigurationMarshaller.getInstance().marshall(this, protocolMarshaller); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy