com.pulumi.kubernetes.storage.v1.outputs.VolumeAttachmentStatusPatch Maven / Gradle / Ivy
// *** 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.v1.outputs;
import com.pulumi.core.annotations.CustomType;
import com.pulumi.kubernetes.storage.v1.outputs.VolumeErrorPatch;
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 VolumeAttachmentStatusPatch {
/**
* @return attachError represents 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 VolumeErrorPatch attachError;
/**
* @return attached 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 @Nullable Boolean attached;
/**
* @return attachmentMetadata is populated with any information returned by the attach operation, upon successful attach, 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 detachError represents 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 VolumeErrorPatch detachError;
private VolumeAttachmentStatusPatch() {}
/**
* @return attachError represents 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 attached 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 Optional attached() {
return Optional.ofNullable(this.attached);
}
/**
* @return attachmentMetadata is populated with any information returned by the attach operation, upon successful attach, 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 detachError represents 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(VolumeAttachmentStatusPatch defaults) {
return new Builder(defaults);
}
@CustomType.Builder
public static final class Builder {
private @Nullable VolumeErrorPatch attachError;
private @Nullable Boolean attached;
private @Nullable Map attachmentMetadata;
private @Nullable VolumeErrorPatch detachError;
public Builder() {}
public Builder(VolumeAttachmentStatusPatch 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 VolumeErrorPatch attachError) {
this.attachError = attachError;
return this;
}
@CustomType.Setter
public Builder attached(@Nullable Boolean 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 VolumeErrorPatch detachError) {
this.detachError = detachError;
return this;
}
public VolumeAttachmentStatusPatch build() {
final var _resultValue = new VolumeAttachmentStatusPatch();
_resultValue.attachError = attachError;
_resultValue.attached = attached;
_resultValue.attachmentMetadata = attachmentMetadata;
_resultValue.detachError = detachError;
return _resultValue;
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy