PageRenderTime 49ms CodeModel.GetById 16ms 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
Possible License(s): BitTorrent-1.0
  1. package com.paypal.sdk.openidconnect;
  2. import com.paypal.core.rest.JSONFormatter;
  3. public class Error {
  4. /**
  5. * A single ASCII error code from the following enum.
  6. */
  7. private String error;
  8. /**
  9. * A resource ID that indicates the starting resource in the returned results.
  10. */
  11. private String errorDescription;
  12. /**
  13. * 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.
  14. */
  15. private String errorUri;
  16. /**
  17. * Default Constructor
  18. */
  19. public Error() {
  20. }
  21. /**
  22. * Parameterized Constructor
  23. */
  24. public Error(String error) {
  25. this.error = error;
  26. }
  27. /**
  28. * Setter for error
  29. */
  30. public void setError(String error) {
  31. this.error = error;
  32. }
  33. /**
  34. * Getter for error
  35. */
  36. public String getError() {
  37. return this.error;
  38. }
  39. /**
  40. * Setter for errorDescription
  41. */
  42. public void setErrorDescription(String errorDescription) {
  43. this.errorDescription = errorDescription;
  44. }
  45. /**
  46. * Getter for errorDescription
  47. */
  48. public String getErrorDescription() {
  49. return this.errorDescription;
  50. }
  51. /**
  52. * Setter for errorUri
  53. */
  54. public void setErrorUri(String errorUri) {
  55. this.errorUri = errorUri;
  56. }
  57. /**
  58. * Getter for errorUri
  59. */
  60. public String getErrorUri() {
  61. return this.errorUri;
  62. }
  63. /**
  64. * Returns a JSON string corresponding to object state
  65. *
  66. * @return JSON representation
  67. */
  68. public String toJSON() {
  69. return JSONFormatter.toJSON(this);
  70. }
  71. @Override
  72. public String toString() {
  73. return toJSON();
  74. }
  75. }