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

com.pulumi.kubernetes.extensions.v1beta1.outputs.RuntimeClassStrategyOptions 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.outputs;

import com.pulumi.core.annotations.CustomType;
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;

@CustomType
public final class RuntimeClassStrategyOptions {
    /**
     * @return allowedRuntimeClassNames is a whitelist of RuntimeClass names that may be specified on a pod. A value of "*" means that any RuntimeClass name is allowed, and must be the only item in the list. An empty list requires the RuntimeClassName field to be unset.
     * 
     */
    private List allowedRuntimeClassNames;
    /**
     * @return defaultRuntimeClassName is the default RuntimeClassName to set on the pod. The default MUST be allowed by the allowedRuntimeClassNames list. A value of nil does not mutate the Pod.
     * 
     */
    private @Nullable String defaultRuntimeClassName;

    private RuntimeClassStrategyOptions() {}
    /**
     * @return allowedRuntimeClassNames is a whitelist of RuntimeClass names that may be specified on a pod. A value of "*" means that any RuntimeClass name is allowed, and must be the only item in the list. An empty list requires the RuntimeClassName field to be unset.
     * 
     */
    public List allowedRuntimeClassNames() {
        return this.allowedRuntimeClassNames;
    }
    /**
     * @return defaultRuntimeClassName is the default RuntimeClassName to set on the pod. The default MUST be allowed by the allowedRuntimeClassNames list. A value of nil does not mutate the Pod.
     * 
     */
    public Optional defaultRuntimeClassName() {
        return Optional.ofNullable(this.defaultRuntimeClassName);
    }

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

    public static Builder builder(RuntimeClassStrategyOptions defaults) {
        return new Builder(defaults);
    }
    @CustomType.Builder
    public static final class Builder {
        private List allowedRuntimeClassNames;
        private @Nullable String defaultRuntimeClassName;
        public Builder() {}
        public Builder(RuntimeClassStrategyOptions defaults) {
    	      Objects.requireNonNull(defaults);
    	      this.allowedRuntimeClassNames = defaults.allowedRuntimeClassNames;
    	      this.defaultRuntimeClassName = defaults.defaultRuntimeClassName;
        }

        @CustomType.Setter
        public Builder allowedRuntimeClassNames(List allowedRuntimeClassNames) {
            if (allowedRuntimeClassNames == null) {
              throw new MissingRequiredPropertyException("RuntimeClassStrategyOptions", "allowedRuntimeClassNames");
            }
            this.allowedRuntimeClassNames = allowedRuntimeClassNames;
            return this;
        }
        public Builder allowedRuntimeClassNames(String... allowedRuntimeClassNames) {
            return allowedRuntimeClassNames(List.of(allowedRuntimeClassNames));
        }
        @CustomType.Setter
        public Builder defaultRuntimeClassName(@Nullable String defaultRuntimeClassName) {

            this.defaultRuntimeClassName = defaultRuntimeClassName;
            return this;
        }
        public RuntimeClassStrategyOptions build() {
            final var _resultValue = new RuntimeClassStrategyOptions();
            _resultValue.allowedRuntimeClassNames = allowedRuntimeClassNames;
            _resultValue.defaultRuntimeClassName = defaultRuntimeClassName;
            return _resultValue;
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy