org.odpi.openmetadata.accessservices.digitalarchitecture.rest.ConnectionsResponse Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of digital-architecture-api Show documentation
Show all versions of digital-architecture-api Show documentation
API classes for the Digital Architecture Open Metadata Access Service (OMAS).
The newest version!
/* SPDX-License-Identifier: Apache-2.0 */
/* Copyright Contributors to the ODPi Egeria project. */
package org.odpi.openmetadata.accessservices.digitalarchitecture.rest;
import com.fasterxml.jackson.annotation.JsonAutoDetect;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonInclude;
import org.odpi.openmetadata.accessservices.digitalarchitecture.metadataelements.ConnectionElement;
import java.util.Arrays;
import java.util.List;
import java.util.Objects;
import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE;
import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY;
/**
* ConnectionsResponse is a response object for passing back a list of connection objects.
*/
@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE)
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonIgnoreProperties(ignoreUnknown=true)
public class ConnectionsResponse extends DigitalArchitectureOMASAPIResponse
{
private List elementList = null;
/**
* Default constructor
*/
public ConnectionsResponse()
{
}
/**
* Copy/clone constructor
*
* @param template object to copy
*/
public ConnectionsResponse(ConnectionsResponse template)
{
super(template);
if (template != null)
{
elementList = template.getElementList();
}
}
/**
* Return the list of metadata elements.
*
* @return result object
*/
public List getElementList()
{
if (elementList == null)
{
return null;
}
else if (elementList.isEmpty())
{
return null;
}
else
{
return elementList;
}
}
/**
* Set up the list of metadata elements to return.
*
* @param elementList result object
*/
public void setElementList(List elementList)
{
this.elementList = elementList;
}
/**
* JSON-style toString
*
* @return return string containing the property names and values
*/
@Override
public String toString()
{
return "ConnectionsResponse{" +
"element=" + elementList +
", 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 == null || getClass() != objectToCompare.getClass())
{
return false;
}
if (!super.equals(objectToCompare))
{
return false;
}
ConnectionsResponse that = (ConnectionsResponse) objectToCompare;
return Objects.equals(elementList, that.elementList);
}
/**
* Return hash code for this object
*
* @return int hash code
*/
@Override
public int hashCode()
{
return Objects.hash(super.hashCode(), elementList);
}
}