package com.amplifyframework.api.aws;

import android.annotation.SuppressLint;
import java.util.Objects;

/* JADX INFO: Access modifiers changed from: package-private */
/* loaded from: classes4.dex */
public final class ApiConfiguration {
    private final String apiKey;
    private final AuthorizationType authorizationType;
    private final String endpoint;
    private final EndpointType endpointType;
    private final String region;

    /* JADX INFO: Access modifiers changed from: package-private */
    /* loaded from: classes4.dex */
    public static final class Builder {
        private String apiKey;
        private AuthorizationType authorizationType;
        private String endpoint;
        private EndpointType endpointType;
        private String region;

        Builder() {
        }

        /* JADX INFO: Access modifiers changed from: package-private */
        public Builder apiKey(String str) {
            this.apiKey = str;
            return this;
        }

        Builder authorizationType(String str) {
            return authorizationType(AuthorizationType.from(str));
        }

        /* JADX INFO: Access modifiers changed from: package-private */
        @SuppressLint({"SyntheticAccessor"})
        public ApiConfiguration build() {
            Objects.requireNonNull(this.endpoint);
            Objects.requireNonNull(this.region);
            Objects.requireNonNull(this.authorizationType);
            return new ApiConfiguration(this);
        }

        /* JADX INFO: Access modifiers changed from: package-private */
        public Builder endpoint(String str) {
            Objects.requireNonNull(str);
            this.endpoint = str;
            return this;
        }

        /* JADX INFO: Access modifiers changed from: package-private */
        public Builder endpointType(EndpointType endpointType) {
            Objects.requireNonNull(endpointType);
            this.endpointType = endpointType;
            return this;
        }

        /* JADX INFO: Access modifiers changed from: package-private */
        public Builder region(String str) {
            Objects.requireNonNull(str);
            this.region = str;
            return this;
        }

        /* JADX INFO: Access modifiers changed from: package-private */
        public Builder authorizationType(AuthorizationType authorizationType) {
            Objects.requireNonNull(authorizationType);
            this.authorizationType = authorizationType;
            return this;
        }
    }

    /* JADX INFO: Access modifiers changed from: package-private */
    public static Builder builder() {
        return new Builder();
    }

    /* JADX INFO: Access modifiers changed from: package-private */
    public String getApiKey() {
        return this.apiKey;
    }

    /* JADX INFO: Access modifiers changed from: package-private */
    public AuthorizationType getAuthorizationType() {
        return this.authorizationType;
    }

    /* JADX INFO: Access modifiers changed from: package-private */
    public String getEndpoint() {
        return this.endpoint;
    }

    /* JADX INFO: Access modifiers changed from: package-private */
    public EndpointType getEndpointType() {
        return this.endpointType;
    }

    /* JADX INFO: Access modifiers changed from: package-private */
    public String getRegion() {
        return this.region;
    }

    @SuppressLint({"SyntheticAccessor"})
    private ApiConfiguration(Builder builder) {
        this.endpointType = builder.endpointType;
        this.endpoint = builder.endpoint;
        this.region = builder.region;
        this.authorizationType = builder.authorizationType;
        this.apiKey = builder.apiKey;
    }
}
