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

com.pulumi.azurenative.notificationhubs.inputs.IpRuleArgs Maven / Gradle / Ivy

There is a newer version: 2.72.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.notificationhubs.inputs;

import com.pulumi.azurenative.notificationhubs.enums.AccessRights;
import com.pulumi.core.Either;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import com.pulumi.exceptions.MissingRequiredPropertyException;
import java.lang.String;
import java.util.List;
import java.util.Objects;


/**
 * A network authorization rule that filters traffic based on IP address.
 * 
 */
public final class IpRuleArgs extends com.pulumi.resources.ResourceArgs {

    public static final IpRuleArgs Empty = new IpRuleArgs();

    /**
     * IP mask.
     * 
     */
    @Import(name="ipMask", required=true)
    private Output ipMask;

    /**
     * @return IP mask.
     * 
     */
    public Output ipMask() {
        return this.ipMask;
    }

    /**
     * List of access rights.
     * 
     */
    @Import(name="rights", required=true)
    private Output>> rights;

    /**
     * @return List of access rights.
     * 
     */
    public Output>> rights() {
        return this.rights;
    }

    private IpRuleArgs() {}

    private IpRuleArgs(IpRuleArgs $) {
        this.ipMask = $.ipMask;
        this.rights = $.rights;
    }

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

    public static final class Builder {
        private IpRuleArgs $;

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

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

        /**
         * @param ipMask IP mask.
         * 
         * @return builder
         * 
         */
        public Builder ipMask(Output ipMask) {
            $.ipMask = ipMask;
            return this;
        }

        /**
         * @param ipMask IP mask.
         * 
         * @return builder
         * 
         */
        public Builder ipMask(String ipMask) {
            return ipMask(Output.of(ipMask));
        }

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

        /**
         * @param rights List of access rights.
         * 
         * @return builder
         * 
         */
        public Builder rights(List> rights) {
            return rights(Output.of(rights));
        }

        /**
         * @param rights List of access rights.
         * 
         * @return builder
         * 
         */
        public Builder rights(Either... rights) {
            return rights(List.of(rights));
        }

        public IpRuleArgs build() {
            if ($.ipMask == null) {
                throw new MissingRequiredPropertyException("IpRuleArgs", "ipMask");
            }
            if ($.rights == null) {
                throw new MissingRequiredPropertyException("IpRuleArgs", "rights");
            }
            return $;
        }
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy