package com.bytedance.globalpayment.iap.model;

import com.bytedance.covode.number.Covode;
import com.bytedance.fresco.nativeheif.BuildConfig;

public class AbsResult {
    public int mCode = -1;
    public int mDetailCode = -1;
    public String mMessage = BuildConfig.VERSION_NAME;

    static {
        Covode.recordClassIndex(27111);
    }

    public int getCode() {
        return this.mCode;
    }

    public int getDetailCode() {
        return this.mDetailCode;
    }

    public String getMessage() {
        return this.mMessage;
    }

    public boolean isSuccess() {
        if (this.mCode == 0) {
            return true;
        }
        return false;
    }

    public String toString() {
        return "AbsResult{mCode=" + this.mCode + ", mDetailCode=" + this.mDetailCode + ", mMessage='" + this.mMessage + '\'' + '}';
    }

    public AbsResult withDetailCode(int i) {
        this.mDetailCode = i;
        return this;
    }

    public AbsResult withErrorCode(int i) {
        this.mCode = i;
        return this;
    }

    public AbsResult withMessage(String str) {
        this.mMessage = str;
        return this;
    }
}
