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

com.pulumi.kubernetes.storage.v1alpha1.outputs.VolumeAttachmentStatus 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.storage.v1alpha1.outputs;

import com.pulumi.core.annotations.CustomType;
import com.pulumi.exceptions.MissingRequiredPropertyException;
import com.pulumi.kubernetes.storage.v1alpha1.outputs.VolumeError;
import java.lang.Boolean;
import java.lang.String;
import java.util.Map;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;

@CustomType
public final class VolumeAttachmentStatus {
    /**
     * @return The last error encountered during attach operation, if any. This field must only be set by the entity completing the attach operation, i.e. the external-attacher.
     * 
     */
    private @Nullable VolumeError attachError;
    /**
     * @return Indicates the volume is successfully attached. This field must only be set by the entity completing the attach operation, i.e. the external-attacher.
     * 
     */
    private Boolean attached;
    /**
     * @return Upon successful attach, this field is populated with any information returned by the attach operation that must be passed into subsequent WaitForAttach or Mount calls. This field must only be set by the entity completing the attach operation, i.e. the external-attacher.
     * 
     */
    private @Nullable Map attachmentMetadata;
    /**
     * @return The last error encountered during detach operation, if any. This field must only be set by the entity completing the detach operation, i.e. the external-attacher.
     * 
     */
    private @Nullable VolumeError detachError;

    private VolumeAttachmentStatus() {}
    /**
     * @return The last error encountered during attach operation, if any. This field must only be set by the entity completing the attach operation, i.e. the external-attacher.
     * 
     */
    public Optional attachError() {
        return Optional.ofNullable(this.attachError);
    }
    /**
     * @return Indicates the volume is successfully attached. This field must only be set by the entity completing the attach operation, i.e. the external-attacher.
     * 
     */
    public Boolean attached() {
        return this.attached;
    }
    /**
     * @return Upon successful attach, this field is populated with any information returned by the attach operation that must be passed into subsequent WaitForAttach or Mount calls. This field must only be set by the entity completing the attach operation, i.e. the external-attacher.
     * 
     */
    public Map attachmentMetadata() {
        return this.attachmentMetadata == null ? Map.of() : this.attachmentMetadata;
    }
    /**
     * @return The last error encountered during detach operation, if any. This field must only be set by the entity completing the detach operation, i.e. the external-attacher.
     * 
     */
    public Optional detachError() {
        return Optional.ofNullable(this.detachError);
    }

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

    public static Builder builder(VolumeAttachmentStatus defaults) {
        return new Builder(defaults);
    }
    @CustomType.Builder
    public static final class Builder {
        private @Nullable VolumeError attachError;
        private Boolean attached;
        private @Nullable Map attachmentMetadata;
        private @Nullable VolumeError detachError;
        public Builder() {}
        public Builder(VolumeAttachmentStatus defaults) {
    	      Objects.requireNonNull(defaults);
    	      this.attachError = defaults.attachError;
    	      this.attached = defaults.attached;
    	      this.attachmentMetadata = defaults.attachmentMetadata;
    	      this.detachError = defaults.detachError;
        }

        @CustomType.Setter
        public Builder attachError(@Nullable VolumeError attachError) {

            this.attachError = attachError;
            return this;
        }
        @CustomType.Setter
        public Builder attached(Boolean attached) {
            if (attached == null) {
              throw new MissingRequiredPropertyException("VolumeAttachmentStatus", "attached");
            }
            this.attached = attached;
            return this;
        }
        @CustomType.Setter
        public Builder attachmentMetadata(@Nullable Map attachmentMetadata) {

            this.attachmentMetadata = attachmentMetadata;
            return this;
        }
        @CustomType.Setter
        public Builder detachError(@Nullable VolumeError detachError) {

            this.detachError = detachError;
            return this;
        }
        public VolumeAttachmentStatus build() {
            final var _resultValue = new VolumeAttachmentStatus();
            _resultValue.attachError = attachError;
            _resultValue.attached = attached;
            _resultValue.attachmentMetadata = attachmentMetadata;
            _resultValue.detachError = detachError;
            return _resultValue;
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy