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

com.amazonaws.services.bedrockagent.model.KnowledgeBase 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 a knowledge base. *

* * @see AWS API * Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class KnowledgeBase implements Serializable, Cloneable, StructuredPojo { private String knowledgeBaseId; private String name; private String knowledgeBaseArn; private String description; private String roleArn; private KnowledgeBaseConfiguration knowledgeBaseConfiguration; private StorageConfiguration storageConfiguration; private String status; private java.util.Date createdAt; private java.util.Date updatedAt; private java.util.List failureReasons; /** * @param knowledgeBaseId */ public void setKnowledgeBaseId(String knowledgeBaseId) { this.knowledgeBaseId = knowledgeBaseId; } /** * @return */ public String getKnowledgeBaseId() { return this.knowledgeBaseId; } /** * @param knowledgeBaseId * @return Returns a reference to this object so that method calls can be chained together. */ public KnowledgeBase withKnowledgeBaseId(String knowledgeBaseId) { setKnowledgeBaseId(knowledgeBaseId); return this; } /** * @param name */ public void setName(String name) { this.name = name; } /** * @return */ public String getName() { return this.name; } /** * @param name * @return Returns a reference to this object so that method calls can be chained together. */ public KnowledgeBase withName(String name) { setName(name); return this; } /** * @param knowledgeBaseArn */ public void setKnowledgeBaseArn(String knowledgeBaseArn) { this.knowledgeBaseArn = knowledgeBaseArn; } /** * @return */ public String getKnowledgeBaseArn() { return this.knowledgeBaseArn; } /** * @param knowledgeBaseArn * @return Returns a reference to this object so that method calls can be chained together. */ public KnowledgeBase withKnowledgeBaseArn(String knowledgeBaseArn) { setKnowledgeBaseArn(knowledgeBaseArn); 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 KnowledgeBase withDescription(String description) { setDescription(description); return this; } /** * @param roleArn */ public void setRoleArn(String roleArn) { this.roleArn = roleArn; } /** * @return */ public String getRoleArn() { return this.roleArn; } /** * @param roleArn * @return Returns a reference to this object so that method calls can be chained together. */ public KnowledgeBase withRoleArn(String roleArn) { setRoleArn(roleArn); return this; } /** * @param knowledgeBaseConfiguration */ public void setKnowledgeBaseConfiguration(KnowledgeBaseConfiguration knowledgeBaseConfiguration) { this.knowledgeBaseConfiguration = knowledgeBaseConfiguration; } /** * @return */ public KnowledgeBaseConfiguration getKnowledgeBaseConfiguration() { return this.knowledgeBaseConfiguration; } /** * @param knowledgeBaseConfiguration * @return Returns a reference to this object so that method calls can be chained together. */ public KnowledgeBase withKnowledgeBaseConfiguration(KnowledgeBaseConfiguration knowledgeBaseConfiguration) { setKnowledgeBaseConfiguration(knowledgeBaseConfiguration); return this; } /** * @param storageConfiguration */ public void setStorageConfiguration(StorageConfiguration storageConfiguration) { this.storageConfiguration = storageConfiguration; } /** * @return */ public StorageConfiguration getStorageConfiguration() { return this.storageConfiguration; } /** * @param storageConfiguration * @return Returns a reference to this object so that method calls can be chained together. */ public KnowledgeBase withStorageConfiguration(StorageConfiguration storageConfiguration) { setStorageConfiguration(storageConfiguration); return this; } /** * @param status * @see KnowledgeBaseStatus */ public void setStatus(String status) { this.status = status; } /** * @return * @see KnowledgeBaseStatus */ public String getStatus() { return this.status; } /** * @param status * @return Returns a reference to this object so that method calls can be chained together. * @see KnowledgeBaseStatus */ public KnowledgeBase withStatus(String status) { setStatus(status); return this; } /** * @param status * @return Returns a reference to this object so that method calls can be chained together. * @see KnowledgeBaseStatus */ public KnowledgeBase withStatus(KnowledgeBaseStatus status) { this.status = status.toString(); 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 KnowledgeBase 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 KnowledgeBase 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 KnowledgeBase 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 KnowledgeBase withFailureReasons(java.util.Collection failureReasons) { setFailureReasons(failureReasons); 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 (getKnowledgeBaseId() != null) sb.append("KnowledgeBaseId: ").append(getKnowledgeBaseId()).append(","); if (getName() != null) sb.append("Name: ").append(getName()).append(","); if (getKnowledgeBaseArn() != null) sb.append("KnowledgeBaseArn: ").append(getKnowledgeBaseArn()).append(","); if (getDescription() != null) sb.append("Description: ").append(getDescription()).append(","); if (getRoleArn() != null) sb.append("RoleArn: ").append(getRoleArn()).append(","); if (getKnowledgeBaseConfiguration() != null) sb.append("KnowledgeBaseConfiguration: ").append(getKnowledgeBaseConfiguration()).append(","); if (getStorageConfiguration() != null) sb.append("StorageConfiguration: ").append(getStorageConfiguration()).append(","); if (getStatus() != null) sb.append("Status: ").append(getStatus()).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()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof KnowledgeBase == false) return false; KnowledgeBase other = (KnowledgeBase) obj; if (other.getKnowledgeBaseId() == null ^ this.getKnowledgeBaseId() == null) return false; if (other.getKnowledgeBaseId() != null && other.getKnowledgeBaseId().equals(this.getKnowledgeBaseId()) == false) return false; if (other.getName() == null ^ this.getName() == null) return false; if (other.getName() != null && other.getName().equals(this.getName()) == false) return false; if (other.getKnowledgeBaseArn() == null ^ this.getKnowledgeBaseArn() == null) return false; if (other.getKnowledgeBaseArn() != null && other.getKnowledgeBaseArn().equals(this.getKnowledgeBaseArn()) == 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.getRoleArn() == null ^ this.getRoleArn() == null) return false; if (other.getRoleArn() != null && other.getRoleArn().equals(this.getRoleArn()) == 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.getStorageConfiguration() == null ^ this.getStorageConfiguration() == null) return false; if (other.getStorageConfiguration() != null && other.getStorageConfiguration().equals(this.getStorageConfiguration()) == false) return false; if (other.getStatus() == null ^ this.getStatus() == null) return false; if (other.getStatus() != null && other.getStatus().equals(this.getStatus()) == 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; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getKnowledgeBaseId() == null) ? 0 : getKnowledgeBaseId().hashCode()); hashCode = prime * hashCode + ((getName() == null) ? 0 : getName().hashCode()); hashCode = prime * hashCode + ((getKnowledgeBaseArn() == null) ? 0 : getKnowledgeBaseArn().hashCode()); hashCode = prime * hashCode + ((getDescription() == null) ? 0 : getDescription().hashCode()); hashCode = prime * hashCode + ((getRoleArn() == null) ? 0 : getRoleArn().hashCode()); hashCode = prime * hashCode + ((getKnowledgeBaseConfiguration() == null) ? 0 : getKnowledgeBaseConfiguration().hashCode()); hashCode = prime * hashCode + ((getStorageConfiguration() == null) ? 0 : getStorageConfiguration().hashCode()); hashCode = prime * hashCode + ((getStatus() == null) ? 0 : getStatus().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()); return hashCode; } @Override public KnowledgeBase clone() { try { return (KnowledgeBase) 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.KnowledgeBaseMarshaller.getInstance().marshall(this, protocolMarshaller); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy