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

com.pulumi.azurenative.iotoperations.outputs.VolumeClaimSpecResponse Maven / Gradle / Ivy

There is a newer version: 2.72.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.azurenative.iotoperations.outputs;

import com.pulumi.azurenative.iotoperations.outputs.KubernetesReferenceResponse;
import com.pulumi.azurenative.iotoperations.outputs.LocalKubernetesReferenceResponse;
import com.pulumi.azurenative.iotoperations.outputs.VolumeClaimResourceRequirementsResponse;
import com.pulumi.azurenative.iotoperations.outputs.VolumeClaimSpecSelectorResponse;
import com.pulumi.core.annotations.CustomType;
import java.lang.String;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;

@CustomType
public final class VolumeClaimSpecResponse {
    /**
     * @return AccessModes contains the desired access modes the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1
     * 
     */
    private @Nullable List accessModes;
    /**
     * @return This field can be used to specify either: * An existing VolumeSnapshot object (snapshot.storage.k8s.io/VolumeSnapshot) * An existing PVC (PersistentVolumeClaim) If the provisioner or an external controller can support the specified data source, it will create a new volume based on the contents of the specified data source. If the AnyVolumeDataSource feature gate is enabled, this field will always have the same contents as the DataSourceRef field.
     * 
     */
    private @Nullable LocalKubernetesReferenceResponse dataSource;
    /**
     * @return Specifies the object from which to populate the volume with data, if a non-empty volume is desired. This may be any local object from a non-empty API group (non core object) or a PersistentVolumeClaim object. When this field is specified, volume binding will only succeed if the type of the specified object matches some installed volume populator or dynamic provisioner. This field will replace the functionality of the DataSource field and as such if both fields are non-empty, they must have the same value. For backwards compatibility, both fields (DataSource and DataSourceRef) will be set to the same value automatically if one of them is empty and the other is non-empty. There are two important differences between DataSource and DataSourceRef: * While DataSource only allows two specific types of objects, DataSourceRef allows any non-core object, as well as PersistentVolumeClaim objects. * While DataSource ignores disallowed values (dropping them), DataSourceRef preserves all values, and generates an error if a disallowed value is specified. (Beta) Using this field requires the AnyVolumeDataSource feature gate to be enabled.
     * 
     */
    private @Nullable KubernetesReferenceResponse dataSourceRef;
    /**
     * @return Resources represents the minimum resources the volume should have. If RecoverVolumeExpansionFailure feature is enabled users are allowed to specify resource requirements that are lower than previous value but must still be higher than capacity recorded in the status field of the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources
     * 
     */
    private @Nullable VolumeClaimResourceRequirementsResponse resources;
    /**
     * @return A label query over volumes to consider for binding.
     * 
     */
    private @Nullable VolumeClaimSpecSelectorResponse selector;
    /**
     * @return Name of the StorageClass required by the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1
     * 
     */
    private @Nullable String storageClassName;
    /**
     * @return volumeMode defines what type of volume is required by the claim. Value of Filesystem is implied when not included in claim spec. This is a beta feature.
     * 
     */
    private @Nullable String volumeMode;
    /**
     * @return VolumeName is the binding reference to the PersistentVolume backing this claim.
     * 
     */
    private @Nullable String volumeName;

    private VolumeClaimSpecResponse() {}
    /**
     * @return AccessModes contains the desired access modes the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1
     * 
     */
    public List accessModes() {
        return this.accessModes == null ? List.of() : this.accessModes;
    }
    /**
     * @return This field can be used to specify either: * An existing VolumeSnapshot object (snapshot.storage.k8s.io/VolumeSnapshot) * An existing PVC (PersistentVolumeClaim) If the provisioner or an external controller can support the specified data source, it will create a new volume based on the contents of the specified data source. If the AnyVolumeDataSource feature gate is enabled, this field will always have the same contents as the DataSourceRef field.
     * 
     */
    public Optional dataSource() {
        return Optional.ofNullable(this.dataSource);
    }
    /**
     * @return Specifies the object from which to populate the volume with data, if a non-empty volume is desired. This may be any local object from a non-empty API group (non core object) or a PersistentVolumeClaim object. When this field is specified, volume binding will only succeed if the type of the specified object matches some installed volume populator or dynamic provisioner. This field will replace the functionality of the DataSource field and as such if both fields are non-empty, they must have the same value. For backwards compatibility, both fields (DataSource and DataSourceRef) will be set to the same value automatically if one of them is empty and the other is non-empty. There are two important differences between DataSource and DataSourceRef: * While DataSource only allows two specific types of objects, DataSourceRef allows any non-core object, as well as PersistentVolumeClaim objects. * While DataSource ignores disallowed values (dropping them), DataSourceRef preserves all values, and generates an error if a disallowed value is specified. (Beta) Using this field requires the AnyVolumeDataSource feature gate to be enabled.
     * 
     */
    public Optional dataSourceRef() {
        return Optional.ofNullable(this.dataSourceRef);
    }
    /**
     * @return Resources represents the minimum resources the volume should have. If RecoverVolumeExpansionFailure feature is enabled users are allowed to specify resource requirements that are lower than previous value but must still be higher than capacity recorded in the status field of the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources
     * 
     */
    public Optional resources() {
        return Optional.ofNullable(this.resources);
    }
    /**
     * @return A label query over volumes to consider for binding.
     * 
     */
    public Optional selector() {
        return Optional.ofNullable(this.selector);
    }
    /**
     * @return Name of the StorageClass required by the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1
     * 
     */
    public Optional storageClassName() {
        return Optional.ofNullable(this.storageClassName);
    }
    /**
     * @return volumeMode defines what type of volume is required by the claim. Value of Filesystem is implied when not included in claim spec. This is a beta feature.
     * 
     */
    public Optional volumeMode() {
        return Optional.ofNullable(this.volumeMode);
    }
    /**
     * @return VolumeName is the binding reference to the PersistentVolume backing this claim.
     * 
     */
    public Optional volumeName() {
        return Optional.ofNullable(this.volumeName);
    }

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

    public static Builder builder(VolumeClaimSpecResponse defaults) {
        return new Builder(defaults);
    }
    @CustomType.Builder
    public static final class Builder {
        private @Nullable List accessModes;
        private @Nullable LocalKubernetesReferenceResponse dataSource;
        private @Nullable KubernetesReferenceResponse dataSourceRef;
        private @Nullable VolumeClaimResourceRequirementsResponse resources;
        private @Nullable VolumeClaimSpecSelectorResponse selector;
        private @Nullable String storageClassName;
        private @Nullable String volumeMode;
        private @Nullable String volumeName;
        public Builder() {}
        public Builder(VolumeClaimSpecResponse defaults) {
    	      Objects.requireNonNull(defaults);
    	      this.accessModes = defaults.accessModes;
    	      this.dataSource = defaults.dataSource;
    	      this.dataSourceRef = defaults.dataSourceRef;
    	      this.resources = defaults.resources;
    	      this.selector = defaults.selector;
    	      this.storageClassName = defaults.storageClassName;
    	      this.volumeMode = defaults.volumeMode;
    	      this.volumeName = defaults.volumeName;
        }

        @CustomType.Setter
        public Builder accessModes(@Nullable List accessModes) {

            this.accessModes = accessModes;
            return this;
        }
        public Builder accessModes(String... accessModes) {
            return accessModes(List.of(accessModes));
        }
        @CustomType.Setter
        public Builder dataSource(@Nullable LocalKubernetesReferenceResponse dataSource) {

            this.dataSource = dataSource;
            return this;
        }
        @CustomType.Setter
        public Builder dataSourceRef(@Nullable KubernetesReferenceResponse dataSourceRef) {

            this.dataSourceRef = dataSourceRef;
            return this;
        }
        @CustomType.Setter
        public Builder resources(@Nullable VolumeClaimResourceRequirementsResponse resources) {

            this.resources = resources;
            return this;
        }
        @CustomType.Setter
        public Builder selector(@Nullable VolumeClaimSpecSelectorResponse selector) {

            this.selector = selector;
            return this;
        }
        @CustomType.Setter
        public Builder storageClassName(@Nullable String storageClassName) {

            this.storageClassName = storageClassName;
            return this;
        }
        @CustomType.Setter
        public Builder volumeMode(@Nullable String volumeMode) {

            this.volumeMode = volumeMode;
            return this;
        }
        @CustomType.Setter
        public Builder volumeName(@Nullable String volumeName) {

            this.volumeName = volumeName;
            return this;
        }
        public VolumeClaimSpecResponse build() {
            final var _resultValue = new VolumeClaimSpecResponse();
            _resultValue.accessModes = accessModes;
            _resultValue.dataSource = dataSource;
            _resultValue.dataSourceRef = dataSourceRef;
            _resultValue.resources = resources;
            _resultValue.selector = selector;
            _resultValue.storageClassName = storageClassName;
            _resultValue.volumeMode = volumeMode;
            _resultValue.volumeName = volumeName;
            return _resultValue;
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy