Aqara Home v2.4.1版本的 MD5 值为:529779ac2bc0131db52a1fc3098d2b35

以下内容为反编译后的 CameraRepository.java 源代码,内容仅作参考


package com.lumi.module.camera.model.repository;

import com.amazonaws.auth.CognitoCachingCredentialsProvider;
import com.lumi.arms.base.viewmodel.BaseModel;
import com.lumi.external.http.ApiResponseWithJava;
import com.lumi.external.http.NetworkResource;
import com.lumi.module.camera.model.entity.AttrData;
import com.lumi.module.camera.model.entity.CameraPwdRequestBody;
import com.lumi.module.camera.model.entity.CruiseEntity;
import com.lumi.module.camera.model.entity.CruiseNode;
import com.lumi.module.camera.model.entity.P2pCameraControlRequestBody;
import com.lumi.module.camera.model.entity.PresetPositionEntity;
import com.lumi.module.camera.model.entity.PresetPositionSortEntity;
import com.lumi.module.camera.model.entity.SubscribeDeviceAttrEntity;
import com.lumi.module.camera.model.entity.UploadUrlEntity;
import com.lumi.module.camera.widget.ruler.bean.TimelineEventInfoList;
import com.lumi.module.p2p.model.entity.ReadResRequestData;
import com.lumi.module.p2p.model.entity.ReadResourceDirectRequestEntity;
import com.lumi.module.p2p.model.entity.ReadResourceRequestEntity;
import com.lumi.module.p2p.model.entity.ReadResourceRespondEntity;
import com.lumi.module.p2p.model.entity.WriteResourceRequestEntity;
import com.meizu.cloud.pushsdk.constants.PushConstants;
import com.umeng.analytics.AnalyticsConfig;
import java.io.File;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import okhttp3.MediaType;
import okhttp3.RequestBody;
import okhttp3.ResponseBody;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import org.json.JSONArray;
import org.json.JSONObject;
import retrofit2.Response;
import retrofit2.Retrofit;
import retrofit2.adapter.rxjava2.RxJava2CallAdapterFactory;
import retrofit2.converter.gson.GsonConverterFactory;
import s.b3.w.k0;
import s.b3.w.m0;
import s.h0;
import s.j2;
import s.r2.a1;
import s.r2.w;
import s.s0;
@h0(bv = {1, 0, 3}, d1 = {"\u0000¬\u0001\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0010\u000e\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\b\b\n\u0002\u0010$\n\u0002\u0010\u0000\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0010\b\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0010 \n\u0000\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0004\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u0012\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0010\t\n\u0002\b\u0006\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\r\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0006\u0018\u00002\u00020\u0001B\u0005¢\u0006\u0002\u0010\u0002J\"\u0010\t\u001a\u000e\u0012\n\u0012\b\u0012\u0004\u0012\u00020\u00040\u000b0\n2\u0006\u0010\f\u001a\u00020\u00042\u0006\u0010\r\u001a\u00020\u000eJ*\u0010\u000f\u001a\u000e\u0012\n\u0012\b\u0012\u0004\u0012\u00020\u00040\u000b0\n2\u0006\u0010\f\u001a\u00020\u00042\u0006\u0010\u0010\u001a\u00020\u00042\u0006\u0010\u0011\u001a\u00020\u0004J\"\u0010\u0012\u001a\u000e\u0012\n\u0012\b\u0012\u0004\u0012\u00020\u00040\u000b0\n2\u0006\u0010\f\u001a\u00020\u00042\u0006\u0010\u0013\u001a\u00020\u0004J6\u0010\u0014\u001a\u000e\u0012\n\u0012\b\u0012\u0004\u0012\u00020\u00040\u000b0\n2\u0006\u0010\f\u001a\u00020\u00042\u0006\u0010\u0015\u001a\u00020\u00042\u0012\u0010\u0016\u001a\u000e\u0012\u0004\u0012\u00020\u0004\u0012\u0004\u0012\u00020\u00180\u0017J\u001a\u0010\u0019\u001a\u000e\u0012\n\u0012\b\u0012\u0004\u0012\u00020\u00040\u000b0\n2\u0006\u0010\u001a\u001a\u00020\u001bJ\u001a\u0010\u001c\u001a\u000e\u0012\n\u0012\b\u0012\u0004\u0012\u00020\u00040\u000b0\n2\u0006\u0010\u001d\u001a\u00020\u001eJ\u001a\u0010\u001f\u001a\u000e\u0012\n\u0012\b\u0012\u0004\u0012\u00020\u00040\u000b0 2\u0006\u0010\u001d\u001a\u00020\u001eJ(\u0010!\u001a\u000e\u0012\n\u0012\b\u0012\u0004\u0012\u00020\u00040\u000b0\n2\u0006\u0010\f\u001a\u00020\u00042\f\u0010\"\u001a\b\u0012\u0004\u0012\u00020\u001e0#J6\u0010$\u001a\u000e\u0012\n\u0012\b\u0012\u0004\u0012\u00020\u00040\u000b0\n2\"\u0010\u0016\u001a\u001e\u0012\u0004\u0012\u00020\u0004\u0012\u0004\u0012\u00020\u00180%j\u000e\u0012\u0004\u0012\u00020\u0004\u0012\u0004\u0012\u00020\u0018`&J*\u0010'\u001a\u000e\u0012\n\u0012\b\u0012\u0004\u0012\u00020\u00040\u000b0\n2\u0006\u0010\f\u001a\u00020\u00042\u0006\u0010\u001d\u001a\u00020\u001e2\u0006\u0010(\u001a\u00020\u0004J\u001a\u0010)\u001a\u000e\u0012\n\u0012\b\u0012\u0004\u0012\u00020\u00040\u000b0\n2\u0006\u0010\f\u001a\u00020\u0004J\u0010\u0010*\u001a\u00020+2\u0006\u0010,\u001a\u00020-H\u0002J\u0010\u0010*\u001a\u00020+2\u0006\u0010.\u001a\u00020\u0004H\u0002J\"\u0010/\u001a\u000e\u0012\n\u0012\b\u0012\u0004\u0012\u0002000\u000b0\n2\u0006\u00101\u001a\u00020\u00042\u0006\u00102\u001a\u00020\u0004J<\u00103\u001a\u000e\u0012\n\u0012\b\u0012\u0004\u0012\u0002040\u000b0\n2\u0006\u00105\u001a\u00020\u00042\u0006\u00106\u001a\u0002072\u0006\u00108\u001a\u0002072\b\u00109\u001a\u0004\u0018\u00010\u00042\u0006\u0010:\u001a\u00020\u001eJ \u0010;\u001a\u0014\u0012\u0010\u0012\u000e\u0012\n\u0012\b\u0012\u0004\u0012\u00020\u001b0#0\u000b0 2\u0006\u0010\f\u001a\u00020\u0004J \u0010<\u001a\u0014\u0012\u0010\u0012\u000e\u0012\n\u0012\b\u0012\u0004\u0012\u00020\u000e0#0\u000b0\n2\u0006\u0010\f\u001a\u00020\u0004J*\u0010=\u001a\u001e\u0012\u001a\u0012\u0018\u0012\u0014\u0012\u0012\u0012\u0004\u0012\u00020?0>j\b\u0012\u0004\u0012\u00020?`@0\u000b0\n2\u0006\u0010\f\u001a\u00020\u0004J*\u0010A\u001a\u001e\u0012\u001a\u0012\u0018\u0012\u0014\u0012\u0012\u0012\u0004\u0012\u00020?0>j\b\u0012\u0004\u0012\u00020?`@0\u000b0\n2\u0006\u0010\f\u001a\u00020\u0004J*\u0010B\u001a\u001e\u0012\u001a\u0012\u0018\u0012\u0014\u0012\u0012\u0012\u0004\u0012\u00020?0>j\b\u0012\u0004\u0012\u00020?`@0\u000b0\n2\u0006\u0010\f\u001a\u00020\u0004J8\u0010C\u001a\u001e\u0012\u001a\u0012\u0018\u0012\u0014\u0012\u0012\u0012\u0004\u0012\u00020?0>j\b\u0012\u0004\u0012\u00020?`@0\u000b0\n2\u0006\u0010\f\u001a\u00020\u00042\f\u0010D\u001a\b\u0012\u0004\u0012\u00020\u00040#J(\u0010E\u001a\u000e\u0012\n\u0012\b\u0012\u0004\u0012\u00020\u00040\u000b0\n2\u0006\u0010\f\u001a\u00020\u00042\f\u0010D\u001a\b\u0012\u0004\u0012\u00020\u00040#J(\u0010F\u001a\u000e\u0012\n\u0012\b\u0012\u0004\u0012\u00020\u00040\u000b0\n2\u0006\u0010\f\u001a\u00020\u00042\f\u0010D\u001a\b\u0012\u0004\u0012\u00020\u00040#J8\u0010G\u001a\u001e\u0012\u001a\u0012\u0018\u0012\u0014\u0012\u0012\u0012\u0004\u0012\u00020?0>j\b\u0012\u0004\u0012\u00020?`@0\u000b0 2\u0006\u0010\f\u001a\u00020\u00042\f\u0010D\u001a\b\u0012\u0004\u0012\u00020\u00040#J\"\u0010H\u001a\u000e\u0012\n\u0012\b\u0012\u0004\u0012\u00020\u00040\u000b0\n2\u0006\u0010\f\u001a\u00020\u00042\u0006\u0010\u001d\u001a\u00020\u001eJ\"\u0010I\u001a\u000e\u0012\n\u0012\b\u0012\u0004\u0012\u00020\u00040\u000b0\n2\u0006\u0010\f\u001a\u00020\u00042\u0006\u0010\u0013\u001a\u00020\u0004J(\u0010J\u001a\u000e\u0012\n\u0012\b\u0012\u0004\u0012\u00020\u00040\u000b0\n2\u0006\u0010\f\u001a\u00020\u00042\f\u0010D\u001a\b\u0012\u0004\u0012\u00020\u00040#J(\u0010K\u001a\u000e\u0012\n\u0012\b\u0012\u0004\u0012\u00020\u00040\u000b0\n2\u0006\u0010\f\u001a\u00020\u00042\f\u0010D\u001a\b\u0012\u0004\u0012\u00020\u00040#J\u001a\u0010L\u001a\u000e\u0012\n\u0012\b\u0012\u0004\u0012\u00020\u00040\u000b0\n2\u0006\u0010M\u001a\u00020NJ\"\u0010O\u001a\u000e\u0012\n\u0012\b\u0012\u0004\u0012\u00020\u00040\u000b0\n2\u0006\u0010\f\u001a\u00020\u00042\u0006\u0010P\u001a\u00020\u001eJ\"\u0010Q\u001a\u000e\u0012\n\u0012\b\u0012\u0004\u0012\u00020S0R0 2\u0006\u0010T\u001a\u00020\u00042\u0006\u0010,\u001a\u00020-J\"\u0010Q\u001a\u000e\u0012\n\u0012\b\u0012\u0004\u0012\u00020S0R0 2\u0006\u0010T\u001a\u00020\u00042\u0006\u0010.\u001a\u00020\u0004J.\u0010U\u001a\u000e\u0012\n\u0012\b\u0012\u0004\u0012\u00020\u00040\u000b0\n2\u0006\u0010\f\u001a\u00020\u00042\u0012\u0010V\u001a\u000e\u0012\u0004\u0012\u00020\u0004\u0012\u0004\u0012\u00020\u00180\u0017J.\u0010W\u001a\u000e\u0012\n\u0012\b\u0012\u0004\u0012\u00020\u00040\u000b0\n2\u0006\u0010\f\u001a\u00020\u00042\u0012\u0010V\u001a\u000e\u0012\u0004\u0012\u00020\u0004\u0012\u0004\u0012\u00020\u00180\u0017J.\u0010X\u001a\u000e\u0012\n\u0012\b\u0012\u0004\u0012\u00020\u00040\u000b0 2\u0006\u0010\f\u001a\u00020\u00042\u0012\u0010V\u001a\u000e\u0012\u0004\u0012\u00020\u0004\u0012\u0004\u0012\u00020\u00180\u0017R\u000e\u0010\u0003\u001a\u00020\u0004X\u0082D¢\u0006\u0002\n\u0000R\u000e\u0010\u0005\u001a\u00020\u0004X\u0082D¢\u0006\u0002\n\u0000R\u000e\u0010\u0006\u001a\u00020\u0004X\u0082D¢\u0006\u0002\n\u0000R\u000e\u0010\u0007\u001a\u00020\bX\u0082\u000e¢\u0006\u0002\n\u0000¨\u0006Y"}, d2 = {"Lcom/lumi/module/camera/model/repository/CameraRepository;", "Lcom/lumi/arms/base/viewmodel/BaseModel;", "()V", "ATTR_CAMERA_SET_VIDEO", "", "PROP_TLP", "PROP_TLP_V2", "cameraApi", "Lcom/lumi/module/camera/model/api/CameraApi;", "addPresetPosition", "Lio/reactivex/Flowable;", "Lcom/lumi/external/http/ApiResponseWithJava;", "did", "presetPositionEntity", "Lcom/lumi/module/camera/model/entity/PresetPositionEntity;", "changeCameraPwd", "oldPwd", "newPwd", "closeCameraPwd", "pwd", "controlCamera", PushConstants.MZ_PUSH_MESSAGE_METHOD, "params", "", "", "createOrUpdateCruise", "cruiseEntity", "Lcom/lumi/module/camera/model/entity/CruiseEntity;", "deleteCruiseItem", "id", "", "deleteCruiseItemSingleVersion", "Lio/reactivex/Single;", "deletePresetPosition", "idList", "", "deleteVideos", "Ljava/util/HashMap;", "Lkotlin/collections/HashMap;", "editPresetPosition", "name", "getCurrentPosition", "getRequestBody", "Lokhttp3/RequestBody;", "byteArray", "", "filePath", "getUploadUrl", "Lcom/lumi/module/camera/model/entity/UploadUrlEntity;", k.u.c.g0.c.j.d.k.i.C, "type", "queryCameraEventInfo", "Lcom/lumi/module/camera/widget/ruler/bean/TimelineEventInfoList;", "observerSubjectId", AnalyticsConfig.RTD_START_TIME, "", "endTime", "scrollId", "size", "queryCruiseList", "queryPresetPositionList", "querySleepState", "Ljava/util/ArrayList;", "Lcom/lumi/module/p2p/model/entity/ReadResourceRespondEntity;", "Lkotlin/collections/ArrayList;", "queryTLP", "queryTLPV2", "readResource", "attrs", "readResourceDirect", "readResourceDirectWithoutToast", "readResourceSingleVersion", "runCruiseTask", "setCameraPwd", "subscribeDeviceProp", "unsubscribeDeviceProp", "updatePresetPositionSort", "presetPositionSortEntity", "Lcom/lumi/module/camera/model/entity/PresetPositionSortEntity;", "updateSleepState", "sleepState", "uploadImage", "Lretrofit2/Response;", "Lokhttp3/ResponseBody;", "url", "writeResource", "attrsMap", "writeResourceNoToastServerError", "writeResourceSingleVersion", "module-camera_mavenDebug"}, k = 1, mv = {1, 1, 16})
public final class CameraRepository extends BaseModel {
    public k.t.i.g.x5.a.a c;
    public final String d = "set_video";
    public final String f7516e = "tlp";
    public final String f7517f = "camera_timelapse_switch";

    @h0(bv = {1, 0, 3}, d1 = {"\u0000\u0016\n\u0000\n\u0002\u0010\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0010\u000e\n\u0000\u0010\u0000\u001a\u00020\u00012\u0012\u0010\u0002\u001a\u000e\u0012\n\u0012\b\u0012\u0004\u0012\u00020\u00050\u00040\u0003H\n¢\u0006\u0002\b\u0006"}, d2 = {"<anonymous>", "", "it", "Lio/reactivex/FlowableEmitter;", "Lcom/lumi/external/http/ApiResponseWithJava;", "", "invoke"}, k = 3, mv = {1, 1, 16})
    public static final class a extends m0 implements s.b3.v.l<p.a.n<ApiResponseWithJava<String>>, j2> {
        public final PresetPositionEntity b;

        public static final class C0103a extends NetworkResource<String, String> {
            public final p.a.n b;

            public C0103a(p.a.n nVar, p.a.n nVar2) {
                super(nVar2);
                this.b = nVar;
            }

            @Override
            @NotNull
            public String processResponse(@NotNull String str) {
                k0.f(str, "result");
                return str;
            }

            @Override
            @NotNull
            public p.a.k0<ApiResponseWithJava<String>> getRemoteData() {
                MediaType parse = MediaType.Companion.parse("application/json; charset=utf-8");
                JSONObject jSONObject = new JSONObject();
                jSONObject.put("did", a.this.b.getDid());
                jSONObject.put("name", a.this.b.getName());
                jSONObject.put("position", a.this.b.getPosition());
                jSONObject.put("imgUrl", a.this.b.getImgUrl());
                jSONObject.put(CognitoCachingCredentialsProvider.A, a.this.b.getSecretKey());
                RequestBody.Companion companion = RequestBody.Companion;
                String jSONObject2 = jSONObject.toString();
                k0.a((Object) jSONObject2, "jsonObj.toString()");
                return ((k.t.i.g.x5.a.a) k.t.b.b.h.b.a(CameraRepository.this, k.t.i.g.x5.a.a.class)).a(companion.create(parse, jSONObject2));
            }
        }

        public a(PresetPositionEntity presetPositionEntity) {
            super(1);
            this.b = presetPositionEntity;
        }

        public final void a(@NotNull p.a.n<ApiResponseWithJava<String>> nVar) {
            k0.f(nVar, "it");
            new C0103a(nVar, nVar);
        }

        @Override
        public j2 invoke(p.a.n<ApiResponseWithJava<String>> nVar) {
            a(nVar);
            return j2.a;
        }
    }

    @h0(bv = {1, 0, 3}, d1 = {"\u0000\u0016\n\u0000\n\u0002\u0010\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0010\u000e\n\u0000\u0010\u0000\u001a\u00020\u00012\u0012\u0010\u0002\u001a\u000e\u0012\n\u0012\b\u0012\u0004\u0012\u00020\u00050\u00040\u0003H\n¢\u0006\u0002\b\u0006"}, d2 = {"<anonymous>", "", "it", "Lio/reactivex/FlowableEmitter;", "Lcom/lumi/external/http/ApiResponseWithJava;", "", "invoke"}, k = 3, mv = {1, 1, 16})
    public static final class b extends m0 implements s.b3.v.l<p.a.n<ApiResponseWithJava<String>>, j2> {
        public final String b;
        public final String c;
        public final String d;

        public static final class a extends NetworkResource<String, String> {
            public final p.a.n b;

            public a(p.a.n nVar, p.a.n nVar2) {
                super(nVar2);
                this.b = nVar;
            }

            @Override
            @NotNull
            public String processResponse(@NotNull String str) {
                k0.f(str, "result");
                return str;
            }

            @Override
            @NotNull
            public p.a.k0<ApiResponseWithJava<String>> getRemoteData() {
                b bVar = b.this;
                return ((k.t.i.g.x5.a.a) k.t.b.b.h.b.a(CameraRepository.this, k.t.i.g.x5.a.a.class)).a(new CameraPwdRequestBody(bVar.b, 2, bVar.c, bVar.d));
            }
        }

        public b(String str, String str2, String str3) {
            super(1);
            this.b = str;
            this.c = str2;
            this.d = str3;
        }

        public final void a(@NotNull p.a.n<ApiResponseWithJava<String>> nVar) {
            k0.f(nVar, "it");
            new a(nVar, nVar);
        }

        @Override
        public j2 invoke(p.a.n<ApiResponseWithJava<String>> nVar) {
            a(nVar);
            return j2.a;
        }
    }

    @h0(bv = {1, 0, 3}, d1 = {"\u0000\u0016\n\u0000\n\u0002\u0010\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0010\u000e\n\u0000\u0010\u0000\u001a\u00020\u00012\u0012\u0010\u0002\u001a\u000e\u0012\n\u0012\b\u0012\u0004\u0012\u00020\u00050\u00040\u0003H\n¢\u0006\u0002\b\u0006"}, d2 = {"<anonymous>", "", "it", "Lio/reactivex/FlowableEmitter;", "Lcom/lumi/external/http/ApiResponseWithJava;", "", "invoke"}, k = 3, mv = {1, 1, 16})
    public static final class c extends m0 implements s.b3.v.l<p.a.n<ApiResponseWithJava<String>>, j2> {
        public final String b;
        public final String c;

        public static final class a extends NetworkResource<String, String> {
            public final p.a.n b;

            public a(p.a.n nVar, p.a.n nVar2) {
                super(nVar2);
                this.b = nVar;
            }

            @Override
            @NotNull
            public String processResponse(@NotNull String str) {
                k0.f(str, "result");
                return str;
            }

            @Override
            @NotNull
            public p.a.k0<ApiResponseWithJava<String>> getRemoteData() {
                c cVar = c.this;
                return ((k.t.i.g.x5.a.a) k.t.b.b.h.b.a(CameraRepository.this, k.t.i.g.x5.a.a.class)).a(new CameraPwdRequestBody(cVar.b, 0, cVar.c, null));
            }
        }

        public c(String str, String str2) {
            super(1);
            this.b = str;
            this.c = str2;
        }

        public final void a(@NotNull p.a.n<ApiResponseWithJava<String>> nVar) {
            k0.f(nVar, "it");
            new a(nVar, nVar);
        }

        @Override
        public j2 invoke(p.a.n<ApiResponseWithJava<String>> nVar) {
            a(nVar);
            return j2.a;
        }
    }

    @h0(bv = {1, 0, 3}, d1 = {"\u0000\u0016\n\u0000\n\u0002\u0010\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0010\u000e\n\u0000\u0010\u0000\u001a\u00020\u00012\u0012\u0010\u0002\u001a\u000e\u0012\n\u0012\b\u0012\u0004\u0012\u00020\u00050\u00040\u0003H\n¢\u0006\u0002\b\u0006"}, d2 = {"<anonymous>", "", "it", "Lio/reactivex/FlowableEmitter;", "Lcom/lumi/external/http/ApiResponseWithJava;", "", "invoke"}, k = 3, mv = {1, 1, 16})
    public static final class d extends m0 implements s.b3.v.l<p.a.n<ApiResponseWithJava<String>>, j2> {
        public final String b;
        public final String c;
        public final Map d;

        public static final class a extends NetworkResource<String, String> {
            public final p.a.n b;

            public a(p.a.n nVar, p.a.n nVar2) {
                super(nVar2);
                this.b = nVar;
            }

            @Override
            @NotNull
            public String processResponse(@NotNull String str) {
                k0.f(str, "result");
                return str;
            }

            @Override
            @NotNull
            public p.a.k0<ApiResponseWithJava<String>> getRemoteData() {
                P2pCameraControlRequestBody p2pCameraControlRequestBody = new P2pCameraControlRequestBody(null, null, null, 7, null);
                p2pCameraControlRequestBody.setDid(d.this.b);
                p2pCameraControlRequestBody.setMethod(d.this.c);
                p2pCameraControlRequestBody.setParams(d.this.d);
                return ((k.t.i.g.x5.a.a) k.t.b.b.h.b.a(CameraRepository.this, k.t.i.g.x5.a.a.class)).a(p2pCameraControlRequestBody);
            }
        }

        public d(String str, String str2, Map map) {
            super(1);
            this.b = str;
            this.c = str2;
            this.d = map;
        }

        public final void a(@NotNull p.a.n<ApiResponseWithJava<String>> nVar) {
            k0.f(nVar, "it");
            new a(nVar, nVar);
        }

        @Override
        public j2 invoke(p.a.n<ApiResponseWithJava<String>> nVar) {
            a(nVar);
            return j2.a;
        }
    }

    @h0(bv = {1, 0, 3}, d1 = {"\u0000\u0016\n\u0000\n\u0002\u0010\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0010\u000e\n\u0000\u0010\u0000\u001a\u00020\u00012\u0012\u0010\u0002\u001a\u000e\u0012\n\u0012\b\u0012\u0004\u0012\u00020\u00050\u00040\u0003H\n¢\u0006\u0002\b\u0006"}, d2 = {"<anonymous>", "", "it", "Lio/reactivex/FlowableEmitter;", "Lcom/lumi/external/http/ApiResponseWithJava;", "", "invoke"}, k = 3, mv = {1, 1, 16})
    public static final class e extends m0 implements s.b3.v.l<p.a.n<ApiResponseWithJava<String>>, j2> {
        public final HashMap b;

        public static final class a extends NetworkResource<String, String> {
            public final p.a.n b;

            public a(p.a.n nVar, p.a.n nVar2) {
                super(nVar2);
                this.b = nVar;
            }

            @Override
            @NotNull
            public String processResponse(@NotNull String str) {
                k0.f(str, "result");
                return str;
            }

            @Override
            @NotNull
            public p.a.k0<ApiResponseWithJava<String>> getRemoteData() {
                return ((k.t.i.g.x5.a.a) k.t.b.b.h.b.a(CameraRepository.this, k.t.i.g.x5.a.a.class)).c(e.this.b);
            }
        }

        public e(HashMap hashMap) {
            super(1);
            this.b = hashMap;
        }

        public final void a(@NotNull p.a.n<ApiResponseWithJava<String>> nVar) {
            k0.f(nVar, "it");
            new a(nVar, nVar);
        }

        @Override
        public j2 invoke(p.a.n<ApiResponseWithJava<String>> nVar) {
            a(nVar);
            return j2.a;
        }
    }

    @h0(bv = {1, 0, 3}, d1 = {"\u0000\u0016\n\u0000\n\u0002\u0010\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0010\u000e\n\u0000\u0010\u0000\u001a\u00020\u00012\u0012\u0010\u0002\u001a\u000e\u0012\n\u0012\b\u0012\u0004\u0012\u00020\u00050\u00040\u0003H\n¢\u0006\u0002\b\u0006"}, d2 = {"<anonymous>", "", "it", "Lio/reactivex/FlowableEmitter;", "Lcom/lumi/external/http/ApiResponseWithJava;", "", "invoke"}, k = 3, mv = {1, 1, 16})
    public static final class f extends m0 implements s.b3.v.l<p.a.n<ApiResponseWithJava<String>>, j2> {
        public final int b;

        public static final class a extends NetworkResource<String, String> {
            public final p.a.n b;

            public a(p.a.n nVar, p.a.n nVar2) {
                super(nVar2);
                this.b = nVar;
            }

            @Override
            @NotNull
            public String processResponse(@NotNull String str) {
                k0.f(str, "result");
                return str;
            }

            @Override
            @NotNull
            public p.a.k0<ApiResponseWithJava<String>> getRemoteData() {
                HashMap<String, Integer> hashMap = new HashMap<>();
                hashMap.put("id", Integer.valueOf(f.this.b));
                return ((k.t.i.g.x5.a.a) k.t.b.b.h.b.a(CameraRepository.this, k.t.i.g.x5.a.a.class)).b(hashMap);
            }
        }

        public f(int i2) {
            super(1);
            this.b = i2;
        }

        public final void a(@NotNull p.a.n<ApiResponseWithJava<String>> nVar) {
            k0.f(nVar, "it");
            new a(nVar, nVar);
        }

        @Override
        public j2 invoke(p.a.n<ApiResponseWithJava<String>> nVar) {
            a(nVar);
            return j2.a;
        }
    }

    @h0(bv = {1, 0, 3}, d1 = {"\u0000\u0016\n\u0000\n\u0002\u0010\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0010\u000e\n\u0000\u0010\u0000\u001a\u00020\u00012\u0012\u0010\u0002\u001a\u000e\u0012\n\u0012\b\u0012\u0004\u0012\u00020\u00050\u00040\u0003H\n¢\u0006\u0002\b\u0006"}, d2 = {"<anonymous>", "", "it", "Lio/reactivex/FlowableEmitter;", "Lcom/lumi/external/http/ApiResponseWithJava;", "", "invoke"}, k = 3, mv = {1, 1, 16})
    public static final class g extends m0 implements s.b3.v.l<p.a.n<ApiResponseWithJava<String>>, j2> {
        public final String b;
        public final List c;

        public static final class a extends NetworkResource<String, String> {
            public final p.a.n b;

            public a(p.a.n nVar, p.a.n nVar2) {
                super(nVar2);
                this.b = nVar;
            }

            @Override
            @NotNull
            public String processResponse(@NotNull String str) {
                k0.f(str, "result");
                return str;
            }

            @Override
            @NotNull
            public p.a.k0<ApiResponseWithJava<String>> getRemoteData() {
                MediaType parse = MediaType.Companion.parse("application/json; charset=utf-8");
                JSONObject jSONObject = new JSONObject();
                jSONObject.put("did", g.this.b);
                JSONArray jSONArray = new JSONArray();
                for (Number number : g.this.c) {
                    jSONArray.put(number.intValue());
                }
                jSONObject.put("ids", jSONArray);
                RequestBody.Companion companion = RequestBody.Companion;
                String jSONObject2 = jSONObject.toString();
                k0.a((Object) jSONObject2, "jsonObj.toString()");
                return ((k.t.i.g.x5.a.a) k.t.b.b.h.b.a(CameraRepository.this, k.t.i.g.x5.a.a.class)).b(companion.create(parse, jSONObject2));
            }
        }

        public g(String str, List list) {
            super(1);
            this.b = str;
            this.c = list;
        }

        public final void a(@NotNull p.a.n<ApiResponseWithJava<String>> nVar) {
            k0.f(nVar, "it");
            new a(nVar, nVar);
        }

        @Override
        public j2 invoke(p.a.n<ApiResponseWithJava<String>> nVar) {
            a(nVar);
            return j2.a;
        }
    }

    @h0(bv = {1, 0, 3}, d1 = {"\u0000\u0016\n\u0000\n\u0002\u0010\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0010\u000e\n\u0000\u0010\u0000\u001a\u00020\u00012\u0012\u0010\u0002\u001a\u000e\u0012\n\u0012\b\u0012\u0004\u0012\u00020\u00050\u00040\u0003H\n¢\u0006\u0002\b\u0006"}, d2 = {"<anonymous>", "", "it", "Lio/reactivex/FlowableEmitter;", "Lcom/lumi/external/http/ApiResponseWithJava;", "", "invoke"}, k = 3, mv = {1, 1, 16})
    public static final class h extends m0 implements s.b3.v.l<p.a.n<ApiResponseWithJava<String>>, j2> {
        public final HashMap b;

        public static final class a extends NetworkResource<String, String> {
            public final p.a.n b;

            public a(p.a.n nVar, p.a.n nVar2) {
                super(nVar2);
                this.b = nVar;
            }

            @Override
            @NotNull
            public String processResponse(@NotNull String str) {
                k0.f(str, "result");
                return str;
            }

            @Override
            @NotNull
            public p.a.k0<ApiResponseWithJava<String>> getRemoteData() {
                return ((k.t.i.g.x5.a.a) k.t.b.b.h.b.a(CameraRepository.this, k.t.i.g.x5.a.a.class)).a(h.this.b);
            }
        }

        public h(HashMap hashMap) {
            super(1);
            this.b = hashMap;
        }

        public final void a(@NotNull p.a.n<ApiResponseWithJava<String>> nVar) {
            k0.f(nVar, "it");
            new a(nVar, nVar);
        }

        @Override
        public j2 invoke(p.a.n<ApiResponseWithJava<String>> nVar) {
            a(nVar);
            return j2.a;
        }
    }

    @h0(bv = {1, 0, 3}, d1 = {"\u0000\u0016\n\u0000\n\u0002\u0010\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0010\u000e\n\u0000\u0010\u0000\u001a\u00020\u00012\u0012\u0010\u0002\u001a\u000e\u0012\n\u0012\b\u0012\u0004\u0012\u00020\u00050\u00040\u0003H\n¢\u0006\u0002\b\u0006"}, d2 = {"<anonymous>", "", "it", "Lio/reactivex/FlowableEmitter;", "Lcom/lumi/external/http/ApiResponseWithJava;", "", "invoke"}, k = 3, mv = {1, 1, 16})
    public static final class i extends m0 implements s.b3.v.l<p.a.n<ApiResponseWithJava<String>>, j2> {
        public final String b;
        public final String c;
        public final int d;

        public static final class a extends NetworkResource<String, String> {
            public final p.a.n b;

            public a(p.a.n nVar, p.a.n nVar2) {
                super(nVar2);
                this.b = nVar;
            }

            @Override
            @NotNull
            public String processResponse(@NotNull String str) {
                k0.f(str, "result");
                return str;
            }

            @Override
            @NotNull
            public p.a.k0<ApiResponseWithJava<String>> getRemoteData() {
                MediaType parse = MediaType.Companion.parse("application/json; charset=utf-8");
                JSONObject jSONObject = new JSONObject();
                jSONObject.put("name", i.this.b);
                jSONObject.put("did", i.this.c);
                jSONObject.put("id", i.this.d);
                RequestBody.Companion companion = RequestBody.Companion;
                String jSONObject2 = jSONObject.toString();
                k0.a((Object) jSONObject2, "jsonObj.toString()");
                return ((k.t.i.g.x5.a.a) k.t.b.b.h.b.a(CameraRepository.this, k.t.i.g.x5.a.a.class)).a(companion.create(parse, jSONObject2));
            }
        }

        public i(String str, String str2, int i2) {
            super(1);
            this.b = str;
            this.c = str2;
            this.d = i2;
        }

        public final void a(@NotNull p.a.n<ApiResponseWithJava<String>> nVar) {
            k0.f(nVar, "it");
            new a(nVar, nVar);
        }

        @Override
        public j2 invoke(p.a.n<ApiResponseWithJava<String>> nVar) {
            a(nVar);
            return j2.a;
        }
    }

    @h0(bv = {1, 0, 3}, d1 = {"\u0000\u0016\n\u0000\n\u0002\u0010\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\u0010\u0000\u001a\u00020\u00012\u0012\u0010\u0002\u001a\u000e\u0012\n\u0012\b\u0012\u0004\u0012\u00020\u00050\u00040\u0003H\n¢\u0006\u0002\b\u0006"}, d2 = {"<anonymous>", "", "it", "Lio/reactivex/FlowableEmitter;", "Lcom/lumi/external/http/ApiResponseWithJava;", "Lcom/lumi/module/camera/model/entity/UploadUrlEntity;", "invoke"}, k = 3, mv = {1, 1, 16})
    public static final class j extends m0 implements s.b3.v.l<p.a.n<ApiResponseWithJava<UploadUrlEntity>>, j2> {
        public final String b;
        public final String c;

        public static final class a extends NetworkResource<UploadUrlEntity, UploadUrlEntity> {
            public final p.a.n b;

            public a(p.a.n nVar, p.a.n nVar2) {
                super(nVar2);
                this.b = nVar;
            }

            @Override
            @NotNull
            public UploadUrlEntity processResponse(@NotNull UploadUrlEntity uploadUrlEntity) {
                k0.f(uploadUrlEntity, "result");
                return uploadUrlEntity;
            }

            @Override
            @NotNull
            public p.a.k0<ApiResponseWithJava<UploadUrlEntity>> getRemoteData() {
                j jVar = j.this;
                return ((k.t.i.g.x5.a.a) k.t.b.b.h.b.a(CameraRepository.this, k.t.i.g.x5.a.a.class)).b(jVar.b, jVar.c);
            }
        }

        public j(String str, String str2) {
            super(1);
            this.b = str;
            this.c = str2;
        }

        public final void a(@NotNull p.a.n<ApiResponseWithJava<UploadUrlEntity>> nVar) {
            k0.f(nVar, "it");
            new a(nVar, nVar);
        }

        @Override
        public j2 invoke(p.a.n<ApiResponseWithJava<UploadUrlEntity>> nVar) {
            a(nVar);
            return j2.a;
        }
    }

    @h0(bv = {1, 0, 3}, d1 = {"\u0000\u0016\n\u0000\n\u0002\u0010\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\u0010\u0000\u001a\u00020\u00012\u0012\u0010\u0002\u001a\u000e\u0012\n\u0012\b\u0012\u0004\u0012\u00020\u00050\u00040\u0003H\n¢\u0006\u0002\b\u0006"}, d2 = {"<anonymous>", "", "it", "Lio/reactivex/FlowableEmitter;", "Lcom/lumi/external/http/ApiResponseWithJava;", "Lcom/lumi/module/camera/widget/ruler/bean/TimelineEventInfoList;", "invoke"}, k = 3, mv = {1, 1, 16})
    public static final class k extends m0 implements s.b3.v.l<p.a.n<ApiResponseWithJava<TimelineEventInfoList>>, j2> {
        public final String b;
        public final long c;
        public final long d;
        public final String f7518e;
        public final int f7519f;

        public static final class a extends NetworkResource<TimelineEventInfoList, TimelineEventInfoList> {
            public final p.a.n b;

            public a(p.a.n nVar, p.a.n nVar2) {
                super(nVar2);
                this.b = nVar;
            }

            @Override
            @NotNull
            public TimelineEventInfoList processResponse(@NotNull TimelineEventInfoList timelineEventInfoList) {
                k0.f(timelineEventInfoList, "result");
                return timelineEventInfoList;
            }

            @Override
            @NotNull
            public p.a.k0<ApiResponseWithJava<TimelineEventInfoList>> getRemoteData() {
                k.t.i.g.x5.a.a aVar = (k.t.i.g.x5.a.a) k.t.b.b.h.b.a(CameraRepository.this, k.t.i.g.x5.a.a.class);
                k kVar = k.this;
                return aVar.a(kVar.b, kVar.c, kVar.d, kVar.f7518e, kVar.f7519f);
            }
        }

        public k(String str, long j2, long j3, String str2, int i2) {
            super(1);
            this.b = str;
            this.c = j2;
            this.d = j3;
            this.f7518e = str2;
            this.f7519f = i2;
        }

        public final void a(@NotNull p.a.n<ApiResponseWithJava<TimelineEventInfoList>> nVar) {
            k0.f(nVar, "it");
            new a(nVar, nVar);
        }

        @Override
        public j2 invoke(p.a.n<ApiResponseWithJava<TimelineEventInfoList>> nVar) {
            a(nVar);
            return j2.a;
        }
    }

    @h0(bv = {1, 0, 3}, d1 = {"\u0000\u001a\n\u0000\n\u0002\u0010\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0010 \n\u0002\u0018\u0002\n\u0000\u0010\u0000\u001a\u00020\u00012\u0018\u0010\u0002\u001a\u0014\u0012\u0010\u0012\u000e\u0012\n\u0012\b\u0012\u0004\u0012\u00020\u00060\u00050\u00040\u0003H\n¢\u0006\u0002\b\u0007"}, d2 = {"<anonymous>", "", "it", "Lio/reactivex/FlowableEmitter;", "Lcom/lumi/external/http/ApiResponseWithJava;", "", "Lcom/lumi/module/camera/model/entity/PresetPositionEntity;", "invoke"}, k = 3, mv = {1, 1, 16})
    public static final class l extends m0 implements s.b3.v.l<p.a.n<ApiResponseWithJava<List<? extends PresetPositionEntity>>>, j2> {
        public final String b;

        public static final class a extends NetworkResource<List<? extends PresetPositionEntity>, List<? extends PresetPositionEntity>> {
            public final p.a.n b;

            public a(p.a.n nVar, p.a.n nVar2) {
                super(nVar2);
                this.b = nVar;
            }

            @Override
            @NotNull
            public List<PresetPositionEntity> processResponse(@NotNull List<PresetPositionEntity> list) {
                k0.f(list, "result");
                return list;
            }

            @Override
            @NotNull
            public p.a.k0<ApiResponseWithJava<List<? extends PresetPositionEntity>>> getRemoteData() {
                return ((k.t.i.g.x5.a.a) k.t.b.b.h.b.a(CameraRepository.this, k.t.i.g.x5.a.a.class)).d(l.this.b);
            }
        }

        public l(String str) {
            super(1);
            this.b = str;
        }

        public final void a(@NotNull p.a.n<ApiResponseWithJava<List<PresetPositionEntity>>> nVar) {
            k0.f(nVar, "it");
            new a(nVar, nVar);
        }

        @Override
        public j2 invoke(p.a.n<ApiResponseWithJava<List<? extends PresetPositionEntity>>> nVar) {
            a(nVar);
            return j2.a;
        }
    }

    @h0(bv = {1, 0, 3}, d1 = {"\u0000\u001e\n\u0000\n\u0002\u0010\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\u0010\u0000\u001a\u00020\u00012\"\u0010\u0002\u001a\u001e\u0012\u001a\u0012\u0018\u0012\u0014\u0012\u0012\u0012\u0004\u0012\u00020\u00060\u0005j\b\u0012\u0004\u0012\u00020\u0006`\u00070\u00040\u0003H\n¢\u0006\u0002\b\b"}, d2 = {"<anonymous>", "", "it", "Lio/reactivex/FlowableEmitter;", "Lcom/lumi/external/http/ApiResponseWithJava;", "Ljava/util/ArrayList;", "Lcom/lumi/module/p2p/model/entity/ReadResourceRespondEntity;", "Lkotlin/collections/ArrayList;", "invoke"}, k = 3, mv = {1, 1, 16})
    public static final class m extends m0 implements s.b3.v.l<p.a.n<ApiResponseWithJava<ArrayList<ReadResourceRespondEntity>>>, j2> {
        public final String b;
        public final List c;

        public static final class a extends NetworkResource<ArrayList<ReadResourceRespondEntity>, ArrayList<ReadResourceRespondEntity>> {
            public final p.a.n b;

            public a(p.a.n nVar, p.a.n nVar2) {
                super(nVar2);
                this.b = nVar;
            }

            @Override
            @NotNull
            public ArrayList<ReadResourceRespondEntity> processResponse(@NotNull ArrayList<ReadResourceRespondEntity> arrayList) {
                k0.f(arrayList, "result");
                return arrayList;
            }

            @Override
            @NotNull
            public p.a.k0<ApiResponseWithJava<ArrayList<ReadResourceRespondEntity>>> getRemoteData() {
                ReadResourceRequestEntity readResourceRequestEntity = new ReadResourceRequestEntity(null, 1, null);
                ArrayList arrayList = new ArrayList();
                ReadResRequestData readResRequestData = new ReadResRequestData(null, null, 3, null);
                readResRequestData.setSubjectId(m.this.b);
                readResRequestData.setOptions(m.this.c);
                arrayList.add(readResRequestData);
                readResourceRequestEntity.setWriteResRequestData(arrayList);
                return ((k.t.i.g.x5.a.a) k.t.b.b.h.b.a(CameraRepository.this, k.t.i.g.x5.a.a.class)).b(readResourceRequestEntity);
            }
        }

        public m(String str, List list) {
            super(1);
            this.b = str;
            this.c = list;
        }

        public final void a(@NotNull p.a.n<ApiResponseWithJava<ArrayList<ReadResourceRespondEntity>>> nVar) {
            k0.f(nVar, "it");
            new a(nVar, nVar);
        }

        @Override
        public j2 invoke(p.a.n<ApiResponseWithJava<ArrayList<ReadResourceRespondEntity>>> nVar) {
            a(nVar);
            return j2.a;
        }
    }

    @h0(bv = {1, 0, 3}, d1 = {"\u0000\u0016\n\u0000\n\u0002\u0010\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0010\u000e\n\u0000\u0010\u0000\u001a\u00020\u00012\u0012\u0010\u0002\u001a\u000e\u0012\n\u0012\b\u0012\u0004\u0012\u00020\u00050\u00040\u0003H\n¢\u0006\u0002\b\u0006"}, d2 = {"<anonymous>", "", "it", "Lio/reactivex/FlowableEmitter;", "Lcom/lumi/external/http/ApiResponseWithJava;", "", "invoke"}, k = 3, mv = {1, 1, 16})
    public static final class n extends m0 implements s.b3.v.l<p.a.n<ApiResponseWithJava<String>>, j2> {
        public final String b;
        public final List c;

        public static final class a extends NetworkResource<String, String> {
            public final p.a.n b;

            public a(p.a.n nVar, p.a.n nVar2) {
                super(nVar2);
                this.b = nVar;
            }

            @Override
            @NotNull
            public String processResponse(@NotNull String str) {
                k0.f(str, "result");
                return str;
            }

            @Override
            @NotNull
            public p.a.k0<ApiResponseWithJava<String>> getRemoteData() {
                ReadResourceDirectRequestEntity readResourceDirectRequestEntity = new ReadResourceDirectRequestEntity(null, null, 3, null);
                readResourceDirectRequestEntity.setDid(n.this.b);
                readResourceDirectRequestEntity.setAttrs(n.this.c);
                return ((k.t.i.g.x5.a.a) k.t.b.b.h.b.a(CameraRepository.this, k.t.i.g.x5.a.a.class)).a(readResourceDirectRequestEntity);
            }
        }

        public n(String str, List list) {
            super(1);
            this.b = str;
            this.c = list;
        }

        public final void a(@NotNull p.a.n<ApiResponseWithJava<String>> nVar) {
            k0.f(nVar, "it");
            new a(nVar, nVar);
        }

        @Override
        public j2 invoke(p.a.n<ApiResponseWithJava<String>> nVar) {
            a(nVar);
            return j2.a;
        }
    }

    @h0(bv = {1, 0, 3}, d1 = {"\u0000\u0016\n\u0000\n\u0002\u0010\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0010\u000e\n\u0000\u0010\u0000\u001a\u00020\u00012\u0012\u0010\u0002\u001a\u000e\u0012\n\u0012\b\u0012\u0004\u0012\u00020\u00050\u00040\u0003H\n¢\u0006\u0002\b\u0006"}, d2 = {"<anonymous>", "", "it", "Lio/reactivex/FlowableEmitter;", "Lcom/lumi/external/http/ApiResponseWithJava;", "", "invoke"}, k = 3, mv = {1, 1, 16})
    public static final class o extends m0 implements s.b3.v.l<p.a.n<ApiResponseWithJava<String>>, j2> {
        public final String b;
        public final List c;

        public static final class a extends NetworkResource<String, String> {
            public final p.a.n b;

            public a(p.a.n nVar, p.a.n nVar2) {
                super(nVar2);
                this.b = nVar;
            }

            @Override
            @NotNull
            public String processResponse(@NotNull String str) {
                k0.f(str, "result");
                return str;
            }

            @Override
            @NotNull
            public p.a.k0<ApiResponseWithJava<String>> getRemoteData() {
                ReadResourceDirectRequestEntity readResourceDirectRequestEntity = new ReadResourceDirectRequestEntity(null, null, 3, null);
                readResourceDirectRequestEntity.setDid(o.this.b);
                readResourceDirectRequestEntity.setAttrs(o.this.c);
                return ((k.t.i.g.x5.a.a) k.t.b.b.h.b.a(CameraRepository.this, k.t.i.g.x5.a.a.class)).a(readResourceDirectRequestEntity);
            }

            @Override
            public void onFetchFailed(@Nullable String str, @Nullable Integer num) {
            }
        }

        public o(String str, List list) {
            super(1);
            this.b = str;
            this.c = list;
        }

        public final void a(@NotNull p.a.n<ApiResponseWithJava<String>> nVar) {
            k0.f(nVar, "it");
            new a(nVar, nVar);
        }

        @Override
        public j2 invoke(p.a.n<ApiResponseWithJava<String>> nVar) {
            a(nVar);
            return j2.a;
        }
    }

    @h0(bv = {1, 0, 3}, d1 = {"\u0000\u0016\n\u0000\n\u0002\u0010\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0010\u000e\n\u0000\u0010\u0000\u001a\u00020\u00012\u0012\u0010\u0002\u001a\u000e\u0012\n\u0012\b\u0012\u0004\u0012\u00020\u00050\u00040\u0003H\n¢\u0006\u0002\b\u0006"}, d2 = {"<anonymous>", "", "it", "Lio/reactivex/FlowableEmitter;", "Lcom/lumi/external/http/ApiResponseWithJava;", "", "invoke"}, k = 3, mv = {1, 1, 16})
    public static final class p extends m0 implements s.b3.v.l<p.a.n<ApiResponseWithJava<String>>, j2> {
        public final String b;
        public final int c;

        public static final class a extends NetworkResource<String, String> {
            public final p.a.n b;

            public a(p.a.n nVar, p.a.n nVar2) {
                super(nVar2);
                this.b = nVar;
            }

            @Override
            @NotNull
            public String processResponse(@NotNull String str) {
                k0.f(str, "result");
                return str;
            }

            @Override
            @NotNull
            public p.a.k0<ApiResponseWithJava<String>> getRemoteData() {
                p pVar = p.this;
                return ((k.t.i.g.x5.a.a) k.t.b.b.h.b.a(CameraRepository.this, k.t.i.g.x5.a.a.class)).a(pVar.b, String.valueOf(pVar.c));
            }
        }

        public p(String str, int i2) {
            super(1);
            this.b = str;
            this.c = i2;
        }

        public final void a(@NotNull p.a.n<ApiResponseWithJava<String>> nVar) {
            k0.f(nVar, "it");
            new a(nVar, nVar);
        }

        @Override
        public j2 invoke(p.a.n<ApiResponseWithJava<String>> nVar) {
            a(nVar);
            return j2.a;
        }
    }

    @h0(bv = {1, 0, 3}, d1 = {"\u0000\u0016\n\u0000\n\u0002\u0010\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0010\u000e\n\u0000\u0010\u0000\u001a\u00020\u00012\u0012\u0010\u0002\u001a\u000e\u0012\n\u0012\b\u0012\u0004\u0012\u00020\u00050\u00040\u0003H\n¢\u0006\u0002\b\u0006"}, d2 = {"<anonymous>", "", "it", "Lio/reactivex/FlowableEmitter;", "Lcom/lumi/external/http/ApiResponseWithJava;", "", "invoke"}, k = 3, mv = {1, 1, 16})
    public static final class q extends m0 implements s.b3.v.l<p.a.n<ApiResponseWithJava<String>>, j2> {
        public final String b;
        public final String c;

        public static final class a extends NetworkResource<String, String> {
            public final p.a.n b;

            public a(p.a.n nVar, p.a.n nVar2) {
                super(nVar2);
                this.b = nVar;
            }

            @Override
            @NotNull
            public String processResponse(@NotNull String str) {
                k0.f(str, "result");
                return str;
            }

            @Override
            @NotNull
            public p.a.k0<ApiResponseWithJava<String>> getRemoteData() {
                q qVar = q.this;
                return ((k.t.i.g.x5.a.a) k.t.b.b.h.b.a(CameraRepository.this, k.t.i.g.x5.a.a.class)).a(new CameraPwdRequestBody(qVar.b, 1, null, qVar.c));
            }
        }

        public q(String str, String str2) {
            super(1);
            this.b = str;
            this.c = str2;
        }

        public final void a(@NotNull p.a.n<ApiResponseWithJava<String>> nVar) {
            k0.f(nVar, "it");
            new a(nVar, nVar);
        }

        @Override
        public j2 invoke(p.a.n<ApiResponseWithJava<String>> nVar) {
            a(nVar);
            return j2.a;
        }
    }

    @h0(bv = {1, 0, 3}, d1 = {"\u0000\u0016\n\u0000\n\u0002\u0010\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0010\u000e\n\u0000\u0010\u0000\u001a\u00020\u00012\u0012\u0010\u0002\u001a\u000e\u0012\n\u0012\b\u0012\u0004\u0012\u00020\u00050\u00040\u0003H\n¢\u0006\u0002\b\u0006"}, d2 = {"<anonymous>", "", "it", "Lio/reactivex/FlowableEmitter;", "Lcom/lumi/external/http/ApiResponseWithJava;", "", "invoke"}, k = 3, mv = {1, 1, 16})
    public static final class r extends m0 implements s.b3.v.l<p.a.n<ApiResponseWithJava<String>>, j2> {
        public final List b;
        public final String c;

        public static final class a extends NetworkResource<String, String> {
            public final p.a.n b;

            public a(p.a.n nVar, p.a.n nVar2) {
                super(nVar2);
                this.b = nVar;
            }

            @Override
            @NotNull
            public String processResponse(@NotNull String str) {
                k0.f(str, "result");
                return str;
            }

            @Override
            @NotNull
            public p.a.k0<ApiResponseWithJava<String>> getRemoteData() {
                r rVar = r.this;
                return ((k.t.i.g.x5.a.a) k.t.b.b.h.b.a(CameraRepository.this, k.t.i.g.x5.a.a.class)).b(new SubscribeDeviceAttrEntity(w.a(new AttrData(rVar.b, rVar.c, null, 4, null))));
            }

            @Override
            public void onFetchFailed(@Nullable String str, @Nullable Integer num) {
            }
        }

        public r(List list, String str) {
            super(1);
            this.b = list;
            this.c = str;
        }

        public final void a(@NotNull p.a.n<ApiResponseWithJava<String>> nVar) {
            k0.f(nVar, "it");
            new a(nVar, nVar);
        }

        @Override
        public j2 invoke(p.a.n<ApiResponseWithJava<String>> nVar) {
            a(nVar);
            return j2.a;
        }
    }

    @h0(bv = {1, 0, 3}, d1 = {"\u0000\u0016\n\u0000\n\u0002\u0010\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0010\u000e\n\u0000\u0010\u0000\u001a\u00020\u00012\u0012\u0010\u0002\u001a\u000e\u0012\n\u0012\b\u0012\u0004\u0012\u00020\u00050\u00040\u0003H\n¢\u0006\u0002\b\u0006"}, d2 = {"<anonymous>", "", "it", "Lio/reactivex/FlowableEmitter;", "Lcom/lumi/external/http/ApiResponseWithJava;", "", "invoke"}, k = 3, mv = {1, 1, 16})
    public static final class s extends m0 implements s.b3.v.l<p.a.n<ApiResponseWithJava<String>>, j2> {
        public final List b;
        public final String c;

        public static final class a extends NetworkResource<String, String> {
            public final p.a.n b;

            public a(p.a.n nVar, p.a.n nVar2) {
                super(nVar2);
                this.b = nVar;
            }

            @Override
            @NotNull
            public String processResponse(@NotNull String str) {
                k0.f(str, "result");
                return str;
            }

            @Override
            @NotNull
            public p.a.k0<ApiResponseWithJava<String>> getRemoteData() {
                s sVar = s.this;
                return ((k.t.i.g.x5.a.a) k.t.b.b.h.b.a(CameraRepository.this, k.t.i.g.x5.a.a.class)).a(new SubscribeDeviceAttrEntity(w.a(new AttrData(sVar.b, sVar.c, null, 4, null))));
            }

            @Override
            public void onFetchFailed(@Nullable String str, @Nullable Integer num) {
            }
        }

        public s(List list, String str) {
            super(1);
            this.b = list;
            this.c = str;
        }

        public final void a(@NotNull p.a.n<ApiResponseWithJava<String>> nVar) {
            k0.f(nVar, "it");
            new a(nVar, nVar);
        }

        @Override
        public j2 invoke(p.a.n<ApiResponseWithJava<String>> nVar) {
            a(nVar);
            return j2.a;
        }
    }

    @h0(bv = {1, 0, 3}, d1 = {"\u0000\u0016\n\u0000\n\u0002\u0010\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0010\u000e\n\u0000\u0010\u0000\u001a\u00020\u00012\u0012\u0010\u0002\u001a\u000e\u0012\n\u0012\b\u0012\u0004\u0012\u00020\u00050\u00040\u0003H\n¢\u0006\u0002\b\u0006"}, d2 = {"<anonymous>", "", "it", "Lio/reactivex/FlowableEmitter;", "Lcom/lumi/external/http/ApiResponseWithJava;", "", "invoke"}, k = 3, mv = {1, 1, 16})
    public static final class t extends m0 implements s.b3.v.l<p.a.n<ApiResponseWithJava<String>>, j2> {
        public final PresetPositionSortEntity b;

        public static final class a extends NetworkResource<String, String> {
            public final p.a.n b;

            public a(p.a.n nVar, p.a.n nVar2) {
                super(nVar2);
                this.b = nVar;
            }

            @Override
            @NotNull
            public String processResponse(@NotNull String str) {
                k0.f(str, "result");
                return str;
            }

            @Override
            @NotNull
            public p.a.k0<ApiResponseWithJava<String>> getRemoteData() {
                return ((k.t.i.g.x5.a.a) k.t.b.b.h.b.a(CameraRepository.this, k.t.i.g.x5.a.a.class)).a(t.this.b);
            }
        }

        public t(PresetPositionSortEntity presetPositionSortEntity) {
            super(1);
            this.b = presetPositionSortEntity;
        }

        public final void a(@NotNull p.a.n<ApiResponseWithJava<String>> nVar) {
            k0.f(nVar, "it");
            new a(nVar, nVar);
        }

        @Override
        public j2 invoke(p.a.n<ApiResponseWithJava<String>> nVar) {
            a(nVar);
            return j2.a;
        }
    }

    @h0(bv = {1, 0, 3}, d1 = {"\u0000\u0016\n\u0000\n\u0002\u0010\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0010\u000e\n\u0000\u0010\u0000\u001a\u00020\u00012\u0012\u0010\u0002\u001a\u000e\u0012\n\u0012\b\u0012\u0004\u0012\u00020\u00050\u00040\u0003H\n¢\u0006\u0002\b\u0006"}, d2 = {"<anonymous>", "", "it", "Lio/reactivex/FlowableEmitter;", "Lcom/lumi/external/http/ApiResponseWithJava;", "", "invoke"}, k = 3, mv = {1, 1, 16})
    public static final class u extends m0 implements s.b3.v.l<p.a.n<ApiResponseWithJava<String>>, j2> {
        public final String b;
        public final Map c;

        public static final class a extends NetworkResource<String, String> {
            public final p.a.n b;

            public a(p.a.n nVar, p.a.n nVar2) {
                super(nVar2);
                this.b = nVar;
            }

            @Override
            @NotNull
            public String processResponse(@NotNull String str) {
                k0.f(str, "result");
                return str;
            }

            @Override
            @NotNull
            public p.a.k0<ApiResponseWithJava<String>> getRemoteData() {
                WriteResourceRequestEntity writeResourceRequestEntity = new WriteResourceRequestEntity(null, null, 3, null);
                writeResourceRequestEntity.setSubjectId(u.this.b);
                writeResourceRequestEntity.setWriteResRequestData(u.this.c);
                return ((k.t.i.g.x5.a.a) k.t.b.b.h.b.a(CameraRepository.this, k.t.i.g.x5.a.a.class)).a(writeResourceRequestEntity);
            }
        }

        public u(String str, Map map) {
            super(1);
            this.b = str;
            this.c = map;
        }

        public final void a(@NotNull p.a.n<ApiResponseWithJava<String>> nVar) {
            k0.f(nVar, "it");
            new a(nVar, nVar);
        }

        @Override
        public j2 invoke(p.a.n<ApiResponseWithJava<String>> nVar) {
            a(nVar);
            return j2.a;
        }
    }

    @h0(bv = {1, 0, 3}, d1 = {"\u0000\u0016\n\u0000\n\u0002\u0010\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0010\u000e\n\u0000\u0010\u0000\u001a\u00020\u00012\u0012\u0010\u0002\u001a\u000e\u0012\n\u0012\b\u0012\u0004\u0012\u00020\u00050\u00040\u0003H\n¢\u0006\u0002\b\u0006"}, d2 = {"<anonymous>", "", "it", "Lio/reactivex/FlowableEmitter;", "Lcom/lumi/external/http/ApiResponseWithJava;", "", "invoke"}, k = 3, mv = {1, 1, 16})
    public static final class v extends m0 implements s.b3.v.l<p.a.n<ApiResponseWithJava<String>>, j2> {
        public final String b;
        public final Map c;

        public static final class a extends NetworkResource<String, String> {
            public final p.a.n b;

            public a(p.a.n nVar, p.a.n nVar2) {
                super(nVar2);
                this.b = nVar;
            }

            @Override
            @NotNull
            public String processResponse(@NotNull String str) {
                k0.f(str, "result");
                return str;
            }

            @Override
            @NotNull
            public p.a.k0<ApiResponseWithJava<String>> getRemoteData() {
                WriteResourceRequestEntity writeResourceRequestEntity = new WriteResourceRequestEntity(null, null, 3, null);
                writeResourceRequestEntity.setSubjectId(v.this.b);
                writeResourceRequestEntity.setWriteResRequestData(v.this.c);
                return ((k.t.i.g.x5.a.a) k.t.b.b.h.b.a(CameraRepository.this, k.t.i.g.x5.a.a.class)).a(writeResourceRequestEntity);
            }

            @Override
            public void onFetchFailed(@Nullable String str, @Nullable Integer num) {
            }
        }

        public v(String str, Map map) {
            super(1);
            this.b = str;
            this.c = map;
        }

        public final void a(@NotNull p.a.n<ApiResponseWithJava<String>> nVar) {
            k0.f(nVar, "it");
            new a(nVar, nVar);
        }

        @Override
        public j2 invoke(p.a.n<ApiResponseWithJava<String>> nVar) {
            a(nVar);
            return j2.a;
        }
    }

    public CameraRepository() {
        Retrofit build = new Retrofit.Builder().baseUrl("http://www.baidu.com").addConverterFactory(GsonConverterFactory.create()).addCallAdapterFactory(RxJava2CallAdapterFactory.create()).build();
        k0.a((Object) build, "Retrofit.Builder()\n     …\n                .build()");
        Object create = build.create(k.t.i.g.x5.a.a.class);
        k0.a(create, "retrofit.create(CameraApi::class.java)");
        this.c = (k.t.i.g.x5.a.a) create;
    }

    @NotNull
    public final p.a.l<ApiResponseWithJava<String>> a(@NotNull String str, @NotNull String str2, @NotNull String str3) {
        k0.f(str, "did");
        k0.f(str2, "oldPwd");
        k0.f(str3, "newPwd");
        return a(new b(str, str2, str3));
    }

    @NotNull
    public final p.a.l<ApiResponseWithJava<String>> b(@NotNull String str, int i2) {
        k0.f(str, "did");
        return a(str, a1.a(new s0(this.d, Integer.valueOf(i2))));
    }

    @NotNull
    public final p.a.l<ApiResponseWithJava<String>> c(@NotNull String str, @NotNull String str2) {
        k0.f(str, "did");
        k0.f(str2, "pwd");
        return a(new q(str, str2));
    }

    @NotNull
    public final p.a.l<ApiResponseWithJava<ArrayList<ReadResourceRespondEntity>>> d(@NotNull String str) {
        k0.f(str, "did");
        return b(str, w.a(this.d));
    }

    @NotNull
    public final p.a.l<ApiResponseWithJava<ArrayList<ReadResourceRespondEntity>>> e(@NotNull String str) {
        k0.f(str, "did");
        return b(str, w.a(this.f7516e));
    }

    @NotNull
    public final p.a.l<ApiResponseWithJava<ArrayList<ReadResourceRespondEntity>>> f(@NotNull String str) {
        k0.f(str, "did");
        return b(str, w.a(this.f7517f));
    }

    @NotNull
    public final p.a.l<ApiResponseWithJava<String>> g(@NotNull String str, @NotNull List<String> list) {
        k0.f(str, "did");
        k0.f(list, "attrs");
        return a(new s(list, str));
    }

    private final RequestBody g(String str) {
        return RequestBody.Companion.create(new File(str), MediaType.Companion.parse("image/jpeg"));
    }

    @NotNull
    public final p.a.l<ApiResponseWithJava<String>> a(@NotNull String str, @NotNull String str2) {
        k0.f(str, "did");
        k0.f(str2, "pwd");
        return a(new c(str, str2));
    }

    @NotNull
    public final p.a.l<ApiResponseWithJava<ArrayList<ReadResourceRespondEntity>>> b(@NotNull String str, @NotNull List<String> list) {
        k0.f(str, "did");
        k0.f(list, "attrs");
        return a(new m(str, list));
    }

    @NotNull
    public final p.a.l<ApiResponseWithJava<String>> c(@NotNull String str, @NotNull List<String> list) {
        k0.f(str, "did");
        k0.f(list, "attrs");
        return a(new n(str, list));
    }

    @NotNull
    public final p.a.l<ApiResponseWithJava<String>> d(@NotNull String str, @NotNull List<String> list) {
        k0.f(str, "did");
        k0.f(list, "attrs");
        return a(new o(str, list));
    }

    @NotNull
    public final p.a.k0<ApiResponseWithJava<ArrayList<ReadResourceRespondEntity>>> e(@NotNull String str, @NotNull List<String> list) {
        k0.f(str, "did");
        k0.f(list, "attrs");
        ReadResourceRequestEntity readResourceRequestEntity = new ReadResourceRequestEntity(null, 1, null);
        ArrayList arrayList = new ArrayList();
        ReadResRequestData readResRequestData = new ReadResRequestData(null, null, 3, null);
        readResRequestData.setSubjectId(str);
        readResRequestData.setOptions(list);
        arrayList.add(readResRequestData);
        readResourceRequestEntity.setWriteResRequestData(arrayList);
        p.a.k0<ApiResponseWithJava<ArrayList<ReadResourceRespondEntity>>> b2 = ((k.t.i.g.x5.a.a) this.a.a(k.t.i.g.x5.a.a.class)).b(readResourceRequestEntity).b(p.a.e1.b.b());
        k0.a((Object) b2, "mManager.obtainRetrofitS…scribeOn(Schedulers.io())");
        return b2;
    }

    @NotNull
    public final p.a.l<ApiResponseWithJava<String>> f(@NotNull String str, @NotNull List<String> list) {
        k0.f(str, "did");
        k0.f(list, "attrs");
        return a(new r(list, str));
    }

    @NotNull
    public final p.a.l<ApiResponseWithJava<String>> a(@NotNull String str, @NotNull String str2, @NotNull Map<String, ? extends Object> map) {
        k0.f(str, "did");
        k0.f(str2, PushConstants.MZ_PUSH_MESSAGE_METHOD);
        k0.f(map, "params");
        return a(new d(str, str2, map));
    }

    @NotNull
    public final p.a.k0<ApiResponseWithJava<String>> b(int i2) {
        HashMap<String, Integer> hashMap = new HashMap<>();
        hashMap.put("id", Integer.valueOf(i2));
        p.a.k0<ApiResponseWithJava<String>> b2 = ((k.t.i.g.x5.a.a) this.a.a(k.t.i.g.x5.a.a.class)).b(hashMap).b(p.a.e1.b.b());
        k0.a((Object) b2, "mManager.obtainRetrofitS…scribeOn(Schedulers.io())");
        return b2;
    }

    @NotNull
    public final p.a.k0<ApiResponseWithJava<String>> c(@NotNull String str, @NotNull Map<String, ? extends Object> map) {
        k0.f(str, "did");
        k0.f(map, "attrsMap");
        WriteResourceRequestEntity writeResourceRequestEntity = new WriteResourceRequestEntity(null, null, 3, null);
        writeResourceRequestEntity.setSubjectId(str);
        writeResourceRequestEntity.setWriteResRequestData(map);
        p.a.k0<ApiResponseWithJava<String>> b2 = ((k.t.i.g.x5.a.a) this.a.a(k.t.i.g.x5.a.a.class)).a(writeResourceRequestEntity).b(p.a.e1.b.b());
        k0.a((Object) b2, "mManager.obtainRetrofitS…scribeOn(Schedulers.io())");
        return b2;
    }

    @NotNull
    public final p.a.k0<Response<ResponseBody>> d(@NotNull String str, @NotNull String str2) {
        k0.f(str, "url");
        k0.f(str2, "filePath");
        return this.c.a(str, g(str2));
    }

    @NotNull
    public final p.a.l<ApiResponseWithJava<String>> a(@NotNull String str, @NotNull Map<String, ? extends Object> map) {
        k0.f(str, "did");
        k0.f(map, "attrsMap");
        return a(new u(str, map));
    }

    @NotNull
    public final p.a.l<ApiResponseWithJava<TimelineEventInfoList>> a(@NotNull String str, long j2, long j3, @Nullable String str2, int i2) {
        k0.f(str, "observerSubjectId");
        return a(new k(str, j2, j3, str2, i2));
    }

    @NotNull
    public final p.a.l<ApiResponseWithJava<String>> a(@NotNull String str) {
        k0.f(str, "did");
        return c(str, w.a("ptz_position"));
    }

    @NotNull
    public final p.a.l<ApiResponseWithJava<String>> b(@NotNull String str, @NotNull Map<String, ? extends Object> map) {
        k0.f(str, "did");
        k0.f(map, "attrsMap");
        return a(new v(str, map));
    }

    @NotNull
    public final p.a.l<ApiResponseWithJava<String>> a(@NotNull String str, @NotNull PresetPositionEntity presetPositionEntity) {
        k0.f(str, "did");
        k0.f(presetPositionEntity, "presetPositionEntity");
        return a(new a(presetPositionEntity));
    }

    @NotNull
    public final p.a.k0<ApiResponseWithJava<List<CruiseEntity>>> b(@NotNull String str) {
        k0.f(str, "did");
        p.a.k0<ApiResponseWithJava<List<CruiseEntity>>> b2 = ((k.t.i.g.x5.a.a) this.a.a(k.t.i.g.x5.a.a.class)).c(str).b(p.a.e1.b.b());
        k0.a((Object) b2, "mManager.obtainRetrofitS…scribeOn(Schedulers.io())");
        return b2;
    }

    @NotNull
    public final p.a.l<ApiResponseWithJava<List<PresetPositionEntity>>> c(@NotNull String str) {
        k0.f(str, "did");
        return a(new l(str));
    }

    @NotNull
    public final p.a.l<ApiResponseWithJava<String>> a(@NotNull String str, @NotNull List<Integer> list) {
        k0.f(str, "did");
        k0.f(list, "idList");
        return a(new g(str, list));
    }

    @NotNull
    public final p.a.l<ApiResponseWithJava<UploadUrlEntity>> b(@NotNull String str, @NotNull String str2) {
        k0.f(str, k.u.c.g0.c.j.d.k.i.C);
        k0.f(str2, "type");
        return a(new j(str, str2));
    }

    @NotNull
    public final p.a.l<ApiResponseWithJava<String>> a(@NotNull String str, int i2) {
        k0.f(str, "did");
        return a(new p(str, i2));
    }

    @NotNull
    public final p.a.l<ApiResponseWithJava<String>> a(int i2) {
        return a(new f(i2));
    }

    @NotNull
    public final p.a.l<ApiResponseWithJava<String>> a(@NotNull CruiseEntity cruiseEntity) {
        k0.f(cruiseEntity, "cruiseEntity");
        HashMap hashMap = new HashMap();
        hashMap.put("did", cruiseEntity.getDid());
        if (cruiseEntity.getId() > 0) {
            hashMap.put("id", String.valueOf(cruiseEntity.getId()));
        }
        hashMap.put("name", cruiseEntity.getName());
        ArrayList arrayList = new ArrayList();
        hashMap.put("positionList", arrayList);
        for (CruiseNode cruiseNode : cruiseEntity.getPositionList()) {
            HashMap hashMap2 = new HashMap();
            hashMap2.put("duration", String.valueOf(cruiseNode.getDuration()));
            hashMap2.put("posId", String.valueOf(cruiseNode.getId()));
            arrayList.add(hashMap2);
        }
        return a(new e(hashMap));
    }

    @NotNull
    public final p.a.l<ApiResponseWithJava<String>> a(@NotNull String str, int i2, @NotNull String str2) {
        k0.f(str, "did");
        k0.f(str2, "name");
        return a(new i(str2, str, i2));
    }

    @NotNull
    public final p.a.k0<Response<ResponseBody>> a(@NotNull String str, @NotNull byte[] bArr) {
        k0.f(str, "url");
        k0.f(bArr, "byteArray");
        return this.c.a(str, a(bArr));
    }

    private final RequestBody a(byte[] bArr) {
        return RequestBody.Companion.create$default(RequestBody.Companion, bArr, MediaType.Companion.parse("image/jpeg"), 0, 0, 6, (Object) null);
    }

    @NotNull
    public final p.a.l<ApiResponseWithJava<String>> a(@NotNull PresetPositionSortEntity presetPositionSortEntity) {
        k0.f(presetPositionSortEntity, "presetPositionSortEntity");
        return a(new t(presetPositionSortEntity));
    }

    @NotNull
    public final p.a.l<ApiResponseWithJava<String>> a(@NotNull HashMap<String, Object> hashMap) {
        k0.f(hashMap, "params");
        return a(new h(hashMap));
    }
}