All Downloads are FREE. Search and download functionalities are using the official Maven repository.

rapture.common.ErrorWrapper 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 com.fasterxml.jackson.annotation.JsonProperty;

/**
* 
**/
@SuppressWarnings("all")
public class ErrorWrapper  implements RaptureTransferObject, Debugable  {
    /*
    *  Start of field 'id' (String) 
    */
    private String id;

    @JsonProperty("id")
    public String getId() {
       return id;
    }

    @JsonProperty("id")
    public void setId(String id) {
       this.id =  id ;
    }
    /*
    *  end of field 'id' (String) 
    */


    /*
    *  Start of field 'status' (Integer) 
    */
    private Integer status;

    @JsonProperty("status")
    public Integer getStatus() {
       return status;
    }

    @JsonProperty("status")
    public void setStatus(Integer status) {
       this.status =  status ;
    }
    /*
    *  end of field 'status' (Integer) 
    */


    /*
    *  Start of field 'message' (String) 
    */
    private String message;

    @JsonProperty("message")
    public String getMessage() {
       return message;
    }

    @JsonProperty("message")
    public void setMessage(String message) {
       this.message =  message ;
    }
    /*
    *  end of field 'message' (String) 
    */


    /*
    *  Start of field 'stackTrace' (String) 
    */
    private String stackTrace;

    @JsonProperty("stackTrace")
    public String getStackTrace() {
       return stackTrace;
    }

    @JsonProperty("stackTrace")
    public void setStackTrace(String stackTrace) {
       this.stackTrace =  stackTrace ;
    }
    /*
    *  end of field 'stackTrace' (String) 
    */


   

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((id == null) ? 0 : id.hashCode());
        result = prime * result + ((stackTrace == null) ? 0 : stackTrace.hashCode());
        result = prime * result + ((message == null) ? 0 : message.hashCode());
        result = prime * result + ((status == null) ? 0 : status.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;
        
        ErrorWrapper other = (ErrorWrapper) obj;

        if (id == null) {
            if (other.id != null) {
                return false;
            }
        } else if (!id.equals(other.id)) {
            return false;
        }

        if (stackTrace == null) {
            if (other.stackTrace != null) {
                return false;
            }
        } else if (!stackTrace.equals(other.stackTrace)) {
            return false;
        }

        if (message == null) {
            if (other.message != null) {
                return false;
            }
        } else if (!message.equals(other.message)) {
            return false;
        }

        if (status == null) {
            if (other.status != null) {
                return false;
            }
        } else if (!status.equals(other.status)) {
            return false;
        }

           
        return true;
    }


    /**/
    public String debug() {
        StringBuilder sb = new StringBuilder();
            {
                sb.append(" id= ");
                Object o = id;
                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(" stackTrace= ");
                Object o = stackTrace;
                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(" message= ");
                Object o = message;
                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(" status= ");
                Object o = status;
                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 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