rapture.common.TypeArchiveConfig 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 rapture.common.Scheme;
import rapture.object.Addressable;
import rapture.common.model.IndexConfig;
import com.fasterxml.jackson.annotation.JsonProperty;
/**
*
**/
@SuppressWarnings("all")
public class TypeArchiveConfig implements RaptureTransferObject, Debugable ,Storable , Addressable {
/*
* Start of field 'authority' (String)
*/
private String authority;
@JsonProperty("authority")
public String getAuthority() {
return authority;
}
@JsonProperty("authority")
public void setAuthority(String authority) {
this.authority = authority ;
}
/*
* end of field 'authority' (String)
*/
/*
* Start of field 'typeName' (String)
*/
private String typeName;
@JsonProperty("typeName")
public String getTypeName() {
return typeName;
}
@JsonProperty("typeName")
public void setTypeName(String typeName) {
this.typeName = typeName ;
}
/*
* end of field 'typeName' (String)
*/
/*
* Start of field 'useScript' (Boolean)
*/
private Boolean useScript = false;
@JsonProperty("useScript")
public Boolean getUseScript() {
return useScript;
}
@JsonProperty("useScript")
public void setUseScript(Boolean useScript) {
this.useScript = useScript ;
}
/*
* end of field 'useScript' (Boolean)
*/
/*
* Start of field 'scriptName' (String)
*/
private String scriptName = "";
@JsonProperty("scriptName")
public String getScriptName() {
return scriptName;
}
@JsonProperty("scriptName")
public void setScriptName(String scriptName) {
this.scriptName = scriptName ;
}
/*
* end of field 'scriptName' (String)
*/
/*
* Start of field 'versionsToKeep' (Long)
*/
private Long versionsToKeep = new Long(-1);
@JsonProperty("versionsToKeep")
public Long getVersionsToKeep() {
return versionsToKeep;
}
@JsonProperty("versionsToKeep")
public void setVersionsToKeep(Long versionsToKeep) {
this.versionsToKeep = versionsToKeep ;
}
/*
* end of field 'versionsToKeep' (Long)
*/
/*
* Start of field 'timeRangeToKeepInDays' (Long)
*/
private Long timeRangeToKeepInDays = new Long(-1);
@JsonProperty("timeRangeToKeepInDays")
public Long getTimeRangeToKeepInDays() {
return timeRangeToKeepInDays;
}
@JsonProperty("timeRangeToKeepInDays")
public void setTimeRangeToKeepInDays(Long timeRangeToKeepInDays) {
this.timeRangeToKeepInDays = timeRangeToKeepInDays ;
}
/*
* end of field 'timeRangeToKeepInDays' (Long)
*/
//@Override
public RaptureURI getAddressURI() {
return new RaptureURI(getStoragePath(), Scheme.DOCUMENT);
// return new DOCUMENTURI(getStoragePath());
}
public static final Scheme scheme = Scheme.DOCUMENT;
//@Override
public Scheme getScheme() {
return scheme;
}
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + ((authority == null) ? 0 : authority.hashCode());
result = prime * result + ((typeName == null) ? 0 : typeName.hashCode());
result = prime * result + ((scriptName == null) ? 0 : scriptName.hashCode());
result = prime * result + ((timeRangeToKeepInDays == null) ? 0 : timeRangeToKeepInDays.hashCode());
result = prime * result + ((useScript == null) ? 0 : useScript.hashCode());
result = prime * result + ((versionsToKeep == null) ? 0 : versionsToKeep.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;
TypeArchiveConfig other = (TypeArchiveConfig) obj;
if (authority == null) {
if (other.authority != null) {
return false;
}
} else if (!authority.equals(other.authority)) {
return false;
}
if (typeName == null) {
if (other.typeName != null) {
return false;
}
} else if (!typeName.equals(other.typeName)) {
return false;
}
if (scriptName == null) {
if (other.scriptName != null) {
return false;
}
} else if (!scriptName.equals(other.scriptName)) {
return false;
}
if (timeRangeToKeepInDays == null) {
if (other.timeRangeToKeepInDays != null) {
return false;
}
} else if (!timeRangeToKeepInDays.equals(other.timeRangeToKeepInDays)) {
return false;
}
if (useScript == null) {
if (other.useScript != null) {
return false;
}
} else if (!useScript.equals(other.useScript)) {
return false;
}
if (versionsToKeep == null) {
if (other.versionsToKeep != null) {
return false;
}
} else if (!versionsToKeep.equals(other.versionsToKeep)) {
return false;
}
return true;
}
/**/
public String debug() {
StringBuilder sb = new StringBuilder();
{
sb.append(" authority= ");
Object o = authority;
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(" typeName= ");
Object o = typeName;
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(" scriptName= ");
Object o = scriptName;
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(" timeRangeToKeepInDays= ");
Object o = timeRangeToKeepInDays;
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(" useScript= ");
Object o = useScript;
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(" versionsToKeep= ");
Object o = versionsToKeep;
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 TypeArchiveConfigPathBuilder()
.authority(getAuthority())
.typeName(getTypeName())
.buildStoragePath();
}
@Override
public RaptureURI getStorageLocation() {
return new TypeArchiveConfigPathBuilder()
.authority(getAuthority())
.typeName(getTypeName())
.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