package com.amplifyframework.api.aws.auth;

import com.amplifyframework.api.aws.sigv4.ApiKeyAuthProvider;
import uq.b0;

/* loaded from: classes4.dex */
public final class ApiKeyRequestDecorator implements RequestDecorator {
    private static final String X_API_KEY = "x-api-key";
    private final ApiKeyAuthProvider apiKeyProvider;

    public ApiKeyRequestDecorator(ApiKeyAuthProvider apiKeyAuthProvider) {
        this.apiKeyProvider = apiKeyAuthProvider;
    }

    @Override // com.amplifyframework.api.aws.auth.RequestDecorator
    public b0 decorate(b0 b0Var) {
        return b0Var.h().a(X_API_KEY, this.apiKeyProvider.getAPIKey()).b();
    }
}
