All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.pulumi.azurenative.devices.inputs.NetworkRuleSetPropertiesArgs Maven / Gradle / Ivy

There is a newer version: 2.82.0
Show newest version
// *** 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.azurenative.devices.inputs;

import com.pulumi.azurenative.devices.enums.DefaultAction;
import com.pulumi.azurenative.devices.inputs.NetworkRuleSetIpRuleArgs;
import com.pulumi.core.Either;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import com.pulumi.core.internal.Codegen;
import com.pulumi.exceptions.MissingRequiredPropertyException;
import java.lang.Boolean;
import java.lang.String;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;


/**
 * Network Rule Set Properties of IotHub
 * 
 */
public final class NetworkRuleSetPropertiesArgs extends com.pulumi.resources.ResourceArgs {

    public static final NetworkRuleSetPropertiesArgs Empty = new NetworkRuleSetPropertiesArgs();

    /**
     * If True, then Network Rule Set is also applied to BuiltIn EventHub EndPoint of IotHub
     * 
     */
    @Import(name="applyToBuiltInEventHubEndpoint", required=true)
    private Output applyToBuiltInEventHubEndpoint;

    /**
     * @return If True, then Network Rule Set is also applied to BuiltIn EventHub EndPoint of IotHub
     * 
     */
    public Output applyToBuiltInEventHubEndpoint() {
        return this.applyToBuiltInEventHubEndpoint;
    }

    /**
     * Default Action for Network Rule Set
     * 
     */
    @Import(name="defaultAction")
    private @Nullable Output> defaultAction;

    /**
     * @return Default Action for Network Rule Set
     * 
     */
    public Optional>> defaultAction() {
        return Optional.ofNullable(this.defaultAction);
    }

    /**
     * List of IP Rules
     * 
     */
    @Import(name="ipRules", required=true)
    private Output> ipRules;

    /**
     * @return List of IP Rules
     * 
     */
    public Output> ipRules() {
        return this.ipRules;
    }

    private NetworkRuleSetPropertiesArgs() {}

    private NetworkRuleSetPropertiesArgs(NetworkRuleSetPropertiesArgs $) {
        this.applyToBuiltInEventHubEndpoint = $.applyToBuiltInEventHubEndpoint;
        this.defaultAction = $.defaultAction;
        this.ipRules = $.ipRules;
    }

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

    public static final class Builder {
        private NetworkRuleSetPropertiesArgs $;

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

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

        /**
         * @param applyToBuiltInEventHubEndpoint If True, then Network Rule Set is also applied to BuiltIn EventHub EndPoint of IotHub
         * 
         * @return builder
         * 
         */
        public Builder applyToBuiltInEventHubEndpoint(Output applyToBuiltInEventHubEndpoint) {
            $.applyToBuiltInEventHubEndpoint = applyToBuiltInEventHubEndpoint;
            return this;
        }

        /**
         * @param applyToBuiltInEventHubEndpoint If True, then Network Rule Set is also applied to BuiltIn EventHub EndPoint of IotHub
         * 
         * @return builder
         * 
         */
        public Builder applyToBuiltInEventHubEndpoint(Boolean applyToBuiltInEventHubEndpoint) {
            return applyToBuiltInEventHubEndpoint(Output.of(applyToBuiltInEventHubEndpoint));
        }

        /**
         * @param defaultAction Default Action for Network Rule Set
         * 
         * @return builder
         * 
         */
        public Builder defaultAction(@Nullable Output> defaultAction) {
            $.defaultAction = defaultAction;
            return this;
        }

        /**
         * @param defaultAction Default Action for Network Rule Set
         * 
         * @return builder
         * 
         */
        public Builder defaultAction(Either defaultAction) {
            return defaultAction(Output.of(defaultAction));
        }

        /**
         * @param defaultAction Default Action for Network Rule Set
         * 
         * @return builder
         * 
         */
        public Builder defaultAction(String defaultAction) {
            return defaultAction(Either.ofLeft(defaultAction));
        }

        /**
         * @param defaultAction Default Action for Network Rule Set
         * 
         * @return builder
         * 
         */
        public Builder defaultAction(DefaultAction defaultAction) {
            return defaultAction(Either.ofRight(defaultAction));
        }

        /**
         * @param ipRules List of IP Rules
         * 
         * @return builder
         * 
         */
        public Builder ipRules(Output> ipRules) {
            $.ipRules = ipRules;
            return this;
        }

        /**
         * @param ipRules List of IP Rules
         * 
         * @return builder
         * 
         */
        public Builder ipRules(List ipRules) {
            return ipRules(Output.of(ipRules));
        }

        /**
         * @param ipRules List of IP Rules
         * 
         * @return builder
         * 
         */
        public Builder ipRules(NetworkRuleSetIpRuleArgs... ipRules) {
            return ipRules(List.of(ipRules));
        }

        public NetworkRuleSetPropertiesArgs build() {
            if ($.applyToBuiltInEventHubEndpoint == null) {
                throw new MissingRequiredPropertyException("NetworkRuleSetPropertiesArgs", "applyToBuiltInEventHubEndpoint");
            }
            $.defaultAction = Codegen.stringProp("defaultAction").left(DefaultAction.class).output().arg($.defaultAction).def("Deny").getNullable();
            if ($.ipRules == null) {
                throw new MissingRequiredPropertyException("NetworkRuleSetPropertiesArgs", "ipRules");
            }
            return $;
        }
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy