导航菜单

页面标题

页面副标题

BetterTogether v3.0.0 - AdaptyConfig.java 源代码

正在查看: BetterTogether v3.0.0 应用的 AdaptyConfig.java JAVA 源代码文件

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


package com.adapty.models;

import com.adapty.internal.utils.InternalAdaptyApi;
import kotlin.Metadata;
import kotlin.jvm.internal.DefaultConstructorMarker;
import kotlin.jvm.internal.Intrinsics;

@Metadata
public final class AdaptyConfig {
    private final String apiKey;
    private final String backendBaseUrl;
    private final String customerUserId;
    private final boolean ipAddressCollectionDisabled;
    private final boolean observerMode;

    @Metadata
    public static final class Builder {
        private final String apiKey;
        private String backendBaseUrl;
        private String customerUserId;
        private boolean ipAddressCollectionDisabled;
        private boolean observerMode;

        public Builder(String str) {
            Intrinsics.checkNotNullParameter(str, "apiKey");
            this.apiKey = str;
            this.backendBaseUrl = ServerCluster.DEFAULT.getUrl$adapty_release();
        }

        public final AdaptyConfig build() {
            return new AdaptyConfig(this.apiKey, this.observerMode, this.customerUserId, this.ipAddressCollectionDisabled, this.backendBaseUrl, null);
        }

        @InternalAdaptyApi
        public final Builder withBackendBaseUrl(String str) {
            Intrinsics.checkNotNullParameter(str, "url");
            if (str.length() > 0) {
                this.backendBaseUrl = str;
            }
            return this;
        }

        public final Builder withCustomerUserId(String str) {
            this.customerUserId = str;
            return this;
        }

        public final Builder withIpAddressCollectionDisabled(boolean z4) {
            this.ipAddressCollectionDisabled = z4;
            return this;
        }

        public final Builder withObserverMode(boolean z4) {
            this.observerMode = z4;
            return this;
        }

        public final Builder withServerCluster(ServerCluster serverCluster) {
            Intrinsics.checkNotNullParameter(serverCluster, "serverCluster");
            this.backendBaseUrl = serverCluster.getUrl$adapty_release();
            return this;
        }
    }

    @Metadata
    public enum ServerCluster {
        DEFAULT("https://api.adapty.io/"),
        EU("https://api-eu.adapty.io/");

        private final String url;

        ServerCluster(String str) {
            this.url = str;
        }

        public final String getUrl$adapty_release() {
            return this.url;
        }
    }

    public AdaptyConfig(String str, boolean z4, String str2, boolean z10, String str3, DefaultConstructorMarker defaultConstructorMarker) {
        this(str, z4, str2, z10, str3);
    }

    public final String getApiKey$adapty_release() {
        return this.apiKey;
    }

    public final String getBackendBaseUrl$adapty_release() {
        return this.backendBaseUrl;
    }

    public final String getCustomerUserId$adapty_release() {
        return this.customerUserId;
    }

    public final boolean getIpAddressCollectionDisabled$adapty_release() {
        return this.ipAddressCollectionDisabled;
    }

    public final boolean getObserverMode$adapty_release() {
        return this.observerMode;
    }

    private AdaptyConfig(String str, boolean z4, String str2, boolean z10, String str3) {
        this.apiKey = str;
        this.observerMode = z4;
        this.customerUserId = str2;
        this.ipAddressCollectionDisabled = z10;
        this.backendBaseUrl = str3;
    }
}