rapture.common.RaptureScript 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.List;
import rapture.common.Scheme;
import rapture.object.Addressable;
import rapture.common.model.IndexConfig;
import com.fasterxml.jackson.annotation.JsonProperty;
/**
*
**/
@SuppressWarnings("all")
public class RaptureScript implements RaptureTransferObject, Debugable ,Storable , Addressable {
/*
* Start of field 'name' (String)
*/
private String name;
@JsonProperty("name")
public String getName() {
return name;
}
@JsonProperty("name")
public void setName(String name) {
this.name = name ;
}
/*
* end of field 'name' (String)
*/
/*
* Start of field 'script' (String)
*/
private String script;
@JsonProperty("script")
public String getScript() {
return script;
}
@JsonProperty("script")
public void setScript(String script) {
this.script = script ;
}
/*
* end of field 'script' (String)
*/
/*
* Start of field 'language' (RaptureScriptLanguage)
*/
private RaptureScriptLanguage language;
@JsonProperty("language")
public RaptureScriptLanguage getLanguage() {
return language;
}
@JsonProperty("language")
public void setLanguage(RaptureScriptLanguage language) {
this.language = language ;
}
/*
* end of field 'language' (RaptureScriptLanguage)
*/
/*
* Start of field 'purpose' (RaptureScriptPurpose)
*/
private RaptureScriptPurpose purpose;
@JsonProperty("purpose")
public RaptureScriptPurpose getPurpose() {
return purpose;
}
@JsonProperty("purpose")
public void setPurpose(RaptureScriptPurpose purpose) {
this.purpose = purpose ;
}
/*
* end of field 'purpose' (RaptureScriptPurpose)
*/
/*
* 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 'parameters' (List)
*/
private List parameters;
@JsonProperty("parameters")
public List getParameters() {
return parameters;
}
@JsonProperty("parameters")
public void setParameters(List parameters) {
this.parameters = parameters ;
}
/*
* end of field 'parameters' (List)
*/
//@Override
public RaptureURI getAddressURI() {
return new RaptureURI(getStoragePath(), Scheme.SCRIPT);
// return new SCRIPTURI(getStoragePath());
}
public static final Scheme scheme = Scheme.SCRIPT;
//@Override
public Scheme getScheme() {
return scheme;
}
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + ((purpose == null) ? 0 : purpose.hashCode());
result = prime * result + ((authority == null) ? 0 : authority.hashCode());
result = prime * result + ((name == null) ? 0 : name.hashCode());
result = prime * result + ((language == null) ? 0 : language.hashCode());
result = prime * result + ((parameters == null) ? 0 : parameters.hashCode());
result = prime * result + ((script == null) ? 0 : script.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;
RaptureScript other = (RaptureScript) obj;
if (purpose == null) {
if (other.purpose != null) {
return false;
}
} else if (!purpose.equals(other.purpose)) {
return false;
}
if (authority == null) {
if (other.authority != null) {
return false;
}
} else if (!authority.equals(other.authority)) {
return false;
}
if (name == null) {
if (other.name != null) {
return false;
}
} else if (!name.equals(other.name)) {
return false;
}
if (language == null) {
if (other.language != null) {
return false;
}
} else if (!language.equals(other.language)) {
return false;
}
if (parameters == null) {
if (other.parameters != null) {
return false;
}
} else if (!parameters.equals(other.parameters)) {
return false;
}
if (script == null) {
if (other.script != null) {
return false;
}
} else if (!script.equals(other.script)) {
return false;
}
return true;
}
/**/
public String debug() {
StringBuilder sb = new StringBuilder();
{
sb.append(" purpose= ");
Object o = purpose;
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(" 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(" name= ");
Object o = name;
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(" language= ");
Object o = language;
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(" parameters= ");
Object o = parameters;
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(" script= ");
Object o = script;
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 RaptureScriptPathBuilder()
.authority(getAuthority())
.name(getName())
.buildStoragePath();
}
@Override
public RaptureURI getStorageLocation() {
return new RaptureScriptPathBuilder()
.authority(getAuthority())
.name(getName())
.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