// *** 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.outputs;

import com.pulumi.core.annotations.CustomType;
import com.pulumi.kubernetes.extensions.v1beta1.outputs.IDRange;
import java.lang.String;
import java.util.List;
import java.util.Objects;
import javax.annotation.Nullable;

@CustomType
public final class RunAsGroupStrategyOptions {
    /**
     * @return ranges are the allowed ranges of gids that may be used. If you would like to force a single gid then supply a single range with the same start and end. Required for MustRunAs.
     * 
     */
    private @Nullable List<IDRange> ranges;
    /**
     * @return rule is the strategy that will dictate the allowable RunAsGroup values that may be set.
     * 
     */
    private String rule;

    private RunAsGroupStrategyOptions() {}
    /**
     * @return ranges are the allowed ranges of gids that may be used. If you would like to force a single gid then supply a single range with the same start and end. Required for MustRunAs.
     * 
     */
    public List<IDRange> ranges() {
        return this.ranges == null ? List.of() : this.ranges;
    }
    /**
     * @return rule is the strategy that will dictate the allowable RunAsGroup values that may be set.
     * 
     */
    public String rule() {
        return this.rule;
    }

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

    public static Builder builder(RunAsGroupStrategyOptions defaults) {
        return new Builder(defaults);
    }
    @CustomType.Builder
    public static final class Builder {
        private @Nullable List<IDRange> ranges;
        private String rule;
        public Builder() {}
        public Builder(RunAsGroupStrategyOptions defaults) {
    	      Objects.requireNonNull(defaults);
    	      this.ranges = defaults.ranges;
    	      this.rule = defaults.rule;
        }

        @CustomType.Setter
        public Builder ranges(@Nullable List<IDRange> ranges) {
            this.ranges = ranges;
            return this;
        }
        public Builder ranges(IDRange... ranges) {
            return ranges(List.of(ranges));
        }
        @CustomType.Setter
        public Builder rule(String rule) {
            this.rule = Objects.requireNonNull(rule);
            return this;
        }
        public RunAsGroupStrategyOptions build() {
            final var o = new RunAsGroupStrategyOptions();
            o.ranges = ranges;
            o.rule = rule;
            return o;
        }
    }
}
