com.pulumi.digitalocean.outputs.SpacesBucketLifecycleRule Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of digitalocean Show documentation
Show all versions of digitalocean Show documentation
A Pulumi package for creating and managing DigitalOcean cloud 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.digitalocean.outputs;
import com.pulumi.core.annotations.CustomType;
import com.pulumi.digitalocean.outputs.SpacesBucketLifecycleRuleExpiration;
import com.pulumi.digitalocean.outputs.SpacesBucketLifecycleRuleNoncurrentVersionExpiration;
import com.pulumi.exceptions.MissingRequiredPropertyException;
import java.lang.Boolean;
import java.lang.Integer;
import java.lang.String;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;
@CustomType
public final class SpacesBucketLifecycleRule {
/**
* @return Specifies the number of days after initiating a multipart
* upload when the multipart upload must be completed or else Spaces will abort the upload.
*
*/
private @Nullable Integer abortIncompleteMultipartUploadDays;
/**
* @return Specifies lifecycle rule status.
*
*/
private Boolean enabled;
/**
* @return Specifies a time period after which applicable objects expire (documented below).
*
*/
private @Nullable SpacesBucketLifecycleRuleExpiration expiration;
/**
* @return Unique identifier for the rule.
*
*/
private @Nullable String id;
/**
* @return Specifies when non-current object versions expire (documented below).
*
* At least one of `expiration` or `noncurrent_version_expiration` must be specified.
*
*/
private @Nullable SpacesBucketLifecycleRuleNoncurrentVersionExpiration noncurrentVersionExpiration;
/**
* @return Object key prefix identifying one or more objects to which the rule applies.
*
*/
private @Nullable String prefix;
private SpacesBucketLifecycleRule() {}
/**
* @return Specifies the number of days after initiating a multipart
* upload when the multipart upload must be completed or else Spaces will abort the upload.
*
*/
public Optional abortIncompleteMultipartUploadDays() {
return Optional.ofNullable(this.abortIncompleteMultipartUploadDays);
}
/**
* @return Specifies lifecycle rule status.
*
*/
public Boolean enabled() {
return this.enabled;
}
/**
* @return Specifies a time period after which applicable objects expire (documented below).
*
*/
public Optional expiration() {
return Optional.ofNullable(this.expiration);
}
/**
* @return Unique identifier for the rule.
*
*/
public Optional id() {
return Optional.ofNullable(this.id);
}
/**
* @return Specifies when non-current object versions expire (documented below).
*
* At least one of `expiration` or `noncurrent_version_expiration` must be specified.
*
*/
public Optional noncurrentVersionExpiration() {
return Optional.ofNullable(this.noncurrentVersionExpiration);
}
/**
* @return Object key prefix identifying one or more objects to which the rule applies.
*
*/
public Optional prefix() {
return Optional.ofNullable(this.prefix);
}
public static Builder builder() {
return new Builder();
}
public static Builder builder(SpacesBucketLifecycleRule defaults) {
return new Builder(defaults);
}
@CustomType.Builder
public static final class Builder {
private @Nullable Integer abortIncompleteMultipartUploadDays;
private Boolean enabled;
private @Nullable SpacesBucketLifecycleRuleExpiration expiration;
private @Nullable String id;
private @Nullable SpacesBucketLifecycleRuleNoncurrentVersionExpiration noncurrentVersionExpiration;
private @Nullable String prefix;
public Builder() {}
public Builder(SpacesBucketLifecycleRule defaults) {
Objects.requireNonNull(defaults);
this.abortIncompleteMultipartUploadDays = defaults.abortIncompleteMultipartUploadDays;
this.enabled = defaults.enabled;
this.expiration = defaults.expiration;
this.id = defaults.id;
this.noncurrentVersionExpiration = defaults.noncurrentVersionExpiration;
this.prefix = defaults.prefix;
}
@CustomType.Setter
public Builder abortIncompleteMultipartUploadDays(@Nullable Integer abortIncompleteMultipartUploadDays) {
this.abortIncompleteMultipartUploadDays = abortIncompleteMultipartUploadDays;
return this;
}
@CustomType.Setter
public Builder enabled(Boolean enabled) {
if (enabled == null) {
throw new MissingRequiredPropertyException("SpacesBucketLifecycleRule", "enabled");
}
this.enabled = enabled;
return this;
}
@CustomType.Setter
public Builder expiration(@Nullable SpacesBucketLifecycleRuleExpiration expiration) {
this.expiration = expiration;
return this;
}
@CustomType.Setter
public Builder id(@Nullable String id) {
this.id = id;
return this;
}
@CustomType.Setter
public Builder noncurrentVersionExpiration(@Nullable SpacesBucketLifecycleRuleNoncurrentVersionExpiration noncurrentVersionExpiration) {
this.noncurrentVersionExpiration = noncurrentVersionExpiration;
return this;
}
@CustomType.Setter
public Builder prefix(@Nullable String prefix) {
this.prefix = prefix;
return this;
}
public SpacesBucketLifecycleRule build() {
final var _resultValue = new SpacesBucketLifecycleRule();
_resultValue.abortIncompleteMultipartUploadDays = abortIncompleteMultipartUploadDays;
_resultValue.enabled = enabled;
_resultValue.expiration = expiration;
_resultValue.id = id;
_resultValue.noncurrentVersionExpiration = noncurrentVersionExpiration;
_resultValue.prefix = prefix;
return _resultValue;
}
}
}