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

com.pulumi.kubernetes.resource.v1alpha3.outputs.AllocationResult Maven / Gradle / Ivy

There is a newer version: 4.19.0
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.resource.v1alpha3.outputs;

import com.pulumi.core.annotations.CustomType;
import com.pulumi.kubernetes.core.v1.outputs.NodeSelector;
import com.pulumi.kubernetes.resource.v1alpha3.outputs.DeviceAllocationResult;
import java.lang.String;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;

@CustomType
public final class AllocationResult {
    /**
     * @return Controller is the name of the DRA driver which handled the allocation. That driver is also responsible for deallocating the claim. It is empty when the claim can be deallocated without involving a driver.
     * 
     * A driver may allocate devices provided by other drivers, so this driver name here can be different from the driver names listed for the results.
     * 
     * This is an alpha field and requires enabling the DRAControlPlaneController feature gate.
     * 
     */
    private @Nullable String controller;
    /**
     * @return Devices is the result of allocating devices.
     * 
     */
    private @Nullable DeviceAllocationResult devices;
    /**
     * @return NodeSelector defines where the allocated resources are available. If unset, they are available everywhere.
     * 
     */
    private @Nullable NodeSelector nodeSelector;

    private AllocationResult() {}
    /**
     * @return Controller is the name of the DRA driver which handled the allocation. That driver is also responsible for deallocating the claim. It is empty when the claim can be deallocated without involving a driver.
     * 
     * A driver may allocate devices provided by other drivers, so this driver name here can be different from the driver names listed for the results.
     * 
     * This is an alpha field and requires enabling the DRAControlPlaneController feature gate.
     * 
     */
    public Optional controller() {
        return Optional.ofNullable(this.controller);
    }
    /**
     * @return Devices is the result of allocating devices.
     * 
     */
    public Optional devices() {
        return Optional.ofNullable(this.devices);
    }
    /**
     * @return NodeSelector defines where the allocated resources are available. If unset, they are available everywhere.
     * 
     */
    public Optional nodeSelector() {
        return Optional.ofNullable(this.nodeSelector);
    }

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

    public static Builder builder(AllocationResult defaults) {
        return new Builder(defaults);
    }
    @CustomType.Builder
    public static final class Builder {
        private @Nullable String controller;
        private @Nullable DeviceAllocationResult devices;
        private @Nullable NodeSelector nodeSelector;
        public Builder() {}
        public Builder(AllocationResult defaults) {
    	      Objects.requireNonNull(defaults);
    	      this.controller = defaults.controller;
    	      this.devices = defaults.devices;
    	      this.nodeSelector = defaults.nodeSelector;
        }

        @CustomType.Setter
        public Builder controller(@Nullable String controller) {

            this.controller = controller;
            return this;
        }
        @CustomType.Setter
        public Builder devices(@Nullable DeviceAllocationResult devices) {

            this.devices = devices;
            return this;
        }
        @CustomType.Setter
        public Builder nodeSelector(@Nullable NodeSelector nodeSelector) {

            this.nodeSelector = nodeSelector;
            return this;
        }
        public AllocationResult build() {
            final var _resultValue = new AllocationResult();
            _resultValue.controller = controller;
            _resultValue.devices = devices;
            _resultValue.nodeSelector = nodeSelector;
            return _resultValue;
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy