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

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

@CustomType
public final class KubernetesClusterApiServerAccessProfile {
    /**
     * @return Set of authorized IP ranges to allow access to API server, e.g. [&#34;198.51.100.0/24&#34;].
     * 
     */
    private @Nullable List<String> authorizedIpRanges;
    /**
     * @return The ID of the Subnet where the API server endpoint is delegated to.
     * 
     */
    private @Nullable String subnetId;
    /**
     * @return Should API Server VNet Integration be enabled? For more details please visit [Use API Server VNet Integration](https://learn.microsoft.com/en-us/azure/aks/api-server-vnet-integration).
     * 
     * &gt; **Note:** This requires that the Preview Feature `Microsoft.ContainerService/EnableAPIServerVnetIntegrationPreview` is enabled and the Resource Provider is re-registered, see [the documentation](https://learn.microsoft.com/en-us/azure/aks/api-server-vnet-integration#register-the-enableapiservervnetintegrationpreview-preview-feature) for more information.
     * 
     */
    private @Nullable Boolean vnetIntegrationEnabled;

    private KubernetesClusterApiServerAccessProfile() {}
    /**
     * @return Set of authorized IP ranges to allow access to API server, e.g. [&#34;198.51.100.0/24&#34;].
     * 
     */
    public List<String> authorizedIpRanges() {
        return this.authorizedIpRanges == null ? List.of() : this.authorizedIpRanges;
    }
    /**
     * @return The ID of the Subnet where the API server endpoint is delegated to.
     * 
     */
    public Optional<String> subnetId() {
        return Optional.ofNullable(this.subnetId);
    }
    /**
     * @return Should API Server VNet Integration be enabled? For more details please visit [Use API Server VNet Integration](https://learn.microsoft.com/en-us/azure/aks/api-server-vnet-integration).
     * 
     * &gt; **Note:** This requires that the Preview Feature `Microsoft.ContainerService/EnableAPIServerVnetIntegrationPreview` is enabled and the Resource Provider is re-registered, see [the documentation](https://learn.microsoft.com/en-us/azure/aks/api-server-vnet-integration#register-the-enableapiservervnetintegrationpreview-preview-feature) for more information.
     * 
     */
    public Optional<Boolean> vnetIntegrationEnabled() {
        return Optional.ofNullable(this.vnetIntegrationEnabled);
    }

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

    public static Builder builder(KubernetesClusterApiServerAccessProfile defaults) {
        return new Builder(defaults);
    }
    @CustomType.Builder
    public static final class Builder {
        private @Nullable List<String> authorizedIpRanges;
        private @Nullable String subnetId;
        private @Nullable Boolean vnetIntegrationEnabled;
        public Builder() {}
        public Builder(KubernetesClusterApiServerAccessProfile defaults) {
    	      Objects.requireNonNull(defaults);
    	      this.authorizedIpRanges = defaults.authorizedIpRanges;
    	      this.subnetId = defaults.subnetId;
    	      this.vnetIntegrationEnabled = defaults.vnetIntegrationEnabled;
        }

        @CustomType.Setter
        public Builder authorizedIpRanges(@Nullable List<String> authorizedIpRanges) {
            this.authorizedIpRanges = authorizedIpRanges;
            return this;
        }
        public Builder authorizedIpRanges(String... authorizedIpRanges) {
            return authorizedIpRanges(List.of(authorizedIpRanges));
        }
        @CustomType.Setter
        public Builder subnetId(@Nullable String subnetId) {
            this.subnetId = subnetId;
            return this;
        }
        @CustomType.Setter
        public Builder vnetIntegrationEnabled(@Nullable Boolean vnetIntegrationEnabled) {
            this.vnetIntegrationEnabled = vnetIntegrationEnabled;
            return this;
        }
        public KubernetesClusterApiServerAccessProfile build() {
            final var o = new KubernetesClusterApiServerAccessProfile();
            o.authorizedIpRanges = authorizedIpRanges;
            o.subnetId = subnetId;
            o.vnetIntegrationEnabled = vnetIntegrationEnabled;
            return o;
        }
    }
}
