
com.pulumi.azurenative.storage.outputs.ImmutabilityPolicyPropertiesResponse 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.azurenative.storage.outputs;
import com.pulumi.azurenative.storage.outputs.UpdateHistoryPropertyResponse;
import com.pulumi.core.annotations.CustomType;
import com.pulumi.exceptions.MissingRequiredPropertyException;
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 ImmutabilityPolicyPropertiesResponse {
/**
* @return This property can only be changed for unlocked time-based retention policies. When enabled, new blocks can be written to an append blob while maintaining immutability protection and compliance. Only new blocks can be added and any existing blocks cannot be modified or deleted. This property cannot be changed with ExtendImmutabilityPolicy API.
*
*/
private @Nullable Boolean allowProtectedAppendWrites;
/**
* @return This property can only be changed for unlocked time-based retention policies. When enabled, new blocks can be written to both 'Append and Bock Blobs' while maintaining immutability protection and compliance. Only new blocks can be added and any existing blocks cannot be modified or deleted. This property cannot be changed with ExtendImmutabilityPolicy API. The 'allowProtectedAppendWrites' and 'allowProtectedAppendWritesAll' properties are mutually exclusive.
*
*/
private @Nullable Boolean allowProtectedAppendWritesAll;
/**
* @return ImmutabilityPolicy Etag.
*
*/
private String etag;
/**
* @return The immutability period for the blobs in the container since the policy creation, in days.
*
*/
private @Nullable Integer immutabilityPeriodSinceCreationInDays;
/**
* @return The ImmutabilityPolicy state of a blob container, possible values include: Locked and Unlocked.
*
*/
private String state;
/**
* @return The ImmutabilityPolicy update history of the blob container.
*
*/
private List updateHistory;
private ImmutabilityPolicyPropertiesResponse() {}
/**
* @return This property can only be changed for unlocked time-based retention policies. When enabled, new blocks can be written to an append blob while maintaining immutability protection and compliance. Only new blocks can be added and any existing blocks cannot be modified or deleted. This property cannot be changed with ExtendImmutabilityPolicy API.
*
*/
public Optional allowProtectedAppendWrites() {
return Optional.ofNullable(this.allowProtectedAppendWrites);
}
/**
* @return This property can only be changed for unlocked time-based retention policies. When enabled, new blocks can be written to both 'Append and Bock Blobs' while maintaining immutability protection and compliance. Only new blocks can be added and any existing blocks cannot be modified or deleted. This property cannot be changed with ExtendImmutabilityPolicy API. The 'allowProtectedAppendWrites' and 'allowProtectedAppendWritesAll' properties are mutually exclusive.
*
*/
public Optional allowProtectedAppendWritesAll() {
return Optional.ofNullable(this.allowProtectedAppendWritesAll);
}
/**
* @return ImmutabilityPolicy Etag.
*
*/
public String etag() {
return this.etag;
}
/**
* @return The immutability period for the blobs in the container since the policy creation, in days.
*
*/
public Optional immutabilityPeriodSinceCreationInDays() {
return Optional.ofNullable(this.immutabilityPeriodSinceCreationInDays);
}
/**
* @return The ImmutabilityPolicy state of a blob container, possible values include: Locked and Unlocked.
*
*/
public String state() {
return this.state;
}
/**
* @return The ImmutabilityPolicy update history of the blob container.
*
*/
public List updateHistory() {
return this.updateHistory;
}
public static Builder builder() {
return new Builder();
}
public static Builder builder(ImmutabilityPolicyPropertiesResponse defaults) {
return new Builder(defaults);
}
@CustomType.Builder
public static final class Builder {
private @Nullable Boolean allowProtectedAppendWrites;
private @Nullable Boolean allowProtectedAppendWritesAll;
private String etag;
private @Nullable Integer immutabilityPeriodSinceCreationInDays;
private String state;
private List updateHistory;
public Builder() {}
public Builder(ImmutabilityPolicyPropertiesResponse defaults) {
Objects.requireNonNull(defaults);
this.allowProtectedAppendWrites = defaults.allowProtectedAppendWrites;
this.allowProtectedAppendWritesAll = defaults.allowProtectedAppendWritesAll;
this.etag = defaults.etag;
this.immutabilityPeriodSinceCreationInDays = defaults.immutabilityPeriodSinceCreationInDays;
this.state = defaults.state;
this.updateHistory = defaults.updateHistory;
}
@CustomType.Setter
public Builder allowProtectedAppendWrites(@Nullable Boolean allowProtectedAppendWrites) {
this.allowProtectedAppendWrites = allowProtectedAppendWrites;
return this;
}
@CustomType.Setter
public Builder allowProtectedAppendWritesAll(@Nullable Boolean allowProtectedAppendWritesAll) {
this.allowProtectedAppendWritesAll = allowProtectedAppendWritesAll;
return this;
}
@CustomType.Setter
public Builder etag(String etag) {
if (etag == null) {
throw new MissingRequiredPropertyException("ImmutabilityPolicyPropertiesResponse", "etag");
}
this.etag = etag;
return this;
}
@CustomType.Setter
public Builder immutabilityPeriodSinceCreationInDays(@Nullable Integer immutabilityPeriodSinceCreationInDays) {
this.immutabilityPeriodSinceCreationInDays = immutabilityPeriodSinceCreationInDays;
return this;
}
@CustomType.Setter
public Builder state(String state) {
if (state == null) {
throw new MissingRequiredPropertyException("ImmutabilityPolicyPropertiesResponse", "state");
}
this.state = state;
return this;
}
@CustomType.Setter
public Builder updateHistory(List updateHistory) {
if (updateHistory == null) {
throw new MissingRequiredPropertyException("ImmutabilityPolicyPropertiesResponse", "updateHistory");
}
this.updateHistory = updateHistory;
return this;
}
public Builder updateHistory(UpdateHistoryPropertyResponse... updateHistory) {
return updateHistory(List.of(updateHistory));
}
public ImmutabilityPolicyPropertiesResponse build() {
final var _resultValue = new ImmutabilityPolicyPropertiesResponse();
_resultValue.allowProtectedAppendWrites = allowProtectedAppendWrites;
_resultValue.allowProtectedAppendWritesAll = allowProtectedAppendWritesAll;
_resultValue.etag = etag;
_resultValue.immutabilityPeriodSinceCreationInDays = immutabilityPeriodSinceCreationInDays;
_resultValue.state = state;
_resultValue.updateHistory = updateHistory;
return _resultValue;
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy