ContainerGetPropertiesHeaders.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.implementation.models;
import com.azure.core.annotation.Fluent;
import com.azure.core.annotation.HeaderCollection;
import com.azure.core.util.DateTimeRfc1123;
import com.azure.storage.blob.models.LeaseDurationType;
import com.azure.storage.blob.models.LeaseStateType;
import com.azure.storage.blob.models.LeaseStatusType;
import com.azure.storage.blob.models.PublicAccessType;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement;
import java.time.OffsetDateTime;
import java.util.Map;
/**
* Defines headers for GetProperties operation.
*/
@JacksonXmlRootElement(localName = "Container-GetProperties-Headers")
@Fluent
public final class ContainerGetPropertiesHeaders {
/*
* The metadata property.
*/
@HeaderCollection("x-ms-meta-")
private Map<String, String> metadata;
/*
* The ETag contains a value that you can use to perform operations
* conditionally. If the request version is 2011-08-18 or newer, the ETag
* value will be in quotes.
*/
@JsonProperty(value = "ETag")
private String eTag;
/*
* Returns the date and time the container was last modified. Any operation
* that modifies the blob, including an update of the blob's metadata or
* properties, changes the last-modified time of the blob.
*/
@JsonProperty(value = "Last-Modified")
private DateTimeRfc1123 lastModified;
/*
* When a blob is leased, specifies whether the lease is of infinite or
* fixed duration. Possible values include: 'infinite', 'fixed'
*/
@JsonProperty(value = "x-ms-lease-duration")
private LeaseDurationType leaseDuration;
/*
* Lease state of the blob. Possible values include: 'available', 'leased',
* 'expired', 'breaking', 'broken'
*/
@JsonProperty(value = "x-ms-lease-state")
private LeaseStateType leaseState;
/*
* The current lease status of the blob. Possible values include: 'locked',
* 'unlocked'
*/
@JsonProperty(value = "x-ms-lease-status")
private LeaseStatusType leaseStatus;
/*
* If a client request id header is sent in the request, this header will
* be present in the response with the same value.
*/
@JsonProperty(value = "x-ms-client-request-id")
private String clientRequestId;
/*
* This header uniquely identifies the request that was made and can be
* used for troubleshooting the request.
*/
@JsonProperty(value = "x-ms-request-id")
private String requestId;
/*
* Indicates the version of the Blob service used to execute the request.
* This header is returned for requests made against version 2009-09-19 and
* above.
*/
@JsonProperty(value = "x-ms-version")
private String version;
/*
* UTC date/time value generated by the service that indicates the time at
* which the response was initiated
*/
@JsonProperty(value = "Date")
private DateTimeRfc1123 dateProperty;
/*
* Indicated whether data in the container may be accessed publicly and the
* level of access. Possible values include: 'container', 'blob'
*/
@JsonProperty(value = "x-ms-blob-public-access")
private PublicAccessType blobPublicAccess;
/*
* Indicates whether the container has an immutability policy set on it.
*/
@JsonProperty(value = "x-ms-has-immutability-policy")
private Boolean hasImmutabilityPolicy;
/*
* Indicates whether the container has a legal hold.
*/
@JsonProperty(value = "x-ms-has-legal-hold")
private Boolean hasLegalHold;
/*
* The default encryption scope for the container.
*/
@JsonProperty(value = "x-ms-default-encryption-scope")
private String defaultEncryptionScope;
/*
* Indicates whether the container's default encryption scope can be
* overriden.
*/
@JsonProperty(value = "x-ms-deny-encryption-scope-override")
private Boolean denyEncryptionScopeOverride;
/*
* The errorCode property.
*/
@JsonProperty(value = "x-ms-error-code")
private String errorCode;
/**
* Get the metadata property: The metadata property.
*
* @return the metadata value.
*/
public Map<String, String> getMetadata() {
return this.metadata;
}
/**
* Set the metadata property: The metadata property.
*
* @param metadata the metadata value to set.
* @return the ContainerGetPropertiesHeaders object itself.
*/
public ContainerGetPropertiesHeaders setMetadata(Map<String, String> metadata) {
this.metadata = metadata;
return this;
}
/**
* Get the eTag property: The ETag contains a value that you can use to
* perform operations conditionally. If the request version is 2011-08-18
* or newer, the ETag value will be in quotes.
*
* @return the eTag value.
*/
public String getETag() {
return this.eTag;
}
/**
* Set the eTag property: The ETag contains a value that you can use to
* perform operations conditionally. If the request version is 2011-08-18
* or newer, the ETag value will be in quotes.
*
* @param eTag the eTag value to set.
* @return the ContainerGetPropertiesHeaders object itself.
*/
public ContainerGetPropertiesHeaders setETag(String eTag) {
this.eTag = eTag;
return this;
}
/**
* Get the lastModified property: Returns the date and time the container
* was last modified. Any operation that modifies the blob, including an
* update of the blob's metadata or properties, changes the last-modified
* time of the blob.
*
* @return the lastModified value.
*/
public OffsetDateTime getLastModified() {
if (this.lastModified == null) {
return null;
}
return this.lastModified.getDateTime();
}
/**
* Set the lastModified property: Returns the date and time the container
* was last modified. Any operation that modifies the blob, including an
* update of the blob's metadata or properties, changes the last-modified
* time of the blob.
*
* @param lastModified the lastModified value to set.
* @return the ContainerGetPropertiesHeaders object itself.
*/
public ContainerGetPropertiesHeaders setLastModified(OffsetDateTime lastModified) {
if (lastModified == null) {
this.lastModified = null;
} else {
this.lastModified = new DateTimeRfc1123(lastModified);
}
return this;
}
/**
* Get the leaseDuration property: When a blob is leased, specifies whether
* the lease is of infinite or fixed duration. Possible values include:
* 'infinite', 'fixed'.
*
* @return the leaseDuration value.
*/
public LeaseDurationType getLeaseDuration() {
return this.leaseDuration;
}
/**
* Set the leaseDuration property: When a blob is leased, specifies whether
* the lease is of infinite or fixed duration. Possible values include:
* 'infinite', 'fixed'.
*
* @param leaseDuration the leaseDuration value to set.
* @return the ContainerGetPropertiesHeaders object itself.
*/
public ContainerGetPropertiesHeaders setLeaseDuration(LeaseDurationType leaseDuration) {
this.leaseDuration = leaseDuration;
return this;
}
/**
* Get the leaseState property: Lease state of the blob. Possible values
* include: 'available', 'leased', 'expired', 'breaking', 'broken'.
*
* @return the leaseState value.
*/
public LeaseStateType getLeaseState() {
return this.leaseState;
}
/**
* Set the leaseState property: Lease state of the blob. Possible values
* include: 'available', 'leased', 'expired', 'breaking', 'broken'.
*
* @param leaseState the leaseState value to set.
* @return the ContainerGetPropertiesHeaders object itself.
*/
public ContainerGetPropertiesHeaders setLeaseState(LeaseStateType leaseState) {
this.leaseState = leaseState;
return this;
}
/**
* Get the leaseStatus property: The current lease status of the blob.
* Possible values include: 'locked', 'unlocked'.
*
* @return the leaseStatus value.
*/
public LeaseStatusType getLeaseStatus() {
return this.leaseStatus;
}
/**
* Set the leaseStatus property: The current lease status of the blob.
* Possible values include: 'locked', 'unlocked'.
*
* @param leaseStatus the leaseStatus value to set.
* @return the ContainerGetPropertiesHeaders object itself.
*/
public ContainerGetPropertiesHeaders setLeaseStatus(LeaseStatusType leaseStatus) {
this.leaseStatus = leaseStatus;
return this;
}
/**
* Get the clientRequestId property: If a client request id header is sent
* in the request, this header will be present in the response with the
* same value.
*
* @return the clientRequestId value.
*/
public String getClientRequestId() {
return this.clientRequestId;
}
/**
* Set the clientRequestId property: If a client request id header is sent
* in the request, this header will be present in the response with the
* same value.
*
* @param clientRequestId the clientRequestId value to set.
* @return the ContainerGetPropertiesHeaders object itself.
*/
public ContainerGetPropertiesHeaders setClientRequestId(String clientRequestId) {
this.clientRequestId = clientRequestId;
return this;
}
/**
* Get the requestId property: This header uniquely identifies the request
* that was made and can be used for troubleshooting the request.
*
* @return the requestId value.
*/
public String getRequestId() {
return this.requestId;
}
/**
* Set the requestId property: This header uniquely identifies the request
* that was made and can be used for troubleshooting the request.
*
* @param requestId the requestId value to set.
* @return the ContainerGetPropertiesHeaders object itself.
*/
public ContainerGetPropertiesHeaders setRequestId(String requestId) {
this.requestId = requestId;
return this;
}
/**
* Get the version property: Indicates the version of the Blob service used
* to execute the request. This header is returned for requests made
* against version 2009-09-19 and above.
*
* @return the version value.
*/
public String getVersion() {
return this.version;
}
/**
* Set the version property: Indicates the version of the Blob service used
* to execute the request. This header is returned for requests made
* against version 2009-09-19 and above.
*
* @param version the version value to set.
* @return the ContainerGetPropertiesHeaders object itself.
*/
public ContainerGetPropertiesHeaders setVersion(String version) {
this.version = version;
return this;
}
/**
* Get the dateProperty property: UTC date/time value generated by the
* service that indicates the time at which the response was initiated.
*
* @return the dateProperty value.
*/
public OffsetDateTime getDateProperty() {
if (this.dateProperty == null) {
return null;
}
return this.dateProperty.getDateTime();
}
/**
* Set the dateProperty property: UTC date/time value generated by the
* service that indicates the time at which the response was initiated.
*
* @param dateProperty the dateProperty value to set.
* @return the ContainerGetPropertiesHeaders object itself.
*/
public ContainerGetPropertiesHeaders setDateProperty(OffsetDateTime dateProperty) {
if (dateProperty == null) {
this.dateProperty = null;
} else {
this.dateProperty = new DateTimeRfc1123(dateProperty);
}
return this;
}
/**
* Get the blobPublicAccess property: Indicated whether data in the
* container may be accessed publicly and the level of access. Possible
* values include: 'container', 'blob'.
*
* @return the blobPublicAccess value.
*/
public PublicAccessType getBlobPublicAccess() {
return this.blobPublicAccess;
}
/**
* Set the blobPublicAccess property: Indicated whether data in the
* container may be accessed publicly and the level of access. Possible
* values include: 'container', 'blob'.
*
* @param blobPublicAccess the blobPublicAccess value to set.
* @return the ContainerGetPropertiesHeaders object itself.
*/
public ContainerGetPropertiesHeaders setBlobPublicAccess(PublicAccessType blobPublicAccess) {
this.blobPublicAccess = blobPublicAccess;
return this;
}
/**
* Get the hasImmutabilityPolicy property: Indicates whether the container
* has an immutability policy set on it.
*
* @return the hasImmutabilityPolicy value.
*/
public Boolean isHasImmutabilityPolicy() {
return this.hasImmutabilityPolicy;
}
/**
* Set the hasImmutabilityPolicy property: Indicates whether the container
* has an immutability policy set on it.
*
* @param hasImmutabilityPolicy the hasImmutabilityPolicy value to set.
* @return the ContainerGetPropertiesHeaders object itself.
*/
public ContainerGetPropertiesHeaders setHasImmutabilityPolicy(Boolean hasImmutabilityPolicy) {
this.hasImmutabilityPolicy = hasImmutabilityPolicy;
return this;
}
/**
* Get the hasLegalHold property: Indicates whether the container has a
* legal hold.
*
* @return the hasLegalHold value.
*/
public Boolean isHasLegalHold() {
return this.hasLegalHold;
}
/**
* Set the hasLegalHold property: Indicates whether the container has a
* legal hold.
*
* @param hasLegalHold the hasLegalHold value to set.
* @return the ContainerGetPropertiesHeaders object itself.
*/
public ContainerGetPropertiesHeaders setHasLegalHold(Boolean hasLegalHold) {
this.hasLegalHold = hasLegalHold;
return this;
}
/**
* Get the defaultEncryptionScope property: The default encryption scope
* for the container.
*
* @return the defaultEncryptionScope value.
*/
public String getDefaultEncryptionScope() {
return this.defaultEncryptionScope;
}
/**
* Set the defaultEncryptionScope property: The default encryption scope
* for the container.
*
* @param defaultEncryptionScope the defaultEncryptionScope value to set.
* @return the ContainerGetPropertiesHeaders object itself.
*/
public ContainerGetPropertiesHeaders setDefaultEncryptionScope(String defaultEncryptionScope) {
this.defaultEncryptionScope = defaultEncryptionScope;
return this;
}
/**
* Get the denyEncryptionScopeOverride property: Indicates whether the
* container's default encryption scope can be overriden.
*
* @return the denyEncryptionScopeOverride value.
*/
public Boolean isDenyEncryptionScopeOverride() {
return this.denyEncryptionScopeOverride;
}
/**
* Set the denyEncryptionScopeOverride property: Indicates whether the
* container's default encryption scope can be overriden.
*
* @param denyEncryptionScopeOverride the denyEncryptionScopeOverride value
* to set.
* @return the ContainerGetPropertiesHeaders object itself.
*/
public ContainerGetPropertiesHeaders setDenyEncryptionScopeOverride(Boolean denyEncryptionScopeOverride) {
this.denyEncryptionScopeOverride = denyEncryptionScopeOverride;
return this;
}
/**
* Get the errorCode property: The errorCode property.
*
* @return the errorCode value.
*/
public String getErrorCode() {
return this.errorCode;
}
/**
* Set the errorCode property: The errorCode property.
*
* @param errorCode the errorCode value to set.
* @return the ContainerGetPropertiesHeaders object itself.
*/
public ContainerGetPropertiesHeaders setErrorCode(String errorCode) {
this.errorCode = errorCode;
return this;
}
}