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

import com.pulumi.azure.apimanagement.inputs.CustomDomainDeveloperPortalArgs;
import com.pulumi.azure.apimanagement.inputs.CustomDomainGatewayArgs;
import com.pulumi.azure.apimanagement.inputs.CustomDomainManagementArgs;
import com.pulumi.azure.apimanagement.inputs.CustomDomainPortalArgs;
import com.pulumi.azure.apimanagement.inputs.CustomDomainScmArgs;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import java.lang.String;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;


public final class CustomDomainArgs extends com.pulumi.resources.ResourceArgs {

    public static final CustomDomainArgs Empty = new CustomDomainArgs();

    /**
     * The ID of the API Management service for which to configure Custom Domains. Changing this forces a new API Management Custom Domain resource to be created.
     * 
     */
    @Import(name="apiManagementId", required=true)
    private Output<String> apiManagementId;

    /**
     * @return The ID of the API Management service for which to configure Custom Domains. Changing this forces a new API Management Custom Domain resource to be created.
     * 
     */
    public Output<String> apiManagementId() {
        return this.apiManagementId;
    }

    /**
     * One or more `developer_portal` blocks as defined below.
     * 
     */
    @Import(name="developerPortals")
    private @Nullable Output<List<CustomDomainDeveloperPortalArgs>> developerPortals;

    /**
     * @return One or more `developer_portal` blocks as defined below.
     * 
     */
    public Optional<Output<List<CustomDomainDeveloperPortalArgs>>> developerPortals() {
        return Optional.ofNullable(this.developerPortals);
    }

    /**
     * One or more `gateway` blocks as defined below.
     * 
     */
    @Import(name="gateways")
    private @Nullable Output<List<CustomDomainGatewayArgs>> gateways;

    /**
     * @return One or more `gateway` blocks as defined below.
     * 
     */
    public Optional<Output<List<CustomDomainGatewayArgs>>> gateways() {
        return Optional.ofNullable(this.gateways);
    }

    /**
     * One or more `management` blocks as defined below.
     * 
     */
    @Import(name="managements")
    private @Nullable Output<List<CustomDomainManagementArgs>> managements;

    /**
     * @return One or more `management` blocks as defined below.
     * 
     */
    public Optional<Output<List<CustomDomainManagementArgs>>> managements() {
        return Optional.ofNullable(this.managements);
    }

    /**
     * One or more `portal` blocks as defined below.
     * 
     */
    @Import(name="portals")
    private @Nullable Output<List<CustomDomainPortalArgs>> portals;

    /**
     * @return One or more `portal` blocks as defined below.
     * 
     */
    public Optional<Output<List<CustomDomainPortalArgs>>> portals() {
        return Optional.ofNullable(this.portals);
    }

    /**
     * One or more `scm` blocks as defined below.
     * 
     */
    @Import(name="scms")
    private @Nullable Output<List<CustomDomainScmArgs>> scms;

    /**
     * @return One or more `scm` blocks as defined below.
     * 
     */
    public Optional<Output<List<CustomDomainScmArgs>>> scms() {
        return Optional.ofNullable(this.scms);
    }

    private CustomDomainArgs() {}

    private CustomDomainArgs(CustomDomainArgs $) {
        this.apiManagementId = $.apiManagementId;
        this.developerPortals = $.developerPortals;
        this.gateways = $.gateways;
        this.managements = $.managements;
        this.portals = $.portals;
        this.scms = $.scms;
    }

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

    public static final class Builder {
        private CustomDomainArgs $;

        public Builder() {
            $ = new CustomDomainArgs();
        }

        public Builder(CustomDomainArgs defaults) {
            $ = new CustomDomainArgs(Objects.requireNonNull(defaults));
        }

        /**
         * @param apiManagementId The ID of the API Management service for which to configure Custom Domains. Changing this forces a new API Management Custom Domain resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder apiManagementId(Output<String> apiManagementId) {
            $.apiManagementId = apiManagementId;
            return this;
        }

        /**
         * @param apiManagementId The ID of the API Management service for which to configure Custom Domains. Changing this forces a new API Management Custom Domain resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder apiManagementId(String apiManagementId) {
            return apiManagementId(Output.of(apiManagementId));
        }

        /**
         * @param developerPortals One or more `developer_portal` blocks as defined below.
         * 
         * @return builder
         * 
         */
        public Builder developerPortals(@Nullable Output<List<CustomDomainDeveloperPortalArgs>> developerPortals) {
            $.developerPortals = developerPortals;
            return this;
        }

        /**
         * @param developerPortals One or more `developer_portal` blocks as defined below.
         * 
         * @return builder
         * 
         */
        public Builder developerPortals(List<CustomDomainDeveloperPortalArgs> developerPortals) {
            return developerPortals(Output.of(developerPortals));
        }

        /**
         * @param developerPortals One or more `developer_portal` blocks as defined below.
         * 
         * @return builder
         * 
         */
        public Builder developerPortals(CustomDomainDeveloperPortalArgs... developerPortals) {
            return developerPortals(List.of(developerPortals));
        }

        /**
         * @param gateways One or more `gateway` blocks as defined below.
         * 
         * @return builder
         * 
         */
        public Builder gateways(@Nullable Output<List<CustomDomainGatewayArgs>> gateways) {
            $.gateways = gateways;
            return this;
        }

        /**
         * @param gateways One or more `gateway` blocks as defined below.
         * 
         * @return builder
         * 
         */
        public Builder gateways(List<CustomDomainGatewayArgs> gateways) {
            return gateways(Output.of(gateways));
        }

        /**
         * @param gateways One or more `gateway` blocks as defined below.
         * 
         * @return builder
         * 
         */
        public Builder gateways(CustomDomainGatewayArgs... gateways) {
            return gateways(List.of(gateways));
        }

        /**
         * @param managements One or more `management` blocks as defined below.
         * 
         * @return builder
         * 
         */
        public Builder managements(@Nullable Output<List<CustomDomainManagementArgs>> managements) {
            $.managements = managements;
            return this;
        }

        /**
         * @param managements One or more `management` blocks as defined below.
         * 
         * @return builder
         * 
         */
        public Builder managements(List<CustomDomainManagementArgs> managements) {
            return managements(Output.of(managements));
        }

        /**
         * @param managements One or more `management` blocks as defined below.
         * 
         * @return builder
         * 
         */
        public Builder managements(CustomDomainManagementArgs... managements) {
            return managements(List.of(managements));
        }

        /**
         * @param portals One or more `portal` blocks as defined below.
         * 
         * @return builder
         * 
         */
        public Builder portals(@Nullable Output<List<CustomDomainPortalArgs>> portals) {
            $.portals = portals;
            return this;
        }

        /**
         * @param portals One or more `portal` blocks as defined below.
         * 
         * @return builder
         * 
         */
        public Builder portals(List<CustomDomainPortalArgs> portals) {
            return portals(Output.of(portals));
        }

        /**
         * @param portals One or more `portal` blocks as defined below.
         * 
         * @return builder
         * 
         */
        public Builder portals(CustomDomainPortalArgs... portals) {
            return portals(List.of(portals));
        }

        /**
         * @param scms One or more `scm` blocks as defined below.
         * 
         * @return builder
         * 
         */
        public Builder scms(@Nullable Output<List<CustomDomainScmArgs>> scms) {
            $.scms = scms;
            return this;
        }

        /**
         * @param scms One or more `scm` blocks as defined below.
         * 
         * @return builder
         * 
         */
        public Builder scms(List<CustomDomainScmArgs> scms) {
            return scms(Output.of(scms));
        }

        /**
         * @param scms One or more `scm` blocks as defined below.
         * 
         * @return builder
         * 
         */
        public Builder scms(CustomDomainScmArgs... scms) {
            return scms(List.of(scms));
        }

        public CustomDomainArgs build() {
            $.apiManagementId = Objects.requireNonNull($.apiManagementId, "expected parameter 'apiManagementId' to be non-null");
            return $;
        }
    }

}
