Advertisement
Guest User

Untitled

a guest
Jun 24th, 2019
122
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.24 KB | None | 0 0
  1. import android.support.annotation.Keep;
  2.  
  3. import com.google.gson.Gson;
  4. import com.google.gson.GsonBuilder;
  5. import com.google.gson.annotations.Expose;
  6. import com.google.gson.annotations.SerializedName;
  7. import org.parceler.Parcel;
  8.  
  9. @Parcel @Keep
  10. public class LoginRequest {
  11.  
  12. static Gson gson = new GsonBuilder().setPrettyPrinting().create();
  13.  
  14. @SerializedName("username")
  15. @Expose
  16. String username;
  17. @SerializedName("password")
  18. @Expose
  19. String password;
  20.  
  21. public LoginRequest(){
  22.  
  23. }
  24.  
  25. /**
  26. *
  27. * @return
  28. * The username
  29. */
  30. public String getUsername() {
  31. return username;
  32. }
  33.  
  34. /**
  35. *
  36. * @param username
  37. * The username
  38. */
  39. public void setUsername(String username) {
  40. this.username = username;
  41. }
  42.  
  43. /**
  44. *
  45. * @return
  46. * The password
  47. */
  48. public String getPassword() {
  49. return password;
  50. }
  51.  
  52. /**
  53. *
  54. * @param password
  55. * The password
  56. */
  57. public void setPassword(String password) {
  58. this.password = password;
  59. }
  60.  
  61. @Override
  62. public String toString() {
  63. return gson.toJson(this);
  64. }
  65. }
  66.  
  67. -keep class com.google.gson.** { *; }
  68.  
  69. # Classes that will be serialized/deserialized over Gson
  70. -keep class com.myclass.data.model.** { *; }
  71.  
  72. @SerializedName("username")
  73. @Expose
  74. @Keep
  75. String username;
  76. @SerializedName("password")
  77. @Expose
  78. @Keep
  79. String password;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement