Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import android.support.annotation.Keep;
- import com.google.gson.Gson;
- import com.google.gson.GsonBuilder;
- import com.google.gson.annotations.Expose;
- import com.google.gson.annotations.SerializedName;
- import org.parceler.Parcel;
- @Parcel @Keep
- public class LoginRequest {
- static Gson gson = new GsonBuilder().setPrettyPrinting().create();
- @SerializedName("username")
- @Expose
- String username;
- @SerializedName("password")
- @Expose
- String password;
- public LoginRequest(){
- }
- /**
- *
- * @return
- * The username
- */
- public String getUsername() {
- return username;
- }
- /**
- *
- * @param username
- * The username
- */
- public void setUsername(String username) {
- this.username = username;
- }
- /**
- *
- * @return
- * The password
- */
- public String getPassword() {
- return password;
- }
- /**
- *
- * @param password
- * The password
- */
- public void setPassword(String password) {
- this.password = password;
- }
- @Override
- public String toString() {
- return gson.toJson(this);
- }
- }
- -keep class com.google.gson.** { *; }
- # Classes that will be serialized/deserialized over Gson
- -keep class com.myclass.data.model.** { *; }
- @SerializedName("username")
- @Expose
- @Keep
- String username;
- @SerializedName("password")
- @Expose
- @Keep
- String password;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement