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

com.pulumi.kubernetes.resource.v1alpha3.inputs.DeviceConstraintArgs 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.resource.v1alpha3.inputs;

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


/**
 * DeviceConstraint must have exactly one field set besides Requests.
 * 
 */
public final class DeviceConstraintArgs extends com.pulumi.resources.ResourceArgs {

    public static final DeviceConstraintArgs Empty = new DeviceConstraintArgs();

    /**
     * MatchAttribute requires that all devices in question have this attribute and that its type and value are the same across those devices.
     * 
     * For example, if you specified "dra.example.com/numa" (a hypothetical example!), then only devices in the same NUMA node will be chosen. A device which does not have that attribute will not be chosen. All devices should use a value of the same type for this attribute because that is part of its specification, but if one device doesn't, then it also will not be chosen.
     * 
     * Must include the domain qualifier.
     * 
     */
    @Import(name="matchAttribute")
    private @Nullable Output matchAttribute;

    /**
     * @return MatchAttribute requires that all devices in question have this attribute and that its type and value are the same across those devices.
     * 
     * For example, if you specified "dra.example.com/numa" (a hypothetical example!), then only devices in the same NUMA node will be chosen. A device which does not have that attribute will not be chosen. All devices should use a value of the same type for this attribute because that is part of its specification, but if one device doesn't, then it also will not be chosen.
     * 
     * Must include the domain qualifier.
     * 
     */
    public Optional> matchAttribute() {
        return Optional.ofNullable(this.matchAttribute);
    }

    /**
     * Requests is a list of the one or more requests in this claim which must co-satisfy this constraint. If a request is fulfilled by multiple devices, then all of the devices must satisfy the constraint. If this is not specified, this constraint applies to all requests in this claim.
     * 
     */
    @Import(name="requests")
    private @Nullable Output> requests;

    /**
     * @return Requests is a list of the one or more requests in this claim which must co-satisfy this constraint. If a request is fulfilled by multiple devices, then all of the devices must satisfy the constraint. If this is not specified, this constraint applies to all requests in this claim.
     * 
     */
    public Optional>> requests() {
        return Optional.ofNullable(this.requests);
    }

    private DeviceConstraintArgs() {}

    private DeviceConstraintArgs(DeviceConstraintArgs $) {
        this.matchAttribute = $.matchAttribute;
        this.requests = $.requests;
    }

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

    public static final class Builder {
        private DeviceConstraintArgs $;

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

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

        /**
         * @param matchAttribute MatchAttribute requires that all devices in question have this attribute and that its type and value are the same across those devices.
         * 
         * For example, if you specified "dra.example.com/numa" (a hypothetical example!), then only devices in the same NUMA node will be chosen. A device which does not have that attribute will not be chosen. All devices should use a value of the same type for this attribute because that is part of its specification, but if one device doesn't, then it also will not be chosen.
         * 
         * Must include the domain qualifier.
         * 
         * @return builder
         * 
         */
        public Builder matchAttribute(@Nullable Output matchAttribute) {
            $.matchAttribute = matchAttribute;
            return this;
        }

        /**
         * @param matchAttribute MatchAttribute requires that all devices in question have this attribute and that its type and value are the same across those devices.
         * 
         * For example, if you specified "dra.example.com/numa" (a hypothetical example!), then only devices in the same NUMA node will be chosen. A device which does not have that attribute will not be chosen. All devices should use a value of the same type for this attribute because that is part of its specification, but if one device doesn't, then it also will not be chosen.
         * 
         * Must include the domain qualifier.
         * 
         * @return builder
         * 
         */
        public Builder matchAttribute(String matchAttribute) {
            return matchAttribute(Output.of(matchAttribute));
        }

        /**
         * @param requests Requests is a list of the one or more requests in this claim which must co-satisfy this constraint. If a request is fulfilled by multiple devices, then all of the devices must satisfy the constraint. If this is not specified, this constraint applies to all requests in this claim.
         * 
         * @return builder
         * 
         */
        public Builder requests(@Nullable Output> requests) {
            $.requests = requests;
            return this;
        }

        /**
         * @param requests Requests is a list of the one or more requests in this claim which must co-satisfy this constraint. If a request is fulfilled by multiple devices, then all of the devices must satisfy the constraint. If this is not specified, this constraint applies to all requests in this claim.
         * 
         * @return builder
         * 
         */
        public Builder requests(List requests) {
            return requests(Output.of(requests));
        }

        /**
         * @param requests Requests is a list of the one or more requests in this claim which must co-satisfy this constraint. If a request is fulfilled by multiple devices, then all of the devices must satisfy the constraint. If this is not specified, this constraint applies to all requests in this claim.
         * 
         * @return builder
         * 
         */
        public Builder requests(String... requests) {
            return requests(List.of(requests));
        }

        public DeviceConstraintArgs build() {
            return $;
        }
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy