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

com.amazonaws.services.bedrockagent.model.PromptFlowNodeInlineConfiguration Maven / Gradle / Ivy

Go to download

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

The 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.bedrockagent.model;

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

/**
 * 

* Contains configurations for a prompt defined inline in the node. *

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

* Contains inference configurations for the prompt. *

*/ private PromptInferenceConfiguration inferenceConfiguration; /** *

* The unique identifier of the model to run inference with. *

*/ private String modelId; /** *

* Contains a prompt and variables in the prompt that can be replaced with values at runtime. *

*/ private PromptTemplateConfiguration templateConfiguration; /** *

* The type of prompt template. *

*/ private String templateType; /** *

* Contains inference configurations for the prompt. *

* * @param inferenceConfiguration * Contains inference configurations for the prompt. */ public void setInferenceConfiguration(PromptInferenceConfiguration inferenceConfiguration) { this.inferenceConfiguration = inferenceConfiguration; } /** *

* Contains inference configurations for the prompt. *

* * @return Contains inference configurations for the prompt. */ public PromptInferenceConfiguration getInferenceConfiguration() { return this.inferenceConfiguration; } /** *

* Contains inference configurations for the prompt. *

* * @param inferenceConfiguration * Contains inference configurations for the prompt. * @return Returns a reference to this object so that method calls can be chained together. */ public PromptFlowNodeInlineConfiguration withInferenceConfiguration(PromptInferenceConfiguration inferenceConfiguration) { setInferenceConfiguration(inferenceConfiguration); return this; } /** *

* The unique identifier of the model to run inference with. *

* * @param modelId * The unique identifier of the model to run inference with. */ public void setModelId(String modelId) { this.modelId = modelId; } /** *

* The unique identifier of the model to run inference with. *

* * @return The unique identifier of the model to run inference with. */ public String getModelId() { return this.modelId; } /** *

* The unique identifier of the model to run inference with. *

* * @param modelId * The unique identifier of the model to run inference with. * @return Returns a reference to this object so that method calls can be chained together. */ public PromptFlowNodeInlineConfiguration withModelId(String modelId) { setModelId(modelId); return this; } /** *

* Contains a prompt and variables in the prompt that can be replaced with values at runtime. *

* * @param templateConfiguration * Contains a prompt and variables in the prompt that can be replaced with values at runtime. */ public void setTemplateConfiguration(PromptTemplateConfiguration templateConfiguration) { this.templateConfiguration = templateConfiguration; } /** *

* Contains a prompt and variables in the prompt that can be replaced with values at runtime. *

* * @return Contains a prompt and variables in the prompt that can be replaced with values at runtime. */ public PromptTemplateConfiguration getTemplateConfiguration() { return this.templateConfiguration; } /** *

* Contains a prompt and variables in the prompt that can be replaced with values at runtime. *

* * @param templateConfiguration * Contains a prompt and variables in the prompt that can be replaced with values at runtime. * @return Returns a reference to this object so that method calls can be chained together. */ public PromptFlowNodeInlineConfiguration withTemplateConfiguration(PromptTemplateConfiguration templateConfiguration) { setTemplateConfiguration(templateConfiguration); return this; } /** *

* The type of prompt template. *

* * @param templateType * The type of prompt template. * @see PromptTemplateType */ public void setTemplateType(String templateType) { this.templateType = templateType; } /** *

* The type of prompt template. *

* * @return The type of prompt template. * @see PromptTemplateType */ public String getTemplateType() { return this.templateType; } /** *

* The type of prompt template. *

* * @param templateType * The type of prompt template. * @return Returns a reference to this object so that method calls can be chained together. * @see PromptTemplateType */ public PromptFlowNodeInlineConfiguration withTemplateType(String templateType) { setTemplateType(templateType); return this; } /** *

* The type of prompt template. *

* * @param templateType * The type of prompt template. * @return Returns a reference to this object so that method calls can be chained together. * @see PromptTemplateType */ public PromptFlowNodeInlineConfiguration withTemplateType(PromptTemplateType templateType) { this.templateType = templateType.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 (getInferenceConfiguration() != null) sb.append("InferenceConfiguration: ").append(getInferenceConfiguration()).append(","); if (getModelId() != null) sb.append("ModelId: ").append(getModelId()).append(","); if (getTemplateConfiguration() != null) sb.append("TemplateConfiguration: ").append(getTemplateConfiguration()).append(","); if (getTemplateType() != null) sb.append("TemplateType: ").append(getTemplateType()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof PromptFlowNodeInlineConfiguration == false) return false; PromptFlowNodeInlineConfiguration other = (PromptFlowNodeInlineConfiguration) obj; if (other.getInferenceConfiguration() == null ^ this.getInferenceConfiguration() == null) return false; if (other.getInferenceConfiguration() != null && other.getInferenceConfiguration().equals(this.getInferenceConfiguration()) == false) return false; if (other.getModelId() == null ^ this.getModelId() == null) return false; if (other.getModelId() != null && other.getModelId().equals(this.getModelId()) == false) return false; if (other.getTemplateConfiguration() == null ^ this.getTemplateConfiguration() == null) return false; if (other.getTemplateConfiguration() != null && other.getTemplateConfiguration().equals(this.getTemplateConfiguration()) == false) return false; if (other.getTemplateType() == null ^ this.getTemplateType() == null) return false; if (other.getTemplateType() != null && other.getTemplateType().equals(this.getTemplateType()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getInferenceConfiguration() == null) ? 0 : getInferenceConfiguration().hashCode()); hashCode = prime * hashCode + ((getModelId() == null) ? 0 : getModelId().hashCode()); hashCode = prime * hashCode + ((getTemplateConfiguration() == null) ? 0 : getTemplateConfiguration().hashCode()); hashCode = prime * hashCode + ((getTemplateType() == null) ? 0 : getTemplateType().hashCode()); return hashCode; } @Override public PromptFlowNodeInlineConfiguration clone() { try { return (PromptFlowNodeInlineConfiguration) 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.bedrockagent.model.transform.PromptFlowNodeInlineConfigurationMarshaller.getInstance().marshall(this, protocolMarshaller); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy