// *** 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.Boolean;
import java.lang.String;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;

@CustomType
public final class LinuxWebAppSlotAuthSettingsV2ActiveDirectoryV2 {
    /**
     * @return The list of allowed Applications for the Default Authorisation Policy.
     * 
     */
    private @Nullable List<String> allowedApplications;
    /**
     * @return Specifies a list of Allowed audience values to consider when validating JWTs issued by Azure Active Directory.
     * 
     * &gt; **Note:** The `client_id` value is always considered an allowed audience.
     * 
     * &gt; **NOTE:** This is configured on the Authentication Provider side and is Read Only here.
     * 
     */
    private @Nullable List<String> allowedAudiences;
    /**
     * @return The list of allowed Group Names for the Default Authorisation Policy.
     * 
     */
    private @Nullable List<String> allowedGroups;
    /**
     * @return The list of allowed Identities for the Default Authorisation Policy.
     * 
     */
    private @Nullable List<String> allowedIdentities;
    /**
     * @return The ID of the Client to use to authenticate with Azure Active Directory.
     * 
     */
    private String clientId;
    /**
     * @return The thumbprint of the certificate used for signing purposes.
     * 
     * &gt; **NOTE:** One of `client_secret_setting_name` or `client_secret_certificate_thumbprint` must be specified.
     * 
     */
    private @Nullable String clientSecretCertificateThumbprint;
    /**
     * @return The App Setting name that contains the client secret of the Client. Cannot be used with `client_secret`.
     * 
     * !&gt; **NOTE:** A setting with this name must exist in `app_settings` to function correctly.
     * 
     * !&gt; **NOTE:** A setting with this name must exist in `app_settings` to function correctly.
     * 
     * !&gt; **NOTE:** A setting with this name must exist in `app_settings` to function correctly.
     * 
     * !&gt; **NOTE:** A setting with this name must exist in `app_settings` to function correctly.
     * 
     * !&gt; **NOTE:** A setting with this name must exist in `app_settings` to function correctly.
     * 
     */
    private @Nullable String clientSecretSettingName;
    /**
     * @return A list of Allowed Client Applications in the JWT Claim.
     * 
     */
    private @Nullable List<String> jwtAllowedClientApplications;
    /**
     * @return A list of Allowed Groups in the JWT Claim.
     * 
     */
    private @Nullable List<String> jwtAllowedGroups;
    /**
     * @return A map of key-value pairs to send to the Authorisation Endpoint when a user logs in.
     * 
     */
    private @Nullable Map<String,String> loginParameters;
    /**
     * @return The Azure Tenant Endpoint for the Authenticating Tenant. e.g. `https://login.microsoftonline.com/v2.0/{tenant-guid}/`
     * 
     */
    private String tenantAuthEndpoint;
    /**
     * @return Should the www-authenticate provider should be omitted from the request? Defaults to `false`
     * 
     */
    private @Nullable Boolean wwwAuthenticationDisabled;

    private LinuxWebAppSlotAuthSettingsV2ActiveDirectoryV2() {}
    /**
     * @return The list of allowed Applications for the Default Authorisation Policy.
     * 
     */
    public List<String> allowedApplications() {
        return this.allowedApplications == null ? List.of() : this.allowedApplications;
    }
    /**
     * @return Specifies a list of Allowed audience values to consider when validating JWTs issued by Azure Active Directory.
     * 
     * &gt; **Note:** The `client_id` value is always considered an allowed audience.
     * 
     * &gt; **NOTE:** This is configured on the Authentication Provider side and is Read Only here.
     * 
     */
    public List<String> allowedAudiences() {
        return this.allowedAudiences == null ? List.of() : this.allowedAudiences;
    }
    /**
     * @return The list of allowed Group Names for the Default Authorisation Policy.
     * 
     */
    public List<String> allowedGroups() {
        return this.allowedGroups == null ? List.of() : this.allowedGroups;
    }
    /**
     * @return The list of allowed Identities for the Default Authorisation Policy.
     * 
     */
    public List<String> allowedIdentities() {
        return this.allowedIdentities == null ? List.of() : this.allowedIdentities;
    }
    /**
     * @return The ID of the Client to use to authenticate with Azure Active Directory.
     * 
     */
    public String clientId() {
        return this.clientId;
    }
    /**
     * @return The thumbprint of the certificate used for signing purposes.
     * 
     * &gt; **NOTE:** One of `client_secret_setting_name` or `client_secret_certificate_thumbprint` must be specified.
     * 
     */
    public Optional<String> clientSecretCertificateThumbprint() {
        return Optional.ofNullable(this.clientSecretCertificateThumbprint);
    }
    /**
     * @return The App Setting name that contains the client secret of the Client. Cannot be used with `client_secret`.
     * 
     * !&gt; **NOTE:** A setting with this name must exist in `app_settings` to function correctly.
     * 
     * !&gt; **NOTE:** A setting with this name must exist in `app_settings` to function correctly.
     * 
     * !&gt; **NOTE:** A setting with this name must exist in `app_settings` to function correctly.
     * 
     * !&gt; **NOTE:** A setting with this name must exist in `app_settings` to function correctly.
     * 
     * !&gt; **NOTE:** A setting with this name must exist in `app_settings` to function correctly.
     * 
     */
    public Optional<String> clientSecretSettingName() {
        return Optional.ofNullable(this.clientSecretSettingName);
    }
    /**
     * @return A list of Allowed Client Applications in the JWT Claim.
     * 
     */
    public List<String> jwtAllowedClientApplications() {
        return this.jwtAllowedClientApplications == null ? List.of() : this.jwtAllowedClientApplications;
    }
    /**
     * @return A list of Allowed Groups in the JWT Claim.
     * 
     */
    public List<String> jwtAllowedGroups() {
        return this.jwtAllowedGroups == null ? List.of() : this.jwtAllowedGroups;
    }
    /**
     * @return A map of key-value pairs to send to the Authorisation Endpoint when a user logs in.
     * 
     */
    public Map<String,String> loginParameters() {
        return this.loginParameters == null ? Map.of() : this.loginParameters;
    }
    /**
     * @return The Azure Tenant Endpoint for the Authenticating Tenant. e.g. `https://login.microsoftonline.com/v2.0/{tenant-guid}/`
     * 
     */
    public String tenantAuthEndpoint() {
        return this.tenantAuthEndpoint;
    }
    /**
     * @return Should the www-authenticate provider should be omitted from the request? Defaults to `false`
     * 
     */
    public Optional<Boolean> wwwAuthenticationDisabled() {
        return Optional.ofNullable(this.wwwAuthenticationDisabled);
    }

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

    public static Builder builder(LinuxWebAppSlotAuthSettingsV2ActiveDirectoryV2 defaults) {
        return new Builder(defaults);
    }
    @CustomType.Builder
    public static final class Builder {
        private @Nullable List<String> allowedApplications;
        private @Nullable List<String> allowedAudiences;
        private @Nullable List<String> allowedGroups;
        private @Nullable List<String> allowedIdentities;
        private String clientId;
        private @Nullable String clientSecretCertificateThumbprint;
        private @Nullable String clientSecretSettingName;
        private @Nullable List<String> jwtAllowedClientApplications;
        private @Nullable List<String> jwtAllowedGroups;
        private @Nullable Map<String,String> loginParameters;
        private String tenantAuthEndpoint;
        private @Nullable Boolean wwwAuthenticationDisabled;
        public Builder() {}
        public Builder(LinuxWebAppSlotAuthSettingsV2ActiveDirectoryV2 defaults) {
    	      Objects.requireNonNull(defaults);
    	      this.allowedApplications = defaults.allowedApplications;
    	      this.allowedAudiences = defaults.allowedAudiences;
    	      this.allowedGroups = defaults.allowedGroups;
    	      this.allowedIdentities = defaults.allowedIdentities;
    	      this.clientId = defaults.clientId;
    	      this.clientSecretCertificateThumbprint = defaults.clientSecretCertificateThumbprint;
    	      this.clientSecretSettingName = defaults.clientSecretSettingName;
    	      this.jwtAllowedClientApplications = defaults.jwtAllowedClientApplications;
    	      this.jwtAllowedGroups = defaults.jwtAllowedGroups;
    	      this.loginParameters = defaults.loginParameters;
    	      this.tenantAuthEndpoint = defaults.tenantAuthEndpoint;
    	      this.wwwAuthenticationDisabled = defaults.wwwAuthenticationDisabled;
        }

        @CustomType.Setter
        public Builder allowedApplications(@Nullable List<String> allowedApplications) {
            this.allowedApplications = allowedApplications;
            return this;
        }
        public Builder allowedApplications(String... allowedApplications) {
            return allowedApplications(List.of(allowedApplications));
        }
        @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 allowedGroups(@Nullable List<String> allowedGroups) {
            this.allowedGroups = allowedGroups;
            return this;
        }
        public Builder allowedGroups(String... allowedGroups) {
            return allowedGroups(List.of(allowedGroups));
        }
        @CustomType.Setter
        public Builder allowedIdentities(@Nullable List<String> allowedIdentities) {
            this.allowedIdentities = allowedIdentities;
            return this;
        }
        public Builder allowedIdentities(String... allowedIdentities) {
            return allowedIdentities(List.of(allowedIdentities));
        }
        @CustomType.Setter
        public Builder clientId(String clientId) {
            this.clientId = Objects.requireNonNull(clientId);
            return this;
        }
        @CustomType.Setter
        public Builder clientSecretCertificateThumbprint(@Nullable String clientSecretCertificateThumbprint) {
            this.clientSecretCertificateThumbprint = clientSecretCertificateThumbprint;
            return this;
        }
        @CustomType.Setter
        public Builder clientSecretSettingName(@Nullable String clientSecretSettingName) {
            this.clientSecretSettingName = clientSecretSettingName;
            return this;
        }
        @CustomType.Setter
        public Builder jwtAllowedClientApplications(@Nullable List<String> jwtAllowedClientApplications) {
            this.jwtAllowedClientApplications = jwtAllowedClientApplications;
            return this;
        }
        public Builder jwtAllowedClientApplications(String... jwtAllowedClientApplications) {
            return jwtAllowedClientApplications(List.of(jwtAllowedClientApplications));
        }
        @CustomType.Setter
        public Builder jwtAllowedGroups(@Nullable List<String> jwtAllowedGroups) {
            this.jwtAllowedGroups = jwtAllowedGroups;
            return this;
        }
        public Builder jwtAllowedGroups(String... jwtAllowedGroups) {
            return jwtAllowedGroups(List.of(jwtAllowedGroups));
        }
        @CustomType.Setter
        public Builder loginParameters(@Nullable Map<String,String> loginParameters) {
            this.loginParameters = loginParameters;
            return this;
        }
        @CustomType.Setter
        public Builder tenantAuthEndpoint(String tenantAuthEndpoint) {
            this.tenantAuthEndpoint = Objects.requireNonNull(tenantAuthEndpoint);
            return this;
        }
        @CustomType.Setter
        public Builder wwwAuthenticationDisabled(@Nullable Boolean wwwAuthenticationDisabled) {
            this.wwwAuthenticationDisabled = wwwAuthenticationDisabled;
            return this;
        }
        public LinuxWebAppSlotAuthSettingsV2ActiveDirectoryV2 build() {
            final var o = new LinuxWebAppSlotAuthSettingsV2ActiveDirectoryV2();
            o.allowedApplications = allowedApplications;
            o.allowedAudiences = allowedAudiences;
            o.allowedGroups = allowedGroups;
            o.allowedIdentities = allowedIdentities;
            o.clientId = clientId;
            o.clientSecretCertificateThumbprint = clientSecretCertificateThumbprint;
            o.clientSecretSettingName = clientSecretSettingName;
            o.jwtAllowedClientApplications = jwtAllowedClientApplications;
            o.jwtAllowedGroups = jwtAllowedGroups;
            o.loginParameters = loginParameters;
            o.tenantAuthEndpoint = tenantAuthEndpoint;
            o.wwwAuthenticationDisabled = wwwAuthenticationDisabled;
            return o;
        }
    }
}
