
com.amazonaws.services.bedrockagentruntime.model.RetrievalResultLocation 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 information about the data source location.
*
*
* This data type is used in the following API operations:
*
*
* -
*
* Retrieve response – in the location
field
*
*
* -
*
* RetrieveAndGenerate response – in the location
field
*
*
* -
*
* InvokeAgent response – in the locatino
field
*
*
*
*
* @see AWS API Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class RetrievalResultLocation implements Serializable, Cloneable, StructuredPojo {
/**
*
* The Confluence data source location.
*
*/
private RetrievalResultConfluenceLocation confluenceLocation;
/**
*
* The S3 data source location.
*
*/
private RetrievalResultS3Location s3Location;
/**
*
* The Salesforce data source location.
*
*/
private RetrievalResultSalesforceLocation salesforceLocation;
/**
*
* The SharePoint data source location.
*
*/
private RetrievalResultSharePointLocation sharePointLocation;
/**
*
* The type of data source location.
*
*/
private String type;
/**
*
* The web URL/URLs data source location.
*
*/
private RetrievalResultWebLocation webLocation;
/**
*
* The Confluence data source location.
*
*
* @param confluenceLocation
* The Confluence data source location.
*/
public void setConfluenceLocation(RetrievalResultConfluenceLocation confluenceLocation) {
this.confluenceLocation = confluenceLocation;
}
/**
*
* The Confluence data source location.
*
*
* @return The Confluence data source location.
*/
public RetrievalResultConfluenceLocation getConfluenceLocation() {
return this.confluenceLocation;
}
/**
*
* The Confluence data source location.
*
*
* @param confluenceLocation
* The Confluence data source location.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public RetrievalResultLocation withConfluenceLocation(RetrievalResultConfluenceLocation confluenceLocation) {
setConfluenceLocation(confluenceLocation);
return this;
}
/**
*
* The S3 data source location.
*
*
* @param s3Location
* The S3 data source location.
*/
public void setS3Location(RetrievalResultS3Location s3Location) {
this.s3Location = s3Location;
}
/**
*
* The S3 data source location.
*
*
* @return The S3 data source location.
*/
public RetrievalResultS3Location getS3Location() {
return this.s3Location;
}
/**
*
* The S3 data source location.
*
*
* @param s3Location
* The S3 data source location.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public RetrievalResultLocation withS3Location(RetrievalResultS3Location s3Location) {
setS3Location(s3Location);
return this;
}
/**
*
* The Salesforce data source location.
*
*
* @param salesforceLocation
* The Salesforce data source location.
*/
public void setSalesforceLocation(RetrievalResultSalesforceLocation salesforceLocation) {
this.salesforceLocation = salesforceLocation;
}
/**
*
* The Salesforce data source location.
*
*
* @return The Salesforce data source location.
*/
public RetrievalResultSalesforceLocation getSalesforceLocation() {
return this.salesforceLocation;
}
/**
*
* The Salesforce data source location.
*
*
* @param salesforceLocation
* The Salesforce data source location.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public RetrievalResultLocation withSalesforceLocation(RetrievalResultSalesforceLocation salesforceLocation) {
setSalesforceLocation(salesforceLocation);
return this;
}
/**
*
* The SharePoint data source location.
*
*
* @param sharePointLocation
* The SharePoint data source location.
*/
public void setSharePointLocation(RetrievalResultSharePointLocation sharePointLocation) {
this.sharePointLocation = sharePointLocation;
}
/**
*
* The SharePoint data source location.
*
*
* @return The SharePoint data source location.
*/
public RetrievalResultSharePointLocation getSharePointLocation() {
return this.sharePointLocation;
}
/**
*
* The SharePoint data source location.
*
*
* @param sharePointLocation
* The SharePoint data source location.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public RetrievalResultLocation withSharePointLocation(RetrievalResultSharePointLocation sharePointLocation) {
setSharePointLocation(sharePointLocation);
return this;
}
/**
*
* The type of data source location.
*
*
* @param type
* The type of data source location.
* @see RetrievalResultLocationType
*/
public void setType(String type) {
this.type = type;
}
/**
*
* The type of data source location.
*
*
* @return The type of data source location.
* @see RetrievalResultLocationType
*/
public String getType() {
return this.type;
}
/**
*
* The type of data source location.
*
*
* @param type
* The type of data source location.
* @return Returns a reference to this object so that method calls can be chained together.
* @see RetrievalResultLocationType
*/
public RetrievalResultLocation withType(String type) {
setType(type);
return this;
}
/**
*
* The type of data source location.
*
*
* @param type
* The type of data source location.
* @return Returns a reference to this object so that method calls can be chained together.
* @see RetrievalResultLocationType
*/
public RetrievalResultLocation withType(RetrievalResultLocationType type) {
this.type = type.toString();
return this;
}
/**
*
* The web URL/URLs data source location.
*
*
* @param webLocation
* The web URL/URLs data source location.
*/
public void setWebLocation(RetrievalResultWebLocation webLocation) {
this.webLocation = webLocation;
}
/**
*
* The web URL/URLs data source location.
*
*
* @return The web URL/URLs data source location.
*/
public RetrievalResultWebLocation getWebLocation() {
return this.webLocation;
}
/**
*
* The web URL/URLs data source location.
*
*
* @param webLocation
* The web URL/URLs data source location.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public RetrievalResultLocation withWebLocation(RetrievalResultWebLocation webLocation) {
setWebLocation(webLocation);
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 (getConfluenceLocation() != null)
sb.append("ConfluenceLocation: ").append(getConfluenceLocation()).append(",");
if (getS3Location() != null)
sb.append("S3Location: ").append(getS3Location()).append(",");
if (getSalesforceLocation() != null)
sb.append("SalesforceLocation: ").append(getSalesforceLocation()).append(",");
if (getSharePointLocation() != null)
sb.append("SharePointLocation: ").append(getSharePointLocation()).append(",");
if (getType() != null)
sb.append("Type: ").append(getType()).append(",");
if (getWebLocation() != null)
sb.append("WebLocation: ").append(getWebLocation());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof RetrievalResultLocation == false)
return false;
RetrievalResultLocation other = (RetrievalResultLocation) obj;
if (other.getConfluenceLocation() == null ^ this.getConfluenceLocation() == null)
return false;
if (other.getConfluenceLocation() != null && other.getConfluenceLocation().equals(this.getConfluenceLocation()) == false)
return false;
if (other.getS3Location() == null ^ this.getS3Location() == null)
return false;
if (other.getS3Location() != null && other.getS3Location().equals(this.getS3Location()) == false)
return false;
if (other.getSalesforceLocation() == null ^ this.getSalesforceLocation() == null)
return false;
if (other.getSalesforceLocation() != null && other.getSalesforceLocation().equals(this.getSalesforceLocation()) == false)
return false;
if (other.getSharePointLocation() == null ^ this.getSharePointLocation() == null)
return false;
if (other.getSharePointLocation() != null && other.getSharePointLocation().equals(this.getSharePointLocation()) == false)
return false;
if (other.getType() == null ^ this.getType() == null)
return false;
if (other.getType() != null && other.getType().equals(this.getType()) == false)
return false;
if (other.getWebLocation() == null ^ this.getWebLocation() == null)
return false;
if (other.getWebLocation() != null && other.getWebLocation().equals(this.getWebLocation()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getConfluenceLocation() == null) ? 0 : getConfluenceLocation().hashCode());
hashCode = prime * hashCode + ((getS3Location() == null) ? 0 : getS3Location().hashCode());
hashCode = prime * hashCode + ((getSalesforceLocation() == null) ? 0 : getSalesforceLocation().hashCode());
hashCode = prime * hashCode + ((getSharePointLocation() == null) ? 0 : getSharePointLocation().hashCode());
hashCode = prime * hashCode + ((getType() == null) ? 0 : getType().hashCode());
hashCode = prime * hashCode + ((getWebLocation() == null) ? 0 : getWebLocation().hashCode());
return hashCode;
}
@Override
public RetrievalResultLocation clone() {
try {
return (RetrievalResultLocation) 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.RetrievalResultLocationMarshaller.getInstance().marshall(this, protocolMarshaller);
}
}