package com.amplifyframework.api.aws;

import com.amplifyframework.api.aws.sigv4.ApiKeyAuthProvider;
import com.amplifyframework.api.aws.sigv4.CognitoUserPoolsAuthProvider;
import com.amplifyframework.api.aws.sigv4.FunctionAuthProvider;
import com.amplifyframework.api.aws.sigv4.OidcAuthProvider;
import com.amplifyframework.auth.CognitoCredentialsProvider;
import java.util.Objects;

/* loaded from: classes4.dex */
public final class ApiAuthProviders {
    private final ApiKeyAuthProvider apiKeyAuthProvider;
    private final n6.c awsCredentialsProvider;
    private final CognitoUserPoolsAuthProvider cognitoUserPoolsAuthProvider;
    private final FunctionAuthProvider functionAuthProvider;
    private final OidcAuthProvider oidcAuthProvider;

    /* loaded from: classes4.dex */
    public static final class Builder {
        private ApiKeyAuthProvider apiKeyAuthProvider;
        private n6.c awsCredentialsProvider = new CognitoCredentialsProvider();
        private CognitoUserPoolsAuthProvider cognitoUserPoolsAuthProvider;
        private FunctionAuthProvider functionAuthProvider;
        private OidcAuthProvider oidcAuthProvider;

        public Builder apiKeyAuthProvider(ApiKeyAuthProvider apiKeyAuthProvider) {
            Objects.requireNonNull(apiKeyAuthProvider);
            this.apiKeyAuthProvider = apiKeyAuthProvider;
            return this;
        }

        public Builder awsCredentialsProvider(n6.c cVar) {
            Objects.requireNonNull(cVar);
            this.awsCredentialsProvider = cVar;
            return this;
        }

        public ApiAuthProviders build() {
            return new ApiAuthProviders(this);
        }

        public Builder cognitoUserPoolsAuthProvider(CognitoUserPoolsAuthProvider cognitoUserPoolsAuthProvider) {
            Objects.requireNonNull(cognitoUserPoolsAuthProvider);
            this.cognitoUserPoolsAuthProvider = cognitoUserPoolsAuthProvider;
            return this;
        }

        public Builder functionAuthProvider(FunctionAuthProvider functionAuthProvider) {
            Objects.requireNonNull(functionAuthProvider);
            this.functionAuthProvider = functionAuthProvider;
            return this;
        }

        n6.c getAWSCredentialsProvider() {
            return this.awsCredentialsProvider;
        }

        ApiKeyAuthProvider getApiKeyAuthProvider() {
            return this.apiKeyAuthProvider;
        }

        CognitoUserPoolsAuthProvider getCognitoUserPoolsAuthProvider() {
            return this.cognitoUserPoolsAuthProvider;
        }

        FunctionAuthProvider getFunctionAuthProvider() {
            return this.functionAuthProvider;
        }

        OidcAuthProvider getOidcAuthProvider() {
            return this.oidcAuthProvider;
        }

        public Builder oidcAuthProvider(OidcAuthProvider oidcAuthProvider) {
            Objects.requireNonNull(oidcAuthProvider);
            this.oidcAuthProvider = oidcAuthProvider;
            return this;
        }
    }

    public static Builder builder() {
        return new Builder();
    }

    public static ApiAuthProviders noProviderOverrides() {
        return builder().build();
    }

    public n6.c getAWSCredentialsProvider() {
        return this.awsCredentialsProvider;
    }

    public ApiKeyAuthProvider getApiKeyAuthProvider() {
        return this.apiKeyAuthProvider;
    }

    public CognitoUserPoolsAuthProvider getCognitoUserPoolsAuthProvider() {
        return this.cognitoUserPoolsAuthProvider;
    }

    public FunctionAuthProvider getFunctionAuthProvider() {
        return this.functionAuthProvider;
    }

    public OidcAuthProvider getOidcAuthProvider() {
        return this.oidcAuthProvider;
    }

    private ApiAuthProviders(Builder builder) {
        this.apiKeyAuthProvider = builder.getApiKeyAuthProvider();
        this.awsCredentialsProvider = builder.getAWSCredentialsProvider();
        this.oidcAuthProvider = builder.getOidcAuthProvider();
        this.cognitoUserPoolsAuthProvider = builder.getCognitoUserPoolsAuthProvider();
        this.functionAuthProvider = builder.getFunctionAuthProvider();
    }
}
