Created
August 23, 2017 14:30
-
-
Save aemxn/7377e0ef6f1d6f28c299018f04375061 to your computer and use it in GitHub Desktop.
Login model
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Login { | |
private static final String KEY_USERNAME = "username"; | |
private static final String KEY_PASSWORD = "password"; | |
private static final String KEY_DEVICEID = "deviceid"; | |
private static final String KEY_DEVICENAME = "devicename"; | |
private static final String KEY_NOTIFICATIONTOKEN = "notificationtoken"; | |
@SerializedName(KEY_USERNAME) | |
private String username; | |
@SerializedName(KEY_PASSWORD) | |
private String password; | |
@SerializedName(KEY_DEVICEID) | |
private String deviceid; | |
@SerializedName(KEY_DEVICENAME) | |
private String devicename; | |
@SerializedName(KEY_NOTIFICATIONTOKEN) | |
private String notificationtoken; | |
public Login() { | |
} | |
private Login(Builder builder) { | |
username = builder.username; | |
password = builder.password; | |
deviceid = builder.deviceid; | |
devicename = builder.devicename; | |
notificationtoken = builder.notificationtoken; | |
} | |
public static Builder newBuilder() { | |
return new Builder(); | |
} | |
public static final class Builder { | |
private String username; | |
private String password; | |
private String deviceid; | |
private String devicename; | |
private String notificationtoken; | |
private Builder() { | |
} | |
public Builder withUsername(String val) { | |
username = val; | |
return this; | |
} | |
public Builder withPassword(String val) { | |
password = val; | |
return this; | |
} | |
public Builder withDeviceid(String val) { | |
deviceid = val; | |
return this; | |
} | |
public Builder withDevicename(String val) { | |
devicename = val; | |
return this; | |
} | |
public Builder withNotificationtoken(String val) { | |
notificationtoken = val; | |
return this; | |
} | |
public Login build() { | |
return new Login(this); | |
} | |
} | |
// getter | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment