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

com.pulumi.kubernetes.flowcontrol.v1alpha1.outputs.ResourcePolicyRulePatch 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.flowcontrol.v1alpha1.outputs;

import com.pulumi.core.annotations.CustomType;
import java.lang.Boolean;
import java.lang.String;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;

@CustomType
public final class ResourcePolicyRulePatch {
    /**
     * @return `apiGroups` is a list of matching API groups and may not be empty. "*" matches all API groups and, if present, must be the only entry. Required.
     * 
     */
    private @Nullable List apiGroups;
    /**
     * @return `clusterScope` indicates whether to match requests that do not specify a namespace (which happens either because the resource is not namespaced or the request targets all namespaces). If this field is omitted or false then the `namespaces` field must contain a non-empty list.
     * 
     */
    private @Nullable Boolean clusterScope;
    /**
     * @return `namespaces` is a list of target namespaces that restricts matches.  A request that specifies a target namespace matches only if either (a) this list contains that target namespace or (b) this list contains "*".  Note that "*" matches any specified namespace but does not match a request that _does not specify_ a namespace (see the `clusterScope` field for that). This list may be empty, but only if `clusterScope` is true.
     * 
     */
    private @Nullable List namespaces;
    /**
     * @return `resources` is a list of matching resources (i.e., lowercase and plural) with, if desired, subresource.  For example, [ "services", "nodes/status" ].  This list may not be empty. "*" matches all resources and, if present, must be the only entry. Required.
     * 
     */
    private @Nullable List resources;
    /**
     * @return `verbs` is a list of matching verbs and may not be empty. "*" matches all verbs and, if present, must be the only entry. Required.
     * 
     */
    private @Nullable List verbs;

    private ResourcePolicyRulePatch() {}
    /**
     * @return `apiGroups` is a list of matching API groups and may not be empty. "*" matches all API groups and, if present, must be the only entry. Required.
     * 
     */
    public List apiGroups() {
        return this.apiGroups == null ? List.of() : this.apiGroups;
    }
    /**
     * @return `clusterScope` indicates whether to match requests that do not specify a namespace (which happens either because the resource is not namespaced or the request targets all namespaces). If this field is omitted or false then the `namespaces` field must contain a non-empty list.
     * 
     */
    public Optional clusterScope() {
        return Optional.ofNullable(this.clusterScope);
    }
    /**
     * @return `namespaces` is a list of target namespaces that restricts matches.  A request that specifies a target namespace matches only if either (a) this list contains that target namespace or (b) this list contains "*".  Note that "*" matches any specified namespace but does not match a request that _does not specify_ a namespace (see the `clusterScope` field for that). This list may be empty, but only if `clusterScope` is true.
     * 
     */
    public List namespaces() {
        return this.namespaces == null ? List.of() : this.namespaces;
    }
    /**
     * @return `resources` is a list of matching resources (i.e., lowercase and plural) with, if desired, subresource.  For example, [ "services", "nodes/status" ].  This list may not be empty. "*" matches all resources and, if present, must be the only entry. Required.
     * 
     */
    public List resources() {
        return this.resources == null ? List.of() : this.resources;
    }
    /**
     * @return `verbs` is a list of matching verbs and may not be empty. "*" matches all verbs and, if present, must be the only entry. Required.
     * 
     */
    public List verbs() {
        return this.verbs == null ? List.of() : this.verbs;
    }

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

    public static Builder builder(ResourcePolicyRulePatch defaults) {
        return new Builder(defaults);
    }
    @CustomType.Builder
    public static final class Builder {
        private @Nullable List apiGroups;
        private @Nullable Boolean clusterScope;
        private @Nullable List namespaces;
        private @Nullable List resources;
        private @Nullable List verbs;
        public Builder() {}
        public Builder(ResourcePolicyRulePatch defaults) {
    	      Objects.requireNonNull(defaults);
    	      this.apiGroups = defaults.apiGroups;
    	      this.clusterScope = defaults.clusterScope;
    	      this.namespaces = defaults.namespaces;
    	      this.resources = defaults.resources;
    	      this.verbs = defaults.verbs;
        }

        @CustomType.Setter
        public Builder apiGroups(@Nullable List apiGroups) {

            this.apiGroups = apiGroups;
            return this;
        }
        public Builder apiGroups(String... apiGroups) {
            return apiGroups(List.of(apiGroups));
        }
        @CustomType.Setter
        public Builder clusterScope(@Nullable Boolean clusterScope) {

            this.clusterScope = clusterScope;
            return this;
        }
        @CustomType.Setter
        public Builder namespaces(@Nullable List namespaces) {

            this.namespaces = namespaces;
            return this;
        }
        public Builder namespaces(String... namespaces) {
            return namespaces(List.of(namespaces));
        }
        @CustomType.Setter
        public Builder resources(@Nullable List resources) {

            this.resources = resources;
            return this;
        }
        public Builder resources(String... resources) {
            return resources(List.of(resources));
        }
        @CustomType.Setter
        public Builder verbs(@Nullable List verbs) {

            this.verbs = verbs;
            return this;
        }
        public Builder verbs(String... verbs) {
            return verbs(List.of(verbs));
        }
        public ResourcePolicyRulePatch build() {
            final var _resultValue = new ResourcePolicyRulePatch();
            _resultValue.apiGroups = apiGroups;
            _resultValue.clusterScope = clusterScope;
            _resultValue.namespaces = namespaces;
            _resultValue.resources = resources;
            _resultValue.verbs = verbs;
            return _resultValue;
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy