// Path: impala/src/main/java/hainguyen/impala/network/model/LoginRequest.java
// @AutoValue
// public abstract class LoginRequest {
//     @SerializedName("Email")
//     public abstract String email();
// 
//     @SerializedName("Password")
//     public abstract  String password();
// 
//     public static Builder builder() {
//         return new AutoValue_LoginRequest.Builder();
//     }
// 
//     @AutoValue.Builder
//     public abstract static class Builder {
//         public abstract Builder setEmail(String value);
//         public abstract Builder setPassword(String value);
//         public abstract LoginRequest build();
//     }
// 
//     public static TypeAdapter<LoginRequest> typeAdapter(Gson gson) {
//         return new AutoValue_LoginRequest.GsonTypeAdapter(gson);
//     }
// }
// 
// Path: impala/src/main/java/hainguyen/impala/network/model/LoginResponse.java
// @AutoValue public abstract class LoginResponse {
// 
//     @SerializedName("UserId") public abstract Integer userID();
// 
//     @SerializedName("FullName") public abstract String fullName();
// 
//     @SerializedName("DateOfBirth") public abstract String dateOfBirth();
// 
//     @SerializedName("Gender") public abstract String gender();
// 
//     @SerializedName("Address") public abstract String address();
// 
//     @SerializedName("Phone") public abstract String phone();
// 
//     public static LoginResponse.Builder builder() {
//         return new AutoValue_LoginResponse.Builder();
//     }
// 
//     @AutoValue.Builder
//     public abstract static class Builder {
//         public abstract Builder userID(Integer value);
//         public abstract Builder fullName(String value);
//         public abstract Builder dateOfBirth(String value);
//         public abstract Builder gender(String value);
//         public abstract Builder address(String value);
//         public abstract Builder phone(String value);
//         public abstract LoginResponse build();
//     }
// 
//     public static TypeAdapter<LoginResponse> typeAdapter(Gson gson) {
//         return new AutoValue_LoginResponse.GsonTypeAdapter(gson);
//     }
// 
//     //For testing purpose
//     public static LoginResponse create(Integer id, String name, String dateOfBirth, String gender,
//                                        String address, String phone) {
//         return new AutoValue_LoginResponse(id, name, dateOfBirth, gender, address, phone);
//     }
// 
// }


import hainguyen.impala.network.model.LoginRequest;
import hainguyen.impala.network.model.LoginResponse;
import rx.Observable;
package hainguyen.impala.network;


public class LoginRepositoryImpl implements LoginRepository {

    private LoginService loginService;

    public LoginRepositoryImpl(LoginService service) {
        this.loginService = service;
    }

    @Override public Observable<LoginResponse> login(LoginRequest request) {
// Path: impala/src/main/java/hainguyen/impala/network/model/LoginRequest.java
// @AutoValue
// public abstract class LoginRequest {
//     @SerializedName("Email")
//     public abstract String email();
// 
//     @SerializedName("Password")
//     public abstract  String password();
// 
//     public static Builder builder() {
//         return new AutoValue_LoginRequest.Builder();
//     }
// 
//     @AutoValue.Builder
//     public abstract static class Builder {
//         public abstract Builder setEmail(String value);
//         public abstract Builder setPassword(String value);
//         public abstract LoginRequest build();
//     }
// 
//     public static TypeAdapter<LoginRequest> typeAdapter(Gson gson) {
//         return new AutoValue_LoginRequest.GsonTypeAdapter(gson);
//     }
// }
// 
// Path: impala/src/main/java/hainguyen/impala/network/model/LoginResponse.java
// @AutoValue public abstract class LoginResponse {
// 
//     @SerializedName("UserId") public abstract Integer userID();
// 
//     @SerializedName("FullName") public abstract String fullName();
// 
//     @SerializedName("DateOfBirth") public abstract String dateOfBirth();
// 
//     @SerializedName("Gender") public abstract String gender();
// 
//     @SerializedName("Address") public abstract String address();
// 
//     @SerializedName("Phone") public abstract String phone();
// 
//     public static LoginResponse.Builder builder() {
//         return new AutoValue_LoginResponse.Builder();
//     }
// 
//     @AutoValue.Builder
//     public abstract static class Builder {
//         public abstract Builder userID(Integer value);
//         public abstract Builder fullName(String value);
//         public abstract Builder dateOfBirth(String value);
//         public abstract Builder gender(String value);
//         public abstract Builder address(String value);
//         public abstract Builder phone(String value);
//         public abstract LoginResponse build();
//     }
// 
//     public static TypeAdapter<LoginResponse> typeAdapter(Gson gson) {
//         return new AutoValue_LoginResponse.GsonTypeAdapter(gson);
//     }
// 
//     //For testing purpose
//     public static LoginResponse create(Integer id, String name, String dateOfBirth, String gender,
//                                        String address, String phone) {
//         return new AutoValue_LoginResponse(id, name, dateOfBirth, gender, address, phone);
//     }
// 
// }


// Path: impala/src/main/java/hainguyen/impala/network/LoginRepositoryImpl.java
import hainguyen.impala.network.model.LoginRequest;
import hainguyen.impala.network.model.LoginResponse;
import rx.Observable;

package hainguyen.impala.network;


public class LoginRepositoryImpl implements LoginRepository {

    private LoginService loginService;

    public LoginRepositoryImpl(LoginService service) {
        this.loginService = service;
    }

    @Override public Observable<LoginResponse> login(LoginRequest request) {
        return loginService.login(request);