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

com.amazonaws.services.bedrockagentruntime.model.RetrieveAndGenerateConfiguration 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 RetrieveAndGenerateConfiguration implements Serializable, Cloneable, StructuredPojo { /** *

* The configuration used with the external source wrapper object in the retrieveAndGenerate function. *

*/ private ExternalSourcesRetrieveAndGenerateConfiguration externalSourcesConfiguration; /** *

* Contains details about the resource being queried. *

*/ private KnowledgeBaseRetrieveAndGenerateConfiguration knowledgeBaseConfiguration; /** *

* The type of resource that is queried by the request. *

*/ private String type; /** *

* The configuration used with the external source wrapper object in the retrieveAndGenerate function. *

* * @param externalSourcesConfiguration * The configuration used with the external source wrapper object in the retrieveAndGenerate function. */ public void setExternalSourcesConfiguration(ExternalSourcesRetrieveAndGenerateConfiguration externalSourcesConfiguration) { this.externalSourcesConfiguration = externalSourcesConfiguration; } /** *

* The configuration used with the external source wrapper object in the retrieveAndGenerate function. *

* * @return The configuration used with the external source wrapper object in the retrieveAndGenerate function. */ public ExternalSourcesRetrieveAndGenerateConfiguration getExternalSourcesConfiguration() { return this.externalSourcesConfiguration; } /** *

* The configuration used with the external source wrapper object in the retrieveAndGenerate function. *

* * @param externalSourcesConfiguration * The configuration used with the external source wrapper object in the retrieveAndGenerate function. * @return Returns a reference to this object so that method calls can be chained together. */ public RetrieveAndGenerateConfiguration withExternalSourcesConfiguration(ExternalSourcesRetrieveAndGenerateConfiguration externalSourcesConfiguration) { setExternalSourcesConfiguration(externalSourcesConfiguration); return this; } /** *

* Contains details about the resource being queried. *

* * @param knowledgeBaseConfiguration * Contains details about the resource being queried. */ public void setKnowledgeBaseConfiguration(KnowledgeBaseRetrieveAndGenerateConfiguration knowledgeBaseConfiguration) { this.knowledgeBaseConfiguration = knowledgeBaseConfiguration; } /** *

* Contains details about the resource being queried. *

* * @return Contains details about the resource being queried. */ public KnowledgeBaseRetrieveAndGenerateConfiguration getKnowledgeBaseConfiguration() { return this.knowledgeBaseConfiguration; } /** *

* Contains details about the resource being queried. *

* * @param knowledgeBaseConfiguration * Contains details about the resource being queried. * @return Returns a reference to this object so that method calls can be chained together. */ public RetrieveAndGenerateConfiguration withKnowledgeBaseConfiguration(KnowledgeBaseRetrieveAndGenerateConfiguration knowledgeBaseConfiguration) { setKnowledgeBaseConfiguration(knowledgeBaseConfiguration); return this; } /** *

* The type of resource that is queried by the request. *

* * @param type * The type of resource that is queried by the request. * @see RetrieveAndGenerateType */ public void setType(String type) { this.type = type; } /** *

* The type of resource that is queried by the request. *

* * @return The type of resource that is queried by the request. * @see RetrieveAndGenerateType */ public String getType() { return this.type; } /** *

* The type of resource that is queried by the request. *

* * @param type * The type of resource that is queried by the request. * @return Returns a reference to this object so that method calls can be chained together. * @see RetrieveAndGenerateType */ public RetrieveAndGenerateConfiguration withType(String type) { setType(type); return this; } /** *

* The type of resource that is queried by the request. *

* * @param type * The type of resource that is queried by the request. * @return Returns a reference to this object so that method calls can be chained together. * @see RetrieveAndGenerateType */ public RetrieveAndGenerateConfiguration withType(RetrieveAndGenerateType type) { this.type = type.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 (getExternalSourcesConfiguration() != null) sb.append("ExternalSourcesConfiguration: ").append(getExternalSourcesConfiguration()).append(","); if (getKnowledgeBaseConfiguration() != null) sb.append("KnowledgeBaseConfiguration: ").append(getKnowledgeBaseConfiguration()).append(","); if (getType() != null) sb.append("Type: ").append(getType()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof RetrieveAndGenerateConfiguration == false) return false; RetrieveAndGenerateConfiguration other = (RetrieveAndGenerateConfiguration) obj; if (other.getExternalSourcesConfiguration() == null ^ this.getExternalSourcesConfiguration() == null) return false; if (other.getExternalSourcesConfiguration() != null && other.getExternalSourcesConfiguration().equals(this.getExternalSourcesConfiguration()) == false) return false; if (other.getKnowledgeBaseConfiguration() == null ^ this.getKnowledgeBaseConfiguration() == null) return false; if (other.getKnowledgeBaseConfiguration() != null && other.getKnowledgeBaseConfiguration().equals(this.getKnowledgeBaseConfiguration()) == false) return false; if (other.getType() == null ^ this.getType() == null) return false; if (other.getType() != null && other.getType().equals(this.getType()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getExternalSourcesConfiguration() == null) ? 0 : getExternalSourcesConfiguration().hashCode()); hashCode = prime * hashCode + ((getKnowledgeBaseConfiguration() == null) ? 0 : getKnowledgeBaseConfiguration().hashCode()); hashCode = prime * hashCode + ((getType() == null) ? 0 : getType().hashCode()); return hashCode; } @Override public RetrieveAndGenerateConfiguration clone() { try { return (RetrieveAndGenerateConfiguration) 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.RetrieveAndGenerateConfigurationMarshaller.getInstance().marshall(this, protocolMarshaller); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy