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

com.amazonaws.services.bedrockagent.model.AgentVersion 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.bedrockagent.model;

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

/**
 * 

* Contains the information of an agent version. *

* * @see AWS API * Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class AgentVersion implements Serializable, Cloneable, StructuredPojo { private String agentId; private String agentName; private String agentArn; private String version; private String instruction; private String agentStatus; private String foundationModel; private String description; private Integer idleSessionTTLInSeconds; private String agentResourceRoleArn; private String customerEncryptionKeyArn; private java.util.Date createdAt; private java.util.Date updatedAt; private java.util.List failureReasons; private java.util.List recommendedActions; private PromptOverrideConfiguration promptOverrideConfiguration; /** * @param agentId */ public void setAgentId(String agentId) { this.agentId = agentId; } /** * @return */ public String getAgentId() { return this.agentId; } /** * @param agentId * @return Returns a reference to this object so that method calls can be chained together. */ public AgentVersion withAgentId(String agentId) { setAgentId(agentId); return this; } /** * @param agentName */ public void setAgentName(String agentName) { this.agentName = agentName; } /** * @return */ public String getAgentName() { return this.agentName; } /** * @param agentName * @return Returns a reference to this object so that method calls can be chained together. */ public AgentVersion withAgentName(String agentName) { setAgentName(agentName); return this; } /** * @param agentArn */ public void setAgentArn(String agentArn) { this.agentArn = agentArn; } /** * @return */ public String getAgentArn() { return this.agentArn; } /** * @param agentArn * @return Returns a reference to this object so that method calls can be chained together. */ public AgentVersion withAgentArn(String agentArn) { setAgentArn(agentArn); return this; } /** * @param version */ public void setVersion(String version) { this.version = version; } /** * @return */ public String getVersion() { return this.version; } /** * @param version * @return Returns a reference to this object so that method calls can be chained together. */ public AgentVersion withVersion(String version) { setVersion(version); return this; } /** * @param instruction */ public void setInstruction(String instruction) { this.instruction = instruction; } /** * @return */ public String getInstruction() { return this.instruction; } /** * @param instruction * @return Returns a reference to this object so that method calls can be chained together. */ public AgentVersion withInstruction(String instruction) { setInstruction(instruction); return this; } /** * @param agentStatus * @see AgentStatus */ public void setAgentStatus(String agentStatus) { this.agentStatus = agentStatus; } /** * @return * @see AgentStatus */ public String getAgentStatus() { return this.agentStatus; } /** * @param agentStatus * @return Returns a reference to this object so that method calls can be chained together. * @see AgentStatus */ public AgentVersion withAgentStatus(String agentStatus) { setAgentStatus(agentStatus); return this; } /** * @param agentStatus * @return Returns a reference to this object so that method calls can be chained together. * @see AgentStatus */ public AgentVersion withAgentStatus(AgentStatus agentStatus) { this.agentStatus = agentStatus.toString(); return this; } /** * @param foundationModel */ public void setFoundationModel(String foundationModel) { this.foundationModel = foundationModel; } /** * @return */ public String getFoundationModel() { return this.foundationModel; } /** * @param foundationModel * @return Returns a reference to this object so that method calls can be chained together. */ public AgentVersion withFoundationModel(String foundationModel) { setFoundationModel(foundationModel); return this; } /** * @param description */ public void setDescription(String description) { this.description = description; } /** * @return */ public String getDescription() { return this.description; } /** * @param description * @return Returns a reference to this object so that method calls can be chained together. */ public AgentVersion withDescription(String description) { setDescription(description); return this; } /** * @param idleSessionTTLInSeconds */ public void setIdleSessionTTLInSeconds(Integer idleSessionTTLInSeconds) { this.idleSessionTTLInSeconds = idleSessionTTLInSeconds; } /** * @return */ public Integer getIdleSessionTTLInSeconds() { return this.idleSessionTTLInSeconds; } /** * @param idleSessionTTLInSeconds * @return Returns a reference to this object so that method calls can be chained together. */ public AgentVersion withIdleSessionTTLInSeconds(Integer idleSessionTTLInSeconds) { setIdleSessionTTLInSeconds(idleSessionTTLInSeconds); return this; } /** * @param agentResourceRoleArn */ public void setAgentResourceRoleArn(String agentResourceRoleArn) { this.agentResourceRoleArn = agentResourceRoleArn; } /** * @return */ public String getAgentResourceRoleArn() { return this.agentResourceRoleArn; } /** * @param agentResourceRoleArn * @return Returns a reference to this object so that method calls can be chained together. */ public AgentVersion withAgentResourceRoleArn(String agentResourceRoleArn) { setAgentResourceRoleArn(agentResourceRoleArn); return this; } /** * @param customerEncryptionKeyArn */ public void setCustomerEncryptionKeyArn(String customerEncryptionKeyArn) { this.customerEncryptionKeyArn = customerEncryptionKeyArn; } /** * @return */ public String getCustomerEncryptionKeyArn() { return this.customerEncryptionKeyArn; } /** * @param customerEncryptionKeyArn * @return Returns a reference to this object so that method calls can be chained together. */ public AgentVersion withCustomerEncryptionKeyArn(String customerEncryptionKeyArn) { setCustomerEncryptionKeyArn(customerEncryptionKeyArn); return this; } /** * @param createdAt */ public void setCreatedAt(java.util.Date createdAt) { this.createdAt = createdAt; } /** * @return */ public java.util.Date getCreatedAt() { return this.createdAt; } /** * @param createdAt * @return Returns a reference to this object so that method calls can be chained together. */ public AgentVersion withCreatedAt(java.util.Date createdAt) { setCreatedAt(createdAt); return this; } /** * @param updatedAt */ public void setUpdatedAt(java.util.Date updatedAt) { this.updatedAt = updatedAt; } /** * @return */ public java.util.Date getUpdatedAt() { return this.updatedAt; } /** * @param updatedAt * @return Returns a reference to this object so that method calls can be chained together. */ public AgentVersion withUpdatedAt(java.util.Date updatedAt) { setUpdatedAt(updatedAt); return this; } /** * @return */ public java.util.List getFailureReasons() { return failureReasons; } /** * @param failureReasons */ public void setFailureReasons(java.util.Collection failureReasons) { if (failureReasons == null) { this.failureReasons = null; return; } this.failureReasons = new java.util.ArrayList(failureReasons); } /** *

* NOTE: This method appends the values to the existing list (if any). Use * {@link #setFailureReasons(java.util.Collection)} or {@link #withFailureReasons(java.util.Collection)} if you want * to override the existing values. *

* * @param failureReasons * @return Returns a reference to this object so that method calls can be chained together. */ public AgentVersion withFailureReasons(String... failureReasons) { if (this.failureReasons == null) { setFailureReasons(new java.util.ArrayList(failureReasons.length)); } for (String ele : failureReasons) { this.failureReasons.add(ele); } return this; } /** * @param failureReasons * @return Returns a reference to this object so that method calls can be chained together. */ public AgentVersion withFailureReasons(java.util.Collection failureReasons) { setFailureReasons(failureReasons); return this; } /** * @return */ public java.util.List getRecommendedActions() { return recommendedActions; } /** * @param recommendedActions */ public void setRecommendedActions(java.util.Collection recommendedActions) { if (recommendedActions == null) { this.recommendedActions = null; return; } this.recommendedActions = new java.util.ArrayList(recommendedActions); } /** *

* NOTE: This method appends the values to the existing list (if any). Use * {@link #setRecommendedActions(java.util.Collection)} or {@link #withRecommendedActions(java.util.Collection)} if * you want to override the existing values. *

* * @param recommendedActions * @return Returns a reference to this object so that method calls can be chained together. */ public AgentVersion withRecommendedActions(String... recommendedActions) { if (this.recommendedActions == null) { setRecommendedActions(new java.util.ArrayList(recommendedActions.length)); } for (String ele : recommendedActions) { this.recommendedActions.add(ele); } return this; } /** * @param recommendedActions * @return Returns a reference to this object so that method calls can be chained together. */ public AgentVersion withRecommendedActions(java.util.Collection recommendedActions) { setRecommendedActions(recommendedActions); return this; } /** * @param promptOverrideConfiguration */ public void setPromptOverrideConfiguration(PromptOverrideConfiguration promptOverrideConfiguration) { this.promptOverrideConfiguration = promptOverrideConfiguration; } /** * @return */ public PromptOverrideConfiguration getPromptOverrideConfiguration() { return this.promptOverrideConfiguration; } /** * @param promptOverrideConfiguration * @return Returns a reference to this object so that method calls can be chained together. */ public AgentVersion withPromptOverrideConfiguration(PromptOverrideConfiguration promptOverrideConfiguration) { setPromptOverrideConfiguration(promptOverrideConfiguration); 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 (getAgentId() != null) sb.append("AgentId: ").append(getAgentId()).append(","); if (getAgentName() != null) sb.append("AgentName: ").append(getAgentName()).append(","); if (getAgentArn() != null) sb.append("AgentArn: ").append(getAgentArn()).append(","); if (getVersion() != null) sb.append("Version: ").append(getVersion()).append(","); if (getInstruction() != null) sb.append("Instruction: ").append("***Sensitive Data Redacted***").append(","); if (getAgentStatus() != null) sb.append("AgentStatus: ").append(getAgentStatus()).append(","); if (getFoundationModel() != null) sb.append("FoundationModel: ").append(getFoundationModel()).append(","); if (getDescription() != null) sb.append("Description: ").append(getDescription()).append(","); if (getIdleSessionTTLInSeconds() != null) sb.append("IdleSessionTTLInSeconds: ").append(getIdleSessionTTLInSeconds()).append(","); if (getAgentResourceRoleArn() != null) sb.append("AgentResourceRoleArn: ").append(getAgentResourceRoleArn()).append(","); if (getCustomerEncryptionKeyArn() != null) sb.append("CustomerEncryptionKeyArn: ").append(getCustomerEncryptionKeyArn()).append(","); if (getCreatedAt() != null) sb.append("CreatedAt: ").append(getCreatedAt()).append(","); if (getUpdatedAt() != null) sb.append("UpdatedAt: ").append(getUpdatedAt()).append(","); if (getFailureReasons() != null) sb.append("FailureReasons: ").append(getFailureReasons()).append(","); if (getRecommendedActions() != null) sb.append("RecommendedActions: ").append(getRecommendedActions()).append(","); if (getPromptOverrideConfiguration() != null) sb.append("PromptOverrideConfiguration: ").append("***Sensitive Data Redacted***"); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof AgentVersion == false) return false; AgentVersion other = (AgentVersion) obj; if (other.getAgentId() == null ^ this.getAgentId() == null) return false; if (other.getAgentId() != null && other.getAgentId().equals(this.getAgentId()) == false) return false; if (other.getAgentName() == null ^ this.getAgentName() == null) return false; if (other.getAgentName() != null && other.getAgentName().equals(this.getAgentName()) == false) return false; if (other.getAgentArn() == null ^ this.getAgentArn() == null) return false; if (other.getAgentArn() != null && other.getAgentArn().equals(this.getAgentArn()) == false) return false; if (other.getVersion() == null ^ this.getVersion() == null) return false; if (other.getVersion() != null && other.getVersion().equals(this.getVersion()) == false) return false; if (other.getInstruction() == null ^ this.getInstruction() == null) return false; if (other.getInstruction() != null && other.getInstruction().equals(this.getInstruction()) == false) return false; if (other.getAgentStatus() == null ^ this.getAgentStatus() == null) return false; if (other.getAgentStatus() != null && other.getAgentStatus().equals(this.getAgentStatus()) == false) return false; if (other.getFoundationModel() == null ^ this.getFoundationModel() == null) return false; if (other.getFoundationModel() != null && other.getFoundationModel().equals(this.getFoundationModel()) == false) return false; if (other.getDescription() == null ^ this.getDescription() == null) return false; if (other.getDescription() != null && other.getDescription().equals(this.getDescription()) == false) return false; if (other.getIdleSessionTTLInSeconds() == null ^ this.getIdleSessionTTLInSeconds() == null) return false; if (other.getIdleSessionTTLInSeconds() != null && other.getIdleSessionTTLInSeconds().equals(this.getIdleSessionTTLInSeconds()) == false) return false; if (other.getAgentResourceRoleArn() == null ^ this.getAgentResourceRoleArn() == null) return false; if (other.getAgentResourceRoleArn() != null && other.getAgentResourceRoleArn().equals(this.getAgentResourceRoleArn()) == false) return false; if (other.getCustomerEncryptionKeyArn() == null ^ this.getCustomerEncryptionKeyArn() == null) return false; if (other.getCustomerEncryptionKeyArn() != null && other.getCustomerEncryptionKeyArn().equals(this.getCustomerEncryptionKeyArn()) == false) return false; if (other.getCreatedAt() == null ^ this.getCreatedAt() == null) return false; if (other.getCreatedAt() != null && other.getCreatedAt().equals(this.getCreatedAt()) == false) return false; if (other.getUpdatedAt() == null ^ this.getUpdatedAt() == null) return false; if (other.getUpdatedAt() != null && other.getUpdatedAt().equals(this.getUpdatedAt()) == false) return false; if (other.getFailureReasons() == null ^ this.getFailureReasons() == null) return false; if (other.getFailureReasons() != null && other.getFailureReasons().equals(this.getFailureReasons()) == false) return false; if (other.getRecommendedActions() == null ^ this.getRecommendedActions() == null) return false; if (other.getRecommendedActions() != null && other.getRecommendedActions().equals(this.getRecommendedActions()) == false) return false; if (other.getPromptOverrideConfiguration() == null ^ this.getPromptOverrideConfiguration() == null) return false; if (other.getPromptOverrideConfiguration() != null && other.getPromptOverrideConfiguration().equals(this.getPromptOverrideConfiguration()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getAgentId() == null) ? 0 : getAgentId().hashCode()); hashCode = prime * hashCode + ((getAgentName() == null) ? 0 : getAgentName().hashCode()); hashCode = prime * hashCode + ((getAgentArn() == null) ? 0 : getAgentArn().hashCode()); hashCode = prime * hashCode + ((getVersion() == null) ? 0 : getVersion().hashCode()); hashCode = prime * hashCode + ((getInstruction() == null) ? 0 : getInstruction().hashCode()); hashCode = prime * hashCode + ((getAgentStatus() == null) ? 0 : getAgentStatus().hashCode()); hashCode = prime * hashCode + ((getFoundationModel() == null) ? 0 : getFoundationModel().hashCode()); hashCode = prime * hashCode + ((getDescription() == null) ? 0 : getDescription().hashCode()); hashCode = prime * hashCode + ((getIdleSessionTTLInSeconds() == null) ? 0 : getIdleSessionTTLInSeconds().hashCode()); hashCode = prime * hashCode + ((getAgentResourceRoleArn() == null) ? 0 : getAgentResourceRoleArn().hashCode()); hashCode = prime * hashCode + ((getCustomerEncryptionKeyArn() == null) ? 0 : getCustomerEncryptionKeyArn().hashCode()); hashCode = prime * hashCode + ((getCreatedAt() == null) ? 0 : getCreatedAt().hashCode()); hashCode = prime * hashCode + ((getUpdatedAt() == null) ? 0 : getUpdatedAt().hashCode()); hashCode = prime * hashCode + ((getFailureReasons() == null) ? 0 : getFailureReasons().hashCode()); hashCode = prime * hashCode + ((getRecommendedActions() == null) ? 0 : getRecommendedActions().hashCode()); hashCode = prime * hashCode + ((getPromptOverrideConfiguration() == null) ? 0 : getPromptOverrideConfiguration().hashCode()); return hashCode; } @Override public AgentVersion clone() { try { return (AgentVersion) 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.AgentVersionMarshaller.getInstance().marshall(this, protocolMarshaller); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy