// Path: app/src/main/java/io/github/droidkaigi/confsched2017/api/DroidKaigiClient.java
// @Singleton
// public class DroidKaigiClient {
// 
//     private final DroidKaigiService droidKaigiService;
// 
//     private final GithubService githubService;
// 
//     private final GoogleFormService googleFormService;
// 
//     private static final int INCLUDE_ANONYMOUS = 1;
// 
//     private static final int MAX_PER_PAGE = 100;
// 
//     @Inject
//     public DroidKaigiClient(DroidKaigiService droidKaigiService, GithubService githubService,
//             GoogleFormService googleFormService) {
//         this.droidKaigiService = droidKaigiService;
//         this.githubService = githubService;
//         this.googleFormService = googleFormService;
//     }
// 
//     public Single<List<Session>> getSessions(@NonNull Locale locale) {
//         if (locale == Locale.JAPANESE) {
//             return droidKaigiService.getSessionsJa();
//         } else {
//             return droidKaigiService.getSessionsEn();
//         }
//     }
// 
//     public Single<List<Contributor>> getContributors() {
//         return githubService.getContributors("DroidKaigi", "conference-app-2017", INCLUDE_ANONYMOUS, MAX_PER_PAGE);
//     }
// 
//     public Single<Response<Void>> submitSessionFeedback(@NonNull SessionFeedback sessionFeedback) {
//         return googleFormService.submitSessionFeedback(sessionFeedback.sessionId,
//                 sessionFeedback.sessionTitle,
//                 sessionFeedback.relevancy,
//                 sessionFeedback.asExpected,
//                 sessionFeedback.difficulty,
//                 sessionFeedback.knowledgeable,
//                 sessionFeedback.comment);
//     }
// }
// 
// Path: app/src/main/java/io/github/droidkaigi/confsched2017/model/SessionFeedback.java
// @Table
// public class SessionFeedback {
// 
//     @PrimaryKey(auto = false)
//     @Column(indexed = true)
//     @SerializedName("session_id")
//     public int sessionId;
// 
//     @Column
//     @SerializedName("session_title")
//     public String sessionTitle;
// 
//     @Column
//     @SerializedName("relevancy")
//     public int relevancy;
// 
//     @Column
//     @SerializedName("as_expected")
//     public int asExpected;
// 
//     @Column
//     @SerializedName("difficulty")
//     public int difficulty;
// 
//     @Column
//     @SerializedName("knowledgeable")
//     public int knowledgeable;
// 
//     @Column
//     @Nullable
//     @SerializedName("comment")
//     public String comment;
// 
//     @Column
//     @SerializedName("is_submitted")
//     public boolean isSubmitted;
// 
//     public SessionFeedback() {
// 
//     }
// 
//     public SessionFeedback(@NonNull Session session, int relevancy, int asExpected,
//             int difficulty, int knowledgeable, @Nullable String comment) {
//         this.sessionId = session.id;
//         this.sessionTitle = session.title;
//         this.relevancy = relevancy;
//         this.asExpected = asExpected;
//         this.difficulty = difficulty;
//         this.knowledgeable = knowledgeable;
//         this.comment = comment;
//     }
// 
//     public boolean isAllFilled() {
//         return sessionId > 0
//                 && sessionTitle != null
//                 && relevancy > 0
//                 && asExpected > 0
//                 && difficulty > 0
//                 && knowledgeable > 0;
//     }
// }


import javax.inject.Inject;
import io.github.droidkaigi.confsched2017.api.DroidKaigiClient;
import io.github.droidkaigi.confsched2017.model.SessionFeedback;
import io.reactivex.Single;
import retrofit2.Response;
package io.github.droidkaigi.confsched2017.repository.feedbacks;



public class SessionFeedbackRemoteDataSource {

    private final DroidKaigiClient client;

    @Inject
    public SessionFeedbackRemoteDataSource(DroidKaigiClient client) {
        this.client = client;
    }

// Path: app/src/main/java/io/github/droidkaigi/confsched2017/api/DroidKaigiClient.java
// @Singleton
// public class DroidKaigiClient {
// 
//     private final DroidKaigiService droidKaigiService;
// 
//     private final GithubService githubService;
// 
//     private final GoogleFormService googleFormService;
// 
//     private static final int INCLUDE_ANONYMOUS = 1;
// 
//     private static final int MAX_PER_PAGE = 100;
// 
//     @Inject
//     public DroidKaigiClient(DroidKaigiService droidKaigiService, GithubService githubService,
//             GoogleFormService googleFormService) {
//         this.droidKaigiService = droidKaigiService;
//         this.githubService = githubService;
//         this.googleFormService = googleFormService;
//     }
// 
//     public Single<List<Session>> getSessions(@NonNull Locale locale) {
//         if (locale == Locale.JAPANESE) {
//             return droidKaigiService.getSessionsJa();
//         } else {
//             return droidKaigiService.getSessionsEn();
//         }
//     }
// 
//     public Single<List<Contributor>> getContributors() {
//         return githubService.getContributors("DroidKaigi", "conference-app-2017", INCLUDE_ANONYMOUS, MAX_PER_PAGE);
//     }
// 
//     public Single<Response<Void>> submitSessionFeedback(@NonNull SessionFeedback sessionFeedback) {
//         return googleFormService.submitSessionFeedback(sessionFeedback.sessionId,
//                 sessionFeedback.sessionTitle,
//                 sessionFeedback.relevancy,
//                 sessionFeedback.asExpected,
//                 sessionFeedback.difficulty,
//                 sessionFeedback.knowledgeable,
//                 sessionFeedback.comment);
//     }
// }
// 
// Path: app/src/main/java/io/github/droidkaigi/confsched2017/model/SessionFeedback.java
// @Table
// public class SessionFeedback {
// 
//     @PrimaryKey(auto = false)
//     @Column(indexed = true)
//     @SerializedName("session_id")
//     public int sessionId;
// 
//     @Column
//     @SerializedName("session_title")
//     public String sessionTitle;
// 
//     @Column
//     @SerializedName("relevancy")
//     public int relevancy;
// 
//     @Column
//     @SerializedName("as_expected")
//     public int asExpected;
// 
//     @Column
//     @SerializedName("difficulty")
//     public int difficulty;
// 
//     @Column
//     @SerializedName("knowledgeable")
//     public int knowledgeable;
// 
//     @Column
//     @Nullable
//     @SerializedName("comment")
//     public String comment;
// 
//     @Column
//     @SerializedName("is_submitted")
//     public boolean isSubmitted;
// 
//     public SessionFeedback() {
// 
//     }
// 
//     public SessionFeedback(@NonNull Session session, int relevancy, int asExpected,
//             int difficulty, int knowledgeable, @Nullable String comment) {
//         this.sessionId = session.id;
//         this.sessionTitle = session.title;
//         this.relevancy = relevancy;
//         this.asExpected = asExpected;
//         this.difficulty = difficulty;
//         this.knowledgeable = knowledgeable;
//         this.comment = comment;
//     }
// 
//     public boolean isAllFilled() {
//         return sessionId > 0
//                 && sessionTitle != null
//                 && relevancy > 0
//                 && asExpected > 0
//                 && difficulty > 0
//                 && knowledgeable > 0;
//     }
// }


// Path: app/src/main/java/io/github/droidkaigi/confsched2017/repository/feedbacks/SessionFeedbackRemoteDataSource.java
import javax.inject.Inject;
import io.github.droidkaigi.confsched2017.api.DroidKaigiClient;
import io.github.droidkaigi.confsched2017.model.SessionFeedback;
import io.reactivex.Single;
import retrofit2.Response;

package io.github.droidkaigi.confsched2017.repository.feedbacks;



public class SessionFeedbackRemoteDataSource {

    private final DroidKaigiClient client;

    @Inject
    public SessionFeedbackRemoteDataSource(DroidKaigiClient client) {
        this.client = client;
    }

    public Single<Response<Void>> submit(SessionFeedback sessionFeedback) {