rapture.common.RaptureInstanceCapabilities Maven / Gradle / Ivy
/**
* The MIT License (MIT)
*
* Copyright (C) 2011-2016 Incapture Technologies LLC
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
/**
* This file is autogenerated and any changes will be overwritten.
*/
package rapture.common;
import rapture.common.*;
import rapture.object.Searchable;
import rapture.object.Storable;
import rapture.object.Debugable;
import rapture.common.version.ApiVersion;
import rapture.common.impl.jackson.JacksonUtil;
import java.util.Map;
import java.util.HashMap;
import com.fasterxml.jackson.annotation.JsonProperty;
/**
*
**/
@SuppressWarnings("all")
public class RaptureInstanceCapabilities implements RaptureTransferObject, Debugable ,Storable {
/*
* Start of field 'server' (String)
*/
private String server;
@JsonProperty("server")
public String getServer() {
return server;
}
@JsonProperty("server")
public void setServer(String server) {
this.server = server ;
}
/*
* end of field 'server' (String)
*/
/*
* Start of field 'instanceName' (String)
*/
private String instanceName;
@JsonProperty("instanceName")
public String getInstanceName() {
return instanceName;
}
@JsonProperty("instanceName")
public void setInstanceName(String instanceName) {
this.instanceName = instanceName ;
}
/*
* end of field 'instanceName' (String)
*/
/*
* Start of field 'capabilities' (Map)
*/
private Map capabilities = new HashMap();
@JsonProperty("capabilities")
public Map getCapabilities() {
return capabilities;
}
@JsonProperty("capabilities")
public void setCapabilities(Map capabilities) {
this.capabilities = capabilities ;
}
/*
* end of field 'capabilities' (Map)
*/
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + ((server == null) ? 0 : server.hashCode());
result = prime * result + ((capabilities == null) ? 0 : capabilities.hashCode());
result = prime * result + ((instanceName == null) ? 0 : instanceName.hashCode());
return result;
}
@Override
public boolean equals(Object obj) {
if (this == obj) return true;
if (obj == null) return false;
if (getClass() != obj.getClass()) return false;
RaptureInstanceCapabilities other = (RaptureInstanceCapabilities) obj;
if (server == null) {
if (other.server != null) {
return false;
}
} else if (!server.equals(other.server)) {
return false;
}
if (capabilities == null) {
if (other.capabilities != null) {
return false;
}
} else if (!capabilities.equals(other.capabilities)) {
return false;
}
if (instanceName == null) {
if (other.instanceName != null) {
return false;
}
} else if (!instanceName.equals(other.instanceName)) {
return false;
}
return true;
}
/**/
public String debug() {
StringBuilder sb = new StringBuilder();
{
sb.append(" server= ");
Object o = server;
if (o != null) {
if (o instanceof java.util.Collection) {
sb.append("{ ");
for (Object oo : (java.util.Collection>) o) {
if (oo == null) sb.append("null");
else if (oo instanceof Debugable) sb.append(((Debugable) oo).debug());
else sb.append(oo.toString()).append(", ");
}
sb.append(" } ");
} else {
if (o instanceof Debugable) sb.append(((Debugable) o).debug());
else sb.append(o.toString());
}
}
}
{
sb.append(" capabilities= ");
Object o = capabilities;
if (o != null) {
if (o instanceof java.util.Collection) {
sb.append("{ ");
for (Object oo : (java.util.Collection>) o) {
if (oo == null) sb.append("null");
else if (oo instanceof Debugable) sb.append(((Debugable) oo).debug());
else sb.append(oo.toString()).append(", ");
}
sb.append(" } ");
} else {
if (o instanceof Debugable) sb.append(((Debugable) o).debug());
else sb.append(o.toString());
}
}
}
{
sb.append(" instanceName= ");
Object o = instanceName;
if (o != null) {
if (o instanceof java.util.Collection) {
sb.append("{ ");
for (Object oo : (java.util.Collection>) o) {
if (oo == null) sb.append("null");
else if (oo instanceof Debugable) sb.append(((Debugable) oo).debug());
else sb.append(oo.toString()).append(", ");
}
sb.append(" } ");
} else {
if (o instanceof Debugable) sb.append(((Debugable) o).debug());
else sb.append(o.toString());
}
}
}
return sb.append("\n").toString();
}
@Override
public String getStoragePath() {
// Add key fields
return new RaptureInstanceCapabilitiesPathBuilder()
.server(getServer())
.instanceName(getInstanceName())
.buildStoragePath();
}
@Override
public RaptureURI getStorageLocation() {
return new RaptureInstanceCapabilitiesPathBuilder()
.server(getServer())
.instanceName(getInstanceName())
.buildStorageLocation();
}
@Override
public String toString() {
return JacksonUtil.jsonFromObject(this);
}
private ApiVersion _raptureVersion;
@JsonProperty("_raptureVersion")
public ApiVersion get_raptureVersion() {
return _raptureVersion;
}
@JsonProperty("_raptureVersion")
public void set_raptureVersion(ApiVersion _raptureVersion) {
this._raptureVersion = _raptureVersion;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy