QueueGetPropertiesHeaders.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.queue.implementation.models;
import com.azure.core.annotation.Fluent;
import com.azure.core.annotation.HeaderCollection;
import com.azure.core.util.DateTimeRfc1123;
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 = "Queue-GetProperties-Headers")
@Fluent
public final class QueueGetPropertiesHeaders {
/*
* The metadata property.
*/
@HeaderCollection("x-ms-meta-")
private Map<String, String> metadata;
/*
* The approximate number of messages in the queue. This number is not
* lower than the actual number of messages in the queue, but could be
* higher.
*/
@JsonProperty(value = "x-ms-approximate-messages-count")
private Integer approximateMessagesCount;
/*
* 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 Queue 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;
/*
* 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 QueueGetPropertiesHeaders object itself.
*/
public QueueGetPropertiesHeaders setMetadata(Map<String, String> metadata) {
this.metadata = metadata;
return this;
}
/**
* Get the approximateMessagesCount property: The approximate number of
* messages in the queue. This number is not lower than the actual number
* of messages in the queue, but could be higher.
*
* @return the approximateMessagesCount value.
*/
public Integer getApproximateMessagesCount() {
return this.approximateMessagesCount;
}
/**
* Set the approximateMessagesCount property: The approximate number of
* messages in the queue. This number is not lower than the actual number
* of messages in the queue, but could be higher.
*
* @param approximateMessagesCount the approximateMessagesCount value to
* set.
* @return the QueueGetPropertiesHeaders object itself.
*/
public QueueGetPropertiesHeaders setApproximateMessagesCount(Integer approximateMessagesCount) {
this.approximateMessagesCount = approximateMessagesCount;
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 QueueGetPropertiesHeaders object itself.
*/
public QueueGetPropertiesHeaders setRequestId(String requestId) {
this.requestId = requestId;
return this;
}
/**
* Get the version property: Indicates the version of the Queue 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 Queue 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 QueueGetPropertiesHeaders object itself.
*/
public QueueGetPropertiesHeaders 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 QueueGetPropertiesHeaders object itself.
*/
public QueueGetPropertiesHeaders setDateProperty(OffsetDateTime dateProperty) {
if (dateProperty == null) {
this.dateProperty = null;
} else {
this.dateProperty = new DateTimeRfc1123(dateProperty);
}
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 QueueGetPropertiesHeaders object itself.
*/
public QueueGetPropertiesHeaders setErrorCode(String errorCode) {
this.errorCode = errorCode;
return this;
}
}