// *** 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.cloudwatch.outputs;

import com.pulumi.aws.cloudwatch.outputs.EventConnectionAuthParametersApiKey;
import com.pulumi.aws.cloudwatch.outputs.EventConnectionAuthParametersBasic;
import com.pulumi.aws.cloudwatch.outputs.EventConnectionAuthParametersInvocationHttpParameters;
import com.pulumi.aws.cloudwatch.outputs.EventConnectionAuthParametersOauth;
import com.pulumi.core.annotations.CustomType;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;

@CustomType
public final class EventConnectionAuthParameters {
    /**
     * @return Parameters used for API_KEY authorization. An API key to include in the header for each authentication request. A maximum of 1 are allowed. Conflicts with `basic` and `oauth`. Documented below.
     * 
     */
    private @Nullable EventConnectionAuthParametersApiKey apiKey;
    /**
     * @return Parameters used for BASIC authorization. A maximum of 1 are allowed. Conflicts with `api_key` and `oauth`. Documented below.
     * 
     */
    private @Nullable EventConnectionAuthParametersBasic basic;
    /**
     * @return Invocation Http Parameters are additional credentials used to sign each Invocation of the ApiDestination created from this Connection. If the ApiDestination Rule Target has additional HttpParameters, the values will be merged together, with the Connection Invocation Http Parameters taking precedence. Secret values are stored and managed by AWS Secrets Manager. A maximum of 1 are allowed. Documented below.
     * 
     */
    private @Nullable EventConnectionAuthParametersInvocationHttpParameters invocationHttpParameters;
    /**
     * @return Parameters used for OAUTH_CLIENT_CREDENTIALS authorization. A maximum of 1 are allowed. Conflicts with `basic` and `api_key`. Documented below.
     * 
     */
    private @Nullable EventConnectionAuthParametersOauth oauth;

    private EventConnectionAuthParameters() {}
    /**
     * @return Parameters used for API_KEY authorization. An API key to include in the header for each authentication request. A maximum of 1 are allowed. Conflicts with `basic` and `oauth`. Documented below.
     * 
     */
    public Optional<EventConnectionAuthParametersApiKey> apiKey() {
        return Optional.ofNullable(this.apiKey);
    }
    /**
     * @return Parameters used for BASIC authorization. A maximum of 1 are allowed. Conflicts with `api_key` and `oauth`. Documented below.
     * 
     */
    public Optional<EventConnectionAuthParametersBasic> basic() {
        return Optional.ofNullable(this.basic);
    }
    /**
     * @return Invocation Http Parameters are additional credentials used to sign each Invocation of the ApiDestination created from this Connection. If the ApiDestination Rule Target has additional HttpParameters, the values will be merged together, with the Connection Invocation Http Parameters taking precedence. Secret values are stored and managed by AWS Secrets Manager. A maximum of 1 are allowed. Documented below.
     * 
     */
    public Optional<EventConnectionAuthParametersInvocationHttpParameters> invocationHttpParameters() {
        return Optional.ofNullable(this.invocationHttpParameters);
    }
    /**
     * @return Parameters used for OAUTH_CLIENT_CREDENTIALS authorization. A maximum of 1 are allowed. Conflicts with `basic` and `api_key`. Documented below.
     * 
     */
    public Optional<EventConnectionAuthParametersOauth> oauth() {
        return Optional.ofNullable(this.oauth);
    }

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

    public static Builder builder(EventConnectionAuthParameters defaults) {
        return new Builder(defaults);
    }
    @CustomType.Builder
    public static final class Builder {
        private @Nullable EventConnectionAuthParametersApiKey apiKey;
        private @Nullable EventConnectionAuthParametersBasic basic;
        private @Nullable EventConnectionAuthParametersInvocationHttpParameters invocationHttpParameters;
        private @Nullable EventConnectionAuthParametersOauth oauth;
        public Builder() {}
        public Builder(EventConnectionAuthParameters defaults) {
    	      Objects.requireNonNull(defaults);
    	      this.apiKey = defaults.apiKey;
    	      this.basic = defaults.basic;
    	      this.invocationHttpParameters = defaults.invocationHttpParameters;
    	      this.oauth = defaults.oauth;
        }

        @CustomType.Setter
        public Builder apiKey(@Nullable EventConnectionAuthParametersApiKey apiKey) {
            this.apiKey = apiKey;
            return this;
        }
        @CustomType.Setter
        public Builder basic(@Nullable EventConnectionAuthParametersBasic basic) {
            this.basic = basic;
            return this;
        }
        @CustomType.Setter
        public Builder invocationHttpParameters(@Nullable EventConnectionAuthParametersInvocationHttpParameters invocationHttpParameters) {
            this.invocationHttpParameters = invocationHttpParameters;
            return this;
        }
        @CustomType.Setter
        public Builder oauth(@Nullable EventConnectionAuthParametersOauth oauth) {
            this.oauth = oauth;
            return this;
        }
        public EventConnectionAuthParameters build() {
            final var o = new EventConnectionAuthParameters();
            o.apiKey = apiKey;
            o.basic = basic;
            o.invocationHttpParameters = invocationHttpParameters;
            o.oauth = oauth;
            return o;
        }
    }
}
