Advertisement
Guest User

Untitled

a guest
Aug 23rd, 2017
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.94 KB | None | 0 0
  1. public class Login {
  2.  
  3. private static final String KEY_USERNAME = "username";
  4. private static final String KEY_PASSWORD = "password";
  5. private static final String KEY_DEVICEID = "deviceid";
  6. private static final String KEY_DEVICENAME = "devicename";
  7. private static final String KEY_NOTIFICATIONTOKEN = "notificationtoken";
  8.  
  9. @SerializedName(KEY_USERNAME)
  10. private String username;
  11.  
  12. @SerializedName(KEY_PASSWORD)
  13. private String password;
  14.  
  15. @SerializedName(KEY_DEVICEID)
  16. private String deviceid;
  17.  
  18. @SerializedName(KEY_DEVICENAME)
  19. private String devicename;
  20.  
  21. @SerializedName(KEY_NOTIFICATIONTOKEN)
  22. private String notificationtoken;
  23.  
  24. public Login() {
  25. }
  26.  
  27. private Login(Builder builder) {
  28. username = builder.username;
  29. password = builder.password;
  30. deviceid = builder.deviceid;
  31. devicename = builder.devicename;
  32. notificationtoken = builder.notificationtoken;
  33. }
  34.  
  35. public static Builder newBuilder() {
  36. return new Builder();
  37. }
  38.  
  39. public static final class Builder {
  40. private String username;
  41. private String password;
  42. private String deviceid;
  43. private String devicename;
  44. private String notificationtoken;
  45.  
  46. private Builder() {
  47. }
  48.  
  49. public Builder withUsername(String val) {
  50. username = val;
  51. return this;
  52. }
  53.  
  54. public Builder withPassword(String val) {
  55. password = val;
  56. return this;
  57. }
  58.  
  59. public Builder withDeviceid(String val) {
  60. deviceid = val;
  61. return this;
  62. }
  63.  
  64. public Builder withDevicename(String val) {
  65. devicename = val;
  66. return this;
  67. }
  68.  
  69. public Builder withNotificationtoken(String val) {
  70. notificationtoken = val;
  71. return this;
  72. }
  73.  
  74. public Login build() {
  75. return new Login(this);
  76. }
  77. }
  78.  
  79. // getter
  80. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement