org.odpi.openmetadata.accessservices.assetowner.rest.FileSystemResponse Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of asset-owner-api Show documentation
Show all versions of asset-owner-api Show documentation
API classes for the Asset Owner Open Metadata Access Service (OMAS).
/* SPDX-License-Identifier: Apache-2.0 */
/* Copyright Contributors to the ODPi Egeria project. */
package org.odpi.openmetadata.accessservices.assetowner.rest;
import com.fasterxml.jackson.annotation.JsonAutoDetect;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonInclude;
import org.odpi.openmetadata.accessservices.assetowner.metadataelements.FileSystemElement;
import org.odpi.openmetadata.accessservices.assetowner.properties.FileSystemProperties;
import java.util.Arrays;
import java.util.Objects;
import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE;
import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY;
/**
* FileSystemResponse is the response structure used on the OMAS REST API calls that return the properties
* for a file system.
*/
@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE)
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonIgnoreProperties(ignoreUnknown=true)
public class FileSystemResponse extends AssetOwnerOMASAPIResponse
{
private static final long serialVersionUID = 1L;
private FileSystemElement fileSystem = null;
/**
* Default constructor
*/
public FileSystemResponse()
{
super();
}
/**
* Copy/clone constructor
*
* @param template object to copy
*/
public FileSystemResponse(FileSystemResponse template)
{
super(template);
if (template != null)
{
this.fileSystem = template.getFileSystem();
}
}
/**
* Return the fileSystem result.
*
* @return bean
*/
public FileSystemElement getFileSystem()
{
return fileSystem;
}
/**
* Set up the fileSystem result.
*
* @param fileSystem - bean
*/
public void setFileSystem(FileSystemElement fileSystem)
{
this.fileSystem = fileSystem;
}
/**
* JSON-style toString
*
* @return return string containing the property names and values
*/
@Override
public String toString()
{
return "FileSystemResponse{" +
"fileSystem=" + fileSystem +
", exceptionClassName='" + getExceptionClassName() + '\'' +
", exceptionCausedBy='" + getExceptionCausedBy() + '\'' +
", actionDescription='" + getActionDescription() + '\'' +
", relatedHTTPCode=" + getRelatedHTTPCode() +
", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' +
", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' +
", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) +
", exceptionSystemAction='" + getExceptionSystemAction() + '\'' +
", exceptionUserAction='" + getExceptionUserAction() + '\'' +
", exceptionProperties=" + getExceptionProperties() +
'}';
}
/**
* Return comparison result based on the content of the properties.
*
* @param objectToCompare test object
* @return result of comparison
*/
@Override
public boolean equals(Object objectToCompare)
{
if (this == objectToCompare)
{
return true;
}
if (!(objectToCompare instanceof FileSystemResponse))
{
return false;
}
if (!super.equals(objectToCompare))
{
return false;
}
FileSystemResponse that = (FileSystemResponse) objectToCompare;
return Objects.equals(fileSystem, that.fileSystem);
}
/**
* Return hash code for this object
*
* @return int hash code
*/
@Override
public int hashCode()
{
return Objects.hash(fileSystem);
}
}