// *** WARNING: this file was generated by pulumi-java-gen. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***

package com.pulumi.aws.appsync.outputs;

import com.pulumi.aws.appsync.outputs.GraphQLApiAdditionalAuthenticationProviderLambdaAuthorizerConfig;
import com.pulumi.aws.appsync.outputs.GraphQLApiAdditionalAuthenticationProviderOpenidConnectConfig;
import com.pulumi.aws.appsync.outputs.GraphQLApiAdditionalAuthenticationProviderUserPoolConfig;
import com.pulumi.core.annotations.CustomType;
import java.lang.String;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;

@CustomType
public final class GraphQLApiAdditionalAuthenticationProvider {
    /**
     * @return Authentication type. Valid values: `API_KEY`, `AWS_IAM`, `AMAZON_COGNITO_USER_POOLS`, `OPENID_CONNECT`, `AWS_LAMBDA`
     * 
     */
    private String authenticationType;
    /**
     * @return Nested argument containing Lambda authorizer configuration. Defined below.
     * 
     */
    private @Nullable GraphQLApiAdditionalAuthenticationProviderLambdaAuthorizerConfig lambdaAuthorizerConfig;
    /**
     * @return Nested argument containing OpenID Connect configuration. Defined below.
     * 
     */
    private @Nullable GraphQLApiAdditionalAuthenticationProviderOpenidConnectConfig openidConnectConfig;
    /**
     * @return Amazon Cognito User Pool configuration. Defined below.
     * 
     */
    private @Nullable GraphQLApiAdditionalAuthenticationProviderUserPoolConfig userPoolConfig;

    private GraphQLApiAdditionalAuthenticationProvider() {}
    /**
     * @return Authentication type. Valid values: `API_KEY`, `AWS_IAM`, `AMAZON_COGNITO_USER_POOLS`, `OPENID_CONNECT`, `AWS_LAMBDA`
     * 
     */
    public String authenticationType() {
        return this.authenticationType;
    }
    /**
     * @return Nested argument containing Lambda authorizer configuration. Defined below.
     * 
     */
    public Optional<GraphQLApiAdditionalAuthenticationProviderLambdaAuthorizerConfig> lambdaAuthorizerConfig() {
        return Optional.ofNullable(this.lambdaAuthorizerConfig);
    }
    /**
     * @return Nested argument containing OpenID Connect configuration. Defined below.
     * 
     */
    public Optional<GraphQLApiAdditionalAuthenticationProviderOpenidConnectConfig> openidConnectConfig() {
        return Optional.ofNullable(this.openidConnectConfig);
    }
    /**
     * @return Amazon Cognito User Pool configuration. Defined below.
     * 
     */
    public Optional<GraphQLApiAdditionalAuthenticationProviderUserPoolConfig> userPoolConfig() {
        return Optional.ofNullable(this.userPoolConfig);
    }

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

    public static Builder builder(GraphQLApiAdditionalAuthenticationProvider defaults) {
        return new Builder(defaults);
    }
    @CustomType.Builder
    public static final class Builder {
        private String authenticationType;
        private @Nullable GraphQLApiAdditionalAuthenticationProviderLambdaAuthorizerConfig lambdaAuthorizerConfig;
        private @Nullable GraphQLApiAdditionalAuthenticationProviderOpenidConnectConfig openidConnectConfig;
        private @Nullable GraphQLApiAdditionalAuthenticationProviderUserPoolConfig userPoolConfig;
        public Builder() {}
        public Builder(GraphQLApiAdditionalAuthenticationProvider defaults) {
    	      Objects.requireNonNull(defaults);
    	      this.authenticationType = defaults.authenticationType;
    	      this.lambdaAuthorizerConfig = defaults.lambdaAuthorizerConfig;
    	      this.openidConnectConfig = defaults.openidConnectConfig;
    	      this.userPoolConfig = defaults.userPoolConfig;
        }

        @CustomType.Setter
        public Builder authenticationType(String authenticationType) {
            this.authenticationType = Objects.requireNonNull(authenticationType);
            return this;
        }
        @CustomType.Setter
        public Builder lambdaAuthorizerConfig(@Nullable GraphQLApiAdditionalAuthenticationProviderLambdaAuthorizerConfig lambdaAuthorizerConfig) {
            this.lambdaAuthorizerConfig = lambdaAuthorizerConfig;
            return this;
        }
        @CustomType.Setter
        public Builder openidConnectConfig(@Nullable GraphQLApiAdditionalAuthenticationProviderOpenidConnectConfig openidConnectConfig) {
            this.openidConnectConfig = openidConnectConfig;
            return this;
        }
        @CustomType.Setter
        public Builder userPoolConfig(@Nullable GraphQLApiAdditionalAuthenticationProviderUserPoolConfig userPoolConfig) {
            this.userPoolConfig = userPoolConfig;
            return this;
        }
        public GraphQLApiAdditionalAuthenticationProvider build() {
            final var o = new GraphQLApiAdditionalAuthenticationProvider();
            o.authenticationType = authenticationType;
            o.lambdaAuthorizerConfig = lambdaAuthorizerConfig;
            o.openidConnectConfig = openidConnectConfig;
            o.userPoolConfig = userPoolConfig;
            return o;
        }
    }
}
