com.pulumi.kubernetes.resource.v1alpha1.outputs.ResourceClaimSpec Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of kubernetes Show documentation
Show all versions of kubernetes Show documentation
A Pulumi package for creating and managing Kubernetes resources.
// *** 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.v1alpha1.outputs;
import com.pulumi.core.annotations.CustomType;
import com.pulumi.exceptions.MissingRequiredPropertyException;
import com.pulumi.kubernetes.resource.v1alpha1.outputs.ResourceClaimParametersReference;
import java.lang.String;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;
@CustomType
public final class ResourceClaimSpec {
/**
* @return Allocation can start immediately or when a Pod wants to use the resource. "WaitForFirstConsumer" is the default.
*
*/
private @Nullable String allocationMode;
/**
* @return ParametersRef references a separate object with arbitrary parameters that will be used by the driver when allocating a resource for the claim.
*
* The object must be in the same namespace as the ResourceClaim.
*
*/
private @Nullable ResourceClaimParametersReference parametersRef;
/**
* @return ResourceClassName references the driver and additional parameters via the name of a ResourceClass that was created as part of the driver deployment.
*
*/
private String resourceClassName;
private ResourceClaimSpec() {}
/**
* @return Allocation can start immediately or when a Pod wants to use the resource. "WaitForFirstConsumer" is the default.
*
*/
public Optional allocationMode() {
return Optional.ofNullable(this.allocationMode);
}
/**
* @return ParametersRef references a separate object with arbitrary parameters that will be used by the driver when allocating a resource for the claim.
*
* The object must be in the same namespace as the ResourceClaim.
*
*/
public Optional parametersRef() {
return Optional.ofNullable(this.parametersRef);
}
/**
* @return ResourceClassName references the driver and additional parameters via the name of a ResourceClass that was created as part of the driver deployment.
*
*/
public String resourceClassName() {
return this.resourceClassName;
}
public static Builder builder() {
return new Builder();
}
public static Builder builder(ResourceClaimSpec defaults) {
return new Builder(defaults);
}
@CustomType.Builder
public static final class Builder {
private @Nullable String allocationMode;
private @Nullable ResourceClaimParametersReference parametersRef;
private String resourceClassName;
public Builder() {}
public Builder(ResourceClaimSpec defaults) {
Objects.requireNonNull(defaults);
this.allocationMode = defaults.allocationMode;
this.parametersRef = defaults.parametersRef;
this.resourceClassName = defaults.resourceClassName;
}
@CustomType.Setter
public Builder allocationMode(@Nullable String allocationMode) {
this.allocationMode = allocationMode;
return this;
}
@CustomType.Setter
public Builder parametersRef(@Nullable ResourceClaimParametersReference parametersRef) {
this.parametersRef = parametersRef;
return this;
}
@CustomType.Setter
public Builder resourceClassName(String resourceClassName) {
if (resourceClassName == null) {
throw new MissingRequiredPropertyException("ResourceClaimSpec", "resourceClassName");
}
this.resourceClassName = resourceClassName;
return this;
}
public ResourceClaimSpec build() {
final var _resultValue = new ResourceClaimSpec();
_resultValue.allocationMode = allocationMode;
_resultValue.parametersRef = parametersRef;
_resultValue.resourceClassName = resourceClassName;
return _resultValue;
}
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy