PageRenderTime 22ms CodeModel.GetById 13ms app.highlight 6ms RepoModel.GetById 1ms app.codeStats 0ms

/src/main/java/com/paypal/sdk/openidconnect/Error.java

https://github.com/peterikladious/sdk-core-java
Java | 91 lines | 37 code | 16 blank | 38 comment | 0 complexity | c605c58c523f6ba037d6fa85180681bc MD5 | raw file
 1package com.paypal.sdk.openidconnect;
 2
 3import com.paypal.core.rest.JSONFormatter;
 4
 5public class Error {
 6
 7	/**
 8	 * A single ASCII error code from the following enum.
 9	 */
10	private String error;
11	
12	/**
13	 * A resource ID that indicates the starting resource in the returned results.
14	 */
15	private String errorDescription;
16	
17	/**
18	 * A URI identifying a human-readable web page with information about the error, used to provide the client developer with additional information about the error.
19	 */
20	private String errorUri;
21	
22	/**
23	 * Default Constructor
24	 */
25	public Error() {
26	}
27
28	/**
29	 * Parameterized Constructor
30	 */
31	public Error(String error) {
32		this.error = error;
33	}
34	
35	/**
36	 * Setter for error
37	 */
38	public void setError(String error) {
39		this.error = error;
40 	}
41 	
42 	/**
43	 * Getter for error
44	 */
45	public String getError() {
46		return this.error;
47	}
48	
49	/**
50	 * Setter for errorDescription
51	 */
52	public void setErrorDescription(String errorDescription) {
53		this.errorDescription = errorDescription;
54 	}
55 	
56 	/**
57	 * Getter for errorDescription
58	 */
59	public String getErrorDescription() {
60		return this.errorDescription;
61	}
62	
63	/**
64	 * Setter for errorUri
65	 */
66	public void setErrorUri(String errorUri) {
67		this.errorUri = errorUri;
68 	}
69 	
70 	/**
71	 * Getter for errorUri
72	 */
73	public String getErrorUri() {
74		return this.errorUri;
75	}
76	
77
78	/**
79	 * Returns a JSON string corresponding to object state
80	 * 
81	 * @return JSON representation
82	 */
83	public String toJSON() {
84		return JSONFormatter.toJSON(this);
85	}
86
87	@Override
88	public String toString() {
89		return toJSON();
90	}
91}