com.pulumi.azure.storage.outputs.AccountBlobProperties 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.azure.storage.outputs;
import com.pulumi.azure.storage.outputs.AccountBlobPropertiesContainerDeleteRetentionPolicy;
import com.pulumi.azure.storage.outputs.AccountBlobPropertiesCorsRule;
import com.pulumi.azure.storage.outputs.AccountBlobPropertiesDeleteRetentionPolicy;
import com.pulumi.azure.storage.outputs.AccountBlobPropertiesRestorePolicy;
import com.pulumi.core.annotations.CustomType;
import java.lang.Boolean;
import java.lang.Integer;
import java.lang.String;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;
@CustomType
public final class AccountBlobProperties {
/**
* @return Is the blob service properties for change feed events enabled? Default to `false`.
*
* > **Note:** This field cannot be configured when `kind` is set to `Storage` (V1).
*
*/
private @Nullable Boolean changeFeedEnabled;
/**
* @return The duration of change feed events retention in days. The possible values are between 1 and 146000 days (400 years). Setting this to null (or omit this in the configuration file) indicates an infinite retention of the change feed.
*
* > **Note:** This field cannot be configured when `kind` is set to `Storage` (V1).
*
*/
private @Nullable Integer changeFeedRetentionInDays;
/**
* @return A `container_delete_retention_policy` block as defined below.
*
*/
private @Nullable AccountBlobPropertiesContainerDeleteRetentionPolicy containerDeleteRetentionPolicy;
/**
* @return A `cors_rule` block as defined below.
*
*/
private @Nullable List corsRules;
/**
* @return The API Version which should be used by default for requests to the Data Plane API if an incoming request doesn't specify an API Version.
*
*/
private @Nullable String defaultServiceVersion;
/**
* @return A `delete_retention_policy` block as defined below.
*
*/
private @Nullable AccountBlobPropertiesDeleteRetentionPolicy deleteRetentionPolicy;
/**
* @return Is the last access time based tracking enabled? Default to `false`.
*
* > **Note:** This field cannot be configured when `kind` is set to `Storage` (V1).
*
*/
private @Nullable Boolean lastAccessTimeEnabled;
/**
* @return A `restore_policy` block as defined below. This must be used together with `delete_retention_policy` set, `versioning_enabled` and `change_feed_enabled` set to `true`.
*
* > **Note:** This field cannot be configured when `kind` is set to `Storage` (V1).
*
* > **Note:** `restore_policy` can not be configured when `dns_endpoint_type` is `AzureDnsZone`.
*
*/
private @Nullable AccountBlobPropertiesRestorePolicy restorePolicy;
/**
* @return Is versioning enabled? Default to `false`.
*
* > **Note:** This field cannot be configured when `kind` is set to `Storage` (V1).
*
*/
private @Nullable Boolean versioningEnabled;
private AccountBlobProperties() {}
/**
* @return Is the blob service properties for change feed events enabled? Default to `false`.
*
* > **Note:** This field cannot be configured when `kind` is set to `Storage` (V1).
*
*/
public Optional changeFeedEnabled() {
return Optional.ofNullable(this.changeFeedEnabled);
}
/**
* @return The duration of change feed events retention in days. The possible values are between 1 and 146000 days (400 years). Setting this to null (or omit this in the configuration file) indicates an infinite retention of the change feed.
*
* > **Note:** This field cannot be configured when `kind` is set to `Storage` (V1).
*
*/
public Optional changeFeedRetentionInDays() {
return Optional.ofNullable(this.changeFeedRetentionInDays);
}
/**
* @return A `container_delete_retention_policy` block as defined below.
*
*/
public Optional containerDeleteRetentionPolicy() {
return Optional.ofNullable(this.containerDeleteRetentionPolicy);
}
/**
* @return A `cors_rule` block as defined below.
*
*/
public List corsRules() {
return this.corsRules == null ? List.of() : this.corsRules;
}
/**
* @return The API Version which should be used by default for requests to the Data Plane API if an incoming request doesn't specify an API Version.
*
*/
public Optional defaultServiceVersion() {
return Optional.ofNullable(this.defaultServiceVersion);
}
/**
* @return A `delete_retention_policy` block as defined below.
*
*/
public Optional deleteRetentionPolicy() {
return Optional.ofNullable(this.deleteRetentionPolicy);
}
/**
* @return Is the last access time based tracking enabled? Default to `false`.
*
* > **Note:** This field cannot be configured when `kind` is set to `Storage` (V1).
*
*/
public Optional lastAccessTimeEnabled() {
return Optional.ofNullable(this.lastAccessTimeEnabled);
}
/**
* @return A `restore_policy` block as defined below. This must be used together with `delete_retention_policy` set, `versioning_enabled` and `change_feed_enabled` set to `true`.
*
* > **Note:** This field cannot be configured when `kind` is set to `Storage` (V1).
*
* > **Note:** `restore_policy` can not be configured when `dns_endpoint_type` is `AzureDnsZone`.
*
*/
public Optional restorePolicy() {
return Optional.ofNullable(this.restorePolicy);
}
/**
* @return Is versioning enabled? Default to `false`.
*
* > **Note:** This field cannot be configured when `kind` is set to `Storage` (V1).
*
*/
public Optional versioningEnabled() {
return Optional.ofNullable(this.versioningEnabled);
}
public static Builder builder() {
return new Builder();
}
public static Builder builder(AccountBlobProperties defaults) {
return new Builder(defaults);
}
@CustomType.Builder
public static final class Builder {
private @Nullable Boolean changeFeedEnabled;
private @Nullable Integer changeFeedRetentionInDays;
private @Nullable AccountBlobPropertiesContainerDeleteRetentionPolicy containerDeleteRetentionPolicy;
private @Nullable List corsRules;
private @Nullable String defaultServiceVersion;
private @Nullable AccountBlobPropertiesDeleteRetentionPolicy deleteRetentionPolicy;
private @Nullable Boolean lastAccessTimeEnabled;
private @Nullable AccountBlobPropertiesRestorePolicy restorePolicy;
private @Nullable Boolean versioningEnabled;
public Builder() {}
public Builder(AccountBlobProperties defaults) {
Objects.requireNonNull(defaults);
this.changeFeedEnabled = defaults.changeFeedEnabled;
this.changeFeedRetentionInDays = defaults.changeFeedRetentionInDays;
this.containerDeleteRetentionPolicy = defaults.containerDeleteRetentionPolicy;
this.corsRules = defaults.corsRules;
this.defaultServiceVersion = defaults.defaultServiceVersion;
this.deleteRetentionPolicy = defaults.deleteRetentionPolicy;
this.lastAccessTimeEnabled = defaults.lastAccessTimeEnabled;
this.restorePolicy = defaults.restorePolicy;
this.versioningEnabled = defaults.versioningEnabled;
}
@CustomType.Setter
public Builder changeFeedEnabled(@Nullable Boolean changeFeedEnabled) {
this.changeFeedEnabled = changeFeedEnabled;
return this;
}
@CustomType.Setter
public Builder changeFeedRetentionInDays(@Nullable Integer changeFeedRetentionInDays) {
this.changeFeedRetentionInDays = changeFeedRetentionInDays;
return this;
}
@CustomType.Setter
public Builder containerDeleteRetentionPolicy(@Nullable AccountBlobPropertiesContainerDeleteRetentionPolicy containerDeleteRetentionPolicy) {
this.containerDeleteRetentionPolicy = containerDeleteRetentionPolicy;
return this;
}
@CustomType.Setter
public Builder corsRules(@Nullable List corsRules) {
this.corsRules = corsRules;
return this;
}
public Builder corsRules(AccountBlobPropertiesCorsRule... corsRules) {
return corsRules(List.of(corsRules));
}
@CustomType.Setter
public Builder defaultServiceVersion(@Nullable String defaultServiceVersion) {
this.defaultServiceVersion = defaultServiceVersion;
return this;
}
@CustomType.Setter
public Builder deleteRetentionPolicy(@Nullable AccountBlobPropertiesDeleteRetentionPolicy deleteRetentionPolicy) {
this.deleteRetentionPolicy = deleteRetentionPolicy;
return this;
}
@CustomType.Setter
public Builder lastAccessTimeEnabled(@Nullable Boolean lastAccessTimeEnabled) {
this.lastAccessTimeEnabled = lastAccessTimeEnabled;
return this;
}
@CustomType.Setter
public Builder restorePolicy(@Nullable AccountBlobPropertiesRestorePolicy restorePolicy) {
this.restorePolicy = restorePolicy;
return this;
}
@CustomType.Setter
public Builder versioningEnabled(@Nullable Boolean versioningEnabled) {
this.versioningEnabled = versioningEnabled;
return this;
}
public AccountBlobProperties build() {
final var _resultValue = new AccountBlobProperties();
_resultValue.changeFeedEnabled = changeFeedEnabled;
_resultValue.changeFeedRetentionInDays = changeFeedRetentionInDays;
_resultValue.containerDeleteRetentionPolicy = containerDeleteRetentionPolicy;
_resultValue.corsRules = corsRules;
_resultValue.defaultServiceVersion = defaultServiceVersion;
_resultValue.deleteRetentionPolicy = deleteRetentionPolicy;
_resultValue.lastAccessTimeEnabled = lastAccessTimeEnabled;
_resultValue.restorePolicy = restorePolicy;
_resultValue.versioningEnabled = versioningEnabled;
return _resultValue;
}
}
}