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

com.pulumi.kubernetes.extensions.v1beta1.inputs.NetworkPolicyPeerPatchArgs 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.kubernetes.extensions.v1beta1.inputs.IPBlockPatchArgs;
import com.pulumi.kubernetes.meta.v1.inputs.LabelSelectorPatchArgs;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;


/**
 * DEPRECATED 1.9 - This group version of NetworkPolicyPeer is deprecated by networking/v1/NetworkPolicyPeer.
 * 
 */
public final class NetworkPolicyPeerPatchArgs extends com.pulumi.resources.ResourceArgs {

    public static final NetworkPolicyPeerPatchArgs Empty = new NetworkPolicyPeerPatchArgs();

    /**
     * IPBlock defines policy on a particular IPBlock. If this field is set then neither of the other fields can be.
     * 
     */
    @Import(name="ipBlock")
    private @Nullable Output ipBlock;

    /**
     * @return IPBlock defines policy on a particular IPBlock. If this field is set then neither of the other fields can be.
     * 
     */
    public Optional> ipBlock() {
        return Optional.ofNullable(this.ipBlock);
    }

    /**
     * Selects Namespaces using cluster-scoped labels. This field follows standard label selector semantics; if present but empty, it selects all namespaces.
     * 
     * If PodSelector is also set, then the NetworkPolicyPeer as a whole selects the Pods matching PodSelector in the Namespaces selected by NamespaceSelector. Otherwise it selects all Pods in the Namespaces selected by NamespaceSelector.
     * 
     */
    @Import(name="namespaceSelector")
    private @Nullable Output namespaceSelector;

    /**
     * @return Selects Namespaces using cluster-scoped labels. This field follows standard label selector semantics; if present but empty, it selects all namespaces.
     * 
     * If PodSelector is also set, then the NetworkPolicyPeer as a whole selects the Pods matching PodSelector in the Namespaces selected by NamespaceSelector. Otherwise it selects all Pods in the Namespaces selected by NamespaceSelector.
     * 
     */
    public Optional> namespaceSelector() {
        return Optional.ofNullable(this.namespaceSelector);
    }

    /**
     * This is a label selector which selects Pods. This field follows standard label selector semantics; if present but empty, it selects all pods.
     * 
     * If NamespaceSelector is also set, then the NetworkPolicyPeer as a whole selects the Pods matching PodSelector in the Namespaces selected by NamespaceSelector. Otherwise it selects the Pods matching PodSelector in the policy's own Namespace.
     * 
     */
    @Import(name="podSelector")
    private @Nullable Output podSelector;

    /**
     * @return This is a label selector which selects Pods. This field follows standard label selector semantics; if present but empty, it selects all pods.
     * 
     * If NamespaceSelector is also set, then the NetworkPolicyPeer as a whole selects the Pods matching PodSelector in the Namespaces selected by NamespaceSelector. Otherwise it selects the Pods matching PodSelector in the policy's own Namespace.
     * 
     */
    public Optional> podSelector() {
        return Optional.ofNullable(this.podSelector);
    }

    private NetworkPolicyPeerPatchArgs() {}

    private NetworkPolicyPeerPatchArgs(NetworkPolicyPeerPatchArgs $) {
        this.ipBlock = $.ipBlock;
        this.namespaceSelector = $.namespaceSelector;
        this.podSelector = $.podSelector;
    }

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

    public static final class Builder {
        private NetworkPolicyPeerPatchArgs $;

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

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

        /**
         * @param ipBlock IPBlock defines policy on a particular IPBlock. If this field is set then neither of the other fields can be.
         * 
         * @return builder
         * 
         */
        public Builder ipBlock(@Nullable Output ipBlock) {
            $.ipBlock = ipBlock;
            return this;
        }

        /**
         * @param ipBlock IPBlock defines policy on a particular IPBlock. If this field is set then neither of the other fields can be.
         * 
         * @return builder
         * 
         */
        public Builder ipBlock(IPBlockPatchArgs ipBlock) {
            return ipBlock(Output.of(ipBlock));
        }

        /**
         * @param namespaceSelector Selects Namespaces using cluster-scoped labels. This field follows standard label selector semantics; if present but empty, it selects all namespaces.
         * 
         * If PodSelector is also set, then the NetworkPolicyPeer as a whole selects the Pods matching PodSelector in the Namespaces selected by NamespaceSelector. Otherwise it selects all Pods in the Namespaces selected by NamespaceSelector.
         * 
         * @return builder
         * 
         */
        public Builder namespaceSelector(@Nullable Output namespaceSelector) {
            $.namespaceSelector = namespaceSelector;
            return this;
        }

        /**
         * @param namespaceSelector Selects Namespaces using cluster-scoped labels. This field follows standard label selector semantics; if present but empty, it selects all namespaces.
         * 
         * If PodSelector is also set, then the NetworkPolicyPeer as a whole selects the Pods matching PodSelector in the Namespaces selected by NamespaceSelector. Otherwise it selects all Pods in the Namespaces selected by NamespaceSelector.
         * 
         * @return builder
         * 
         */
        public Builder namespaceSelector(LabelSelectorPatchArgs namespaceSelector) {
            return namespaceSelector(Output.of(namespaceSelector));
        }

        /**
         * @param podSelector This is a label selector which selects Pods. This field follows standard label selector semantics; if present but empty, it selects all pods.
         * 
         * If NamespaceSelector is also set, then the NetworkPolicyPeer as a whole selects the Pods matching PodSelector in the Namespaces selected by NamespaceSelector. Otherwise it selects the Pods matching PodSelector in the policy's own Namespace.
         * 
         * @return builder
         * 
         */
        public Builder podSelector(@Nullable Output podSelector) {
            $.podSelector = podSelector;
            return this;
        }

        /**
         * @param podSelector This is a label selector which selects Pods. This field follows standard label selector semantics; if present but empty, it selects all pods.
         * 
         * If NamespaceSelector is also set, then the NetworkPolicyPeer as a whole selects the Pods matching PodSelector in the Namespaces selected by NamespaceSelector. Otherwise it selects the Pods matching PodSelector in the policy's own Namespace.
         * 
         * @return builder
         * 
         */
        public Builder podSelector(LabelSelectorPatchArgs podSelector) {
            return podSelector(Output.of(podSelector));
        }

        public NetworkPolicyPeerPatchArgs build() {
            return $;
        }
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy