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

com.newegg.marketplace.sdk.common.Errors Maven / Gradle / Ivy

package com.newegg.marketplace.sdk.common;

import java.util.ArrayList;
import java.util.List;

import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;

import com.fasterxml.jackson.annotation.JsonProperty;

/**
Copyright (c) 2000-present, Newegg Inc.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
 */

@XmlAccessorType(XmlAccessType.FIELD)
@XmlRootElement(name = "Errors")
public class Errors {

    @XmlElement(name = "Error", required = true)
    @JsonProperty("Error")      
    protected List error;
	
	public List getError() {
		if(error==null) {
			error = new ArrayList();
		}
		return error;
	}

	
	@XmlAccessorType(XmlAccessType.FIELD)
	public static class Error{
	
		@XmlElement(name = "Code")
	    @JsonProperty("Code")
		protected String code;
		@XmlElement(name = "Message")
	    @JsonProperty("Message")
		protected String message;
		
		public String getCode() {
			return code;
		}
		public void setCode(String code) {
			this.code = code;
		}
		public String getMessage() {
			return message;
		}
		public void setMessage(String message) {
			this.message = message;
		}
		
		@Override
		public String toString() {
			return  "Code : "+code + " , Message : " + message ;
		}
	}


	@Override
	public String toString() {
		return " " + error+" ";
	}
	
	
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy