org.odpi.openmetadata.adminservices.rest.EngineHostServicesResponse Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of admin-services-api Show documentation
Show all versions of admin-services-api Show documentation
Provides the definitions that make up the APIs used by external components when communicating
with the open metadata administration services.
/* SPDX-License-Identifier: Apache-2.0 */
/* Copyright Contributors to the ODPi Egeria project. */
package org.odpi.openmetadata.adminservices.rest;
import com.fasterxml.jackson.annotation.JsonAutoDetect;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonInclude;
import org.odpi.openmetadata.adminservices.configuration.properties.EngineHostServicesConfig;
import org.odpi.openmetadata.commonservices.ffdc.rest.FFDCResponseBase;
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;
/**
* EngineHostServicesResponse provides a response object for returning information about a
* list of engine services that are configured for an engine host OMAG Server.
*/
@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE)
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonIgnoreProperties(ignoreUnknown=true)
public class EngineHostServicesResponse extends FFDCResponseBase
{
private EngineHostServicesConfig services;
/**
* Default constructor
*/
public EngineHostServicesResponse()
{
}
/**
* Copy clone constructor
*
* @param template object to copy
*/
public EngineHostServicesResponse(EngineHostServicesResponse template)
{
super(template);
if (template != null)
{
this.services = template.getServices();
}
}
/**
* Return the list of services
*
* @return service descriptions
*/
public EngineHostServicesConfig getServices()
{
return services;
}
/**
* Set up the list of services
*
* @param services service
*/
public void setServices(EngineHostServicesConfig services)
{
this.services = services;
}
/**
* JSON-style toString
*
* @return return string containing the property names and values
*/
@Override
public String toString()
{
return "EngineHostServicesResponse{" +
"services=" + services +
", 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;
}
EngineHostServicesResponse that = (EngineHostServicesResponse) objectToCompare;
return Objects.equals(getServices(), that.getServices());
}
/**
* Return hash code for this object
*
* @return int hash code
*/
@Override
public int hashCode()
{
return Objects.hash(super.hashCode(), getServices());
}
}