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

import com.pulumi.core.annotations.CustomType;
import java.lang.String;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;

@CustomType
public final class FunctionAppSlotAuthSettingsActiveDirectory {
    /**
     * @return Allowed audience values to consider when validating JWTs issued by Azure Active Directory.
     * 
     */
    private @Nullable List<String> allowedAudiences;
    /**
     * @return The Client ID of this relying party application. Enables OpenIDConnection authentication with Azure Active Directory.
     * 
     */
    private String clientId;
    /**
     * @return The Client Secret of this relying party application. If no secret is provided, implicit flow will be used.
     * 
     */
    private @Nullable String clientSecret;

    private FunctionAppSlotAuthSettingsActiveDirectory() {}
    /**
     * @return Allowed audience values to consider when validating JWTs issued by Azure Active Directory.
     * 
     */
    public List<String> allowedAudiences() {
        return this.allowedAudiences == null ? List.of() : this.allowedAudiences;
    }
    /**
     * @return The Client ID of this relying party application. Enables OpenIDConnection authentication with Azure Active Directory.
     * 
     */
    public String clientId() {
        return this.clientId;
    }
    /**
     * @return The Client Secret of this relying party application. If no secret is provided, implicit flow will be used.
     * 
     */
    public Optional<String> clientSecret() {
        return Optional.ofNullable(this.clientSecret);
    }

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

    public static Builder builder(FunctionAppSlotAuthSettingsActiveDirectory defaults) {
        return new Builder(defaults);
    }
    @CustomType.Builder
    public static final class Builder {
        private @Nullable List<String> allowedAudiences;
        private String clientId;
        private @Nullable String clientSecret;
        public Builder() {}
        public Builder(FunctionAppSlotAuthSettingsActiveDirectory defaults) {
    	      Objects.requireNonNull(defaults);
    	      this.allowedAudiences = defaults.allowedAudiences;
    	      this.clientId = defaults.clientId;
    	      this.clientSecret = defaults.clientSecret;
        }

        @CustomType.Setter
        public Builder allowedAudiences(@Nullable List<String> allowedAudiences) {
            this.allowedAudiences = allowedAudiences;
            return this;
        }
        public Builder allowedAudiences(String... allowedAudiences) {
            return allowedAudiences(List.of(allowedAudiences));
        }
        @CustomType.Setter
        public Builder clientId(String clientId) {
            this.clientId = Objects.requireNonNull(clientId);
            return this;
        }
        @CustomType.Setter
        public Builder clientSecret(@Nullable String clientSecret) {
            this.clientSecret = clientSecret;
            return this;
        }
        public FunctionAppSlotAuthSettingsActiveDirectory build() {
            final var o = new FunctionAppSlotAuthSettingsActiveDirectory();
            o.allowedAudiences = allowedAudiences;
            o.clientId = clientId;
            o.clientSecret = clientSecret;
            return o;
        }
    }
}
