package com.adjust.sdk;

import java.util.Map;
import org.json.JSONObject;

public class ResponseData {
    public ActivityKind activityKind;
    public ActivityPackage activityPackage;
    public String adid;
    public Long askIn;
    public AdjustAttribution attribution;
    public Long continueIn;
    public JSONObject jsonResponse;
    public String message;
    public Long retryIn;
    public Map<String, String> sendingParameters;
    public boolean success = false;
    public String timestamp;
    public TrackingState trackingState;
    public boolean willRetry = false;

    public static /* synthetic */ class a {
        public static final /* synthetic */ int[] a;

        /* JADX WARNING: Can't wrap try/catch for region: R(8:0|1|2|3|4|5|6|(3:7|8|10)) */
        /* JADX WARNING: Failed to process nested try/catch */
        /* JADX WARNING: Missing exception handler attribute for start block: B:3:0x0012 */
        /* JADX WARNING: Missing exception handler attribute for start block: B:5:0x001d */
        /* JADX WARNING: Missing exception handler attribute for start block: B:7:0x0028 */
        static {
            int[] iArr = new int[ActivityKind.values().length];
            a = iArr;
            iArr[ActivityKind.SESSION.ordinal()] = 1;
            a[ActivityKind.CLICK.ordinal()] = 2;
            a[ActivityKind.ATTRIBUTION.ordinal()] = 3;
            try {
                a[ActivityKind.EVENT.ordinal()] = 4;
            } catch (NoSuchFieldError unused) {
            }
        }
    }

    public static ResponseData buildResponseData(ActivityPackage activityPackage2, Map<String, String> map) {
        ActivityKind activityKind2 = activityPackage2.getActivityKind();
        int i = a.a[activityKind2.ordinal()];
        ResponseData responseData = i != 1 ? i != 2 ? i != 3 ? i != 4 ? new ResponseData() : new EventResponseData(activityPackage2) : new AttributionResponseData() : new SdkClickResponseData() : new SessionResponseData(activityPackage2);
        responseData.activityKind = activityKind2;
        responseData.activityPackage = activityPackage2;
        responseData.sendingParameters = map;
        return responseData;
    }

    public String toString() {
        return Util.formatString("message:%s timestamp:%s json:%s", this.message, this.timestamp, this.jsonResponse);
    }
}
