BlobContainerItemProperties.java
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.
package com.azure.storage.blob.models;
import com.azure.core.annotation.Fluent;
import com.azure.core.util.DateTimeRfc1123;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement;
import java.time.OffsetDateTime;
/**
* Properties of a container.
*/
@JacksonXmlRootElement(localName = "BlobContainerItemProperties")
@Fluent
public final class BlobContainerItemProperties {
/*
* The lastModified property.
*/
@JsonProperty(value = "Last-Modified", required = true)
private DateTimeRfc1123 lastModified;
/*
* The eTag property.
*/
@JsonProperty(value = "Etag", required = true)
private String eTag;
/*
* Possible values include: 'locked', 'unlocked'
*/
@JsonProperty(value = "LeaseStatus")
private LeaseStatusType leaseStatus;
/*
* Possible values include: 'available', 'leased', 'expired', 'breaking',
* 'broken'
*/
@JsonProperty(value = "LeaseState")
private LeaseStateType leaseState;
/*
* Possible values include: 'infinite', 'fixed'
*/
@JsonProperty(value = "LeaseDuration")
private LeaseDurationType leaseDuration;
/*
* Possible values include: 'container', 'blob'
*/
@JsonProperty(value = "PublicAccess")
private PublicAccessType publicAccess;
/*
* The hasImmutabilityPolicy property.
*/
@JsonProperty(value = "HasImmutabilityPolicy")
private Boolean hasImmutabilityPolicy;
/*
* The hasLegalHold property.
*/
@JsonProperty(value = "HasLegalHold")
private Boolean hasLegalHold;
/*
* The defaultEncryptionScope property.
*/
@JsonProperty(value = "DefaultEncryptionScope")
private String defaultEncryptionScope;
/*
* The encryptionScopeOverridePrevented property.
*/
@JsonProperty(value = "DenyEncryptionScopeOverride")
private boolean encryptionScopeOverridePrevented;
/*
* The deletedTime property.
*/
@JsonProperty(value = "DeletedTime")
private DateTimeRfc1123 deletedTime;
/*
* The remainingRetentionDays property.
*/
@JsonProperty(value = "RemainingRetentionDays")
private Integer remainingRetentionDays;
/**
* Get the lastModified property: The lastModified property.
*
* @return the lastModified value.
*/
public OffsetDateTime getLastModified() {
if (this.lastModified == null) {
return null;
}
return this.lastModified.getDateTime();
}
/**
* Set the lastModified property: The lastModified property.
*
* @param lastModified the lastModified value to set.
* @return the BlobContainerItemProperties object itself.
*/
public BlobContainerItemProperties setLastModified(OffsetDateTime lastModified) {
if (lastModified == null) {
this.lastModified = null;
} else {
this.lastModified = new DateTimeRfc1123(lastModified);
}
return this;
}
/**
* Get the eTag property: The eTag property.
*
* @return the eTag value.
*/
public String getETag() {
return this.eTag;
}
/**
* Set the eTag property: The eTag property.
*
* @param eTag the eTag value to set.
* @return the BlobContainerItemProperties object itself.
*/
public BlobContainerItemProperties setETag(String eTag) {
this.eTag = eTag;
return this;
}
/**
* Get the leaseStatus property: Possible values include: 'locked',
* 'unlocked'.
*
* @return the leaseStatus value.
*/
public LeaseStatusType getLeaseStatus() {
return this.leaseStatus;
}
/**
* Set the leaseStatus property: Possible values include: 'locked',
* 'unlocked'.
*
* @param leaseStatus the leaseStatus value to set.
* @return the BlobContainerItemProperties object itself.
*/
public BlobContainerItemProperties setLeaseStatus(LeaseStatusType leaseStatus) {
this.leaseStatus = leaseStatus;
return this;
}
/**
* Get the leaseState property: Possible values include: 'available',
* 'leased', 'expired', 'breaking', 'broken'.
*
* @return the leaseState value.
*/
public LeaseStateType getLeaseState() {
return this.leaseState;
}
/**
* Set the leaseState property: Possible values include: 'available',
* 'leased', 'expired', 'breaking', 'broken'.
*
* @param leaseState the leaseState value to set.
* @return the BlobContainerItemProperties object itself.
*/
public BlobContainerItemProperties setLeaseState(LeaseStateType leaseState) {
this.leaseState = leaseState;
return this;
}
/**
* Get the leaseDuration property: Possible values include: 'infinite',
* 'fixed'.
*
* @return the leaseDuration value.
*/
public LeaseDurationType getLeaseDuration() {
return this.leaseDuration;
}
/**
* Set the leaseDuration property: Possible values include: 'infinite',
* 'fixed'.
*
* @param leaseDuration the leaseDuration value to set.
* @return the BlobContainerItemProperties object itself.
*/
public BlobContainerItemProperties setLeaseDuration(LeaseDurationType leaseDuration) {
this.leaseDuration = leaseDuration;
return this;
}
/**
* Get the publicAccess property: Possible values include: 'container',
* 'blob'.
*
* @return the publicAccess value.
*/
public PublicAccessType getPublicAccess() {
return this.publicAccess;
}
/**
* Set the publicAccess property: Possible values include: 'container',
* 'blob'.
*
* @param publicAccess the publicAccess value to set.
* @return the BlobContainerItemProperties object itself.
*/
public BlobContainerItemProperties setPublicAccess(PublicAccessType publicAccess) {
this.publicAccess = publicAccess;
return this;
}
/**
* Get the hasImmutabilityPolicy property: The hasImmutabilityPolicy
* property.
*
* @return the hasImmutabilityPolicy value.
*/
public Boolean isHasImmutabilityPolicy() {
return this.hasImmutabilityPolicy;
}
/**
* Set the hasImmutabilityPolicy property: The hasImmutabilityPolicy
* property.
*
* @param hasImmutabilityPolicy the hasImmutabilityPolicy value to set.
* @return the BlobContainerItemProperties object itself.
*/
public BlobContainerItemProperties setHasImmutabilityPolicy(Boolean hasImmutabilityPolicy) {
this.hasImmutabilityPolicy = hasImmutabilityPolicy;
return this;
}
/**
* Get the hasLegalHold property: The hasLegalHold property.
*
* @return the hasLegalHold value.
*/
public Boolean isHasLegalHold() {
return this.hasLegalHold;
}
/**
* Set the hasLegalHold property: The hasLegalHold property.
*
* @param hasLegalHold the hasLegalHold value to set.
* @return the BlobContainerItemProperties object itself.
*/
public BlobContainerItemProperties setHasLegalHold(Boolean hasLegalHold) {
this.hasLegalHold = hasLegalHold;
return this;
}
/**
* Get the defaultEncryptionScope property: The defaultEncryptionScope
* property.
*
* @return the defaultEncryptionScope value.
*/
public String getDefaultEncryptionScope() {
return this.defaultEncryptionScope;
}
/**
* Set the defaultEncryptionScope property: The defaultEncryptionScope
* property.
*
* @param defaultEncryptionScope the defaultEncryptionScope value to set.
* @return the BlobContainerItemProperties object itself.
*/
public BlobContainerItemProperties setDefaultEncryptionScope(String defaultEncryptionScope) {
this.defaultEncryptionScope = defaultEncryptionScope;
return this;
}
/**
* Get the encryptionScopeOverridePrevented property: The
* encryptionScopeOverridePrevented property.
*
* @return the encryptionScopeOverridePrevented value.
*/
public boolean isEncryptionScopeOverridePrevented() {
return this.encryptionScopeOverridePrevented;
}
/**
* Set the encryptionScopeOverridePrevented property: The
* encryptionScopeOverridePrevented property.
*
* @param encryptionScopeOverridePrevented the
* encryptionScopeOverridePrevented value to set.
* @return the BlobContainerItemProperties object itself.
*/
public BlobContainerItemProperties setEncryptionScopeOverridePrevented(boolean encryptionScopeOverridePrevented) {
this.encryptionScopeOverridePrevented = encryptionScopeOverridePrevented;
return this;
}
/**
* Get the deletedTime property: The deletedTime property.
*
* @return the deletedTime value.
*/
public OffsetDateTime getDeletedTime() {
if (this.deletedTime == null) {
return null;
}
return this.deletedTime.getDateTime();
}
/**
* Set the deletedTime property: The deletedTime property.
*
* @param deletedTime the deletedTime value to set.
* @return the BlobContainerItemProperties object itself.
*/
public BlobContainerItemProperties setDeletedTime(OffsetDateTime deletedTime) {
if (deletedTime == null) {
this.deletedTime = null;
} else {
this.deletedTime = new DateTimeRfc1123(deletedTime);
}
return this;
}
/**
* Get the remainingRetentionDays property: The remainingRetentionDays
* property.
*
* @return the remainingRetentionDays value.
*/
public Integer getRemainingRetentionDays() {
return this.remainingRetentionDays;
}
/**
* Set the remainingRetentionDays property: The remainingRetentionDays
* property.
*
* @param remainingRetentionDays the remainingRetentionDays value to set.
* @return the BlobContainerItemProperties object itself.
*/
public BlobContainerItemProperties setRemainingRetentionDays(Integer remainingRetentionDays) {
this.remainingRetentionDays = remainingRetentionDays;
return this;
}
}