导航菜单

页面标题

页面副标题

Vi App v10.18.0 - RetrofitClient.java 源代码

正在查看: Vi App v10.18.0 应用的 RetrofitClient.java JAVA 源代码文件

本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。


package com.adityabirlawellness.vifitsdk.network;

import androidx.annotation.Keep;
import com.adityabirlawellness.vifitsdk.g;
import com.adityabirlawellness.vifitsdk.h;
import com.adityabirlawellness.vifitsdk.k;
import com.adityabirlawellness.vifitsdk.utility.EncryptionHelper;
import java.util.Map;
import java.util.concurrent.TimeUnit;
import kotlin.Pair;
import kotlin.TuplesKt;
import kotlin.collections.MapsKt;
import kotlin.jvm.internal.DefaultConstructorMarker;
import kotlin.jvm.internal.Intrinsics;
import okhttp3.OkHttpClient;
import okhttp3.logging.HttpLoggingInterceptor;
import org.jetbrains.annotations.NotNull;
import retrofit2.Retrofit;
import retrofit2.converter.gson.GsonConverterFactory;

@Keep
public final class RetrofitClient {

    @NotNull
    private static String BASE_URL;

    @NotNull
    private static final g apiServiceDeviceConnect;

    @NotNull
    private static final g apiServicePushActivityData;

    @NotNull
    private static final g apiServicePushActivityDataABW;

    @NotNull
    private static final g getInfoContentService;

    @NotNull
    private static final Map<String, String> headersMapDeviceConnect;

    @NotNull
    private static final Map<String, String> headersMapGetInfoContent;

    @NotNull
    private static final Map<String, String> headersMapPushActivityData;

    @NotNull
    private static final HttpLoggingInterceptor interceptor;

    @NotNull
    private static final OkHttpClient okHttpClientDeviceConnect;

    @NotNull
    private static final OkHttpClient okHttpClientGetInfoContent;

    @NotNull
    private static final OkHttpClient okHttpClientPre;

    @NotNull
    private static final OkHttpClient okHttpClientPushActivityData;

    @NotNull
    private static final OkHttpClient okHttpClientPushActivityDataABW;

    @NotNull
    private static final g preLoginApiService;

    @NotNull
    private static final Retrofit retrofitDeviceConnect;

    @NotNull
    private static final Retrofit retrofitGetInfoContent;

    @NotNull
    private static final Retrofit retrofitPre;

    @NotNull
    private static final Retrofit retrofitPushActivityData;

    @NotNull
    private static final Retrofit retrofitPushActivityDataABW;

    @NotNull
    public static final RetrofitClient INSTANCE = new RetrofitClient();

    @NotNull
    private static String wellnessID = "0";

    @NotNull
    private static String userToken = "0";

    @NotNull
    private static String mobileNo = "0";

    @NotNull
    private static String stepDBToken = "0";

    @NotNull
    private static String token = "0";

    @NotNull
    private static String dataPushSource = "normalSync";

    static {
        BASE_URL = Intrinsics.areEqual(k.f283b.d, "UAT") ? "https://corporatewellness.adityabirlahealth.com/VIFITAPP/" : "https://abwcorporatewellness.adityabirlacapital.com/";
        HttpLoggingInterceptor httpLoggingInterceptor = new HttpLoggingInterceptor((HttpLoggingInterceptor.Logger) null, 1, (DefaultConstructorMarker) null);
        httpLoggingInterceptor.level(HttpLoggingInterceptor.Level.BODY);
        interceptor = httpLoggingInterceptor;
        Map<String, String> mutableMapOf = MapsKt.mutableMapOf(new Pair[]{TuplesKt.to("user-token", stepDBToken.toString()), TuplesKt.to("partnerCode", EncryptionHelper.encryptABW("VI")), TuplesKt.to("deviceSource", EncryptionHelper.encryptABW("android")), TuplesKt.to("wellnessId", EncryptionHelper.encryptABW(wellnessID)), TuplesKt.to("mobileno", EncryptionHelper.encryptABW(mobileNo)), TuplesKt.to("auth-token", token.toString())});
        headersMapDeviceConnect = mutableMapOf;
        Map<String, String> mutableMapOf2 = MapsKt.mutableMapOf(new Pair[]{TuplesKt.to("user-token", stepDBToken.toString()), TuplesKt.to("partnerCode", EncryptionHelper.encryptABW("VI")), TuplesKt.to("deviceSource", EncryptionHelper.encryptABW("android")), TuplesKt.to("wellnessId", EncryptionHelper.encryptABW(wellnessID)), TuplesKt.to("mobileno", EncryptionHelper.encryptABW(mobileNo)), TuplesKt.to("deviceCode", EncryptionHelper.encryptABW("HC")), TuplesKt.to("auth-token", token.toString()), TuplesKt.to("dataPushSource", dataPushSource.toString())});
        headersMapPushActivityData = mutableMapOf2;
        Map<String, String> mutableMapOf3 = MapsKt.mutableMapOf(new Pair[]{TuplesKt.to("auth-token", token.toString()), TuplesKt.to("mobileno", EncryptionHelper.encryptABW(mobileNo))});
        headersMapGetInfoContent = mutableMapOf3;
        OkHttpClient.Builder builder = new OkHttpClient.Builder();
        TimeUnit timeUnit = TimeUnit.MINUTES;
        OkHttpClient build = builder.connectTimeout(5L, timeUnit).readTimeout(5L, timeUnit).writeTimeout(5L, timeUnit).addInterceptor(httpLoggingInterceptor).build();
        okHttpClientPre = build;
        OkHttpClient build2 = new OkHttpClient.Builder().connectTimeout(5L, timeUnit).readTimeout(5L, timeUnit).writeTimeout(5L, timeUnit).addInterceptor(httpLoggingInterceptor).addInterceptor(new h(mutableMapOf)).build();
        okHttpClientDeviceConnect = build2;
        OkHttpClient build3 = new OkHttpClient.Builder().connectTimeout(5L, timeUnit).readTimeout(5L, timeUnit).writeTimeout(5L, timeUnit).addInterceptor(httpLoggingInterceptor).addInterceptor(new h(mutableMapOf2)).build();
        okHttpClientPushActivityData = build3;
        OkHttpClient build4 = new OkHttpClient.Builder().addInterceptor(httpLoggingInterceptor).build();
        okHttpClientPushActivityDataABW = build4;
        OkHttpClient build5 = new OkHttpClient.Builder().addInterceptor(httpLoggingInterceptor).addInterceptor(new h(mutableMapOf3)).build();
        okHttpClientGetInfoContent = build5;
        Retrofit build6 = new Retrofit.Builder().baseUrl(BASE_URL).addConverterFactory(GsonConverterFactory.create()).client(build).build();
        Intrinsics.checkNotNullExpressionValue(build6, "Builder()\n        .baseU…ientPre)\n        .build()");
        retrofitPre = build6;
        Retrofit build7 = new Retrofit.Builder().baseUrl(BASE_URL).addConverterFactory(GsonConverterFactory.create()).client(build5).build();
        Intrinsics.checkNotNullExpressionValue(build7, "Builder()\n        .baseU…Content)\n        .build()");
        retrofitGetInfoContent = build7;
        Retrofit build8 = new Retrofit.Builder().baseUrl(BASE_URL).addConverterFactory(GsonConverterFactory.create()).client(build2).build();
        Intrinsics.checkNotNullExpressionValue(build8, "Builder()\n        .baseU…Connect)\n        .build()");
        retrofitDeviceConnect = build8;
        Retrofit build9 = new Retrofit.Builder().baseUrl(BASE_URL).addConverterFactory(GsonConverterFactory.create()).client(build3).build();
        Intrinsics.checkNotNullExpressionValue(build9, "Builder()\n        .baseU…ityData)\n        .build()");
        retrofitPushActivityData = build9;
        Retrofit build10 = new Retrofit.Builder().baseUrl(BASE_URL).addConverterFactory(GsonConverterFactory.create()).client(build4).build();
        Intrinsics.checkNotNullExpressionValue(build10, "Builder()\n        .baseU…DataABW)\n        .build()");
        retrofitPushActivityDataABW = build10;
        Object create = build6.create(g.class);
        Intrinsics.checkNotNullExpressionValue(create, "retrofitPre.create(ApiService::class.java)");
        preLoginApiService = (g) create;
        Object create2 = build8.create(g.class);
        Intrinsics.checkNotNullExpressionValue(create2, "retrofitDeviceConnect.cr…e(ApiService::class.java)");
        apiServiceDeviceConnect = (g) create2;
        Object create3 = build9.create(g.class);
        Intrinsics.checkNotNullExpressionValue(create3, "retrofitPushActivityData…e(ApiService::class.java)");
        apiServicePushActivityData = (g) create3;
        Object create4 = build7.create(g.class);
        Intrinsics.checkNotNullExpressionValue(create4, "retrofitGetInfoContent.c…e(ApiService::class.java)");
        getInfoContentService = (g) create4;
        Object create5 = build10.create(g.class);
        Intrinsics.checkNotNullExpressionValue(create5, "retrofitPushActivityData…e(ApiService::class.java)");
        apiServicePushActivityDataABW = (g) create5;
    }

    private RetrofitClient() {
    }

    @NotNull
    public final g getApiServiceDeviceConnect() {
        return apiServiceDeviceConnect;
    }

    @NotNull
    public final g getApiServicePushActivityData() {
        return apiServicePushActivityData;
    }

    @NotNull
    public final g getApiServicePushActivityDataABW() {
        return apiServicePushActivityDataABW;
    }

    @NotNull
    public final String getDataPushSource() {
        return dataPushSource;
    }

    @NotNull
    public final g getGetInfoContentService() {
        return getInfoContentService;
    }

    @NotNull
    public final Map<String, String> getHeadersMapDeviceConnect() {
        return headersMapDeviceConnect;
    }

    @NotNull
    public final Map<String, String> getHeadersMapGetInfoContent() {
        return headersMapGetInfoContent;
    }

    @NotNull
    public final Map<String, String> getHeadersMapPushActivityData() {
        return headersMapPushActivityData;
    }

    @NotNull
    public final String getMobileNo() {
        return mobileNo;
    }

    @NotNull
    public final g getPreLoginApiService() {
        return preLoginApiService;
    }

    @NotNull
    public final String getStepDBToken() {
        return stepDBToken;
    }

    @NotNull
    public final String getToken() {
        return token;
    }

    @NotNull
    public final String getUserToken() {
        return userToken;
    }

    @NotNull
    public final String getWellnessID() {
        return wellnessID;
    }

    public final void setDataPushSource(@NotNull String str) {
        Intrinsics.checkNotNullParameter(str, "<set-?>");
        dataPushSource = str;
    }

    public final void setMobileNo(@NotNull String str) {
        Intrinsics.checkNotNullParameter(str, "<set-?>");
        mobileNo = str;
    }

    public final void setStepDBToken(@NotNull String str) {
        Intrinsics.checkNotNullParameter(str, "<set-?>");
        stepDBToken = str;
    }

    public final void setToken(@NotNull String str) {
        Intrinsics.checkNotNullParameter(str, "<set-?>");
        token = str;
    }

    public final void setUserToken(@NotNull String str) {
        Intrinsics.checkNotNullParameter(str, "<set-?>");
        userToken = str;
    }

    public final void setWellnessID(@NotNull String str) {
        Intrinsics.checkNotNullParameter(str, "<set-?>");
        wellnessID = str;
    }
}