com.microsoft.azure.storage.blob.models.AppendBlobsAppendBlockHeaders Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of azure-storage-blob Show documentation
Show all versions of azure-storage-blob Show documentation
The Azure Storage Java Blob library.
/**
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for
* license information.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is
* regenerated.
*/
package com.microsoft.azure.storage.blob.models;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty;
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement;
import com.microsoft.rest.v2.DateTimeRfc1123;
import java.time.OffsetDateTime;
/**
* Defines headers for AppendBlock operation.
*/
@JacksonXmlRootElement(localName = "AppendBlobs-AppendBlock-Headers")
public final class AppendBlobsAppendBlockHeaders {
/**
* 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;
/**
* If the blob has an MD5 hash and this operation is to read the full blob,
* this response header is returned so that the client can check for
* message content integrity.
*/
@JsonProperty(value = "Content-MD5")
private byte[] contentMD5;
/**
* 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;
/**
* This response header is returned only for append operations. It returns
* the offset at which the block was committed, in bytes.
*/
@JsonProperty(value = "x-ms-blob-append-offset")
private String blobAppendOffset;
/**
* The number of committed blocks present in the blob. This header is
* returned only for append blobs.
*/
@JsonProperty(value = "x-ms-blob-committed-block-count")
private Integer blobCommittedBlockCount;
/**
* Get the eTag value.
*
* @return the eTag value.
*/
public String eTag() {
return this.eTag;
}
/**
* Set the eTag value.
*
* @param eTag the eTag value to set.
* @return the AppendBlobsAppendBlockHeaders object itself.
*/
public AppendBlobsAppendBlockHeaders withETag(String eTag) {
this.eTag = eTag;
return this;
}
/**
* Get the lastModified value.
*
* @return the lastModified value.
*/
public OffsetDateTime lastModified() {
if (this.lastModified == null) {
return null;
}
return this.lastModified.dateTime();
}
/**
* Set the lastModified value.
*
* @param lastModified the lastModified value to set.
* @return the AppendBlobsAppendBlockHeaders object itself.
*/
public AppendBlobsAppendBlockHeaders withLastModified(OffsetDateTime lastModified) {
if (lastModified == null) {
this.lastModified = null;
} else {
this.lastModified = new DateTimeRfc1123(lastModified);
}
return this;
}
/**
* Get the contentMD5 value.
*
* @return the contentMD5 value.
*/
public byte[] contentMD5() {
return this.contentMD5;
}
/**
* Set the contentMD5 value.
*
* @param contentMD5 the contentMD5 value to set.
* @return the AppendBlobsAppendBlockHeaders object itself.
*/
public AppendBlobsAppendBlockHeaders withContentMD5(byte[] contentMD5) {
this.contentMD5 = contentMD5;
return this;
}
/**
* Get the requestId value.
*
* @return the requestId value.
*/
public String requestId() {
return this.requestId;
}
/**
* Set the requestId value.
*
* @param requestId the requestId value to set.
* @return the AppendBlobsAppendBlockHeaders object itself.
*/
public AppendBlobsAppendBlockHeaders withRequestId(String requestId) {
this.requestId = requestId;
return this;
}
/**
* Get the version value.
*
* @return the version value.
*/
public String version() {
return this.version;
}
/**
* Set the version value.
*
* @param version the version value to set.
* @return the AppendBlobsAppendBlockHeaders object itself.
*/
public AppendBlobsAppendBlockHeaders withVersion(String version) {
this.version = version;
return this;
}
/**
* Get the dateProperty value.
*
* @return the dateProperty value.
*/
public OffsetDateTime dateProperty() {
if (this.dateProperty == null) {
return null;
}
return this.dateProperty.dateTime();
}
/**
* Set the dateProperty value.
*
* @param dateProperty the dateProperty value to set.
* @return the AppendBlobsAppendBlockHeaders object itself.
*/
public AppendBlobsAppendBlockHeaders withDateProperty(OffsetDateTime dateProperty) {
if (dateProperty == null) {
this.dateProperty = null;
} else {
this.dateProperty = new DateTimeRfc1123(dateProperty);
}
return this;
}
/**
* Get the blobAppendOffset value.
*
* @return the blobAppendOffset value.
*/
public String blobAppendOffset() {
return this.blobAppendOffset;
}
/**
* Set the blobAppendOffset value.
*
* @param blobAppendOffset the blobAppendOffset value to set.
* @return the AppendBlobsAppendBlockHeaders object itself.
*/
public AppendBlobsAppendBlockHeaders withBlobAppendOffset(String blobAppendOffset) {
this.blobAppendOffset = blobAppendOffset;
return this;
}
/**
* Get the blobCommittedBlockCount value.
*
* @return the blobCommittedBlockCount value.
*/
public Integer blobCommittedBlockCount() {
return this.blobCommittedBlockCount;
}
/**
* Set the blobCommittedBlockCount value.
*
* @param blobCommittedBlockCount the blobCommittedBlockCount value to set.
* @return the AppendBlobsAppendBlockHeaders object itself.
*/
public AppendBlobsAppendBlockHeaders withBlobCommittedBlockCount(Integer blobCommittedBlockCount) {
this.blobCommittedBlockCount = blobCommittedBlockCount;
return this;
}
}