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

com.pulumi.kubernetes.extensions.v1beta1.inputs.IPBlockArgs Maven / Gradle / Ivy

There is a newer version: 4.19.0-alpha.1730750641
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.kubernetes.extensions.v1beta1.inputs;

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;
import java.util.Optional;
import javax.annotation.Nullable;


/**
 * DEPRECATED 1.9 - This group version of IPBlock is deprecated by networking/v1/IPBlock. IPBlock describes a particular CIDR (Ex. "192.168.1.1/24") that is allowed to the pods matched by a NetworkPolicySpec's podSelector. The except entry describes CIDRs that should not be included within this rule.
 * 
 */
public final class IPBlockArgs extends com.pulumi.resources.ResourceArgs {

    public static final IPBlockArgs Empty = new IPBlockArgs();

    /**
     * CIDR is a string representing the IP Block Valid examples are "192.168.1.1/24"
     * 
     */
    @Import(name="cidr", required=true)
    private Output cidr;

    /**
     * @return CIDR is a string representing the IP Block Valid examples are "192.168.1.1/24"
     * 
     */
    public Output cidr() {
        return this.cidr;
    }

    /**
     * Except is a slice of CIDRs that should not be included within an IP Block Valid examples are "192.168.1.1/24" Except values will be rejected if they are outside the CIDR range
     * 
     */
    @Import(name="except")
    private @Nullable Output> except;

    /**
     * @return Except is a slice of CIDRs that should not be included within an IP Block Valid examples are "192.168.1.1/24" Except values will be rejected if they are outside the CIDR range
     * 
     */
    public Optional>> except() {
        return Optional.ofNullable(this.except);
    }

    private IPBlockArgs() {}

    private IPBlockArgs(IPBlockArgs $) {
        this.cidr = $.cidr;
        this.except = $.except;
    }

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

    public static final class Builder {
        private IPBlockArgs $;

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

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

        /**
         * @param cidr CIDR is a string representing the IP Block Valid examples are "192.168.1.1/24"
         * 
         * @return builder
         * 
         */
        public Builder cidr(Output cidr) {
            $.cidr = cidr;
            return this;
        }

        /**
         * @param cidr CIDR is a string representing the IP Block Valid examples are "192.168.1.1/24"
         * 
         * @return builder
         * 
         */
        public Builder cidr(String cidr) {
            return cidr(Output.of(cidr));
        }

        /**
         * @param except Except is a slice of CIDRs that should not be included within an IP Block Valid examples are "192.168.1.1/24" Except values will be rejected if they are outside the CIDR range
         * 
         * @return builder
         * 
         */
        public Builder except(@Nullable Output> except) {
            $.except = except;
            return this;
        }

        /**
         * @param except Except is a slice of CIDRs that should not be included within an IP Block Valid examples are "192.168.1.1/24" Except values will be rejected if they are outside the CIDR range
         * 
         * @return builder
         * 
         */
        public Builder except(List except) {
            return except(Output.of(except));
        }

        /**
         * @param except Except is a slice of CIDRs that should not be included within an IP Block Valid examples are "192.168.1.1/24" Except values will be rejected if they are outside the CIDR range
         * 
         * @return builder
         * 
         */
        public Builder except(String... except) {
            return except(List.of(except));
        }

        public IPBlockArgs build() {
            if ($.cidr == null) {
                throw new MissingRequiredPropertyException("IPBlockArgs", "cidr");
            }
            return $;
        }
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy