diff --git a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/QueueAsyncClient.java b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/QueueAsyncClient.java index 974572536a200..ed7c917416466 100644 --- a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/QueueAsyncClient.java +++ b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/QueueAsyncClient.java @@ -18,10 +18,10 @@ import com.azure.storage.common.implementation.SasImplUtils; import com.azure.storage.common.implementation.StorageImplUtils; import com.azure.storage.queue.implementation.AzureQueueStorageImpl; -import com.azure.storage.queue.implementation.models.MessageIdUpdateHeaders; +import com.azure.storage.queue.implementation.models.MessageIdsUpdateHeaders; import com.azure.storage.queue.implementation.models.MessageIdsUpdateResponse; -import com.azure.storage.queue.implementation.models.QueueGetPropertiesHeaders; import com.azure.storage.queue.implementation.models.QueueMessage; +import com.azure.storage.queue.implementation.models.QueuesGetPropertiesHeaders; import com.azure.storage.queue.implementation.models.QueuesGetPropertiesResponse; import com.azure.storage.queue.implementation.util.QueueSasImplUtil; import com.azure.storage.queue.models.PeekedMessageItem; @@ -169,7 +169,7 @@ public Mono> createWithResponse(Map metadata) { Mono> createWithResponse(Map metadata, Context context) { context = context == null ? Context.NONE : context; - return client.queues().createWithRestResponseAsync(queueName, null, metadata, null, + return client.getQueues().createWithResponseAsync(queueName, null, metadata, null, context.addData(AZ_TRACING_NAMESPACE_KEY, STORAGE_TRACING_NAMESPACE_VALUE)) .map(response -> new SimpleResponse<>(response, null)); } @@ -224,7 +224,7 @@ public Mono> deleteWithResponse() { Mono> deleteWithResponse(Context context) { context = context == null ? Context.NONE : context; - return client.queues().deleteWithRestResponseAsync(queueName, + return client.getQueues().deleteWithResponseAsync(queueName, null, null, context.addData(AZ_TRACING_NAMESPACE_KEY, STORAGE_TRACING_NAMESPACE_VALUE)) .map(response -> new SimpleResponse<>(response, null)); } @@ -281,7 +281,7 @@ public Mono> getPropertiesWithResponse() { Mono> getPropertiesWithResponse(Context context) { context = context == null ? Context.NONE : context; - return client.queues().getPropertiesWithRestResponseAsync(queueName, + return client.getQueues().getPropertiesWithResponseAsync(queueName, null, null, context.addData(AZ_TRACING_NAMESPACE_KEY, STORAGE_TRACING_NAMESPACE_VALUE)) .map(this::getQueuePropertiesResponse); } @@ -350,8 +350,8 @@ public Mono> setMetadataWithResponse(Map metadata Mono> setMetadataWithResponse(Map metadata, Context context) { context = context == null ? Context.NONE : context; - return client.queues() - .setMetadataWithRestResponseAsync(queueName, null, metadata, null, + return client.getQueues() + .setMetadataWithResponseAsync(queueName, null, metadata, null, context.addData(AZ_TRACING_NAMESPACE_KEY, STORAGE_TRACING_NAMESPACE_VALUE)) .map(response -> new SimpleResponse<>(response, null)); } @@ -375,8 +375,8 @@ Mono> setMetadataWithResponse(Map metadata, Conte public PagedFlux getAccessPolicy() { try { Function>> retriever = - marker -> this.client.queues() - .getAccessPolicyWithRestResponseAsync(queueName, Context.NONE) + marker -> this.client.getQueues() + .getAccessPolicyWithResponseAsync(queueName, null, null, Context.NONE) .map(response -> new PagedResponseBase<>(response.getRequest(), response.getStatusCode(), response.getHeaders(), @@ -466,8 +466,8 @@ OffsetDateTime.now will only give back milliseconds (more precise fields are zer permissions != null ? permissions.spliterator() : Spliterators.emptySpliterator(), false) .collect(Collectors.toList()); - return client.queues() - .setAccessPolicyWithRestResponseAsync(queueName, permissionsList, null, null, + return client.getQueues() + .setAccessPolicyWithResponseAsync(queueName, null, null, permissionsList, context.addData(AZ_TRACING_NAMESPACE_KEY, STORAGE_TRACING_NAMESPACE_VALUE)) .map(response -> new SimpleResponse<>(response, null)); } @@ -522,7 +522,7 @@ public Mono> clearMessagesWithResponse() { Mono> clearMessagesWithResponse(Context context) { context = context == null ? Context.NONE : context; - return client.messages().clearWithRestResponseAsync(queueName, + return client.getMessages().clearWithResponseAsync(queueName, null, null, context.addData(AZ_TRACING_NAMESPACE_KEY, STORAGE_TRACING_NAMESPACE_VALUE)) .map(response -> new SimpleResponse<>(response, null)); } @@ -599,8 +599,8 @@ Mono> sendMessageWithResponse(String messageText, Du QueueMessage message = new QueueMessage().setMessageText(messageText); context = context == null ? Context.NONE : context; - return client.messages() - .enqueueWithRestResponseAsync(queueName, message, visibilityTimeoutInSeconds, timeToLiveInSeconds, + return client.getMessages() + .enqueueWithResponseAsync(queueName, message, visibilityTimeoutInSeconds, timeToLiveInSeconds, null, null, context.addData(AZ_TRACING_NAMESPACE_KEY, STORAGE_TRACING_NAMESPACE_VALUE)) .map(response -> new SimpleResponse<>(response, response.getValue().get(0))); @@ -701,8 +701,8 @@ PagedFlux receiveMessagesWithOptionalTimeout(Integer maxMessag Duration timeout, Context context) { Integer visibilityTimeoutInSeconds = (visibilityTimeout == null) ? null : (int) visibilityTimeout.getSeconds(); Function>> retriever = - marker -> StorageImplUtils.applyOptionalTimeout(this.client.messages() - .dequeueWithRestResponseAsync(queueName, maxMessages, visibilityTimeoutInSeconds, + marker -> StorageImplUtils.applyOptionalTimeout(this.client.getMessages() + .dequeueWithResponseAsync(queueName, maxMessages, visibilityTimeoutInSeconds, null, null, context), timeout) .map(response -> new PagedResponseBase<>(response.getRequest(), response.getStatusCode(), @@ -774,8 +774,8 @@ public PagedFlux peekMessages(Integer maxMessages) { PagedFlux peekMessagesWithOptionalTimeout(Integer maxMessages, Duration timeout, Context context) { Function>> retriever = - marker -> StorageImplUtils.applyOptionalTimeout(this.client.messages() - .peekWithRestResponseAsync(queueName, maxMessages, null, null, context), timeout) + marker -> StorageImplUtils.applyOptionalTimeout(this.client.getMessages() + .peekWithResponseAsync(queueName, maxMessages, null, null, context), timeout) .map(response -> new PagedResponseBase<>(response.getRequest(), response.getStatusCode(), response.getHeaders(), @@ -859,8 +859,8 @@ Mono> updateMessageWithResponse(String messageId, QueueMessage message = messageText == null ? null : new QueueMessage().setMessageText(messageText); context = context == null ? Context.NONE : context; visibilityTimeout = visibilityTimeout == null ? Duration.ZERO : visibilityTimeout; - return client.messageIds().updateWithRestResponseAsync(queueName, messageId, popReceipt, - (int) visibilityTimeout.getSeconds(), message, null, null, + return client.getMessageIds().updateWithResponseAsync(queueName, messageId, popReceipt, + (int) visibilityTimeout.getSeconds(), null, null, message, context.addData(AZ_TRACING_NAMESPACE_KEY, STORAGE_TRACING_NAMESPACE_VALUE)) .map(this::getUpdatedMessageResponse); } @@ -922,7 +922,7 @@ public Mono> deleteMessageWithResponse(String messageId, String p Mono> deleteMessageWithResponse(String messageId, String popReceipt, Context context) { context = context == null ? Context.NONE : context; - return client.messageIds().deleteWithRestResponseAsync(queueName, messageId, popReceipt, + return client.getMessageIds().deleteWithResponseAsync(queueName, messageId, popReceipt, null, null, context.addData(AZ_TRACING_NAMESPACE_KEY, STORAGE_TRACING_NAMESPACE_VALUE)) .map(response -> new SimpleResponse<>(response, null)); } @@ -992,9 +992,9 @@ public String generateSas(QueueServiceSasSignatureValues queueServiceSasSignatur * @return Mapped response */ private Response getQueuePropertiesResponse(QueuesGetPropertiesResponse response) { - QueueGetPropertiesHeaders propertiesHeaders = response.getDeserializedHeaders(); - QueueProperties properties = new QueueProperties(propertiesHeaders.getMetadata(), - propertiesHeaders.getApproximateMessagesCount()); + QueuesGetPropertiesHeaders propertiesHeaders = response.getDeserializedHeaders(); + QueueProperties properties = new QueueProperties(propertiesHeaders.getXMsMeta(), + propertiesHeaders.getXMsApproximateMessagesCount()); return new SimpleResponse<>(response, properties); } @@ -1004,9 +1004,9 @@ private Response getQueuePropertiesResponse(QueuesGetProperties * @return Mapped response */ private Response getUpdatedMessageResponse(MessageIdsUpdateResponse response) { - MessageIdUpdateHeaders headers = response.getDeserializedHeaders(); - UpdateMessageResult updateMessageResult = new UpdateMessageResult(headers.getPopReceipt(), - headers.getTimeNextVisible()); + MessageIdsUpdateHeaders headers = response.getDeserializedHeaders(); + UpdateMessageResult updateMessageResult = new UpdateMessageResult(headers.getXMsPopreceipt(), + headers.getXMsTimeNextVisible()); return new SimpleResponse<>(response, updateMessageResult); } } diff --git a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/QueueClientBuilder.java b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/QueueClientBuilder.java index 7f47f64c3c621..53fc058fea02d 100644 --- a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/QueueClientBuilder.java +++ b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/QueueClientBuilder.java @@ -20,8 +20,8 @@ import com.azure.storage.common.implementation.connectionstring.StorageConnectionString; import com.azure.storage.common.implementation.connectionstring.StorageEndpoint; import com.azure.storage.common.policy.RequestRetryOptions; -import com.azure.storage.queue.implementation.AzureQueueStorageBuilder; import com.azure.storage.queue.implementation.AzureQueueStorageImpl; +import com.azure.storage.queue.implementation.AzureQueueStorageImplBuilder; import com.azure.storage.queue.implementation.util.BuilderHelper; import java.util.ArrayList; import java.util.List; @@ -147,11 +147,11 @@ public QueueAsyncClient buildAsyncClient() { endpoint, retryOptions, logOptions, clientOptions, httpClient, perCallPolicies, perRetryPolicies, configuration, logger); - AzureQueueStorageImpl azureQueueStorage = new AzureQueueStorageBuilder() + AzureQueueStorageImpl azureQueueStorage = new AzureQueueStorageImplBuilder() .url(endpoint) .pipeline(pipeline) .version(serviceVersion.getVersion()) - .build(); + .buildClient(); return new QueueAsyncClient(azureQueueStorage, queueName, accountName, serviceVersion); } diff --git a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/QueueServiceAsyncClient.java b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/QueueServiceAsyncClient.java index f7aa88de7a938..e879918a6deba 100644 --- a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/QueueServiceAsyncClient.java +++ b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/QueueServiceAsyncClient.java @@ -8,7 +8,6 @@ import com.azure.core.http.HttpPipeline; import com.azure.core.http.rest.PagedFlux; import com.azure.core.http.rest.PagedResponse; -import com.azure.core.http.rest.PagedResponseBase; import com.azure.core.http.rest.Response; import com.azure.core.http.rest.SimpleResponse; import com.azure.core.util.Context; @@ -20,7 +19,6 @@ import com.azure.storage.common.implementation.StorageImplUtils; import com.azure.storage.common.sas.AccountSasSignatureValues; import com.azure.storage.queue.implementation.AzureQueueStorageImpl; -import com.azure.storage.queue.implementation.models.ListQueuesIncludeType; import com.azure.storage.queue.models.QueueCorsRule; import com.azure.storage.queue.models.QueueItem; import com.azure.storage.queue.models.QueueServiceProperties; @@ -277,24 +275,18 @@ PagedFlux listQueuesWithOptionalTimeout(String marker, QueuesSegmentO Context context) { final String prefix = (options != null) ? options.getPrefix() : null; final Integer maxResultsPerPage = (options != null) ? options.getMaxResultsPerPage() : null; - final List include = new ArrayList<>(); + final List include = new ArrayList<>(); if (options != null) { if (options.isIncludeMetadata()) { - include.add(ListQueuesIncludeType.fromString(ListQueuesIncludeType.METADATA.toString())); + include.add("metadata"); } } Function>> retriever = - nextMarker -> StorageImplUtils.applyOptionalTimeout(this.client.services() - .listQueuesSegmentWithRestResponseAsync(prefix, nextMarker, maxResultsPerPage, include, - null, null, context), timeout) - .map(response -> new PagedResponseBase<>(response.getRequest(), - response.getStatusCode(), - response.getHeaders(), - response.getValue().getQueueItems(), - response.getValue().getNextMarker(), - response.getDeserializedHeaders())); + nextMarker -> StorageImplUtils.applyOptionalTimeout(this.client.getServices() + .listQueuesSegmentSinglePageAsync(prefix, nextMarker, maxResultsPerPage, include, + null, null, context), timeout); return new PagedFlux<>(() -> retriever.apply(marker), retriever); } @@ -351,7 +343,7 @@ public Mono> getPropertiesWithResponse() { Mono> getPropertiesWithResponse(Context context) { context = context == null ? Context.NONE : context; - return client.services().getPropertiesWithRestResponseAsync( + return client.getServices().getPropertiesWithResponseAsync(null, null, context.addData(AZ_TRACING_NAMESPACE_KEY, STORAGE_TRACING_NAMESPACE_VALUE)) .map(response -> new SimpleResponse<>(response, response.getValue())); } @@ -450,7 +442,7 @@ public Mono> setPropertiesWithResponse(QueueServiceProperties pro Mono> setPropertiesWithResponse(QueueServiceProperties properties, Context context) { context = context == null ? Context.NONE : context; - return client.services().setPropertiesWithRestResponseAsync(properties, + return client.getServices().setPropertiesWithResponseAsync(properties, null, null, context.addData(AZ_TRACING_NAMESPACE_KEY, STORAGE_TRACING_NAMESPACE_VALUE)) .map(response -> new SimpleResponse<>(response, null)); } @@ -503,7 +495,7 @@ public Mono> getStatisticsWithResponse() { Mono> getStatisticsWithResponse(Context context) { context = context == null ? Context.NONE : context; - return client.services().getStatisticsWithRestResponseAsync( + return client.getServices().getStatisticsWithResponseAsync(null, null, context.addData(AZ_TRACING_NAMESPACE_KEY, STORAGE_TRACING_NAMESPACE_VALUE)) .map(response -> new SimpleResponse<>(response, response.getValue())); } diff --git a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/QueueServiceClientBuilder.java b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/QueueServiceClientBuilder.java index 1359235f4c22e..fa402b839aebb 100644 --- a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/QueueServiceClientBuilder.java +++ b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/QueueServiceClientBuilder.java @@ -11,18 +11,18 @@ import com.azure.core.http.policy.HttpLogOptions; import com.azure.core.http.policy.HttpPipelinePolicy; import com.azure.core.util.ClientOptions; -import com.azure.core.util.CoreUtils; import com.azure.core.util.Configuration; +import com.azure.core.util.CoreUtils; import com.azure.core.util.logging.ClientLogger; import com.azure.storage.common.StorageSharedKeyCredential; import com.azure.storage.common.implementation.connectionstring.StorageAuthenticationSettings; import com.azure.storage.common.implementation.connectionstring.StorageConnectionString; import com.azure.storage.common.implementation.connectionstring.StorageEndpoint; import com.azure.storage.common.policy.RequestRetryOptions; -import com.azure.storage.queue.implementation.AzureQueueStorageBuilder; import com.azure.storage.queue.implementation.AzureQueueStorageImpl; - +import com.azure.storage.queue.implementation.AzureQueueStorageImplBuilder; import com.azure.storage.queue.implementation.util.BuilderHelper; + import java.util.ArrayList; import java.util.List; import java.util.Objects; @@ -122,11 +122,11 @@ public QueueServiceAsyncClient buildAsyncClient() { endpoint, retryOptions, logOptions, clientOptions, httpClient, perCallPolicies, perRetryPolicies, configuration, logger); - AzureQueueStorageImpl azureQueueStorage = new AzureQueueStorageBuilder() + AzureQueueStorageImpl azureQueueStorage = new AzureQueueStorageImplBuilder() .url(endpoint) .pipeline(pipeline) .version(serviceVersion.getVersion()) - .build(); + .buildClient(); return new QueueServiceAsyncClient(azureQueueStorage, accountName, serviceVersion); } diff --git a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/implementation/AzureQueueStorageBuilder.java b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/implementation/AzureQueueStorageBuilder.java deleted file mode 100644 index b99f2f35d3c12..0000000000000 --- a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/implementation/AzureQueueStorageBuilder.java +++ /dev/null @@ -1,87 +0,0 @@ -// 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; - -import com.azure.core.annotation.ServiceClientBuilder; -import com.azure.core.http.HttpPipeline; -import com.azure.core.http.HttpPipelineBuilder; -import com.azure.core.http.policy.CookiePolicy; -import com.azure.core.http.policy.RetryPolicy; -import com.azure.core.http.policy.UserAgentPolicy; - -/** - * A builder for creating a new instance of the AzureQueueStorage type. - */ -@ServiceClientBuilder(serviceClients = AzureQueueStorageImpl.class) -public final class AzureQueueStorageBuilder { - /* - * The URL of the service account, queue or message that is the targe of the desired operation. - */ - private String url; - - /** - * Sets The URL of the service account, queue or message that is the targe of the desired operation. - * - * @param url the url value. - * @return the AzureQueueStorageBuilder. - */ - public AzureQueueStorageBuilder url(String url) { - this.url = url; - return this; - } - - /* - * Specifies the version of the operation to use for this request. - */ - private String version; - - /** - * Sets Specifies the version of the operation to use for this request. - * - * @param version the version value. - * @return the AzureQueueStorageBuilder. - */ - public AzureQueueStorageBuilder version(String version) { - this.version = version; - return this; - } - - /* - * The HTTP pipeline to send requests through - */ - private HttpPipeline pipeline; - - /** - * Sets The HTTP pipeline to send requests through. - * - * @param pipeline the pipeline value. - * @return the AzureQueueStorageBuilder. - */ - public AzureQueueStorageBuilder pipeline(HttpPipeline pipeline) { - this.pipeline = pipeline; - return this; - } - - /** - * Builds an instance of AzureQueueStorageImpl with the provided parameters. - * - * @return an instance of AzureQueueStorageImpl. - */ - public AzureQueueStorageImpl build() { - if (pipeline == null) { - this.pipeline = new HttpPipelineBuilder().policies(new UserAgentPolicy(), new RetryPolicy(), new CookiePolicy()).build(); - } - AzureQueueStorageImpl client = new AzureQueueStorageImpl(pipeline); - if (this.url != null) { - client.setUrl(this.url); - } - if (this.version != null) { - client.setVersion(this.version); - } else { - client.setVersion("2018-03-28"); - } - return client; - } -} diff --git a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/implementation/AzureQueueStorageImpl.java b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/implementation/AzureQueueStorageImpl.java index 5c97e90d60988..100a929360d4b 100644 --- a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/implementation/AzureQueueStorageImpl.java +++ b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/implementation/AzureQueueStorageImpl.java @@ -9,15 +9,13 @@ import com.azure.core.http.policy.CookiePolicy; import com.azure.core.http.policy.RetryPolicy; import com.azure.core.http.policy.UserAgentPolicy; +import com.azure.core.util.serializer.JacksonAdapter; +import com.azure.core.util.serializer.SerializerAdapter; -/** - * Initializes a new instance of the AzureQueueStorage type. - */ +/** Initializes a new instance of the AzureQueueStorage type. */ public final class AzureQueueStorageImpl { - /** - * The URL of the service account, queue or message that is the targe of the desired operation. - */ - private String url; + /** The URL of the service account, queue or message that is the targe of the desired operation. */ + private final String url; /** * Gets The URL of the service account, queue or message that is the targe of the desired operation. @@ -28,20 +26,8 @@ public String getUrl() { return this.url; } - /** - * Sets The URL of the service account, queue or message that is the targe of the desired operation. - * - * @param url the url value. - */ - AzureQueueStorageImpl setUrl(String url) { - this.url = url; - return this; - } - - /** - * Specifies the version of the operation to use for this request. - */ - private String version; + /** Specifies the version of the operation to use for this request. */ + private final String version; /** * Gets Specifies the version of the operation to use for this request. @@ -52,20 +38,8 @@ public String getVersion() { return this.version; } - /** - * Sets Specifies the version of the operation to use for this request. - * - * @param version the version value. - */ - AzureQueueStorageImpl setVersion(String version) { - this.version = version; - return this; - } - - /** - * The HTTP pipeline to send requests through. - */ - private HttpPipeline httpPipeline; + /** The HTTP pipeline to send requests through. */ + private final HttpPipeline httpPipeline; /** * Gets The HTTP pipeline to send requests through. @@ -76,76 +50,106 @@ public HttpPipeline getHttpPipeline() { return this.httpPipeline; } + /** The serializer to serialize an object into a string. */ + private final SerializerAdapter serializerAdapter; + /** - * The ServicesImpl object to access its operations. + * Gets The serializer to serialize an object into a string. + * + * @return the serializerAdapter value. */ - private ServicesImpl services; + public SerializerAdapter getSerializerAdapter() { + return this.serializerAdapter; + } + + /** The ServicesImpl object to access its operations. */ + private final ServicesImpl services; /** * Gets the ServicesImpl object to access its operations. * * @return the ServicesImpl object. */ - public ServicesImpl services() { + public ServicesImpl getServices() { return this.services; } - /** - * The QueuesImpl object to access its operations. - */ - private QueuesImpl queues; + /** The QueuesImpl object to access its operations. */ + private final QueuesImpl queues; /** * Gets the QueuesImpl object to access its operations. * * @return the QueuesImpl object. */ - public QueuesImpl queues() { + public QueuesImpl getQueues() { return this.queues; } - /** - * The MessagesImpl object to access its operations. - */ - private MessagesImpl messages; + /** The MessagesImpl object to access its operations. */ + private final MessagesImpl messages; /** * Gets the MessagesImpl object to access its operations. * * @return the MessagesImpl object. */ - public MessagesImpl messages() { + public MessagesImpl getMessages() { return this.messages; } - /** - * The MessageIdsImpl object to access its operations. - */ - private MessageIdsImpl messageIds; + /** The MessageIdsImpl object to access its operations. */ + private final MessageIdsImpl messageIds; /** * Gets the MessageIdsImpl object to access its operations. * * @return the MessageIdsImpl object. */ - public MessageIdsImpl messageIds() { + public MessageIdsImpl getMessageIds() { return this.messageIds; } /** * Initializes an instance of AzureQueueStorage client. + * + * @param url The URL of the service account, queue or message that is the targe of the desired operation. + * @param version Specifies the version of the operation to use for this request. + */ + AzureQueueStorageImpl(String url, String version) { + this( + new HttpPipelineBuilder() + .policies(new UserAgentPolicy(), new RetryPolicy(), new CookiePolicy()) + .build(), + JacksonAdapter.createDefaultSerializerAdapter(), + url, + version); + } + + /** + * Initializes an instance of AzureQueueStorage client. + * + * @param httpPipeline The HTTP pipeline to send requests through. + * @param url The URL of the service account, queue or message that is the targe of the desired operation. + * @param version Specifies the version of the operation to use for this request. */ - public AzureQueueStorageImpl() { - this(new HttpPipelineBuilder().policies(new UserAgentPolicy(), new RetryPolicy(), new CookiePolicy()).build()); + AzureQueueStorageImpl(HttpPipeline httpPipeline, String url, String version) { + this(httpPipeline, JacksonAdapter.createDefaultSerializerAdapter(), url, version); } /** * Initializes an instance of AzureQueueStorage client. * * @param httpPipeline The HTTP pipeline to send requests through. + * @param serializerAdapter The serializer to serialize an object into a string. + * @param url The URL of the service account, queue or message that is the targe of the desired operation. + * @param version Specifies the version of the operation to use for this request. */ - public AzureQueueStorageImpl(HttpPipeline httpPipeline) { + AzureQueueStorageImpl(HttpPipeline httpPipeline, SerializerAdapter serializerAdapter, String url, String version) { this.httpPipeline = httpPipeline; + this.serializerAdapter = serializerAdapter; + this.url = url; + this.version = version; this.services = new ServicesImpl(this); this.queues = new QueuesImpl(this); this.messages = new MessagesImpl(this); diff --git a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/implementation/AzureQueueStorageImplBuilder.java b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/implementation/AzureQueueStorageImplBuilder.java new file mode 100644 index 0000000000000..27a7f6eb5dacd --- /dev/null +++ b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/implementation/AzureQueueStorageImplBuilder.java @@ -0,0 +1,230 @@ +// 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; + +import com.azure.core.annotation.ServiceClientBuilder; +import com.azure.core.http.HttpClient; +import com.azure.core.http.HttpPipeline; +import com.azure.core.http.HttpPipelineBuilder; +import com.azure.core.http.policy.CookiePolicy; +import com.azure.core.http.policy.HttpLogOptions; +import com.azure.core.http.policy.HttpLoggingPolicy; +import com.azure.core.http.policy.HttpPipelinePolicy; +import com.azure.core.http.policy.HttpPolicyProviders; +import com.azure.core.http.policy.RetryPolicy; +import com.azure.core.http.policy.UserAgentPolicy; +import com.azure.core.util.Configuration; +import com.azure.core.util.serializer.JacksonAdapter; +import com.azure.core.util.serializer.SerializerAdapter; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** A builder for creating a new instance of the AzureQueueStorage type. */ +@ServiceClientBuilder(serviceClients = {AzureQueueStorageImpl.class}) +public final class AzureQueueStorageImplBuilder { + private static final String SDK_NAME = "name"; + + private static final String SDK_VERSION = "version"; + + private final Map properties = new HashMap<>(); + + /** Create an instance of the AzureQueueStorageImplBuilder. */ + public AzureQueueStorageImplBuilder() { + this.pipelinePolicies = new ArrayList<>(); + } + + /* + * The URL of the service account, queue or message that is the targe of + * the desired operation. + */ + private String url; + + /** + * Sets The URL of the service account, queue or message that is the targe of the desired operation. + * + * @param url the url value. + * @return the AzureQueueStorageImplBuilder. + */ + public AzureQueueStorageImplBuilder url(String url) { + this.url = url; + return this; + } + + /* + * Specifies the version of the operation to use for this request. + */ + private String version; + + /** + * Sets Specifies the version of the operation to use for this request. + * + * @param version the version value. + * @return the AzureQueueStorageImplBuilder. + */ + public AzureQueueStorageImplBuilder version(String version) { + this.version = version; + return this; + } + + /* + * The HTTP pipeline to send requests through + */ + private HttpPipeline pipeline; + + /** + * Sets The HTTP pipeline to send requests through. + * + * @param pipeline the pipeline value. + * @return the AzureQueueStorageImplBuilder. + */ + public AzureQueueStorageImplBuilder pipeline(HttpPipeline pipeline) { + this.pipeline = pipeline; + return this; + } + + /* + * The serializer to serialize an object into a string + */ + private SerializerAdapter serializerAdapter; + + /** + * Sets The serializer to serialize an object into a string. + * + * @param serializerAdapter the serializerAdapter value. + * @return the AzureQueueStorageImplBuilder. + */ + public AzureQueueStorageImplBuilder serializerAdapter(SerializerAdapter serializerAdapter) { + this.serializerAdapter = serializerAdapter; + return this; + } + + /* + * The HTTP client used to send the request. + */ + private HttpClient httpClient; + + /** + * Sets The HTTP client used to send the request. + * + * @param httpClient the httpClient value. + * @return the AzureQueueStorageImplBuilder. + */ + public AzureQueueStorageImplBuilder httpClient(HttpClient httpClient) { + this.httpClient = httpClient; + return this; + } + + /* + * The configuration store that is used during construction of the service + * client. + */ + private Configuration configuration; + + /** + * Sets The configuration store that is used during construction of the service client. + * + * @param configuration the configuration value. + * @return the AzureQueueStorageImplBuilder. + */ + public AzureQueueStorageImplBuilder configuration(Configuration configuration) { + this.configuration = configuration; + return this; + } + + /* + * The logging configuration for HTTP requests and responses. + */ + private HttpLogOptions httpLogOptions; + + /** + * Sets The logging configuration for HTTP requests and responses. + * + * @param httpLogOptions the httpLogOptions value. + * @return the AzureQueueStorageImplBuilder. + */ + public AzureQueueStorageImplBuilder httpLogOptions(HttpLogOptions httpLogOptions) { + this.httpLogOptions = httpLogOptions; + return this; + } + + /* + * The retry policy that will attempt to retry failed requests, if + * applicable. + */ + private RetryPolicy retryPolicy; + + /** + * Sets The retry policy that will attempt to retry failed requests, if applicable. + * + * @param retryPolicy the retryPolicy value. + * @return the AzureQueueStorageImplBuilder. + */ + public AzureQueueStorageImplBuilder retryPolicy(RetryPolicy retryPolicy) { + this.retryPolicy = retryPolicy; + return this; + } + + /* + * The list of Http pipeline policies to add. + */ + private final List pipelinePolicies; + + /** + * Adds a custom Http pipeline policy. + * + * @param customPolicy The custom Http pipeline policy to add. + * @return the AzureQueueStorageImplBuilder. + */ + public AzureQueueStorageImplBuilder addPolicy(HttpPipelinePolicy customPolicy) { + pipelinePolicies.add(customPolicy); + return this; + } + + /** + * Builds an instance of AzureQueueStorageImpl with the provided parameters. + * + * @return an instance of AzureQueueStorageImpl. + */ + public AzureQueueStorageImpl buildClient() { + if (version == null) { + this.version = "2018-03-28"; + } + if (pipeline == null) { + this.pipeline = createHttpPipeline(); + } + if (serializerAdapter == null) { + this.serializerAdapter = JacksonAdapter.createDefaultSerializerAdapter(); + } + AzureQueueStorageImpl client = new AzureQueueStorageImpl(pipeline, serializerAdapter, url, version); + return client; + } + + private HttpPipeline createHttpPipeline() { + Configuration buildConfiguration = + (configuration == null) ? Configuration.getGlobalConfiguration() : configuration; + if (httpLogOptions == null) { + httpLogOptions = new HttpLogOptions(); + } + List policies = new ArrayList<>(); + String clientName = properties.getOrDefault(SDK_NAME, "UnknownName"); + String clientVersion = properties.getOrDefault(SDK_VERSION, "UnknownVersion"); + policies.add( + new UserAgentPolicy(httpLogOptions.getApplicationId(), clientName, clientVersion, buildConfiguration)); + HttpPolicyProviders.addBeforeRetryPolicies(policies); + policies.add(retryPolicy == null ? new RetryPolicy() : retryPolicy); + policies.add(new CookiePolicy()); + policies.addAll(this.pipelinePolicies); + HttpPolicyProviders.addAfterRetryPolicies(policies); + policies.add(new HttpLoggingPolicy(httpLogOptions)); + HttpPipeline httpPipeline = + new HttpPipelineBuilder() + .policies(policies.toArray(new HttpPipelinePolicy[0])) + .httpClient(httpClient) + .build(); + return httpPipeline; + } +} diff --git a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/implementation/ListQueuesIncludeTypeWrapper.java b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/implementation/ListQueuesIncludeTypeWrapper.java deleted file mode 100644 index 82ce9b3970417..0000000000000 --- a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/implementation/ListQueuesIncludeTypeWrapper.java +++ /dev/null @@ -1,40 +0,0 @@ -// 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; - -import com.azure.storage.queue.implementation.models.ListQueuesIncludeType; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty; -import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; -import java.util.List; - -/** - * A wrapper around List<ListQueuesIncludeType> which provides top-level metadata for serialization. - */ -@JacksonXmlRootElement(localName = "ListQueuesIncludeType") -public final class ListQueuesIncludeTypeWrapper { - @JacksonXmlProperty(localName = "ListQueuesIncludeType") - private final List listQueuesIncludeType; - - /** - * Creates an instance of ListQueuesIncludeTypeWrapper. - * - * @param listQueuesIncludeType the list. - */ - @JsonCreator - public ListQueuesIncludeTypeWrapper(@JsonProperty("ListQueuesIncludeType") List listQueuesIncludeType) { - this.listQueuesIncludeType = listQueuesIncludeType; - } - - /** - * Get the List<ListQueuesIncludeType> contained in this wrapper. - * - * @return the List<ListQueuesIncludeType>. - */ - public List items() { - return listQueuesIncludeType; - } -} diff --git a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/implementation/MessageIdsImpl.java b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/implementation/MessageIdsImpl.java index 02b52c3fc9121..79f9bc1b3b648 100644 --- a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/implementation/MessageIdsImpl.java +++ b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/implementation/MessageIdsImpl.java @@ -22,105 +22,115 @@ import com.azure.storage.queue.implementation.models.MessageIdsDeleteResponse; import com.azure.storage.queue.implementation.models.MessageIdsUpdateResponse; import com.azure.storage.queue.implementation.models.QueueMessage; -import com.azure.storage.queue.models.QueueStorageException; +import com.azure.storage.queue.implementation.models.StorageErrorException; import reactor.core.publisher.Mono; -/** - * An instance of this class provides access to all the operations defined in - * MessageIds. - */ +/** An instance of this class provides access to all the operations defined in MessageIds. */ public final class MessageIdsImpl { - /** - * The proxy service used to perform REST calls. - */ - private MessageIdsService service; + /** The proxy service used to perform REST calls. */ + private final MessageIdsService service; - /** - * The service client containing this operation class. - */ - private AzureQueueStorageImpl client; + /** The service client containing this operation class. */ + private final AzureQueueStorageImpl client; /** * Initializes an instance of MessageIdsImpl. * * @param client the instance of the service client containing this operation class. */ - public MessageIdsImpl(AzureQueueStorageImpl client) { - this.service = RestProxy.create(MessageIdsService.class, client.getHttpPipeline()); + MessageIdsImpl(AzureQueueStorageImpl client) { + this.service = + RestProxy.create(MessageIdsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for AzureQueueStorageMessageIds - * to be used by the proxy service to perform REST calls. + * The interface defining all the services for AzureQueueStorageMessageIds to be used by the proxy service to + * perform REST calls. */ @Host("{url}") - @ServiceInterface(name = "AzureQueueStorageMessageIds") - private interface MessageIdsService { - @Put("{queueName}/messages/{messageid}") + @ServiceInterface(name = "AzureQueueStorageMes") + public interface MessageIdsService { + @Put("/{queueName}/messages/{messageid}") @ExpectedResponses({204}) - @UnexpectedResponseExceptionType(QueueStorageException.class) - Mono update(@PathParam("queueName") String queueName, @PathParam("messageid") String messageid, @HostParam("url") String url, @BodyParam("application/xml; charset=utf-8") QueueMessage queueMessage, @QueryParam("popreceipt") String popReceipt, @QueryParam("visibilitytimeout") int visibilitytimeout, @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, Context context); + @UnexpectedResponseExceptionType(com.azure.storage.queue.models.QueueStorageException.class) + Mono update( + @HostParam("url") String url, + @PathParam("queueName") String queueName, + @PathParam("messageid") String messageid, + @QueryParam("popreceipt") String popReceipt, + @QueryParam("visibilitytimeout") int visibilitytimeout, + @QueryParam("timeout") Integer timeout, + @HeaderParam("x-ms-version") String version, + @HeaderParam("x-ms-client-request-id") String requestId, + @BodyParam("application/xml") QueueMessage queueMessage, + @HeaderParam("Accept") String accept, + Context context); - @Delete("{queueName}/messages/{messageid}") + @Delete("/{queueName}/messages/{messageid}") @ExpectedResponses({204}) - @UnexpectedResponseExceptionType(QueueStorageException.class) - Mono delete(@PathParam("queueName") String queueName, @PathParam("messageid") String messageid, @HostParam("url") String url, @QueryParam("popreceipt") String popReceipt, @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, Context context); + @UnexpectedResponseExceptionType(com.azure.storage.queue.models.QueueStorageException.class) + Mono delete( + @HostParam("url") String url, + @PathParam("queueName") String queueName, + @PathParam("messageid") String messageid, + @QueryParam("popreceipt") String popReceipt, + @QueryParam("timeout") Integer timeout, + @HeaderParam("x-ms-version") String version, + @HeaderParam("x-ms-client-request-id") String requestId, + @HeaderParam("Accept") String accept, + Context context); } /** - * The Update operation was introduced with version 2011-08-18 of the Queue service API. The Update Message operation updates the visibility timeout of a message. You can also use this operation to update the contents of a message. A message must be in a format that can be included in an XML request with UTF-8 encoding, and the encoded message can be up to 64KB in size. + * The Update operation was introduced with version 2011-08-18 of the Queue service API. The Update Message + * operation updates the visibility timeout of a message. You can also use this operation to update the contents of + * a message. A message must be in a format that can be included in an XML request with UTF-8 encoding, and the + * encoded message can be up to 64KB in size. * * @param queueName The queue name. * @param messageid The message ID name. - * @param popReceipt Required. Specifies the valid pop receipt value returned from an earlier call to the Get Messages or Update Message operation. - * @param visibilitytimeout Optional. Specifies the new visibility timeout value, in seconds, relative to server time. The default value is 30 seconds. A specified value must be larger than or equal to 1 second, and cannot be larger than 7 days, or larger than 2 hours on REST protocol versions prior to version 2011-08-18. The visibility timeout of a message can be set to a value later than the expiry time. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @return a Mono which performs the network request upon subscription. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono updateWithRestResponseAsync(String queueName, String messageid, String popReceipt, int visibilitytimeout, Context context) { - final QueueMessage queueMessage = null; - final Integer timeout = null; - final String requestId = null; - return service.update(queueName, messageid, this.client.getUrl(), queueMessage, popReceipt, visibilitytimeout, timeout, this.client.getVersion(), requestId, context); - } - - /** - * The Update operation was introduced with version 2011-08-18 of the Queue service API. The Update Message operation updates the visibility timeout of a message. You can also use this operation to update the contents of a message. A message must be in a format that can be included in an XML request with UTF-8 encoding, and the encoded message can be up to 64KB in size. - * - * @param queueName The queue name. - * @param messageid The message ID name. - * @param popReceipt Required. Specifies the valid pop receipt value returned from an earlier call to the Get Messages or Update Message operation. - * @param visibilitytimeout Optional. Specifies the new visibility timeout value, in seconds, relative to server time. The default value is 30 seconds. A specified value must be larger than or equal to 1 second, and cannot be larger than 7 days, or larger than 2 hours on REST protocol versions prior to version 2011-08-18. The visibility timeout of a message can be set to a value later than the expiry time. + * @param popReceipt Required. Specifies the valid pop receipt value returned from an earlier call to the Get + * Messages or Update Message operation. + * @param visibilitytimeout Optional. Specifies the new visibility timeout value, in seconds, relative to server + * time. The default value is 30 seconds. A specified value must be larger than or equal to 1 second, and cannot + * be larger than 7 days, or larger than 2 hours on REST protocol versions prior to version 2011-08-18. The + * visibility timeout of a message can be set to a value later than the expiry time. + * @param timeout The The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/setting-timeouts-for-queue-service-operations>Setting + * Timeouts for Queue Service Operations.</a>. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. * @param queueMessage A Message object which can be stored in a Queue. - * @param timeout The The timeout parameter is expressed in seconds. For more information, see <a href="https://docs.microsoft.com/en-us/rest/api/storageservices/setting-timeouts-for-queue-service-operations>Setting Timeouts for Queue Service Operations.</a>. - * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the analytics logs when storage analytics logging is enabled. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @return a Mono which performs the network request upon subscription. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono updateWithRestResponseAsync(String queueName, String messageid, String popReceipt, int visibilitytimeout, QueueMessage queueMessage, Integer timeout, String requestId, Context context) { - return service.update(queueName, messageid, this.client.getUrl(), queueMessage, popReceipt, visibilitytimeout, timeout, this.client.getVersion(), requestId, context); - } - - /** - * The Delete operation deletes the specified message. - * - * @param queueName The queue name. - * @param messageid The message ID name. - * @param popReceipt Required. Specifies the valid pop receipt value returned from an earlier call to the Get Messages or Update Message operation. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. - * @return a Mono which performs the network request upon subscription. + * @throws StorageErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono deleteWithRestResponseAsync(String queueName, String messageid, String popReceipt, Context context) { - final Integer timeout = null; - final String requestId = null; - return service.delete(queueName, messageid, this.client.getUrl(), popReceipt, timeout, this.client.getVersion(), requestId, context); + public Mono updateWithResponseAsync( + String queueName, + String messageid, + String popReceipt, + int visibilitytimeout, + Integer timeout, + String requestId, + QueueMessage queueMessage, + Context context) { + final String accept = "application/xml"; + return service.update( + this.client.getUrl(), + queueName, + messageid, + popReceipt, + visibilitytimeout, + timeout, + this.client.getVersion(), + requestId, + queueMessage, + accept, + context); } /** @@ -128,15 +138,32 @@ public Mono deleteWithRestResponseAsync(String queueNa * * @param queueName The queue name. * @param messageid The message ID name. - * @param popReceipt Required. Specifies the valid pop receipt value returned from an earlier call to the Get Messages or Update Message operation. - * @param timeout The The timeout parameter is expressed in seconds. For more information, see <a href="https://docs.microsoft.com/en-us/rest/api/storageservices/setting-timeouts-for-queue-service-operations>Setting Timeouts for Queue Service Operations.</a>. - * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the analytics logs when storage analytics logging is enabled. + * @param popReceipt Required. Specifies the valid pop receipt value returned from an earlier call to the Get + * Messages or Update Message operation. + * @param timeout The The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/setting-timeouts-for-queue-service-operations>Setting + * Timeouts for Queue Service Operations.</a>. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. - * @return a Mono which performs the network request upon subscription. + * @throws StorageErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono deleteWithRestResponseAsync(String queueName, String messageid, String popReceipt, Integer timeout, String requestId, Context context) { - return service.delete(queueName, messageid, this.client.getUrl(), popReceipt, timeout, this.client.getVersion(), requestId, context); + public Mono deleteWithResponseAsync( + String queueName, String messageid, String popReceipt, Integer timeout, String requestId, Context context) { + final String accept = "application/xml"; + return service.delete( + this.client.getUrl(), + queueName, + messageid, + popReceipt, + timeout, + this.client.getVersion(), + requestId, + accept, + context); } } diff --git a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/implementation/MessagesImpl.java b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/implementation/MessagesImpl.java index e91cdc0ff375f..7d414cf6620f5 100644 --- a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/implementation/MessagesImpl.java +++ b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/implementation/MessagesImpl.java @@ -25,193 +25,240 @@ import com.azure.storage.queue.implementation.models.MessagesEnqueueResponse; import com.azure.storage.queue.implementation.models.MessagesPeekResponse; import com.azure.storage.queue.implementation.models.QueueMessage; -import com.azure.storage.queue.models.QueueStorageException; +import com.azure.storage.queue.implementation.models.StorageErrorException; import reactor.core.publisher.Mono; -/** - * An instance of this class provides access to all the operations defined in - * Messages. - */ +/** An instance of this class provides access to all the operations defined in Messages. */ public final class MessagesImpl { - /** - * The proxy service used to perform REST calls. - */ - private MessagesService service; + /** The proxy service used to perform REST calls. */ + private final MessagesService service; - /** - * The service client containing this operation class. - */ - private AzureQueueStorageImpl client; + /** The service client containing this operation class. */ + private final AzureQueueStorageImpl client; /** * Initializes an instance of MessagesImpl. * * @param client the instance of the service client containing this operation class. */ - public MessagesImpl(AzureQueueStorageImpl client) { - this.service = RestProxy.create(MessagesService.class, client.getHttpPipeline()); + MessagesImpl(AzureQueueStorageImpl client) { + this.service = RestProxy.create(MessagesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for AzureQueueStorageMessages to - * be used by the proxy service to perform REST calls. + * The interface defining all the services for AzureQueueStorageMessages to be used by the proxy service to perform + * REST calls. */ @Host("{url}") - @ServiceInterface(name = "AzureQueueStorageMessages") - private interface MessagesService { - @Get("{queueName}/messages") + @ServiceInterface(name = "AzureQueueStorageMes") + public interface MessagesService { + @Get("/{queueName}/messages") @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(QueueStorageException.class) - Mono dequeue(@PathParam("queueName") String queueName, @HostParam("url") String url, @QueryParam("numofmessages") Integer numberOfMessages, @QueryParam("visibilitytimeout") Integer visibilitytimeout, @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, Context context); + @UnexpectedResponseExceptionType(com.azure.storage.queue.models.QueueStorageException.class) + Mono dequeue( + @HostParam("url") String url, + @PathParam("queueName") String queueName, + @QueryParam("numofmessages") Integer numberOfMessages, + @QueryParam("visibilitytimeout") Integer visibilitytimeout, + @QueryParam("timeout") Integer timeout, + @HeaderParam("x-ms-version") String version, + @HeaderParam("x-ms-client-request-id") String requestId, + @HeaderParam("Accept") String accept, + Context context); - @Delete("{queueName}/messages") + @Delete("/{queueName}/messages") @ExpectedResponses({204}) - @UnexpectedResponseExceptionType(QueueStorageException.class) - Mono clear(@PathParam("queueName") String queueName, @HostParam("url") String url, @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, Context context); + @UnexpectedResponseExceptionType(com.azure.storage.queue.models.QueueStorageException.class) + Mono clear( + @HostParam("url") String url, + @PathParam("queueName") String queueName, + @QueryParam("timeout") Integer timeout, + @HeaderParam("x-ms-version") String version, + @HeaderParam("x-ms-client-request-id") String requestId, + @HeaderParam("Accept") String accept, + Context context); - @Post("{queueName}/messages") + @Post("/{queueName}/messages") @ExpectedResponses({201}) - @UnexpectedResponseExceptionType(QueueStorageException.class) - Mono enqueue(@PathParam("queueName") String queueName, @HostParam("url") String url, @BodyParam("application/xml; charset=utf-8") QueueMessage queueMessage, @QueryParam("visibilitytimeout") Integer visibilitytimeout, @QueryParam("messagettl") Integer messageTimeToLive, @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, Context context); + @UnexpectedResponseExceptionType(com.azure.storage.queue.models.QueueStorageException.class) + Mono enqueue( + @HostParam("url") String url, + @PathParam("queueName") String queueName, + @QueryParam("visibilitytimeout") Integer visibilitytimeout, + @QueryParam("messagettl") Integer messageTimeToLive, + @QueryParam("timeout") Integer timeout, + @HeaderParam("x-ms-version") String version, + @HeaderParam("x-ms-client-request-id") String requestId, + @BodyParam("application/xml") QueueMessage queueMessage, + @HeaderParam("Accept") String accept, + Context context); - @Get("{queueName}/messages") + @Get("/{queueName}/messages") @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(QueueStorageException.class) - Mono peek(@PathParam("queueName") String queueName, @HostParam("url") String url, @QueryParam("numofmessages") Integer numberOfMessages, @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, @QueryParam("peekonly") String peekonly, Context context); - } - - /** - * The Dequeue operation retrieves one or more messages from the front of the queue. - * - * @param queueName The queue name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @return a Mono which performs the network request upon subscription. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono dequeueWithRestResponseAsync(String queueName, Context context) { - final Integer numberOfMessages = null; - final Integer visibilitytimeout = null; - final Integer timeout = null; - final String requestId = null; - return service.dequeue(queueName, this.client.getUrl(), numberOfMessages, visibilitytimeout, timeout, this.client.getVersion(), requestId, context); + @UnexpectedResponseExceptionType(com.azure.storage.queue.models.QueueStorageException.class) + Mono peek( + @HostParam("url") String url, + @QueryParam("peekonly") String peekonly, + @PathParam("queueName") String queueName, + @QueryParam("numofmessages") Integer numberOfMessages, + @QueryParam("timeout") Integer timeout, + @HeaderParam("x-ms-version") String version, + @HeaderParam("x-ms-client-request-id") String requestId, + @HeaderParam("Accept") String accept, + Context context); } /** * The Dequeue operation retrieves one or more messages from the front of the queue. * * @param queueName The queue name. - * @param numberOfMessages Optional. A nonzero integer value that specifies the number of messages to retrieve from the queue, up to a maximum of 32. If fewer are visible, the visible messages are returned. By default, a single message is retrieved from the queue with this operation. - * @param visibilitytimeout Optional. Specifies the new visibility timeout value, in seconds, relative to server time. The default value is 30 seconds. A specified value must be larger than or equal to 1 second, and cannot be larger than 7 days, or larger than 2 hours on REST protocol versions prior to version 2011-08-18. The visibility timeout of a message can be set to a value later than the expiry time. - * @param timeout The The timeout parameter is expressed in seconds. For more information, see <a href="https://docs.microsoft.com/en-us/rest/api/storageservices/setting-timeouts-for-queue-service-operations>Setting Timeouts for Queue Service Operations.</a>. - * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the analytics logs when storage analytics logging is enabled. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @return a Mono which performs the network request upon subscription. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono dequeueWithRestResponseAsync(String queueName, Integer numberOfMessages, Integer visibilitytimeout, Integer timeout, String requestId, Context context) { - return service.dequeue(queueName, this.client.getUrl(), numberOfMessages, visibilitytimeout, timeout, this.client.getVersion(), requestId, context); - } - - /** - * The Clear operation deletes all messages from the specified queue. - * - * @param queueName The queue name. + * @param numberOfMessages Optional. A nonzero integer value that specifies the number of messages to retrieve from + * the queue, up to a maximum of 32. If fewer are visible, the visible messages are returned. By default, a + * single message is retrieved from the queue with this operation. + * @param visibilitytimeout Optional. Specifies the new visibility timeout value, in seconds, relative to server + * time. The default value is 30 seconds. A specified value must be larger than or equal to 1 second, and cannot + * be larger than 7 days, or larger than 2 hours on REST protocol versions prior to version 2011-08-18. The + * visibility timeout of a message can be set to a value later than the expiry time. + * @param timeout The The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/setting-timeouts-for-queue-service-operations>Setting + * Timeouts for Queue Service Operations.</a>. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. - * @return a Mono which performs the network request upon subscription. + * @throws StorageErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the object returned when calling Get Messages on a Queue. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono clearWithRestResponseAsync(String queueName, Context context) { - final Integer timeout = null; - final String requestId = null; - return service.clear(queueName, this.client.getUrl(), timeout, this.client.getVersion(), requestId, context); + public Mono dequeueWithResponseAsync( + String queueName, + Integer numberOfMessages, + Integer visibilitytimeout, + Integer timeout, + String requestId, + Context context) { + final String accept = "application/xml"; + return service.dequeue( + this.client.getUrl(), + queueName, + numberOfMessages, + visibilitytimeout, + timeout, + this.client.getVersion(), + requestId, + accept, + context); } /** * The Clear operation deletes all messages from the specified queue. * * @param queueName The queue name. - * @param timeout The The timeout parameter is expressed in seconds. For more information, see <a href="https://docs.microsoft.com/en-us/rest/api/storageservices/setting-timeouts-for-queue-service-operations>Setting Timeouts for Queue Service Operations.</a>. - * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the analytics logs when storage analytics logging is enabled. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @return a Mono which performs the network request upon subscription. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono clearWithRestResponseAsync(String queueName, Integer timeout, String requestId, Context context) { - return service.clear(queueName, this.client.getUrl(), timeout, this.client.getVersion(), requestId, context); - } - - /** - * The Enqueue operation adds a new message to the back of the message queue. A visibility timeout can also be specified to make the message invisible until the visibility timeout expires. A message must be in a format that can be included in an XML request with UTF-8 encoding. The encoded message can be up to 64 KB in size for versions 2011-08-18 and newer, or 8 KB in size for previous versions. - * - * @param queueName The queue name. - * @param queueMessage A Message object which can be stored in a Queue. + * @param timeout The The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/setting-timeouts-for-queue-service-operations>Setting + * Timeouts for Queue Service Operations.</a>. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. - * @return a Mono which performs the network request upon subscription. + * @throws StorageErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono enqueueWithRestResponseAsync(String queueName, QueueMessage queueMessage, Context context) { - final Integer visibilitytimeout = null; - final Integer messageTimeToLive = null; - final Integer timeout = null; - final String requestId = null; - return service.enqueue(queueName, this.client.getUrl(), queueMessage, visibilitytimeout, messageTimeToLive, timeout, this.client.getVersion(), requestId, context); + public Mono clearWithResponseAsync( + String queueName, Integer timeout, String requestId, Context context) { + final String accept = "application/xml"; + return service.clear( + this.client.getUrl(), queueName, timeout, this.client.getVersion(), requestId, accept, context); } /** - * The Enqueue operation adds a new message to the back of the message queue. A visibility timeout can also be specified to make the message invisible until the visibility timeout expires. A message must be in a format that can be included in an XML request with UTF-8 encoding. The encoded message can be up to 64 KB in size for versions 2011-08-18 and newer, or 8 KB in size for previous versions. + * The Enqueue operation adds a new message to the back of the message queue. A visibility timeout can also be + * specified to make the message invisible until the visibility timeout expires. A message must be in a format that + * can be included in an XML request with UTF-8 encoding. The encoded message can be up to 64 KB in size for + * versions 2011-08-18 and newer, or 8 KB in size for previous versions. * * @param queueName The queue name. * @param queueMessage A Message object which can be stored in a Queue. - * @param visibilitytimeout Optional. If specified, the request must be made using an x-ms-version of 2011-08-18 or later. If not specified, the default value is 0. Specifies the new visibility timeout value, in seconds, relative to server time. The new value must be larger than or equal to 0, and cannot be larger than 7 days. The visibility timeout of a message cannot be set to a value later than the expiry time. visibilitytimeout should be set to a value smaller than the time-to-live value. - * @param messageTimeToLive Optional. Specifies the time-to-live interval for the message, in seconds. Prior to version 2017-07-29, the maximum time-to-live allowed is 7 days. For version 2017-07-29 or later, the maximum time-to-live can be any positive number, as well as -1 indicating that the message does not expire. If this parameter is omitted, the default time-to-live is 7 days. - * @param timeout The The timeout parameter is expressed in seconds. For more information, see <a href="https://docs.microsoft.com/en-us/rest/api/storageservices/setting-timeouts-for-queue-service-operations>Setting Timeouts for Queue Service Operations.</a>. - * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the analytics logs when storage analytics logging is enabled. + * @param visibilitytimeout Optional. If specified, the request must be made using an x-ms-version of 2011-08-18 or + * later. If not specified, the default value is 0. Specifies the new visibility timeout value, in seconds, + * relative to server time. The new value must be larger than or equal to 0, and cannot be larger than 7 days. + * The visibility timeout of a message cannot be set to a value later than the expiry time. visibilitytimeout + * should be set to a value smaller than the time-to-live value. + * @param messageTimeToLive Optional. Specifies the time-to-live interval for the message, in seconds. Prior to + * version 2017-07-29, the maximum time-to-live allowed is 7 days. For version 2017-07-29 or later, the maximum + * time-to-live can be any positive number, as well as -1 indicating that the message does not expire. If this + * parameter is omitted, the default time-to-live is 7 days. + * @param timeout The The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/setting-timeouts-for-queue-service-operations>Setting + * Timeouts for Queue Service Operations.</a>. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. - * @return a Mono which performs the network request upon subscription. + * @throws StorageErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the object returned when calling Put Message on a Queue. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono enqueueWithRestResponseAsync(String queueName, QueueMessage queueMessage, Integer visibilitytimeout, Integer messageTimeToLive, Integer timeout, String requestId, Context context) { - return service.enqueue(queueName, this.client.getUrl(), queueMessage, visibilitytimeout, messageTimeToLive, timeout, this.client.getVersion(), requestId, context); - } - - /** - * The Peek operation retrieves one or more messages from the front of the queue, but does not alter the visibility of the message. - * - * @param queueName The queue name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @return a Mono which performs the network request upon subscription. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono peekWithRestResponseAsync(String queueName, Context context) { - final Integer numberOfMessages = null; - final Integer timeout = null; - final String requestId = null; - final String peekonly = "true"; - return service.peek(queueName, this.client.getUrl(), numberOfMessages, timeout, this.client.getVersion(), requestId, peekonly, context); + public Mono enqueueWithResponseAsync( + String queueName, + QueueMessage queueMessage, + Integer visibilitytimeout, + Integer messageTimeToLive, + Integer timeout, + String requestId, + Context context) { + final String accept = "application/xml"; + return service.enqueue( + this.client.getUrl(), + queueName, + visibilitytimeout, + messageTimeToLive, + timeout, + this.client.getVersion(), + requestId, + queueMessage, + accept, + context); } /** - * The Peek operation retrieves one or more messages from the front of the queue, but does not alter the visibility of the message. + * The Peek operation retrieves one or more messages from the front of the queue, but does not alter the visibility + * of the message. * * @param queueName The queue name. - * @param numberOfMessages Optional. A nonzero integer value that specifies the number of messages to retrieve from the queue, up to a maximum of 32. If fewer are visible, the visible messages are returned. By default, a single message is retrieved from the queue with this operation. - * @param timeout The The timeout parameter is expressed in seconds. For more information, see <a href="https://docs.microsoft.com/en-us/rest/api/storageservices/setting-timeouts-for-queue-service-operations>Setting Timeouts for Queue Service Operations.</a>. - * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the analytics logs when storage analytics logging is enabled. + * @param numberOfMessages Optional. A nonzero integer value that specifies the number of messages to retrieve from + * the queue, up to a maximum of 32. If fewer are visible, the visible messages are returned. By default, a + * single message is retrieved from the queue with this operation. + * @param timeout The The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/setting-timeouts-for-queue-service-operations>Setting + * Timeouts for Queue Service Operations.</a>. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. - * @return a Mono which performs the network request upon subscription. + * @throws StorageErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the object returned when calling Peek Messages on a Queue. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono peekWithRestResponseAsync(String queueName, Integer numberOfMessages, Integer timeout, String requestId, Context context) { + public Mono peekWithResponseAsync( + String queueName, Integer numberOfMessages, Integer timeout, String requestId, Context context) { final String peekonly = "true"; - return service.peek(queueName, this.client.getUrl(), numberOfMessages, timeout, this.client.getVersion(), requestId, peekonly, context); + final String accept = "application/xml"; + return service.peek( + this.client.getUrl(), + peekonly, + queueName, + numberOfMessages, + timeout, + this.client.getVersion(), + requestId, + accept, + context); } } diff --git a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/implementation/QueuesImpl.java b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/implementation/QueuesImpl.java index 0381ae5046ab5..a1733d0793b7a 100644 --- a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/implementation/QueuesImpl.java +++ b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/implementation/QueuesImpl.java @@ -26,267 +26,295 @@ import com.azure.storage.queue.implementation.models.QueuesGetPropertiesResponse; import com.azure.storage.queue.implementation.models.QueuesSetAccessPolicyResponse; import com.azure.storage.queue.implementation.models.QueuesSetMetadataResponse; -import com.azure.storage.queue.models.QueueStorageException; +import com.azure.storage.queue.implementation.models.StorageErrorException; import com.azure.storage.queue.models.QueueSignedIdentifier; import java.util.List; import java.util.Map; import reactor.core.publisher.Mono; -/** - * An instance of this class provides access to all the operations defined in - * Queues. - */ +/** An instance of this class provides access to all the operations defined in Queues. */ public final class QueuesImpl { - /** - * The proxy service used to perform REST calls. - */ - private QueuesService service; + /** The proxy service used to perform REST calls. */ + private final QueuesService service; - /** - * The service client containing this operation class. - */ - private AzureQueueStorageImpl client; + /** The service client containing this operation class. */ + private final AzureQueueStorageImpl client; /** * Initializes an instance of QueuesImpl. * * @param client the instance of the service client containing this operation class. */ - public QueuesImpl(AzureQueueStorageImpl client) { - this.service = RestProxy.create(QueuesService.class, client.getHttpPipeline()); + QueuesImpl(AzureQueueStorageImpl client) { + this.service = RestProxy.create(QueuesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for AzureQueueStorageQueues to - * be used by the proxy service to perform REST calls. + * The interface defining all the services for AzureQueueStorageQueues to be used by the proxy service to perform + * REST calls. */ @Host("{url}") - @ServiceInterface(name = "AzureQueueStorageQueues") - private interface QueuesService { - @Put("{queueName}") + @ServiceInterface(name = "AzureQueueStorageQue") + public interface QueuesService { + @Put("/{queueName}") @ExpectedResponses({201, 204}) - @UnexpectedResponseExceptionType(QueueStorageException.class) - Mono create(@PathParam("queueName") String queueName, @HostParam("url") String url, @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-meta-") Map metadata, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, Context context); + @UnexpectedResponseExceptionType(com.azure.storage.queue.models.QueueStorageException.class) + Mono create( + @HostParam("url") String url, + @PathParam("queueName") String queueName, + @QueryParam("timeout") Integer timeout, + @HeaderParam("x-ms-meta-") Map metadata, + @HeaderParam("x-ms-version") String version, + @HeaderParam("x-ms-client-request-id") String requestId, + @HeaderParam("Accept") String accept, + Context context); - @Delete("{queueName}") + @Delete("/{queueName}") @ExpectedResponses({204}) - @UnexpectedResponseExceptionType(QueueStorageException.class) - Mono delete(@PathParam("queueName") String queueName, @HostParam("url") String url, @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, Context context); + @UnexpectedResponseExceptionType(com.azure.storage.queue.models.QueueStorageException.class) + Mono delete( + @HostParam("url") String url, + @PathParam("queueName") String queueName, + @QueryParam("timeout") Integer timeout, + @HeaderParam("x-ms-version") String version, + @HeaderParam("x-ms-client-request-id") String requestId, + @HeaderParam("Accept") String accept, + Context context); - @Get("{queueName}") + @Get("/{queueName}") @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(QueueStorageException.class) - Mono getProperties(@PathParam("queueName") String queueName, @HostParam("url") String url, @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, @QueryParam("comp") String comp, Context context); + @UnexpectedResponseExceptionType(com.azure.storage.queue.models.QueueStorageException.class) + Mono getProperties( + @HostParam("url") String url, + @QueryParam("comp") String comp, + @PathParam("queueName") String queueName, + @QueryParam("timeout") Integer timeout, + @HeaderParam("x-ms-version") String version, + @HeaderParam("x-ms-client-request-id") String requestId, + @HeaderParam("Accept") String accept, + Context context); - @Put("{queueName}") + @Put("/{queueName}") @ExpectedResponses({204}) - @UnexpectedResponseExceptionType(QueueStorageException.class) - Mono setMetadata(@PathParam("queueName") String queueName, @HostParam("url") String url, @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-meta-") Map metadata, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, @QueryParam("comp") String comp, Context context); + @UnexpectedResponseExceptionType(com.azure.storage.queue.models.QueueStorageException.class) + Mono setMetadata( + @HostParam("url") String url, + @QueryParam("comp") String comp, + @PathParam("queueName") String queueName, + @QueryParam("timeout") Integer timeout, + @HeaderParam("x-ms-meta-") Map metadata, + @HeaderParam("x-ms-version") String version, + @HeaderParam("x-ms-client-request-id") String requestId, + @HeaderParam("Accept") String accept, + Context context); - @Get("{queueName}") + @Get("/{queueName}") @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(QueueStorageException.class) - Mono getAccessPolicy(@PathParam("queueName") String queueName, @HostParam("url") String url, @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, @QueryParam("comp") String comp, Context context); + @UnexpectedResponseExceptionType(com.azure.storage.queue.models.QueueStorageException.class) + Mono getAccessPolicy( + @HostParam("url") String url, + @QueryParam("comp") String comp, + @PathParam("queueName") String queueName, + @QueryParam("timeout") Integer timeout, + @HeaderParam("x-ms-version") String version, + @HeaderParam("x-ms-client-request-id") String requestId, + @HeaderParam("Accept") String accept, + Context context); - @Put("{queueName}") + @Put("/{queueName}") @ExpectedResponses({204}) - @UnexpectedResponseExceptionType(QueueStorageException.class) - Mono setAccessPolicy(@PathParam("queueName") String queueName, @HostParam("url") String url, @BodyParam("application/xml; charset=utf-8") SignedIdentifiersWrapper queueAcl, @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, @QueryParam("comp") String comp, Context context); + @UnexpectedResponseExceptionType(com.azure.storage.queue.models.QueueStorageException.class) + Mono setAccessPolicy( + @HostParam("url") String url, + @QueryParam("comp") String comp, + @PathParam("queueName") String queueName, + @QueryParam("timeout") Integer timeout, + @HeaderParam("x-ms-version") String version, + @HeaderParam("x-ms-client-request-id") String requestId, + @BodyParam("application/xml") SignedIdentifiersWrapper queueAcl, + @HeaderParam("Accept") String accept, + Context context); } /** * creates a new queue under the given account. * * @param queueName The queue name. + * @param timeout The The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/setting-timeouts-for-queue-service-operations>Setting + * Timeouts for Queue Service Operations.</a>. + * @param metadata Optional. Include this parameter to specify that the queue's metadata be returned as part of the + * response body. Note that metadata requested with this parameter must be stored in accordance with the naming + * restrictions imposed by the 2009-09-19 version of the Queue service. Beginning with this version, all + * metadata names must adhere to the naming conventions for C# identifiers. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. - * @return a Mono which performs the network request upon subscription. + * @throws StorageErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono createWithRestResponseAsync(String queueName, Context context) { - final Integer timeout = null; - final Map metadata = null; - final String requestId = null; - return service.create(queueName, this.client.getUrl(), timeout, metadata, this.client.getVersion(), requestId, context); - } - - /** - * creates a new queue under the given account. - * - * @param queueName The queue name. - * @param timeout The The timeout parameter is expressed in seconds. For more information, see <a href="https://docs.microsoft.com/en-us/rest/api/storageservices/setting-timeouts-for-queue-service-operations>Setting Timeouts for Queue Service Operations.</a>. - * @param metadata Optional. Include this parameter to specify that the queue's metadata be returned as part of the response body. Note that metadata requested with this parameter must be stored in accordance with the naming restrictions imposed by the 2009-09-19 version of the Queue service. Beginning with this version, all metadata names must adhere to the naming conventions for C# identifiers. - * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the analytics logs when storage analytics logging is enabled. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @return a Mono which performs the network request upon subscription. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono createWithRestResponseAsync(String queueName, Integer timeout, Map metadata, String requestId, Context context) { - return service.create(queueName, this.client.getUrl(), timeout, metadata, this.client.getVersion(), requestId, context); + public Mono createWithResponseAsync( + String queueName, Integer timeout, Map metadata, String requestId, Context context) { + final String accept = "application/xml"; + return service.create( + this.client.getUrl(), + queueName, + timeout, + metadata, + this.client.getVersion(), + requestId, + accept, + context); } /** * operation permanently deletes the specified queue. * * @param queueName The queue name. + * @param timeout The The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/setting-timeouts-for-queue-service-operations>Setting + * Timeouts for Queue Service Operations.</a>. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. - * @return a Mono which performs the network request upon subscription. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono deleteWithRestResponseAsync(String queueName, Context context) { - final Integer timeout = null; - final String requestId = null; - return service.delete(queueName, this.client.getUrl(), timeout, this.client.getVersion(), requestId, context); - } - - /** - * operation permanently deletes the specified queue. - * - * @param queueName The queue name. - * @param timeout The The timeout parameter is expressed in seconds. For more information, see <a href="https://docs.microsoft.com/en-us/rest/api/storageservices/setting-timeouts-for-queue-service-operations>Setting Timeouts for Queue Service Operations.</a>. - * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the analytics logs when storage analytics logging is enabled. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @return a Mono which performs the network request upon subscription. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono deleteWithRestResponseAsync(String queueName, Integer timeout, String requestId, Context context) { - return service.delete(queueName, this.client.getUrl(), timeout, this.client.getVersion(), requestId, context); - } - - /** - * Retrieves user-defined metadata and queue properties on the specified queue. Metadata is associated with the queue as name-values pairs. - * - * @param queueName The queue name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @return a Mono which performs the network request upon subscription. + * @throws StorageErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getPropertiesWithRestResponseAsync(String queueName, Context context) { - final Integer timeout = null; - final String requestId = null; - final String comp = "metadata"; - return service.getProperties(queueName, this.client.getUrl(), timeout, this.client.getVersion(), requestId, comp, context); + public Mono deleteWithResponseAsync( + String queueName, Integer timeout, String requestId, Context context) { + final String accept = "application/xml"; + return service.delete( + this.client.getUrl(), queueName, timeout, this.client.getVersion(), requestId, accept, context); } /** - * Retrieves user-defined metadata and queue properties on the specified queue. Metadata is associated with the queue as name-values pairs. + * Retrieves user-defined metadata and queue properties on the specified queue. Metadata is associated with the + * queue as name-values pairs. * * @param queueName The queue name. - * @param timeout The The timeout parameter is expressed in seconds. For more information, see <a href="https://docs.microsoft.com/en-us/rest/api/storageservices/setting-timeouts-for-queue-service-operations>Setting Timeouts for Queue Service Operations.</a>. - * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the analytics logs when storage analytics logging is enabled. + * @param timeout The The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/setting-timeouts-for-queue-service-operations>Setting + * Timeouts for Queue Service Operations.</a>. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. - * @return a Mono which performs the network request upon subscription. + * @throws StorageErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getPropertiesWithRestResponseAsync(String queueName, Integer timeout, String requestId, Context context) { + public Mono getPropertiesWithResponseAsync( + String queueName, Integer timeout, String requestId, Context context) { final String comp = "metadata"; - return service.getProperties(queueName, this.client.getUrl(), timeout, this.client.getVersion(), requestId, comp, context); + final String accept = "application/xml"; + return service.getProperties( + this.client.getUrl(), comp, queueName, timeout, this.client.getVersion(), requestId, accept, context); } /** * sets user-defined metadata on the specified queue. Metadata is associated with the queue as name-value pairs. * * @param queueName The queue name. + * @param timeout The The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/setting-timeouts-for-queue-service-operations>Setting + * Timeouts for Queue Service Operations.</a>. + * @param metadata Optional. Include this parameter to specify that the queue's metadata be returned as part of the + * response body. Note that metadata requested with this parameter must be stored in accordance with the naming + * restrictions imposed by the 2009-09-19 version of the Queue service. Beginning with this version, all + * metadata names must adhere to the naming conventions for C# identifiers. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. - * @return a Mono which performs the network request upon subscription. + * @throws StorageErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono setMetadataWithRestResponseAsync(String queueName, Context context) { - final Integer timeout = null; - final Map metadata = null; - final String requestId = null; + public Mono setMetadataWithResponseAsync( + String queueName, Integer timeout, Map metadata, String requestId, Context context) { final String comp = "metadata"; - return service.setMetadata(queueName, this.client.getUrl(), timeout, metadata, this.client.getVersion(), requestId, comp, context); + final String accept = "application/xml"; + return service.setMetadata( + this.client.getUrl(), + comp, + queueName, + timeout, + metadata, + this.client.getVersion(), + requestId, + accept, + context); } /** - * sets user-defined metadata on the specified queue. Metadata is associated with the queue as name-value pairs. - * - * @param queueName The queue name. - * @param timeout The The timeout parameter is expressed in seconds. For more information, see <a href="https://docs.microsoft.com/en-us/rest/api/storageservices/setting-timeouts-for-queue-service-operations>Setting Timeouts for Queue Service Operations.</a>. - * @param metadata Optional. Include this parameter to specify that the queue's metadata be returned as part of the response body. Note that metadata requested with this parameter must be stored in accordance with the naming restrictions imposed by the 2009-09-19 version of the Queue service. Beginning with this version, all metadata names must adhere to the naming conventions for C# identifiers. - * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the analytics logs when storage analytics logging is enabled. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @return a Mono which performs the network request upon subscription. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono setMetadataWithRestResponseAsync(String queueName, Integer timeout, Map metadata, String requestId, Context context) { - final String comp = "metadata"; - return service.setMetadata(queueName, this.client.getUrl(), timeout, metadata, this.client.getVersion(), requestId, comp, context); - } - - /** - * returns details about any stored access policies specified on the queue that may be used with Shared Access Signatures. - * - * @param queueName The queue name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @return a Mono which performs the network request upon subscription. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getAccessPolicyWithRestResponseAsync(String queueName, Context context) { - final Integer timeout = null; - final String requestId = null; - final String comp = "acl"; - return service.getAccessPolicy(queueName, this.client.getUrl(), timeout, this.client.getVersion(), requestId, comp, context); - } - - /** - * returns details about any stored access policies specified on the queue that may be used with Shared Access Signatures. - * - * @param queueName The queue name. - * @param timeout The The timeout parameter is expressed in seconds. For more information, see <a href="https://docs.microsoft.com/en-us/rest/api/storageservices/setting-timeouts-for-queue-service-operations>Setting Timeouts for Queue Service Operations.</a>. - * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the analytics logs when storage analytics logging is enabled. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @return a Mono which performs the network request upon subscription. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getAccessPolicyWithRestResponseAsync(String queueName, Integer timeout, String requestId, Context context) { - final String comp = "acl"; - return service.getAccessPolicy(queueName, this.client.getUrl(), timeout, this.client.getVersion(), requestId, comp, context); - } - - /** - * sets stored access policies for the queue that may be used with Shared Access Signatures. + * returns details about any stored access policies specified on the queue that may be used with Shared Access + * Signatures. * * @param queueName The queue name. + * @param timeout The The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/setting-timeouts-for-queue-service-operations>Setting + * Timeouts for Queue Service Operations.</a>. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. - * @return a Mono which performs the network request upon subscription. + * @throws StorageErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a collection of signed identifiers. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono setAccessPolicyWithRestResponseAsync(String queueName, Context context) { - final Integer timeout = null; - final String requestId = null; + public Mono getAccessPolicyWithResponseAsync( + String queueName, Integer timeout, String requestId, Context context) { final String comp = "acl"; - SignedIdentifiersWrapper queueAclConverted = new SignedIdentifiersWrapper(null); - return service.setAccessPolicy(queueName, this.client.getUrl(), queueAclConverted, timeout, this.client.getVersion(), requestId, comp, context); + final String accept = "application/xml"; + return service.getAccessPolicy( + this.client.getUrl(), comp, queueName, timeout, this.client.getVersion(), requestId, accept, context); } /** * sets stored access policies for the queue that may be used with Shared Access Signatures. * * @param queueName The queue name. + * @param timeout The The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/setting-timeouts-for-queue-service-operations>Setting + * Timeouts for Queue Service Operations.</a>. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. * @param queueAcl the acls for the queue. - * @param timeout The The timeout parameter is expressed in seconds. For more information, see <a href="https://docs.microsoft.com/en-us/rest/api/storageservices/setting-timeouts-for-queue-service-operations>Setting Timeouts for Queue Service Operations.</a>. - * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the analytics logs when storage analytics logging is enabled. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. - * @return a Mono which performs the network request upon subscription. + * @throws StorageErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono setAccessPolicyWithRestResponseAsync(String queueName, List queueAcl, Integer timeout, String requestId, Context context) { + public Mono setAccessPolicyWithResponseAsync( + String queueName, + Integer timeout, + String requestId, + List queueAcl, + Context context) { final String comp = "acl"; + final String accept = "application/xml"; SignedIdentifiersWrapper queueAclConverted = new SignedIdentifiersWrapper(queueAcl); - return service.setAccessPolicy(queueName, this.client.getUrl(), queueAclConverted, timeout, this.client.getVersion(), requestId, comp, context); + return service.setAccessPolicy( + this.client.getUrl(), + comp, + queueName, + timeout, + this.client.getVersion(), + requestId, + queueAclConverted, + accept, + context); } } diff --git a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/implementation/ServicesImpl.java b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/implementation/ServicesImpl.java index 72b82030faac5..0676e0290704b 100644 --- a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/implementation/ServicesImpl.java +++ b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/implementation/ServicesImpl.java @@ -10,213 +10,297 @@ import com.azure.core.annotation.HeaderParam; import com.azure.core.annotation.Host; import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; import com.azure.core.annotation.Put; import com.azure.core.annotation.QueryParam; import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceInterface; import com.azure.core.annotation.ServiceMethod; import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; import com.azure.core.http.rest.RestProxy; import com.azure.core.util.Context; import com.azure.core.util.serializer.CollectionFormat; import com.azure.core.util.serializer.JacksonAdapter; -import com.azure.storage.queue.implementation.models.ListQueuesIncludeType; import com.azure.storage.queue.implementation.models.ServicesGetPropertiesResponse; import com.azure.storage.queue.implementation.models.ServicesGetStatisticsResponse; +import com.azure.storage.queue.implementation.models.ServicesListQueuesSegmentNextResponse; import com.azure.storage.queue.implementation.models.ServicesListQueuesSegmentResponse; import com.azure.storage.queue.implementation.models.ServicesSetPropertiesResponse; -import com.azure.storage.queue.models.QueueStorageException; +import com.azure.storage.queue.implementation.models.StorageErrorException; +import com.azure.storage.queue.models.QueueItem; import com.azure.storage.queue.models.QueueServiceProperties; import java.util.List; import reactor.core.publisher.Mono; -/** - * An instance of this class provides access to all the operations defined in - * Services. - */ +/** An instance of this class provides access to all the operations defined in Services. */ public final class ServicesImpl { - /** - * The proxy service used to perform REST calls. - */ - private ServicesService service; + /** The proxy service used to perform REST calls. */ + private final ServicesService service; - /** - * The service client containing this operation class. - */ - private AzureQueueStorageImpl client; + /** The service client containing this operation class. */ + private final AzureQueueStorageImpl client; /** * Initializes an instance of ServicesImpl. * * @param client the instance of the service client containing this operation class. */ - public ServicesImpl(AzureQueueStorageImpl client) { - this.service = RestProxy.create(ServicesService.class, client.getHttpPipeline()); + ServicesImpl(AzureQueueStorageImpl client) { + this.service = RestProxy.create(ServicesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for AzureQueueStorageServices to - * be used by the proxy service to perform REST calls. + * The interface defining all the services for AzureQueueStorageServices to be used by the proxy service to perform + * REST calls. */ @Host("{url}") - @ServiceInterface(name = "AzureQueueStorageServices") - private interface ServicesService { - @Put("") + @ServiceInterface(name = "AzureQueueStorageSer") + public interface ServicesService { + @Put("/") @ExpectedResponses({202}) - @UnexpectedResponseExceptionType(QueueStorageException.class) - Mono setProperties(@HostParam("url") String url, @BodyParam("application/xml; charset=utf-8") QueueServiceProperties properties, @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, @QueryParam("restype") String restype, @QueryParam("comp") String comp, Context context); + @UnexpectedResponseExceptionType(com.azure.storage.queue.models.QueueStorageException.class) + Mono setProperties( + @HostParam("url") String url, + @QueryParam("restype") String restype, + @QueryParam("comp") String comp, + @QueryParam("timeout") Integer timeout, + @HeaderParam("x-ms-version") String version, + @HeaderParam("x-ms-client-request-id") String requestId, + @BodyParam("application/xml") QueueServiceProperties properties, + @HeaderParam("Accept") String accept, + Context context); - @Get("") + @Get("/") @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(QueueStorageException.class) - Mono getProperties(@HostParam("url") String url, @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, @QueryParam("restype") String restype, @QueryParam("comp") String comp, Context context); + @UnexpectedResponseExceptionType(com.azure.storage.queue.models.QueueStorageException.class) + Mono getProperties( + @HostParam("url") String url, + @QueryParam("restype") String restype, + @QueryParam("comp") String comp, + @QueryParam("timeout") Integer timeout, + @HeaderParam("x-ms-version") String version, + @HeaderParam("x-ms-client-request-id") String requestId, + @HeaderParam("Accept") String accept, + Context context); - @Get("") + @Get("/") @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(QueueStorageException.class) - Mono getStatistics(@HostParam("url") String url, @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, @QueryParam("restype") String restype, @QueryParam("comp") String comp, Context context); + @UnexpectedResponseExceptionType(com.azure.storage.queue.models.QueueStorageException.class) + Mono getStatistics( + @HostParam("url") String url, + @QueryParam("restype") String restype, + @QueryParam("comp") String comp, + @QueryParam("timeout") Integer timeout, + @HeaderParam("x-ms-version") String version, + @HeaderParam("x-ms-client-request-id") String requestId, + @HeaderParam("Accept") String accept, + Context context); - @Get("") + @Get("/") @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(QueueStorageException.class) - Mono listQueuesSegment(@HostParam("url") String url, @QueryParam("prefix") String prefix, @QueryParam("marker") String marker, @QueryParam("maxresults") Integer maxresults, @QueryParam("include") String include, @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, @QueryParam("comp") String comp, Context context); - } + @UnexpectedResponseExceptionType(com.azure.storage.queue.models.QueueStorageException.class) + Mono listQueuesSegment( + @HostParam("url") String url, + @QueryParam("comp") String comp, + @QueryParam("prefix") String prefix, + @QueryParam("marker") String marker, + @QueryParam("maxresults") Integer maxresults, + @QueryParam("include") String include, + @QueryParam("timeout") Integer timeout, + @HeaderParam("x-ms-version") String version, + @HeaderParam("x-ms-client-request-id") String requestId, + @HeaderParam("Accept") String accept, + Context context); - /** - * Sets properties for a storage account's Queue service endpoint, including properties for Storage Analytics and CORS (Cross-Origin Resource Sharing) rules. - * - * @param properties The StorageService properties. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @return a Mono which performs the network request upon subscription. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono setPropertiesWithRestResponseAsync(QueueServiceProperties properties, Context context) { - final Integer timeout = null; - final String requestId = null; - final String restype = "service"; - final String comp = "properties"; - return service.setProperties(this.client.getUrl(), properties, timeout, this.client.getVersion(), requestId, restype, comp, context); + @Get("{nextLink}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(com.azure.storage.queue.models.QueueStorageException.class) + Mono listQueuesSegmentNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("url") String url, + @HeaderParam("x-ms-version") String version, + @HeaderParam("x-ms-client-request-id") String requestId, + @HeaderParam("Accept") String accept, + Context context); } /** - * Sets properties for a storage account's Queue service endpoint, including properties for Storage Analytics and CORS (Cross-Origin Resource Sharing) rules. + * Sets properties for a storage account's Queue service endpoint, including properties for Storage Analytics and + * CORS (Cross-Origin Resource Sharing) rules. * * @param properties The StorageService properties. - * @param timeout The The timeout parameter is expressed in seconds. For more information, see <a href="https://docs.microsoft.com/en-us/rest/api/storageservices/setting-timeouts-for-queue-service-operations>Setting Timeouts for Queue Service Operations.</a>. - * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the analytics logs when storage analytics logging is enabled. + * @param timeout The The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/setting-timeouts-for-queue-service-operations>Setting + * Timeouts for Queue Service Operations.</a>. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. - * @return a Mono which performs the network request upon subscription. + * @throws StorageErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono setPropertiesWithRestResponseAsync(QueueServiceProperties properties, Integer timeout, String requestId, Context context) { + public Mono setPropertiesWithResponseAsync( + QueueServiceProperties properties, Integer timeout, String requestId, Context context) { final String restype = "service"; final String comp = "properties"; - return service.setProperties(this.client.getUrl(), properties, timeout, this.client.getVersion(), requestId, restype, comp, context); + final String accept = "application/xml"; + return service.setProperties( + this.client.getUrl(), + restype, + comp, + timeout, + this.client.getVersion(), + requestId, + properties, + accept, + context); } /** - * gets the properties of a storage account's Queue service, including properties for Storage Analytics and CORS (Cross-Origin Resource Sharing) rules. + * gets the properties of a storage account's Queue service, including properties for Storage Analytics and CORS + * (Cross-Origin Resource Sharing) rules. * + * @param timeout The The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/setting-timeouts-for-queue-service-operations>Setting + * Timeouts for Queue Service Operations.</a>. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. - * @return a Mono which performs the network request upon subscription. + * @throws StorageErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the properties of a storage account's Queue service, including properties for Storage Analytics and CORS + * (Cross-Origin Resource Sharing) rules. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getPropertiesWithRestResponseAsync(Context context) { - final Integer timeout = null; - final String requestId = null; + public Mono getPropertiesWithResponseAsync( + Integer timeout, String requestId, Context context) { final String restype = "service"; final String comp = "properties"; - return service.getProperties(this.client.getUrl(), timeout, this.client.getVersion(), requestId, restype, comp, context); + final String accept = "application/xml"; + return service.getProperties( + this.client.getUrl(), restype, comp, timeout, this.client.getVersion(), requestId, accept, context); } /** - * gets the properties of a storage account's Queue service, including properties for Storage Analytics and CORS (Cross-Origin Resource Sharing) rules. + * Retrieves statistics related to replication for the Queue service. It is only available on the secondary location + * endpoint when read-access geo-redundant replication is enabled for the storage account. * - * @param timeout The The timeout parameter is expressed in seconds. For more information, see <a href="https://docs.microsoft.com/en-us/rest/api/storageservices/setting-timeouts-for-queue-service-operations>Setting Timeouts for Queue Service Operations.</a>. - * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the analytics logs when storage analytics logging is enabled. + * @param timeout The The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/setting-timeouts-for-queue-service-operations>Setting + * Timeouts for Queue Service Operations.</a>. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. - * @return a Mono which performs the network request upon subscription. + * @throws StorageErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return statistics for the storage service. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getPropertiesWithRestResponseAsync(Integer timeout, String requestId, Context context) { - final String restype = "service"; - final String comp = "properties"; - return service.getProperties(this.client.getUrl(), timeout, this.client.getVersion(), requestId, restype, comp, context); - } - - /** - * Retrieves statistics related to replication for the Queue service. It is only available on the secondary location endpoint when read-access geo-redundant replication is enabled for the storage account. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @return a Mono which performs the network request upon subscription. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getStatisticsWithRestResponseAsync(Context context) { - final Integer timeout = null; - final String requestId = null; + public Mono getStatisticsWithResponseAsync( + Integer timeout, String requestId, Context context) { final String restype = "service"; final String comp = "stats"; - return service.getStatistics(this.client.getUrl(), timeout, this.client.getVersion(), requestId, restype, comp, context); - } - - /** - * Retrieves statistics related to replication for the Queue service. It is only available on the secondary location endpoint when read-access geo-redundant replication is enabled for the storage account. - * - * @param timeout The The timeout parameter is expressed in seconds. For more information, see <a href="https://docs.microsoft.com/en-us/rest/api/storageservices/setting-timeouts-for-queue-service-operations>Setting Timeouts for Queue Service Operations.</a>. - * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the analytics logs when storage analytics logging is enabled. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @return a Mono which performs the network request upon subscription. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getStatisticsWithRestResponseAsync(Integer timeout, String requestId, Context context) { - final String restype = "service"; - final String comp = "stats"; - return service.getStatistics(this.client.getUrl(), timeout, this.client.getVersion(), requestId, restype, comp, context); + final String accept = "application/xml"; + return service.getStatistics( + this.client.getUrl(), restype, comp, timeout, this.client.getVersion(), requestId, accept, context); } /** * The List Queues Segment operation returns a list of the queues under the specified account. * + * @param prefix Filters the results to return only queues whose name begins with the specified prefix. + * @param marker A string value that identifies the portion of the list of queues to be returned with the next + * listing operation. The operation returns the NextMarker value within the response body if the listing + * operation did not return all queues remaining to be listed with the current page. The NextMarker value can be + * used as the value for the marker parameter in a subsequent call to request the next page of list items. The + * marker value is opaque to the client. + * @param maxresults Specifies the maximum number of queues to return. If the request does not specify maxresults, + * or specifies a value greater than 5000, the server will return up to 5000 items. Note that if the listing + * operation crosses a partition boundary, then the service will return a continuation token for retrieving the + * remainder of the results. For this reason, it is possible that the service will return fewer results than + * specified by maxresults, or than the default of 5000. + * @param include Include this parameter to specify that the queues's metadata be returned as part of the response + * body. + * @param timeout The The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/setting-timeouts-for-queue-service-operations>Setting + * Timeouts for Queue Service Operations.</a>. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. - * @return a Mono which performs the network request upon subscription. + * @throws StorageErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the object returned when calling List Queues on a Queue Service. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono listQueuesSegmentWithRestResponseAsync(Context context) { - final String prefix = null; - final String marker = null; - final Integer maxresults = null; - final Integer timeout = null; - final String requestId = null; + public Mono> listQueuesSegmentSinglePageAsync( + String prefix, + String marker, + Integer maxresults, + List include, + Integer timeout, + String requestId, + Context context) { final String comp = "list"; - String includeConverted = null; - return service.listQueuesSegment(this.client.getUrl(), prefix, marker, maxresults, includeConverted, timeout, this.client.getVersion(), requestId, comp, context); + final String accept = "application/xml"; + String includeConverted = + JacksonAdapter.createDefaultSerializerAdapter().serializeList(include, CollectionFormat.CSV); + return service.listQueuesSegment( + this.client.getUrl(), + comp, + prefix, + marker, + maxresults, + includeConverted, + timeout, + this.client.getVersion(), + requestId, + accept, + context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().getQueueItems(), + res.getValue().getNextMarker(), + res.getDeserializedHeaders())); } /** - * The List Queues Segment operation returns a list of the queues under the specified account. + * Get the next page of items. * - * @param prefix Filters the results to return only queues whose name begins with the specified prefix. - * @param marker A string value that identifies the portion of the list of queues to be returned with the next listing operation. The operation returns the NextMarker value within the response body if the listing operation did not return all queues remaining to be listed with the current page. The NextMarker value can be used as the value for the marker parameter in a subsequent call to request the next page of list items. The marker value is opaque to the client. - * @param maxresults Specifies the maximum number of queues to return. If the request does not specify maxresults, or specifies a value greater than 5000, the server will return up to 5000 items. Note that if the listing operation crosses a partition boundary, then the service will return a continuation token for retrieving the remainder of the results. For this reason, it is possible that the service will return fewer results than specified by maxresults, or than the default of 5000. - * @param include Include this parameter to specify that the queues's metadata be returned as part of the response body. - * @param timeout The The timeout parameter is expressed in seconds. For more information, see <a href="https://docs.microsoft.com/en-us/rest/api/storageservices/setting-timeouts-for-queue-service-operations>Setting Timeouts for Queue Service Operations.</a>. - * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the analytics logs when storage analytics logging is enabled. + * @param nextLink The nextLink parameter. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. - * @return a Mono which performs the network request upon subscription. + * @throws StorageErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the object returned when calling List Queues on a Queue Service. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono listQueuesSegmentWithRestResponseAsync(String prefix, String marker, Integer maxresults, List include, Integer timeout, String requestId, Context context) { - final String comp = "list"; - String includeConverted = JacksonAdapter.createDefaultSerializerAdapter().serializeList(include, CollectionFormat.CSV); - return service.listQueuesSegment(this.client.getUrl(), prefix, marker, maxresults, includeConverted, timeout, this.client.getVersion(), requestId, comp, context); + public Mono> listQueuesSegmentNextSinglePageAsync( + String nextLink, String requestId, Context context) { + final String accept = "application/xml"; + return service.listQueuesSegmentNext( + nextLink, this.client.getUrl(), this.client.getVersion(), requestId, accept, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().getQueueItems(), + res.getValue().getNextMarker(), + res.getDeserializedHeaders())); } } diff --git a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/implementation/SignedIdentifiersWrapper.java b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/implementation/SignedIdentifiersWrapper.java index cbae94c32e33c..a7eb35d6de3a3 100644 --- a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/implementation/SignedIdentifiersWrapper.java +++ b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/implementation/SignedIdentifiersWrapper.java @@ -11,9 +11,7 @@ import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.util.List; -/** - * A wrapper around List<QueueSignedIdentifier> which provides top-level metadata for serialization. - */ +/** A wrapper around List<QueueSignedIdentifier> which provides top-level metadata for serialization. */ @JacksonXmlRootElement(localName = "SignedIdentifiers") public final class SignedIdentifiersWrapper { @JacksonXmlProperty(localName = "SignedIdentifier") diff --git a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/implementation/models/ListQueuesIncludeType.java b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/implementation/models/ListQueuesIncludeType.java deleted file mode 100644 index 03ee304229d85..0000000000000 --- a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/implementation/models/ListQueuesIncludeType.java +++ /dev/null @@ -1,50 +0,0 @@ -// 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.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** - * Defines values for ListQueuesIncludeType. - */ -public enum ListQueuesIncludeType { - /** - * Enum value metadata. - */ - METADATA("metadata"); - - /** - * The actual serialized value for a ListQueuesIncludeType instance. - */ - private final String value; - - ListQueuesIncludeType(String value) { - this.value = value; - } - - /** - * Parses a serialized value to a ListQueuesIncludeType instance. - * - * @param value the serialized value to parse. - * @return the parsed ListQueuesIncludeType object, or null if unable to parse. - */ - @JsonCreator - public static ListQueuesIncludeType fromString(String value) { - ListQueuesIncludeType[] items = ListQueuesIncludeType.values(); - for (ListQueuesIncludeType item : items) { - if (item.toString().equalsIgnoreCase(value)) { - return item; - } - } - return null; - } - - @JsonValue - @Override - public String toString() { - return this.value; - } -} diff --git a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/implementation/models/ListQueuesSegmentResponse.java b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/implementation/models/ListQueuesSegmentResponse.java index c49facbaf8c9d..1d41b55e56a4f 100644 --- a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/implementation/models/ListQueuesSegmentResponse.java +++ b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/implementation/models/ListQueuesSegmentResponse.java @@ -13,32 +13,30 @@ import java.util.ArrayList; import java.util.List; -/** - * The object returned when calling List Queues on a Queue Service. - */ +/** The object returned when calling List Queues on a Queue Service. */ @JacksonXmlRootElement(localName = "EnumerationResults") @Fluent public final class ListQueuesSegmentResponse { /* - * The serviceEndpoint property. + * The ServiceEndpoint property. */ @JacksonXmlProperty(localName = "ServiceEndpoint", isAttribute = true) private String serviceEndpoint; /* - * The prefix property. + * The Prefix property. */ @JsonProperty(value = "Prefix", required = true) private String prefix; /* - * The marker property. + * The Marker property. */ @JsonProperty(value = "Marker") private String marker; /* - * The maxResults property. + * The MaxResults property. */ @JsonProperty(value = "MaxResults", required = true) private int maxResults; @@ -54,19 +52,19 @@ private QueuesWrapper(@JacksonXmlProperty(localName = "Queue") List i } /* - * The queueItems property. + * The QueueItems property. */ @JsonProperty(value = "Queues") private QueuesWrapper queueItems; /* - * The nextMarker property. + * The NextMarker property. */ @JsonProperty(value = "NextMarker", required = true) private String nextMarker; /** - * Get the serviceEndpoint property: The serviceEndpoint property. + * Get the serviceEndpoint property: The ServiceEndpoint property. * * @return the serviceEndpoint value. */ @@ -75,7 +73,7 @@ public String getServiceEndpoint() { } /** - * Set the serviceEndpoint property: The serviceEndpoint property. + * Set the serviceEndpoint property: The ServiceEndpoint property. * * @param serviceEndpoint the serviceEndpoint value to set. * @return the ListQueuesSegmentResponse object itself. @@ -86,7 +84,7 @@ public ListQueuesSegmentResponse setServiceEndpoint(String serviceEndpoint) { } /** - * Get the prefix property: The prefix property. + * Get the prefix property: The Prefix property. * * @return the prefix value. */ @@ -95,7 +93,7 @@ public String getPrefix() { } /** - * Set the prefix property: The prefix property. + * Set the prefix property: The Prefix property. * * @param prefix the prefix value to set. * @return the ListQueuesSegmentResponse object itself. @@ -106,7 +104,7 @@ public ListQueuesSegmentResponse setPrefix(String prefix) { } /** - * Get the marker property: The marker property. + * Get the marker property: The Marker property. * * @return the marker value. */ @@ -115,7 +113,7 @@ public String getMarker() { } /** - * Set the marker property: The marker property. + * Set the marker property: The Marker property. * * @param marker the marker value to set. * @return the ListQueuesSegmentResponse object itself. @@ -126,7 +124,7 @@ public ListQueuesSegmentResponse setMarker(String marker) { } /** - * Get the maxResults property: The maxResults property. + * Get the maxResults property: The MaxResults property. * * @return the maxResults value. */ @@ -135,7 +133,7 @@ public int getMaxResults() { } /** - * Set the maxResults property: The maxResults property. + * Set the maxResults property: The MaxResults property. * * @param maxResults the maxResults value to set. * @return the ListQueuesSegmentResponse object itself. @@ -146,7 +144,7 @@ public ListQueuesSegmentResponse setMaxResults(int maxResults) { } /** - * Get the queueItems property: The queueItems property. + * Get the queueItems property: The QueueItems property. * * @return the queueItems value. */ @@ -158,7 +156,7 @@ public List getQueueItems() { } /** - * Set the queueItems property: The queueItems property. + * Set the queueItems property: The QueueItems property. * * @param queueItems the queueItems value to set. * @return the ListQueuesSegmentResponse object itself. @@ -169,7 +167,7 @@ public ListQueuesSegmentResponse setQueueItems(List queueItems) { } /** - * Get the nextMarker property: The nextMarker property. + * Get the nextMarker property: The NextMarker property. * * @return the nextMarker value. */ @@ -178,7 +176,7 @@ public String getNextMarker() { } /** - * Set the nextMarker property: The nextMarker property. + * Set the nextMarker property: The NextMarker property. * * @param nextMarker the nextMarker value to set. * @return the ListQueuesSegmentResponse object itself. diff --git a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/implementation/models/MessageIdDeleteHeaders.java b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/implementation/models/MessageIdDeleteHeaders.java deleted file mode 100644 index 2127a741f3579..0000000000000 --- a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/implementation/models/MessageIdDeleteHeaders.java +++ /dev/null @@ -1,141 +0,0 @@ -// 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.util.DateTimeRfc1123; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; -import java.time.OffsetDateTime; - -/** - * Defines headers for Delete operation. - */ -@JacksonXmlRootElement(localName = "MessageId-Delete-Headers") -@Fluent -public final class MessageIdDeleteHeaders { - /* - * 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 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 MessageIdDeleteHeaders object itself. - */ - public MessageIdDeleteHeaders 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 MessageIdDeleteHeaders object itself. - */ - public MessageIdDeleteHeaders 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 MessageIdDeleteHeaders object itself. - */ - public MessageIdDeleteHeaders 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 MessageIdDeleteHeaders object itself. - */ - public MessageIdDeleteHeaders setErrorCode(String errorCode) { - this.errorCode = errorCode; - return this; - } -} diff --git a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/implementation/models/MessageIdUpdateHeaders.java b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/implementation/models/MessageIdUpdateHeaders.java deleted file mode 100644 index 870837f46d8a5..0000000000000 --- a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/implementation/models/MessageIdUpdateHeaders.java +++ /dev/null @@ -1,203 +0,0 @@ -// 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.util.DateTimeRfc1123; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; -import java.time.OffsetDateTime; - -/** - * Defines headers for Update operation. - */ -@JacksonXmlRootElement(localName = "MessageId-Update-Headers") -@Fluent -public final class MessageIdUpdateHeaders { - /* - * 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 pop receipt of the queue message. - */ - @JsonProperty(value = "x-ms-popreceipt") - private String popReceipt; - - /* - * A UTC date/time value that represents when the message will be visible - * on the queue. - */ - @JsonProperty(value = "x-ms-time-next-visible") - private DateTimeRfc1123 timeNextVisible; - - /* - * The errorCode property. - */ - @JsonProperty(value = "x-ms-error-code") - private String errorCode; - - /** - * 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 MessageIdUpdateHeaders object itself. - */ - public MessageIdUpdateHeaders 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 MessageIdUpdateHeaders object itself. - */ - public MessageIdUpdateHeaders 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 MessageIdUpdateHeaders object itself. - */ - public MessageIdUpdateHeaders setDateProperty(OffsetDateTime dateProperty) { - if (dateProperty == null) { - this.dateProperty = null; - } else { - this.dateProperty = new DateTimeRfc1123(dateProperty); - } - return this; - } - - /** - * Get the popReceipt property: The pop receipt of the queue message. - * - * @return the popReceipt value. - */ - public String getPopReceipt() { - return this.popReceipt; - } - - /** - * Set the popReceipt property: The pop receipt of the queue message. - * - * @param popReceipt the popReceipt value to set. - * @return the MessageIdUpdateHeaders object itself. - */ - public MessageIdUpdateHeaders setPopReceipt(String popReceipt) { - this.popReceipt = popReceipt; - return this; - } - - /** - * Get the timeNextVisible property: A UTC date/time value that represents - * when the message will be visible on the queue. - * - * @return the timeNextVisible value. - */ - public OffsetDateTime getTimeNextVisible() { - if (this.timeNextVisible == null) { - return null; - } - return this.timeNextVisible.getDateTime(); - } - - /** - * Set the timeNextVisible property: A UTC date/time value that represents - * when the message will be visible on the queue. - * - * @param timeNextVisible the timeNextVisible value to set. - * @return the MessageIdUpdateHeaders object itself. - */ - public MessageIdUpdateHeaders setTimeNextVisible(OffsetDateTime timeNextVisible) { - if (timeNextVisible == null) { - this.timeNextVisible = null; - } else { - this.timeNextVisible = new DateTimeRfc1123(timeNextVisible); - } - 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 MessageIdUpdateHeaders object itself. - */ - public MessageIdUpdateHeaders setErrorCode(String errorCode) { - this.errorCode = errorCode; - return this; - } -} diff --git a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/implementation/models/MessageIdsDeleteHeaders.java b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/implementation/models/MessageIdsDeleteHeaders.java new file mode 100644 index 0000000000000..fb84a3c83ebf3 --- /dev/null +++ b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/implementation/models/MessageIdsDeleteHeaders.java @@ -0,0 +1,101 @@ +// 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.util.DateTimeRfc1123; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; +import java.time.OffsetDateTime; + +/** The MessageIdsDeleteHeaders model. */ +@JacksonXmlRootElement(localName = "null") +@Fluent +public final class MessageIdsDeleteHeaders { + /* + * The x-ms-version property. + */ + @JsonProperty(value = "x-ms-version") + private String xMsVersion; + + /* + * The x-ms-request-id property. + */ + @JsonProperty(value = "x-ms-request-id") + private String xMsRequestId; + + /* + * The Date property. + */ + @JsonProperty(value = "Date") + private DateTimeRfc1123 dateProperty; + + /** + * Get the xMsVersion property: The x-ms-version property. + * + * @return the xMsVersion value. + */ + public String getXMsVersion() { + return this.xMsVersion; + } + + /** + * Set the xMsVersion property: The x-ms-version property. + * + * @param xMsVersion the xMsVersion value to set. + * @return the MessageIdsDeleteHeaders object itself. + */ + public MessageIdsDeleteHeaders setXMsVersion(String xMsVersion) { + this.xMsVersion = xMsVersion; + return this; + } + + /** + * Get the xMsRequestId property: The x-ms-request-id property. + * + * @return the xMsRequestId value. + */ + public String getXMsRequestId() { + return this.xMsRequestId; + } + + /** + * Set the xMsRequestId property: The x-ms-request-id property. + * + * @param xMsRequestId the xMsRequestId value to set. + * @return the MessageIdsDeleteHeaders object itself. + */ + public MessageIdsDeleteHeaders setXMsRequestId(String xMsRequestId) { + this.xMsRequestId = xMsRequestId; + return this; + } + + /** + * Get the dateProperty property: The Date property. + * + * @return the dateProperty value. + */ + public OffsetDateTime getDateProperty() { + if (this.dateProperty == null) { + return null; + } + return this.dateProperty.getDateTime(); + } + + /** + * Set the dateProperty property: The Date property. + * + * @param dateProperty the dateProperty value to set. + * @return the MessageIdsDeleteHeaders object itself. + */ + public MessageIdsDeleteHeaders setDateProperty(OffsetDateTime dateProperty) { + if (dateProperty == null) { + this.dateProperty = null; + } else { + this.dateProperty = new DateTimeRfc1123(dateProperty); + } + return this; + } +} diff --git a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/implementation/models/MessageIdsDeleteResponse.java b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/implementation/models/MessageIdsDeleteResponse.java index 555cdf8a4f735..2849783631cb5 100644 --- a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/implementation/models/MessageIdsDeleteResponse.java +++ b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/implementation/models/MessageIdsDeleteResponse.java @@ -8,10 +8,8 @@ import com.azure.core.http.HttpRequest; import com.azure.core.http.rest.ResponseBase; -/** - * Contains all response data for the delete operation. - */ -public final class MessageIdsDeleteResponse extends ResponseBase { +/** Contains all response data for the delete operation. */ +public final class MessageIdsDeleteResponse extends ResponseBase { /** * Creates an instance of MessageIdsDeleteResponse. * @@ -21,7 +19,8 @@ public final class MessageIdsDeleteResponse extends ResponseBase { +/** Contains all response data for the update operation. */ +public final class MessageIdsUpdateResponse extends ResponseBase { /** * Creates an instance of MessageIdsUpdateResponse. * @@ -21,7 +19,8 @@ public final class MessageIdsUpdateResponse extends ResponseBase { /** * Creates an instance of MessagesClearResponse. @@ -21,7 +19,8 @@ public final class MessagesClearResponse extends ResponseBase> { /** * Creates an instance of MessagesDequeueResponse. @@ -23,13 +21,16 @@ public final class MessagesDequeueResponse extends ResponseBase value, MessagesDequeueHeaders headers) { + public MessagesDequeueResponse( + HttpRequest request, + int statusCode, + HttpHeaders rawHeaders, + List value, + MessagesDequeueHeaders headers) { super(request, statusCode, rawHeaders, value, headers); } - /** - * @return the deserialized response body. - */ + /** @return the deserialized response body. */ @Override public List getValue() { return super.getValue(); diff --git a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/implementation/models/MessagesEnqueueHeaders.java b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/implementation/models/MessagesEnqueueHeaders.java index 3d3586bf879d0..d4a2e017206b1 100644 --- a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/implementation/models/MessagesEnqueueHeaders.java +++ b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/implementation/models/MessagesEnqueueHeaders.java @@ -10,89 +10,70 @@ import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; -/** - * Defines headers for Enqueue operation. - */ -@JacksonXmlRootElement(localName = "Messages-Enqueue-Headers") +/** The MessagesEnqueueHeaders model. */ +@JacksonXmlRootElement(localName = "null") @Fluent public final class MessagesEnqueueHeaders { /* - * This header uniquely identifies the request that was made and can be - * used for troubleshooting the request. + * The x-ms-version property. */ - @JsonProperty(value = "x-ms-request-id") - private String requestId; + @JsonProperty(value = "x-ms-version") + private String xMsVersion; /* - * 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. + * The x-ms-request-id property. */ - @JsonProperty(value = "x-ms-version") - private String version; + @JsonProperty(value = "x-ms-request-id") + private String xMsRequestId; /* - * UTC date/time value generated by the service that indicates the time at - * which the response was initiated + * The Date property. */ @JsonProperty(value = "Date") private DateTimeRfc1123 dateProperty; - /* - * The errorCode property. - */ - @JsonProperty(value = "x-ms-error-code") - private String errorCode; - /** - * Get the requestId property: This header uniquely identifies the request - * that was made and can be used for troubleshooting the request. + * Get the xMsVersion property: The x-ms-version property. * - * @return the requestId value. + * @return the xMsVersion value. */ - public String getRequestId() { - return this.requestId; + public String getXMsVersion() { + return this.xMsVersion; } /** - * Set the requestId property: This header uniquely identifies the request - * that was made and can be used for troubleshooting the request. + * Set the xMsVersion property: The x-ms-version property. * - * @param requestId the requestId value to set. + * @param xMsVersion the xMsVersion value to set. * @return the MessagesEnqueueHeaders object itself. */ - public MessagesEnqueueHeaders setRequestId(String requestId) { - this.requestId = requestId; + public MessagesEnqueueHeaders setXMsVersion(String xMsVersion) { + this.xMsVersion = xMsVersion; 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. + * Get the xMsRequestId property: The x-ms-request-id property. * - * @return the version value. + * @return the xMsRequestId value. */ - public String getVersion() { - return this.version; + public String getXMsRequestId() { + return this.xMsRequestId; } /** - * 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. + * Set the xMsRequestId property: The x-ms-request-id property. * - * @param version the version value to set. + * @param xMsRequestId the xMsRequestId value to set. * @return the MessagesEnqueueHeaders object itself. */ - public MessagesEnqueueHeaders setVersion(String version) { - this.version = version; + public MessagesEnqueueHeaders setXMsRequestId(String xMsRequestId) { + this.xMsRequestId = xMsRequestId; return this; } /** - * Get the dateProperty property: UTC date/time value generated by the - * service that indicates the time at which the response was initiated. + * Get the dateProperty property: The Date property. * * @return the dateProperty value. */ @@ -104,8 +85,7 @@ public OffsetDateTime getDateProperty() { } /** - * Set the dateProperty property: UTC date/time value generated by the - * service that indicates the time at which the response was initiated. + * Set the dateProperty property: The Date property. * * @param dateProperty the dateProperty value to set. * @return the MessagesEnqueueHeaders object itself. @@ -118,24 +98,4 @@ public MessagesEnqueueHeaders setDateProperty(OffsetDateTime 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 MessagesEnqueueHeaders object itself. - */ - public MessagesEnqueueHeaders setErrorCode(String errorCode) { - this.errorCode = errorCode; - return this; - } } diff --git a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/implementation/models/MessagesEnqueueResponse.java b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/implementation/models/MessagesEnqueueResponse.java index ecd5a7c4a8024..95474c6a72b88 100644 --- a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/implementation/models/MessagesEnqueueResponse.java +++ b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/implementation/models/MessagesEnqueueResponse.java @@ -10,9 +10,7 @@ import com.azure.storage.queue.models.SendMessageResult; import java.util.List; -/** - * Contains all response data for the enqueue operation. - */ +/** Contains all response data for the enqueue operation. */ public final class MessagesEnqueueResponse extends ResponseBase> { /** * Creates an instance of MessagesEnqueueResponse. @@ -23,13 +21,16 @@ public final class MessagesEnqueueResponse extends ResponseBase value, MessagesEnqueueHeaders headers) { + public MessagesEnqueueResponse( + HttpRequest request, + int statusCode, + HttpHeaders rawHeaders, + List value, + MessagesEnqueueHeaders headers) { super(request, statusCode, rawHeaders, value, headers); } - /** - * @return the deserialized response body. - */ + /** @return the deserialized response body. */ @Override public List getValue() { return super.getValue(); diff --git a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/implementation/models/MessagesPeekHeaders.java b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/implementation/models/MessagesPeekHeaders.java index b358569908a3e..47714ed09d35b 100644 --- a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/implementation/models/MessagesPeekHeaders.java +++ b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/implementation/models/MessagesPeekHeaders.java @@ -10,89 +10,70 @@ import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; -/** - * Defines headers for Peek operation. - */ -@JacksonXmlRootElement(localName = "Messages-Peek-Headers") +/** The MessagesPeekHeaders model. */ +@JacksonXmlRootElement(localName = "null") @Fluent public final class MessagesPeekHeaders { /* - * This header uniquely identifies the request that was made and can be - * used for troubleshooting the request. + * The x-ms-version property. */ - @JsonProperty(value = "x-ms-request-id") - private String requestId; + @JsonProperty(value = "x-ms-version") + private String xMsVersion; /* - * 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. + * The x-ms-request-id property. */ - @JsonProperty(value = "x-ms-version") - private String version; + @JsonProperty(value = "x-ms-request-id") + private String xMsRequestId; /* - * UTC date/time value generated by the service that indicates the time at - * which the response was initiated + * The Date property. */ @JsonProperty(value = "Date") private DateTimeRfc1123 dateProperty; - /* - * The errorCode property. - */ - @JsonProperty(value = "x-ms-error-code") - private String errorCode; - /** - * Get the requestId property: This header uniquely identifies the request - * that was made and can be used for troubleshooting the request. + * Get the xMsVersion property: The x-ms-version property. * - * @return the requestId value. + * @return the xMsVersion value. */ - public String getRequestId() { - return this.requestId; + public String getXMsVersion() { + return this.xMsVersion; } /** - * Set the requestId property: This header uniquely identifies the request - * that was made and can be used for troubleshooting the request. + * Set the xMsVersion property: The x-ms-version property. * - * @param requestId the requestId value to set. + * @param xMsVersion the xMsVersion value to set. * @return the MessagesPeekHeaders object itself. */ - public MessagesPeekHeaders setRequestId(String requestId) { - this.requestId = requestId; + public MessagesPeekHeaders setXMsVersion(String xMsVersion) { + this.xMsVersion = xMsVersion; 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. + * Get the xMsRequestId property: The x-ms-request-id property. * - * @return the version value. + * @return the xMsRequestId value. */ - public String getVersion() { - return this.version; + public String getXMsRequestId() { + return this.xMsRequestId; } /** - * 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. + * Set the xMsRequestId property: The x-ms-request-id property. * - * @param version the version value to set. + * @param xMsRequestId the xMsRequestId value to set. * @return the MessagesPeekHeaders object itself. */ - public MessagesPeekHeaders setVersion(String version) { - this.version = version; + public MessagesPeekHeaders setXMsRequestId(String xMsRequestId) { + this.xMsRequestId = xMsRequestId; return this; } /** - * Get the dateProperty property: UTC date/time value generated by the - * service that indicates the time at which the response was initiated. + * Get the dateProperty property: The Date property. * * @return the dateProperty value. */ @@ -104,8 +85,7 @@ public OffsetDateTime getDateProperty() { } /** - * Set the dateProperty property: UTC date/time value generated by the - * service that indicates the time at which the response was initiated. + * Set the dateProperty property: The Date property. * * @param dateProperty the dateProperty value to set. * @return the MessagesPeekHeaders object itself. @@ -118,24 +98,4 @@ public MessagesPeekHeaders setDateProperty(OffsetDateTime 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 MessagesPeekHeaders object itself. - */ - public MessagesPeekHeaders setErrorCode(String errorCode) { - this.errorCode = errorCode; - return this; - } } diff --git a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/implementation/models/MessagesPeekResponse.java b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/implementation/models/MessagesPeekResponse.java index 329a1213572f8..045ed52a9f5bf 100644 --- a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/implementation/models/MessagesPeekResponse.java +++ b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/implementation/models/MessagesPeekResponse.java @@ -10,9 +10,7 @@ import com.azure.storage.queue.models.PeekedMessageItem; import java.util.List; -/** - * Contains all response data for the peek operation. - */ +/** Contains all response data for the peek operation. */ public final class MessagesPeekResponse extends ResponseBase> { /** * Creates an instance of MessagesPeekResponse. @@ -23,13 +21,16 @@ public final class MessagesPeekResponse extends ResponseBase value, MessagesPeekHeaders headers) { + public MessagesPeekResponse( + HttpRequest request, + int statusCode, + HttpHeaders rawHeaders, + List value, + MessagesPeekHeaders headers) { super(request, statusCode, rawHeaders, value, headers); } - /** - * @return the deserialized response body. - */ + /** @return the deserialized response body. */ @Override public List getValue() { return super.getValue(); diff --git a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/implementation/models/QueueCreateHeaders.java b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/implementation/models/QueueCreateHeaders.java deleted file mode 100644 index 86794b062c417..0000000000000 --- a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/implementation/models/QueueCreateHeaders.java +++ /dev/null @@ -1,141 +0,0 @@ -// 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.util.DateTimeRfc1123; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; -import java.time.OffsetDateTime; - -/** - * Defines headers for Create operation. - */ -@JacksonXmlRootElement(localName = "Queue-Create-Headers") -@Fluent -public final class QueueCreateHeaders { - /* - * 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 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 QueueCreateHeaders object itself. - */ - public QueueCreateHeaders 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 QueueCreateHeaders object itself. - */ - public QueueCreateHeaders 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 QueueCreateHeaders object itself. - */ - public QueueCreateHeaders 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 QueueCreateHeaders object itself. - */ - public QueueCreateHeaders setErrorCode(String errorCode) { - this.errorCode = errorCode; - return this; - } -} diff --git a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/implementation/models/QueueDeleteHeaders.java b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/implementation/models/QueueDeleteHeaders.java deleted file mode 100644 index 076ee45443e16..0000000000000 --- a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/implementation/models/QueueDeleteHeaders.java +++ /dev/null @@ -1,141 +0,0 @@ -// 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.util.DateTimeRfc1123; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; -import java.time.OffsetDateTime; - -/** - * Defines headers for Delete operation. - */ -@JacksonXmlRootElement(localName = "Queue-Delete-Headers") -@Fluent -public final class QueueDeleteHeaders { - /* - * 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 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 QueueDeleteHeaders object itself. - */ - public QueueDeleteHeaders 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 QueueDeleteHeaders object itself. - */ - public QueueDeleteHeaders 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 QueueDeleteHeaders object itself. - */ - public QueueDeleteHeaders 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 QueueDeleteHeaders object itself. - */ - public QueueDeleteHeaders setErrorCode(String errorCode) { - this.errorCode = errorCode; - return this; - } -} diff --git a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/implementation/models/QueueGetAccessPolicyHeaders.java b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/implementation/models/QueueGetAccessPolicyHeaders.java deleted file mode 100644 index 63028bb81d2f5..0000000000000 --- a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/implementation/models/QueueGetAccessPolicyHeaders.java +++ /dev/null @@ -1,141 +0,0 @@ -// 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.util.DateTimeRfc1123; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; -import java.time.OffsetDateTime; - -/** - * Defines headers for GetAccessPolicy operation. - */ -@JacksonXmlRootElement(localName = "Queue-GetAccessPolicy-Headers") -@Fluent -public final class QueueGetAccessPolicyHeaders { - /* - * 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 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 QueueGetAccessPolicyHeaders object itself. - */ - public QueueGetAccessPolicyHeaders 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 QueueGetAccessPolicyHeaders object itself. - */ - public QueueGetAccessPolicyHeaders 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 QueueGetAccessPolicyHeaders object itself. - */ - public QueueGetAccessPolicyHeaders 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 QueueGetAccessPolicyHeaders object itself. - */ - public QueueGetAccessPolicyHeaders setErrorCode(String errorCode) { - this.errorCode = errorCode; - return this; - } -} diff --git a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/implementation/models/QueueGetPropertiesHeaders.java b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/implementation/models/QueueGetPropertiesHeaders.java deleted file mode 100644 index 4a3cbdff0241b..0000000000000 --- a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/implementation/models/QueueGetPropertiesHeaders.java +++ /dev/null @@ -1,202 +0,0 @@ -// 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 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 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 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; - } -} diff --git a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/implementation/models/QueueMessage.java b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/implementation/models/QueueMessage.java index f69fb44ffc2b5..0b58ba367ee38 100644 --- a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/implementation/models/QueueMessage.java +++ b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/implementation/models/QueueMessage.java @@ -8,9 +8,7 @@ import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; -/** - * A Message object which can be stored in a Queue. - */ +/** A Message object which can be stored in a Queue. */ @JacksonXmlRootElement(localName = "QueueMessage") @Fluent public final class QueueMessage { diff --git a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/implementation/models/QueueSetAccessPolicyHeaders.java b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/implementation/models/QueueSetAccessPolicyHeaders.java deleted file mode 100644 index 2aa3b8f2ee017..0000000000000 --- a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/implementation/models/QueueSetAccessPolicyHeaders.java +++ /dev/null @@ -1,141 +0,0 @@ -// 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.util.DateTimeRfc1123; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; -import java.time.OffsetDateTime; - -/** - * Defines headers for SetAccessPolicy operation. - */ -@JacksonXmlRootElement(localName = "Queue-SetAccessPolicy-Headers") -@Fluent -public final class QueueSetAccessPolicyHeaders { - /* - * 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 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 QueueSetAccessPolicyHeaders object itself. - */ - public QueueSetAccessPolicyHeaders 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 QueueSetAccessPolicyHeaders object itself. - */ - public QueueSetAccessPolicyHeaders 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 QueueSetAccessPolicyHeaders object itself. - */ - public QueueSetAccessPolicyHeaders 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 QueueSetAccessPolicyHeaders object itself. - */ - public QueueSetAccessPolicyHeaders setErrorCode(String errorCode) { - this.errorCode = errorCode; - return this; - } -} diff --git a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/implementation/models/QueueSetMetadataHeaders.java b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/implementation/models/QueueSetMetadataHeaders.java deleted file mode 100644 index ba746eb45ea6f..0000000000000 --- a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/implementation/models/QueueSetMetadataHeaders.java +++ /dev/null @@ -1,141 +0,0 @@ -// 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.util.DateTimeRfc1123; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; -import java.time.OffsetDateTime; - -/** - * Defines headers for SetMetadata operation. - */ -@JacksonXmlRootElement(localName = "Queue-SetMetadata-Headers") -@Fluent -public final class QueueSetMetadataHeaders { - /* - * 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 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 QueueSetMetadataHeaders object itself. - */ - public QueueSetMetadataHeaders 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 QueueSetMetadataHeaders object itself. - */ - public QueueSetMetadataHeaders 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 QueueSetMetadataHeaders object itself. - */ - public QueueSetMetadataHeaders 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 QueueSetMetadataHeaders object itself. - */ - public QueueSetMetadataHeaders setErrorCode(String errorCode) { - this.errorCode = errorCode; - return this; - } -} diff --git a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/implementation/models/QueuesCreateHeaders.java b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/implementation/models/QueuesCreateHeaders.java new file mode 100644 index 0000000000000..efc594dc1df7f --- /dev/null +++ b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/implementation/models/QueuesCreateHeaders.java @@ -0,0 +1,101 @@ +// 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.util.DateTimeRfc1123; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; +import java.time.OffsetDateTime; + +/** The QueuesCreateHeaders model. */ +@JacksonXmlRootElement(localName = "null") +@Fluent +public final class QueuesCreateHeaders { + /* + * The x-ms-version property. + */ + @JsonProperty(value = "x-ms-version") + private String xMsVersion; + + /* + * The x-ms-request-id property. + */ + @JsonProperty(value = "x-ms-request-id") + private String xMsRequestId; + + /* + * The Date property. + */ + @JsonProperty(value = "Date") + private DateTimeRfc1123 dateProperty; + + /** + * Get the xMsVersion property: The x-ms-version property. + * + * @return the xMsVersion value. + */ + public String getXMsVersion() { + return this.xMsVersion; + } + + /** + * Set the xMsVersion property: The x-ms-version property. + * + * @param xMsVersion the xMsVersion value to set. + * @return the QueuesCreateHeaders object itself. + */ + public QueuesCreateHeaders setXMsVersion(String xMsVersion) { + this.xMsVersion = xMsVersion; + return this; + } + + /** + * Get the xMsRequestId property: The x-ms-request-id property. + * + * @return the xMsRequestId value. + */ + public String getXMsRequestId() { + return this.xMsRequestId; + } + + /** + * Set the xMsRequestId property: The x-ms-request-id property. + * + * @param xMsRequestId the xMsRequestId value to set. + * @return the QueuesCreateHeaders object itself. + */ + public QueuesCreateHeaders setXMsRequestId(String xMsRequestId) { + this.xMsRequestId = xMsRequestId; + return this; + } + + /** + * Get the dateProperty property: The Date property. + * + * @return the dateProperty value. + */ + public OffsetDateTime getDateProperty() { + if (this.dateProperty == null) { + return null; + } + return this.dateProperty.getDateTime(); + } + + /** + * Set the dateProperty property: The Date property. + * + * @param dateProperty the dateProperty value to set. + * @return the QueuesCreateHeaders object itself. + */ + public QueuesCreateHeaders setDateProperty(OffsetDateTime dateProperty) { + if (dateProperty == null) { + this.dateProperty = null; + } else { + this.dateProperty = new DateTimeRfc1123(dateProperty); + } + return this; + } +} diff --git a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/implementation/models/QueuesCreateResponse.java b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/implementation/models/QueuesCreateResponse.java index c9843113cee56..46b5e79dd8f8a 100644 --- a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/implementation/models/QueuesCreateResponse.java +++ b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/implementation/models/QueuesCreateResponse.java @@ -8,10 +8,8 @@ import com.azure.core.http.HttpRequest; import com.azure.core.http.rest.ResponseBase; -/** - * Contains all response data for the create operation. - */ -public final class QueuesCreateResponse extends ResponseBase { +/** Contains all response data for the create operation. */ +public final class QueuesCreateResponse extends ResponseBase { /** * Creates an instance of QueuesCreateResponse. * @@ -21,7 +19,8 @@ public final class QueuesCreateResponse extends ResponseBase { +/** Contains all response data for the delete operation. */ +public final class QueuesDeleteResponse extends ResponseBase { /** * Creates an instance of QueuesDeleteResponse. * @@ -21,7 +19,8 @@ public final class QueuesDeleteResponse extends ResponseBase> { +/** Contains all response data for the getAccessPolicy operation. */ +public final class QueuesGetAccessPolicyResponse + extends ResponseBase> { /** * Creates an instance of QueuesGetAccessPolicyResponse. * @@ -23,13 +22,16 @@ public final class QueuesGetAccessPolicyResponse extends ResponseBase value, QueueGetAccessPolicyHeaders headers) { + public QueuesGetAccessPolicyResponse( + HttpRequest request, + int statusCode, + HttpHeaders rawHeaders, + List value, + QueuesGetAccessPolicyHeaders headers) { super(request, statusCode, rawHeaders, value, headers); } - /** - * @return the deserialized response body. - */ + /** @return the deserialized response body. */ @Override public List getValue() { return super.getValue(); diff --git a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/implementation/models/QueuesGetPropertiesHeaders.java b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/implementation/models/QueuesGetPropertiesHeaders.java new file mode 100644 index 0000000000000..01c4884a1655c --- /dev/null +++ b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/implementation/models/QueuesGetPropertiesHeaders.java @@ -0,0 +1,155 @@ +// 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; + +/** The QueuesGetPropertiesHeaders model. */ +@JacksonXmlRootElement(localName = "null") +@Fluent +public final class QueuesGetPropertiesHeaders { + /* + * The x-ms-version property. + */ + @JsonProperty(value = "x-ms-version") + private String xMsVersion; + + /* + * The x-ms-approximate-messages-count property. + */ + @JsonProperty(value = "x-ms-approximate-messages-count") + private Integer xMsApproximateMessagesCount; + + /* + * The x-ms-meta- property. + */ + @HeaderCollection("x-ms-meta-") + private Map xMsMeta; + + /* + * The x-ms-request-id property. + */ + @JsonProperty(value = "x-ms-request-id") + private String xMsRequestId; + + /* + * The Date property. + */ + @JsonProperty(value = "Date") + private DateTimeRfc1123 dateProperty; + + /** + * Get the xMsVersion property: The x-ms-version property. + * + * @return the xMsVersion value. + */ + public String getXMsVersion() { + return this.xMsVersion; + } + + /** + * Set the xMsVersion property: The x-ms-version property. + * + * @param xMsVersion the xMsVersion value to set. + * @return the QueuesGetPropertiesHeaders object itself. + */ + public QueuesGetPropertiesHeaders setXMsVersion(String xMsVersion) { + this.xMsVersion = xMsVersion; + return this; + } + + /** + * Get the xMsApproximateMessagesCount property: The x-ms-approximate-messages-count property. + * + * @return the xMsApproximateMessagesCount value. + */ + public Integer getXMsApproximateMessagesCount() { + return this.xMsApproximateMessagesCount; + } + + /** + * Set the xMsApproximateMessagesCount property: The x-ms-approximate-messages-count property. + * + * @param xMsApproximateMessagesCount the xMsApproximateMessagesCount value to set. + * @return the QueuesGetPropertiesHeaders object itself. + */ + public QueuesGetPropertiesHeaders setXMsApproximateMessagesCount(Integer xMsApproximateMessagesCount) { + this.xMsApproximateMessagesCount = xMsApproximateMessagesCount; + return this; + } + + /** + * Get the xMsMeta property: The x-ms-meta- property. + * + * @return the xMsMeta value. + */ + public Map getXMsMeta() { + return this.xMsMeta; + } + + /** + * Set the xMsMeta property: The x-ms-meta- property. + * + * @param xMsMeta the xMsMeta value to set. + * @return the QueuesGetPropertiesHeaders object itself. + */ + public QueuesGetPropertiesHeaders setXMsMeta(Map xMsMeta) { + this.xMsMeta = xMsMeta; + return this; + } + + /** + * Get the xMsRequestId property: The x-ms-request-id property. + * + * @return the xMsRequestId value. + */ + public String getXMsRequestId() { + return this.xMsRequestId; + } + + /** + * Set the xMsRequestId property: The x-ms-request-id property. + * + * @param xMsRequestId the xMsRequestId value to set. + * @return the QueuesGetPropertiesHeaders object itself. + */ + public QueuesGetPropertiesHeaders setXMsRequestId(String xMsRequestId) { + this.xMsRequestId = xMsRequestId; + return this; + } + + /** + * Get the dateProperty property: The Date property. + * + * @return the dateProperty value. + */ + public OffsetDateTime getDateProperty() { + if (this.dateProperty == null) { + return null; + } + return this.dateProperty.getDateTime(); + } + + /** + * Set the dateProperty property: The Date property. + * + * @param dateProperty the dateProperty value to set. + * @return the QueuesGetPropertiesHeaders object itself. + */ + public QueuesGetPropertiesHeaders setDateProperty(OffsetDateTime dateProperty) { + if (dateProperty == null) { + this.dateProperty = null; + } else { + this.dateProperty = new DateTimeRfc1123(dateProperty); + } + return this; + } +} diff --git a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/implementation/models/QueuesGetPropertiesResponse.java b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/implementation/models/QueuesGetPropertiesResponse.java index de0d8bbcd5a44..659fe132ed5a2 100644 --- a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/implementation/models/QueuesGetPropertiesResponse.java +++ b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/implementation/models/QueuesGetPropertiesResponse.java @@ -8,10 +8,8 @@ import com.azure.core.http.HttpRequest; import com.azure.core.http.rest.ResponseBase; -/** - * Contains all response data for the getProperties operation. - */ -public final class QueuesGetPropertiesResponse extends ResponseBase { +/** Contains all response data for the getProperties operation. */ +public final class QueuesGetPropertiesResponse extends ResponseBase { /** * Creates an instance of QueuesGetPropertiesResponse. * @@ -21,7 +19,12 @@ public final class QueuesGetPropertiesResponse extends ResponseBase { +/** Contains all response data for the setAccessPolicy operation. */ +public final class QueuesSetAccessPolicyResponse extends ResponseBase { /** * Creates an instance of QueuesSetAccessPolicyResponse. * @@ -21,7 +19,12 @@ public final class QueuesSetAccessPolicyResponse extends ResponseBase { +/** Contains all response data for the setMetadata operation. */ +public final class QueuesSetMetadataResponse extends ResponseBase { /** * Creates an instance of QueuesSetMetadataResponse. * @@ -21,7 +19,8 @@ public final class QueuesSetMetadataResponse extends ResponseBase { +/** Contains all response data for the getProperties operation. */ +public final class ServicesGetPropertiesResponse + extends ResponseBase { /** * Creates an instance of ServicesGetPropertiesResponse. * @@ -22,13 +21,16 @@ public final class ServicesGetPropertiesResponse extends ResponseBase { +/** Contains all response data for the getStatistics operation. */ +public final class ServicesGetStatisticsResponse + extends ResponseBase { /** * Creates an instance of ServicesGetStatisticsResponse. * @@ -22,13 +21,16 @@ public final class ServicesGetStatisticsResponse extends ResponseBase { + /** + * Creates an instance of ServicesListQueuesSegmentNextResponse. + * + * @param request the request which resulted in this ServicesListQueuesSegmentNextResponse. + * @param statusCode the status code of the HTTP response. + * @param rawHeaders the raw headers of the HTTP response. + * @param value the deserialized value of the HTTP response. + * @param headers the deserialized headers of the HTTP response. + */ + public ServicesListQueuesSegmentNextResponse( + HttpRequest request, + int statusCode, + HttpHeaders rawHeaders, + ListQueuesSegmentResponse value, + ServicesListQueuesSegmentNextHeaders headers) { + super(request, statusCode, rawHeaders, value, headers); + } + + /** @return the deserialized response body. */ + @Override + public ListQueuesSegmentResponse getValue() { + return super.getValue(); + } +} diff --git a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/implementation/models/ServicesListQueuesSegmentResponse.java b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/implementation/models/ServicesListQueuesSegmentResponse.java index a8274b869bc79..b5d0ff45db3c0 100644 --- a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/implementation/models/ServicesListQueuesSegmentResponse.java +++ b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/implementation/models/ServicesListQueuesSegmentResponse.java @@ -8,10 +8,9 @@ import com.azure.core.http.HttpRequest; import com.azure.core.http.rest.ResponseBase; -/** - * Contains all response data for the listQueuesSegment operation. - */ -public final class ServicesListQueuesSegmentResponse extends ResponseBase { +/** Contains all response data for the listQueuesSegment operation. */ +public final class ServicesListQueuesSegmentResponse + extends ResponseBase { /** * Creates an instance of ServicesListQueuesSegmentResponse. * @@ -21,13 +20,16 @@ public final class ServicesListQueuesSegmentResponse extends ResponseBase { +/** Contains all response data for the setProperties operation. */ +public final class ServicesSetPropertiesResponse extends ResponseBase { /** * Creates an instance of ServicesSetPropertiesResponse. * @@ -21,7 +19,12 @@ public final class ServicesSetPropertiesResponse extends ResponseBase { - /** - * Static value live for GeoReplicationStatus. - */ + /** Static value live for GeoReplicationStatus. */ public static final GeoReplicationStatus LIVE = fromString("live"); - /** - * Static value bootstrap for GeoReplicationStatus. - */ + /** Static value bootstrap for GeoReplicationStatus. */ public static final GeoReplicationStatus BOOTSTRAP = fromString("bootstrap"); - /** - * Static value unavailable for GeoReplicationStatus. - */ + /** Static value unavailable for GeoReplicationStatus. */ public static final GeoReplicationStatus UNAVAILABLE = fromString("unavailable"); /** @@ -38,9 +30,7 @@ public static GeoReplicationStatus fromString(String name) { return fromString(name, GeoReplicationStatus.class); } - /** - * @return known GeoReplicationStatus values. - */ + /** @return known GeoReplicationStatus values. */ public static Collection values() { return values(GeoReplicationStatus.class); } diff --git a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/models/PeekedMessageItem.java b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/models/PeekedMessageItem.java index 10de2ce8ef224..4883d8d8a48f0 100644 --- a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/models/PeekedMessageItem.java +++ b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/models/PeekedMessageItem.java @@ -10,10 +10,7 @@ import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; -/** - * The object returned in the QueueMessageList array when calling Peek Messages - * on a Queue. - */ +/** The object returned in the QueueMessageList array when calling Peek Messages on a Queue. */ @JacksonXmlRootElement(localName = "QueueMessage") @Fluent public final class PeekedMessageItem { @@ -68,8 +65,7 @@ public PeekedMessageItem setMessageId(String messageId) { } /** - * Get the insertionTime property: The time the Message was inserted into - * the Queue. + * Get the insertionTime property: The time the Message was inserted into the Queue. * * @return the insertionTime value. */ @@ -81,8 +77,7 @@ public OffsetDateTime getInsertionTime() { } /** - * Set the insertionTime property: The time the Message was inserted into - * the Queue. + * Set the insertionTime property: The time the Message was inserted into the Queue. * * @param insertionTime the insertionTime value to set. * @return the PeekedMessageItem object itself. @@ -97,8 +92,7 @@ public PeekedMessageItem setInsertionTime(OffsetDateTime insertionTime) { } /** - * Get the expirationTime property: The time that the Message will expire - * and be automatically deleted. + * Get the expirationTime property: The time that the Message will expire and be automatically deleted. * * @return the expirationTime value. */ @@ -110,8 +104,7 @@ public OffsetDateTime getExpirationTime() { } /** - * Set the expirationTime property: The time that the Message will expire - * and be automatically deleted. + * Set the expirationTime property: The time that the Message will expire and be automatically deleted. * * @param expirationTime the expirationTime value to set. * @return the PeekedMessageItem object itself. @@ -126,8 +119,7 @@ public PeekedMessageItem setExpirationTime(OffsetDateTime expirationTime) { } /** - * Get the dequeueCount property: The number of times the message has been - * dequeued. + * Get the dequeueCount property: The number of times the message has been dequeued. * * @return the dequeueCount value. */ @@ -136,8 +128,7 @@ public long getDequeueCount() { } /** - * Set the dequeueCount property: The number of times the message has been - * dequeued. + * Set the dequeueCount property: The number of times the message has been dequeued. * * @param dequeueCount the dequeueCount value to set. * @return the PeekedMessageItem object itself. diff --git a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/models/QueueAccessPolicy.java b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/models/QueueAccessPolicy.java index 73d0993a2b4e1..b5433ba70b839 100644 --- a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/models/QueueAccessPolicy.java +++ b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/models/QueueAccessPolicy.java @@ -9,9 +9,7 @@ import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; -/** - * An Access policy. - */ +/** An Access policy. */ @JacksonXmlRootElement(localName = "AccessPolicy") @Fluent public final class QueueAccessPolicy { diff --git a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/models/QueueAnalyticsLogging.java b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/models/QueueAnalyticsLogging.java index dadb2c7a2283b..7077bb04c1531 100644 --- a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/models/QueueAnalyticsLogging.java +++ b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/models/QueueAnalyticsLogging.java @@ -8,9 +8,7 @@ import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; -/** - * Azure Analytics Logging settings. - */ +/** Azure Analytics Logging settings. */ @JacksonXmlRootElement(localName = "Logging") @Fluent public final class QueueAnalyticsLogging { @@ -39,7 +37,7 @@ public final class QueueAnalyticsLogging { private boolean write; /* - * The retentionPolicy property. + * the retention policy */ @JsonProperty(value = "RetentionPolicy", required = true) private QueueRetentionPolicy retentionPolicy; @@ -65,8 +63,7 @@ public QueueAnalyticsLogging setVersion(String version) { } /** - * Get the delete property: Indicates whether all delete requests should be - * logged. + * Get the delete property: Indicates whether all delete requests should be logged. * * @return the delete value. */ @@ -75,8 +72,7 @@ public boolean isDelete() { } /** - * Set the delete property: Indicates whether all delete requests should be - * logged. + * Set the delete property: Indicates whether all delete requests should be logged. * * @param delete the delete value to set. * @return the QueueAnalyticsLogging object itself. @@ -87,8 +83,7 @@ public QueueAnalyticsLogging setDelete(boolean delete) { } /** - * Get the read property: Indicates whether all read requests should be - * logged. + * Get the read property: Indicates whether all read requests should be logged. * * @return the read value. */ @@ -97,8 +92,7 @@ public boolean isRead() { } /** - * Set the read property: Indicates whether all read requests should be - * logged. + * Set the read property: Indicates whether all read requests should be logged. * * @param read the read value to set. * @return the QueueAnalyticsLogging object itself. @@ -109,8 +103,7 @@ public QueueAnalyticsLogging setRead(boolean read) { } /** - * Get the write property: Indicates whether all write requests should be - * logged. + * Get the write property: Indicates whether all write requests should be logged. * * @return the write value. */ @@ -119,8 +112,7 @@ public boolean isWrite() { } /** - * Set the write property: Indicates whether all write requests should be - * logged. + * Set the write property: Indicates whether all write requests should be logged. * * @param write the write value to set. * @return the QueueAnalyticsLogging object itself. @@ -131,7 +123,7 @@ public QueueAnalyticsLogging setWrite(boolean write) { } /** - * Get the retentionPolicy property: The retentionPolicy property. + * Get the retentionPolicy property: the retention policy. * * @return the retentionPolicy value. */ @@ -140,7 +132,7 @@ public QueueRetentionPolicy getRetentionPolicy() { } /** - * Set the retentionPolicy property: The retentionPolicy property. + * Set the retentionPolicy property: the retention policy. * * @param retentionPolicy the retentionPolicy value to set. * @return the QueueAnalyticsLogging object itself. diff --git a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/models/QueueCorsRule.java b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/models/QueueCorsRule.java index 6a29dd46efee4..01d4a102a8fca 100644 --- a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/models/QueueCorsRule.java +++ b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/models/QueueCorsRule.java @@ -9,11 +9,10 @@ import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; /** - * CORS is an HTTP feature that enables a web application running under one - * domain to access resources in another domain. Web browsers implement a - * security restriction known as same-origin policy that prevents a web page - * from calling APIs in a different domain; CORS provides a secure way to allow - * one domain (the origin domain) to call APIs in another domain. + * CORS is an HTTP feature that enables a web application running under one domain to access resources in another + * domain. Web browsers implement a security restriction known as same-origin policy that prevents a web page from + * calling APIs in a different domain; CORS provides a secure way to allow one domain (the origin domain) to call APIs + * in another domain. */ @JacksonXmlRootElement(localName = "CorsRule") @Fluent @@ -58,12 +57,10 @@ public final class QueueCorsRule { private int maxAgeInSeconds; /** - * Get the allowedOrigins property: The origin domains that are permitted - * to make a request against the storage service via CORS. The origin - * domain is the domain from which the request originates. Note that the - * origin must be an exact case-sensitive match with the origin that the - * user age sends to the service. You can also use the wildcard character - * '*' to allow all origin domains to make requests via CORS. + * Get the allowedOrigins property: The origin domains that are permitted to make a request against the storage + * service via CORS. The origin domain is the domain from which the request originates. Note that the origin must be + * an exact case-sensitive match with the origin that the user age sends to the service. You can also use the + * wildcard character '*' to allow all origin domains to make requests via CORS. * * @return the allowedOrigins value. */ @@ -72,12 +69,10 @@ public String getAllowedOrigins() { } /** - * Set the allowedOrigins property: The origin domains that are permitted - * to make a request against the storage service via CORS. The origin - * domain is the domain from which the request originates. Note that the - * origin must be an exact case-sensitive match with the origin that the - * user age sends to the service. You can also use the wildcard character - * '*' to allow all origin domains to make requests via CORS. + * Set the allowedOrigins property: The origin domains that are permitted to make a request against the storage + * service via CORS. The origin domain is the domain from which the request originates. Note that the origin must be + * an exact case-sensitive match with the origin that the user age sends to the service. You can also use the + * wildcard character '*' to allow all origin domains to make requests via CORS. * * @param allowedOrigins the allowedOrigins value to set. * @return the QueueCorsRule object itself. @@ -88,8 +83,8 @@ public QueueCorsRule setAllowedOrigins(String allowedOrigins) { } /** - * Get the allowedMethods property: The methods (HTTP request verbs) that - * the origin domain may use for a CORS request. (comma separated). + * Get the allowedMethods property: The methods (HTTP request verbs) that the origin domain may use for a CORS + * request. (comma separated). * * @return the allowedMethods value. */ @@ -98,8 +93,8 @@ public String getAllowedMethods() { } /** - * Set the allowedMethods property: The methods (HTTP request verbs) that - * the origin domain may use for a CORS request. (comma separated). + * Set the allowedMethods property: The methods (HTTP request verbs) that the origin domain may use for a CORS + * request. (comma separated). * * @param allowedMethods the allowedMethods value to set. * @return the QueueCorsRule object itself. @@ -110,8 +105,7 @@ public QueueCorsRule setAllowedMethods(String allowedMethods) { } /** - * Get the allowedHeaders property: the request headers that the origin - * domain may specify on the CORS request. + * Get the allowedHeaders property: the request headers that the origin domain may specify on the CORS request. * * @return the allowedHeaders value. */ @@ -120,8 +114,7 @@ public String getAllowedHeaders() { } /** - * Set the allowedHeaders property: the request headers that the origin - * domain may specify on the CORS request. + * Set the allowedHeaders property: the request headers that the origin domain may specify on the CORS request. * * @param allowedHeaders the allowedHeaders value to set. * @return the QueueCorsRule object itself. @@ -132,9 +125,8 @@ public QueueCorsRule setAllowedHeaders(String allowedHeaders) { } /** - * Get the exposedHeaders property: The response headers that may be sent - * in the response to the CORS request and exposed by the browser to the - * request issuer. + * Get the exposedHeaders property: The response headers that may be sent in the response to the CORS request and + * exposed by the browser to the request issuer. * * @return the exposedHeaders value. */ @@ -143,9 +135,8 @@ public String getExposedHeaders() { } /** - * Set the exposedHeaders property: The response headers that may be sent - * in the response to the CORS request and exposed by the browser to the - * request issuer. + * Set the exposedHeaders property: The response headers that may be sent in the response to the CORS request and + * exposed by the browser to the request issuer. * * @param exposedHeaders the exposedHeaders value to set. * @return the QueueCorsRule object itself. @@ -156,8 +147,8 @@ public QueueCorsRule setExposedHeaders(String exposedHeaders) { } /** - * Get the maxAgeInSeconds property: The maximum amount time that a browser - * should cache the preflight OPTIONS request. + * Get the maxAgeInSeconds property: The maximum amount time that a browser should cache the preflight OPTIONS + * request. * * @return the maxAgeInSeconds value. */ @@ -166,8 +157,8 @@ public int getMaxAgeInSeconds() { } /** - * Set the maxAgeInSeconds property: The maximum amount time that a browser - * should cache the preflight OPTIONS request. + * Set the maxAgeInSeconds property: The maximum amount time that a browser should cache the preflight OPTIONS + * request. * * @param maxAgeInSeconds the maxAgeInSeconds value to set. * @return the QueueCorsRule object itself. diff --git a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/models/QueueErrorCode.java b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/models/QueueErrorCode.java index bbf4ea2ce031b..0f4fbd3540cbb 100644 --- a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/models/QueueErrorCode.java +++ b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/models/QueueErrorCode.java @@ -8,293 +8,180 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** - * Defines values for QueueErrorCode. - */ +/** Defines values for QueueErrorCode. */ public final class QueueErrorCode extends ExpandableStringEnum { - /** - * Static value AccountAlreadyExists for QueueErrorCode. - */ + /** Static value AccountAlreadyExists for QueueErrorCode. */ public static final QueueErrorCode ACCOUNT_ALREADY_EXISTS = fromString("AccountAlreadyExists"); - /** - * Static value AccountBeingCreated for QueueErrorCode. - */ + /** Static value AccountBeingCreated for QueueErrorCode. */ public static final QueueErrorCode ACCOUNT_BEING_CREATED = fromString("AccountBeingCreated"); - /** - * Static value AccountIsDisabled for QueueErrorCode. - */ + /** Static value AccountIsDisabled for QueueErrorCode. */ public static final QueueErrorCode ACCOUNT_IS_DISABLED = fromString("AccountIsDisabled"); - /** - * Static value AuthenticationFailed for QueueErrorCode. - */ + /** Static value AuthenticationFailed for QueueErrorCode. */ public static final QueueErrorCode AUTHENTICATION_FAILED = fromString("AuthenticationFailed"); - /** - * Static value AuthorizationFailure for QueueErrorCode. - */ + /** Static value AuthorizationFailure for QueueErrorCode. */ public static final QueueErrorCode AUTHORIZATION_FAILURE = fromString("AuthorizationFailure"); - /** - * Static value ConditionHeadersNotSupported for QueueErrorCode. - */ + /** Static value ConditionHeadersNotSupported for QueueErrorCode. */ public static final QueueErrorCode CONDITION_HEADERS_NOT_SUPPORTED = fromString("ConditionHeadersNotSupported"); - /** - * Static value ConditionNotMet for QueueErrorCode. - */ + /** Static value ConditionNotMet for QueueErrorCode. */ public static final QueueErrorCode CONDITION_NOT_MET = fromString("ConditionNotMet"); - /** - * Static value EmptyMetadataKey for QueueErrorCode. - */ + /** Static value EmptyMetadataKey for QueueErrorCode. */ public static final QueueErrorCode EMPTY_METADATA_KEY = fromString("EmptyMetadataKey"); - /** - * Static value InsufficientAccountPermissions for QueueErrorCode. - */ + /** Static value InsufficientAccountPermissions for QueueErrorCode. */ public static final QueueErrorCode INSUFFICIENT_ACCOUNT_PERMISSIONS = fromString("InsufficientAccountPermissions"); - /** - * Static value InternalError for QueueErrorCode. - */ + /** Static value InternalError for QueueErrorCode. */ public static final QueueErrorCode INTERNAL_ERROR = fromString("InternalError"); - /** - * Static value InvalidAuthenticationInfo for QueueErrorCode. - */ + /** Static value InvalidAuthenticationInfo for QueueErrorCode. */ public static final QueueErrorCode INVALID_AUTHENTICATION_INFO = fromString("InvalidAuthenticationInfo"); - /** - * Static value InvalidHeaderValue for QueueErrorCode. - */ + /** Static value InvalidHeaderValue for QueueErrorCode. */ public static final QueueErrorCode INVALID_HEADER_VALUE = fromString("InvalidHeaderValue"); - /** - * Static value InvalidHttpVerb for QueueErrorCode. - */ + /** Static value InvalidHttpVerb for QueueErrorCode. */ public static final QueueErrorCode INVALID_HTTP_VERB = fromString("InvalidHttpVerb"); - /** - * Static value InvalidInput for QueueErrorCode. - */ + /** Static value InvalidInput for QueueErrorCode. */ public static final QueueErrorCode INVALID_INPUT = fromString("InvalidInput"); - /** - * Static value InvalidMd5 for QueueErrorCode. - */ + /** Static value InvalidMd5 for QueueErrorCode. */ public static final QueueErrorCode INVALID_MD5 = fromString("InvalidMd5"); - /** - * Static value InvalidMetadata for QueueErrorCode. - */ + /** Static value InvalidMetadata for QueueErrorCode. */ public static final QueueErrorCode INVALID_METADATA = fromString("InvalidMetadata"); - /** - * Static value InvalidQueryParameterValue for QueueErrorCode. - */ + /** Static value InvalidQueryParameterValue for QueueErrorCode. */ public static final QueueErrorCode INVALID_QUERY_PARAMETER_VALUE = fromString("InvalidQueryParameterValue"); - /** - * Static value InvalidRange for QueueErrorCode. - */ + /** Static value InvalidRange for QueueErrorCode. */ public static final QueueErrorCode INVALID_RANGE = fromString("InvalidRange"); - /** - * Static value InvalidResourceName for QueueErrorCode. - */ + /** Static value InvalidResourceName for QueueErrorCode. */ public static final QueueErrorCode INVALID_RESOURCE_NAME = fromString("InvalidResourceName"); - /** - * Static value InvalidUri for QueueErrorCode. - */ + /** Static value InvalidUri for QueueErrorCode. */ public static final QueueErrorCode INVALID_URI = fromString("InvalidUri"); - /** - * Static value InvalidXmlDocument for QueueErrorCode. - */ + /** Static value InvalidXmlDocument for QueueErrorCode. */ public static final QueueErrorCode INVALID_XML_DOCUMENT = fromString("InvalidXmlDocument"); - /** - * Static value InvalidXmlNodeValue for QueueErrorCode. - */ + /** Static value InvalidXmlNodeValue for QueueErrorCode. */ public static final QueueErrorCode INVALID_XML_NODE_VALUE = fromString("InvalidXmlNodeValue"); - /** - * Static value Md5Mismatch for QueueErrorCode. - */ + /** Static value Md5Mismatch for QueueErrorCode. */ public static final QueueErrorCode MD5MISMATCH = fromString("Md5Mismatch"); - /** - * Static value MetadataTooLarge for QueueErrorCode. - */ + /** Static value MetadataTooLarge for QueueErrorCode. */ public static final QueueErrorCode METADATA_TOO_LARGE = fromString("MetadataTooLarge"); - /** - * Static value MissingContentLengthHeader for QueueErrorCode. - */ + /** Static value MissingContentLengthHeader for QueueErrorCode. */ public static final QueueErrorCode MISSING_CONTENT_LENGTH_HEADER = fromString("MissingContentLengthHeader"); - /** - * Static value MissingRequiredQueryParameter for QueueErrorCode. - */ + /** Static value MissingRequiredQueryParameter for QueueErrorCode. */ public static final QueueErrorCode MISSING_REQUIRED_QUERY_PARAMETER = fromString("MissingRequiredQueryParameter"); - /** - * Static value MissingRequiredHeader for QueueErrorCode. - */ + /** Static value MissingRequiredHeader for QueueErrorCode. */ public static final QueueErrorCode MISSING_REQUIRED_HEADER = fromString("MissingRequiredHeader"); - /** - * Static value MissingRequiredXmlNode for QueueErrorCode. - */ + /** Static value MissingRequiredXmlNode for QueueErrorCode. */ public static final QueueErrorCode MISSING_REQUIRED_XML_NODE = fromString("MissingRequiredXmlNode"); - /** - * Static value MultipleConditionHeadersNotSupported for QueueErrorCode. - */ - public static final QueueErrorCode MULTIPLE_CONDITION_HEADERS_NOT_SUPPORTED = fromString("MultipleConditionHeadersNotSupported"); + /** Static value MultipleConditionHeadersNotSupported for QueueErrorCode. */ + public static final QueueErrorCode MULTIPLE_CONDITION_HEADERS_NOT_SUPPORTED = + fromString("MultipleConditionHeadersNotSupported"); - /** - * Static value OperationTimedOut for QueueErrorCode. - */ + /** Static value OperationTimedOut for QueueErrorCode. */ public static final QueueErrorCode OPERATION_TIMED_OUT = fromString("OperationTimedOut"); - /** - * Static value OutOfRangeInput for QueueErrorCode. - */ + /** Static value OutOfRangeInput for QueueErrorCode. */ public static final QueueErrorCode OUT_OF_RANGE_INPUT = fromString("OutOfRangeInput"); - /** - * Static value OutOfRangeQueryParameterValue for QueueErrorCode. - */ + /** Static value OutOfRangeQueryParameterValue for QueueErrorCode. */ public static final QueueErrorCode OUT_OF_RANGE_QUERY_PARAMETER_VALUE = fromString("OutOfRangeQueryParameterValue"); - /** - * Static value RequestBodyTooLarge for QueueErrorCode. - */ + /** Static value RequestBodyTooLarge for QueueErrorCode. */ public static final QueueErrorCode REQUEST_BODY_TOO_LARGE = fromString("RequestBodyTooLarge"); - /** - * Static value ResourceTypeMismatch for QueueErrorCode. - */ + /** Static value ResourceTypeMismatch for QueueErrorCode. */ public static final QueueErrorCode RESOURCE_TYPE_MISMATCH = fromString("ResourceTypeMismatch"); - /** - * Static value RequestUrlFailedToParse for QueueErrorCode. - */ + /** Static value RequestUrlFailedToParse for QueueErrorCode. */ public static final QueueErrorCode REQUEST_URL_FAILED_TO_PARSE = fromString("RequestUrlFailedToParse"); - /** - * Static value ResourceAlreadyExists for QueueErrorCode. - */ + /** Static value ResourceAlreadyExists for QueueErrorCode. */ public static final QueueErrorCode RESOURCE_ALREADY_EXISTS = fromString("ResourceAlreadyExists"); - /** - * Static value ResourceNotFound for QueueErrorCode. - */ + /** Static value ResourceNotFound for QueueErrorCode. */ public static final QueueErrorCode RESOURCE_NOT_FOUND = fromString("ResourceNotFound"); - /** - * Static value ServerBusy for QueueErrorCode. - */ + /** Static value ServerBusy for QueueErrorCode. */ public static final QueueErrorCode SERVER_BUSY = fromString("ServerBusy"); - /** - * Static value UnsupportedHeader for QueueErrorCode. - */ + /** Static value UnsupportedHeader for QueueErrorCode. */ public static final QueueErrorCode UNSUPPORTED_HEADER = fromString("UnsupportedHeader"); - /** - * Static value UnsupportedXmlNode for QueueErrorCode. - */ + /** Static value UnsupportedXmlNode for QueueErrorCode. */ public static final QueueErrorCode UNSUPPORTED_XML_NODE = fromString("UnsupportedXmlNode"); - /** - * Static value UnsupportedQueryParameter for QueueErrorCode. - */ + /** Static value UnsupportedQueryParameter for QueueErrorCode. */ public static final QueueErrorCode UNSUPPORTED_QUERY_PARAMETER = fromString("UnsupportedQueryParameter"); - /** - * Static value UnsupportedHttpVerb for QueueErrorCode. - */ + /** Static value UnsupportedHttpVerb for QueueErrorCode. */ public static final QueueErrorCode UNSUPPORTED_HTTP_VERB = fromString("UnsupportedHttpVerb"); - /** - * Static value InvalidMarker for QueueErrorCode. - */ + /** Static value InvalidMarker for QueueErrorCode. */ public static final QueueErrorCode INVALID_MARKER = fromString("InvalidMarker"); - /** - * Static value MessageNotFound for QueueErrorCode. - */ + /** Static value MessageNotFound for QueueErrorCode. */ public static final QueueErrorCode MESSAGE_NOT_FOUND = fromString("MessageNotFound"); - /** - * Static value MessageTooLarge for QueueErrorCode. - */ + /** Static value MessageTooLarge for QueueErrorCode. */ public static final QueueErrorCode MESSAGE_TOO_LARGE = fromString("MessageTooLarge"); - /** - * Static value PopReceiptMismatch for QueueErrorCode. - */ + /** Static value PopReceiptMismatch for QueueErrorCode. */ public static final QueueErrorCode POP_RECEIPT_MISMATCH = fromString("PopReceiptMismatch"); - /** - * Static value QueueAlreadyExists for QueueErrorCode. - */ + /** Static value QueueAlreadyExists for QueueErrorCode. */ public static final QueueErrorCode QUEUE_ALREADY_EXISTS = fromString("QueueAlreadyExists"); - /** - * Static value QueueBeingDeleted for QueueErrorCode. - */ + /** Static value QueueBeingDeleted for QueueErrorCode. */ public static final QueueErrorCode QUEUE_BEING_DELETED = fromString("QueueBeingDeleted"); - /** - * Static value QueueDisabled for QueueErrorCode. - */ + /** Static value QueueDisabled for QueueErrorCode. */ public static final QueueErrorCode QUEUE_DISABLED = fromString("QueueDisabled"); - /** - * Static value QueueNotEmpty for QueueErrorCode. - */ + /** Static value QueueNotEmpty for QueueErrorCode. */ public static final QueueErrorCode QUEUE_NOT_EMPTY = fromString("QueueNotEmpty"); - /** - * Static value QueueNotFound for QueueErrorCode. - */ + /** Static value QueueNotFound for QueueErrorCode. */ public static final QueueErrorCode QUEUE_NOT_FOUND = fromString("QueueNotFound"); - /** - * Static value AuthorizationSourceIPMismatch for QueueErrorCode. - */ + /** Static value AuthorizationSourceIPMismatch for QueueErrorCode. */ public static final QueueErrorCode AUTHORIZATION_SOURCE_IPMISMATCH = fromString("AuthorizationSourceIPMismatch"); - /** - * Static value AuthorizationProtocolMismatch for QueueErrorCode. - */ + /** Static value AuthorizationProtocolMismatch for QueueErrorCode. */ public static final QueueErrorCode AUTHORIZATION_PROTOCOL_MISMATCH = fromString("AuthorizationProtocolMismatch"); - /** - * Static value AuthorizationPermissionMismatch for QueueErrorCode. - */ - public static final QueueErrorCode AUTHORIZATION_PERMISSION_MISMATCH = fromString("AuthorizationPermissionMismatch"); + /** Static value AuthorizationPermissionMismatch for QueueErrorCode. */ + public static final QueueErrorCode AUTHORIZATION_PERMISSION_MISMATCH = + fromString("AuthorizationPermissionMismatch"); - /** - * Static value AuthorizationServiceMismatch for QueueErrorCode. - */ + /** Static value AuthorizationServiceMismatch for QueueErrorCode. */ public static final QueueErrorCode AUTHORIZATION_SERVICE_MISMATCH = fromString("AuthorizationServiceMismatch"); - /** - * Static value AuthorizationResourceTypeMismatch for QueueErrorCode. - */ - public static final QueueErrorCode AUTHORIZATION_RESOURCE_TYPE_MISMATCH = fromString("AuthorizationResourceTypeMismatch"); + /** Static value AuthorizationResourceTypeMismatch for QueueErrorCode. */ + public static final QueueErrorCode AUTHORIZATION_RESOURCE_TYPE_MISMATCH = + fromString("AuthorizationResourceTypeMismatch"); - /** - * Static value FeatureVersionMismatch for QueueErrorCode. - */ + /** Static value FeatureVersionMismatch for QueueErrorCode. */ public static final QueueErrorCode FEATURE_VERSION_MISMATCH = fromString("FeatureVersionMismatch"); /** @@ -308,9 +195,7 @@ public static QueueErrorCode fromString(String name) { return fromString(name, QueueErrorCode.class); } - /** - * @return known QueueErrorCode values. - */ + /** @return known QueueErrorCode values. */ public static Collection values() { return values(QueueErrorCode.class); } diff --git a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/models/QueueItem.java b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/models/QueueItem.java index 7b545c8c7a408..c34bd4b8ded18 100644 --- a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/models/QueueItem.java +++ b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/models/QueueItem.java @@ -9,9 +9,7 @@ import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.util.Map; -/** - * An Azure Storage Queue. - */ +/** An Azure Storage Queue. */ @JacksonXmlRootElement(localName = "Queue") @Fluent public final class QueueItem { @@ -22,7 +20,7 @@ public final class QueueItem { private String name; /* - * The metadata property. + * Dictionary of */ @JsonProperty(value = "Metadata") private Map metadata; @@ -48,7 +46,7 @@ public QueueItem setName(String name) { } /** - * Get the metadata property: The metadata property. + * Get the metadata property: Dictionary of <string>. * * @return the metadata value. */ @@ -57,7 +55,7 @@ public Map getMetadata() { } /** - * Set the metadata property: The metadata property. + * Set the metadata property: Dictionary of <string>. * * @param metadata the metadata value to set. * @return the QueueItem object itself. diff --git a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/models/QueueMessageItem.java b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/models/QueueMessageItem.java index d2d3e0b7365d1..4df66335114ee 100644 --- a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/models/QueueMessageItem.java +++ b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/models/QueueMessageItem.java @@ -10,10 +10,7 @@ import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; -/** - * The object returned in the QueueMessageList array when calling Get Messages - * on a Queue. - */ +/** The object returned in the QueueMessageList array when calling Get Messages on a Queue. */ @JacksonXmlRootElement(localName = "QueueMessage") @Fluent public final class QueueMessageItem { @@ -81,8 +78,7 @@ public QueueMessageItem setMessageId(String messageId) { } /** - * Get the insertionTime property: The time the Message was inserted into - * the Queue. + * Get the insertionTime property: The time the Message was inserted into the Queue. * * @return the insertionTime value. */ @@ -94,8 +90,7 @@ public OffsetDateTime getInsertionTime() { } /** - * Set the insertionTime property: The time the Message was inserted into - * the Queue. + * Set the insertionTime property: The time the Message was inserted into the Queue. * * @param insertionTime the insertionTime value to set. * @return the QueueMessageItem object itself. @@ -110,8 +105,7 @@ public QueueMessageItem setInsertionTime(OffsetDateTime insertionTime) { } /** - * Get the expirationTime property: The time that the Message will expire - * and be automatically deleted. + * Get the expirationTime property: The time that the Message will expire and be automatically deleted. * * @return the expirationTime value. */ @@ -123,8 +117,7 @@ public OffsetDateTime getExpirationTime() { } /** - * Set the expirationTime property: The time that the Message will expire - * and be automatically deleted. + * Set the expirationTime property: The time that the Message will expire and be automatically deleted. * * @param expirationTime the expirationTime value to set. * @return the QueueMessageItem object itself. @@ -139,9 +132,8 @@ public QueueMessageItem setExpirationTime(OffsetDateTime expirationTime) { } /** - * Get the popReceipt property: This value is required to delete the - * Message. If deletion fails using this popreceipt then the message has - * been dequeued by another client. + * Get the popReceipt property: This value is required to delete the Message. If deletion fails using this + * popreceipt then the message has been dequeued by another client. * * @return the popReceipt value. */ @@ -150,9 +142,8 @@ public String getPopReceipt() { } /** - * Set the popReceipt property: This value is required to delete the - * Message. If deletion fails using this popreceipt then the message has - * been dequeued by another client. + * Set the popReceipt property: This value is required to delete the Message. If deletion fails using this + * popreceipt then the message has been dequeued by another client. * * @param popReceipt the popReceipt value to set. * @return the QueueMessageItem object itself. @@ -163,8 +154,7 @@ public QueueMessageItem setPopReceipt(String popReceipt) { } /** - * Get the timeNextVisible property: The time that the message will again - * become visible in the Queue. + * Get the timeNextVisible property: The time that the message will again become visible in the Queue. * * @return the timeNextVisible value. */ @@ -176,8 +166,7 @@ public OffsetDateTime getTimeNextVisible() { } /** - * Set the timeNextVisible property: The time that the message will again - * become visible in the Queue. + * Set the timeNextVisible property: The time that the message will again become visible in the Queue. * * @param timeNextVisible the timeNextVisible value to set. * @return the QueueMessageItem object itself. @@ -192,8 +181,7 @@ public QueueMessageItem setTimeNextVisible(OffsetDateTime timeNextVisible) { } /** - * Get the dequeueCount property: The number of times the message has been - * dequeued. + * Get the dequeueCount property: The number of times the message has been dequeued. * * @return the dequeueCount value. */ @@ -202,8 +190,7 @@ public long getDequeueCount() { } /** - * Set the dequeueCount property: The number of times the message has been - * dequeued. + * Set the dequeueCount property: The number of times the message has been dequeued. * * @param dequeueCount the dequeueCount value to set. * @return the QueueMessageItem object itself. diff --git a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/models/QueueMetrics.java b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/models/QueueMetrics.java index 889b6a37b3b60..a8dc6b764a756 100644 --- a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/models/QueueMetrics.java +++ b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/models/QueueMetrics.java @@ -8,9 +8,7 @@ import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; -/** - * The QueueMetrics model. - */ +/** The QueueMetrics model. */ @JacksonXmlRootElement(localName = "Metrics") @Fluent public final class QueueMetrics { @@ -27,7 +25,7 @@ public final class QueueMetrics { private boolean enabled; /* - * The retentionPolicy property. + * the retention policy */ @JsonProperty(value = "RetentionPolicy") private QueueRetentionPolicy retentionPolicy; @@ -60,8 +58,7 @@ public QueueMetrics setVersion(String version) { } /** - * Get the enabled property: Indicates whether metrics are enabled for the - * Queue service. + * Get the enabled property: Indicates whether metrics are enabled for the Queue service. * * @return the enabled value. */ @@ -70,8 +67,7 @@ public boolean isEnabled() { } /** - * Set the enabled property: Indicates whether metrics are enabled for the - * Queue service. + * Set the enabled property: Indicates whether metrics are enabled for the Queue service. * * @param enabled the enabled value to set. * @return the QueueMetrics object itself. @@ -82,7 +78,7 @@ public QueueMetrics setEnabled(boolean enabled) { } /** - * Get the retentionPolicy property: The retentionPolicy property. + * Get the retentionPolicy property: the retention policy. * * @return the retentionPolicy value. */ @@ -91,7 +87,7 @@ public QueueRetentionPolicy getRetentionPolicy() { } /** - * Set the retentionPolicy property: The retentionPolicy property. + * Set the retentionPolicy property: the retention policy. * * @param retentionPolicy the retentionPolicy value to set. * @return the QueueMetrics object itself. @@ -102,8 +98,8 @@ public QueueMetrics setRetentionPolicy(QueueRetentionPolicy retentionPolicy) { } /** - * Get the includeApis property: Indicates whether metrics should generate - * summary statistics for called API operations. + * Get the includeApis property: Indicates whether metrics should generate summary statistics for called API + * operations. * * @return the includeApis value. */ @@ -112,8 +108,8 @@ public Boolean isIncludeApis() { } /** - * Set the includeApis property: Indicates whether metrics should generate - * summary statistics for called API operations. + * Set the includeApis property: Indicates whether metrics should generate summary statistics for called API + * operations. * * @param includeApis the includeApis value to set. * @return the QueueMetrics object itself. diff --git a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/models/QueueRetentionPolicy.java b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/models/QueueRetentionPolicy.java index aad6c1174d7b4..e9e969e45a34b 100644 --- a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/models/QueueRetentionPolicy.java +++ b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/models/QueueRetentionPolicy.java @@ -8,9 +8,7 @@ import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; -/** - * the retention policy. - */ +/** the retention policy. */ @JacksonXmlRootElement(localName = "RetentionPolicy") @Fluent public final class QueueRetentionPolicy { @@ -28,8 +26,7 @@ public final class QueueRetentionPolicy { private Integer days; /** - * Get the enabled property: Indicates whether a retention policy is - * enabled for the storage service. + * Get the enabled property: Indicates whether a retention policy is enabled for the storage service. * * @return the enabled value. */ @@ -38,8 +35,7 @@ public boolean isEnabled() { } /** - * Set the enabled property: Indicates whether a retention policy is - * enabled for the storage service. + * Set the enabled property: Indicates whether a retention policy is enabled for the storage service. * * @param enabled the enabled value to set. * @return the QueueRetentionPolicy object itself. @@ -50,9 +46,8 @@ public QueueRetentionPolicy setEnabled(boolean enabled) { } /** - * Get the days property: Indicates the number of days that metrics or - * logging or soft-deleted data should be retained. All data older than - * this value will be deleted. + * Get the days property: Indicates the number of days that metrics or logging or soft-deleted data should be + * retained. All data older than this value will be deleted. * * @return the days value. */ @@ -61,9 +56,8 @@ public Integer getDays() { } /** - * Set the days property: Indicates the number of days that metrics or - * logging or soft-deleted data should be retained. All data older than - * this value will be deleted. + * Set the days property: Indicates the number of days that metrics or logging or soft-deleted data should be + * retained. All data older than this value will be deleted. * * @param days the days value to set. * @return the QueueRetentionPolicy object itself. diff --git a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/models/QueueServiceProperties.java b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/models/QueueServiceProperties.java index a2a594dfcba89..bbc51b476e1fb 100644 --- a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/models/QueueServiceProperties.java +++ b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/models/QueueServiceProperties.java @@ -12,9 +12,7 @@ import java.util.ArrayList; import java.util.List; -/** - * Storage Service Properties. - */ +/** Storage Service Properties. */ @JacksonXmlRootElement(localName = "StorageServiceProperties") @Fluent public final class QueueServiceProperties { @@ -75,8 +73,7 @@ public QueueServiceProperties setAnalyticsLogging(QueueAnalyticsLogging analytic } /** - * Get the hourMetrics property: A summary of request statistics grouped by - * API in hourly aggregates for queues. + * Get the hourMetrics property: A summary of request statistics grouped by API in hourly aggregates for queues. * * @return the hourMetrics value. */ @@ -85,8 +82,7 @@ public QueueMetrics getHourMetrics() { } /** - * Set the hourMetrics property: A summary of request statistics grouped by - * API in hourly aggregates for queues. + * Set the hourMetrics property: A summary of request statistics grouped by API in hourly aggregates for queues. * * @param hourMetrics the hourMetrics value to set. * @return the QueueServiceProperties object itself. @@ -97,8 +93,7 @@ public QueueServiceProperties setHourMetrics(QueueMetrics hourMetrics) { } /** - * Get the minuteMetrics property: a summary of request statistics grouped - * by API in minute aggregates for queues. + * Get the minuteMetrics property: a summary of request statistics grouped by API in minute aggregates for queues. * * @return the minuteMetrics value. */ @@ -107,8 +102,7 @@ public QueueMetrics getMinuteMetrics() { } /** - * Set the minuteMetrics property: a summary of request statistics grouped - * by API in minute aggregates for queues. + * Set the minuteMetrics property: a summary of request statistics grouped by API in minute aggregates for queues. * * @param minuteMetrics the minuteMetrics value to set. * @return the QueueServiceProperties object itself. diff --git a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/models/QueueServiceStatistics.java b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/models/QueueServiceStatistics.java index a13be3927ee6d..52ecb9ecf563b 100644 --- a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/models/QueueServiceStatistics.java +++ b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/models/QueueServiceStatistics.java @@ -8,9 +8,7 @@ import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; -/** - * Statistics for the storage service. - */ +/** Statistics for the storage service. */ @JacksonXmlRootElement(localName = "StorageServiceStats") @Fluent public final class QueueServiceStatistics { @@ -21,8 +19,7 @@ public final class QueueServiceStatistics { private GeoReplication geoReplication; /** - * Get the geoReplication property: Geo-Replication information for the - * Secondary Storage Service. + * Get the geoReplication property: Geo-Replication information for the Secondary Storage Service. * * @return the geoReplication value. */ @@ -31,8 +28,7 @@ public GeoReplication getGeoReplication() { } /** - * Set the geoReplication property: Geo-Replication information for the - * Secondary Storage Service. + * Set the geoReplication property: Geo-Replication information for the Secondary Storage Service. * * @param geoReplication the geoReplication value to set. * @return the QueueServiceStatistics object itself. diff --git a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/models/QueueSignedIdentifier.java b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/models/QueueSignedIdentifier.java index 166fd274afb8c..f0c81273e7dda 100644 --- a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/models/QueueSignedIdentifier.java +++ b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/models/QueueSignedIdentifier.java @@ -8,9 +8,7 @@ import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; -/** - * signed identifier. - */ +/** signed identifier. */ @JacksonXmlRootElement(localName = "SignedIdentifier") @Fluent public final class QueueSignedIdentifier { diff --git a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/models/SendMessageResult.java b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/models/SendMessageResult.java index 26a3ee8f4b6e4..f3ed0c272c0b9 100644 --- a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/models/SendMessageResult.java +++ b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/models/SendMessageResult.java @@ -10,10 +10,7 @@ import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; -/** - * The object returned in the QueueMessageList array when calling Put Message - * on a Queue. - */ +/** The object returned in the QueueMessageList array when calling Put Message on a Queue. */ @JacksonXmlRootElement(localName = "QueueMessage") @Fluent public final class SendMessageResult { @@ -69,8 +66,7 @@ public SendMessageResult setMessageId(String messageId) { } /** - * Get the insertionTime property: The time the Message was inserted into - * the Queue. + * Get the insertionTime property: The time the Message was inserted into the Queue. * * @return the insertionTime value. */ @@ -82,8 +78,7 @@ public OffsetDateTime getInsertionTime() { } /** - * Set the insertionTime property: The time the Message was inserted into - * the Queue. + * Set the insertionTime property: The time the Message was inserted into the Queue. * * @param insertionTime the insertionTime value to set. * @return the SendMessageResult object itself. @@ -98,8 +93,7 @@ public SendMessageResult setInsertionTime(OffsetDateTime insertionTime) { } /** - * Get the expirationTime property: The time that the Message will expire - * and be automatically deleted. + * Get the expirationTime property: The time that the Message will expire and be automatically deleted. * * @return the expirationTime value. */ @@ -111,8 +105,7 @@ public OffsetDateTime getExpirationTime() { } /** - * Set the expirationTime property: The time that the Message will expire - * and be automatically deleted. + * Set the expirationTime property: The time that the Message will expire and be automatically deleted. * * @param expirationTime the expirationTime value to set. * @return the SendMessageResult object itself. @@ -127,9 +120,8 @@ public SendMessageResult setExpirationTime(OffsetDateTime expirationTime) { } /** - * Get the popReceipt property: This value is required to delete the - * Message. If deletion fails using this popreceipt then the message has - * been dequeued by another client. + * Get the popReceipt property: This value is required to delete the Message. If deletion fails using this + * popreceipt then the message has been dequeued by another client. * * @return the popReceipt value. */ @@ -138,9 +130,8 @@ public String getPopReceipt() { } /** - * Set the popReceipt property: This value is required to delete the - * Message. If deletion fails using this popreceipt then the message has - * been dequeued by another client. + * Set the popReceipt property: This value is required to delete the Message. If deletion fails using this + * popreceipt then the message has been dequeued by another client. * * @param popReceipt the popReceipt value to set. * @return the SendMessageResult object itself. @@ -151,8 +142,7 @@ public SendMessageResult setPopReceipt(String popReceipt) { } /** - * Get the timeNextVisible property: The time that the message will again - * become visible in the Queue. + * Get the timeNextVisible property: The time that the message will again become visible in the Queue. * * @return the timeNextVisible value. */ @@ -164,8 +154,7 @@ public OffsetDateTime getTimeNextVisible() { } /** - * Set the timeNextVisible property: The time that the message will again - * become visible in the Queue. + * Set the timeNextVisible property: The time that the message will again become visible in the Queue. * * @param timeNextVisible the timeNextVisible value to set. * @return the SendMessageResult object itself. diff --git a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/models/package-info.java b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/models/package-info.java index 9391160d658c4..9b48f92b44a0a 100644 --- a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/models/package-info.java +++ b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/models/package-info.java @@ -2,7 +2,5 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -/** - * Package containing classes for AzureQueueStorage. - */ +/** Package containing classes for AzureQueueStorage. null. */ package com.azure.storage.queue.models; diff --git a/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAPITestsPeekMultipleMessages.json b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAPITestsPeekMultipleMessages.json index fad55e5a6494d..22c3cdbd4d771 100644 --- a/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAPITestsPeekMultipleMessages.json +++ b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAPITestsPeekMultipleMessages.json @@ -1,89 +1,85 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.queue.core.windows.net/queueapitestspeekmultiplemessages176332ef1f55736e", + "Uri" : "https://REDACTED.queue.core.windows.net/queueapitestspeekmultiplemessages04662cf70a99385d", "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-queue/12.6.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "14329526-c22e-4088-b8bb-a94b5ba47fd3" + "x-ms-version" : "2018-03-28", + "User-Agent" : "azsdk-java-azure-storage-queue/12.9.0-beta.1 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "956493ff-0513-44e8-b225-4f780fc47476" }, "Response" : { - "x-ms-version" : "2019-12-12", + "x-ms-version" : "2018-03-28", "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "37a39ed2-3003-009b-3c03-3a8ca5000000", - "Date" : "Thu, 04 Jun 2020 00:05:04 GMT", - "x-ms-client-request-id" : "14329526-c22e-4088-b8bb-a94b5ba47fd3" + "x-ms-request-id" : "edafc50f-d003-008b-3077-f321c4000000", + "Date" : "Tue, 26 Jan 2021 00:10:13 GMT" }, "Exception" : null }, { "Method" : "POST", - "Uri" : "https://REDACTED.queue.core.windows.net/queueapitestspeekmultiplemessages176332ef1f55736e/messages", + "Uri" : "https://REDACTED.queue.core.windows.net/queueapitestspeekmultiplemessages04662cf70a99385d/messages", "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-queue/12.6.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "217af2b2-4c30-4a83-9c2b-e26e2d2f672e", - "Content-Type" : "application/xml; charset=utf-8" + "x-ms-version" : "2018-03-28", + "User-Agent" : "azsdk-java-azure-storage-queue/12.9.0-beta.1 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "729c2569-27a0-4041-b194-fc3b301ee2ff", + "Content-Type" : "application/xml" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-12-12", + "x-ms-version" : "2018-03-28", "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "StatusCode" : "201", - "x-ms-request-id" : "37a39eda-3003-009b-4103-3a8ca5000000", - "Body" : "ef58b348-777a-47c2-ba85-ccd6322739e3Thu, 04 Jun 2020 00:05:05 GMTThu, 11 Jun 2020 00:05:05 GMTAgAAAAMAAAAAAAAATj/fzAM61gE=Thu, 04 Jun 2020 00:05:05 GMT", - "Date" : "Thu, 04 Jun 2020 00:05:04 GMT", - "x-ms-client-request-id" : "217af2b2-4c30-4a83-9c2b-e26e2d2f672e", + "x-ms-request-id" : "edafc513-d003-008b-3377-f321c4000000", + "Body" : "d024f383-d996-4577-bcb0-4dc901cd4877Tue, 26 Jan 2021 00:10:13 GMTTue, 02 Feb 2021 00:10:13 GMTAgAAAAMAAAAAAAAAlGpznnfz1gE=Tue, 26 Jan 2021 00:10:13 GMT", + "Date" : "Tue, 26 Jan 2021 00:10:13 GMT", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "POST", - "Uri" : "https://REDACTED.queue.core.windows.net/queueapitestspeekmultiplemessages176332ef1f55736e/messages", + "Uri" : "https://REDACTED.queue.core.windows.net/queueapitestspeekmultiplemessages04662cf70a99385d/messages", "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-queue/12.6.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "f58414fb-c704-440b-b8bf-a58beb50af25", - "Content-Type" : "application/xml; charset=utf-8" + "x-ms-version" : "2018-03-28", + "User-Agent" : "azsdk-java-azure-storage-queue/12.9.0-beta.1 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "c8644e22-abfe-4e7b-a5be-509eba0a93af", + "Content-Type" : "application/xml" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-12-12", + "x-ms-version" : "2018-03-28", "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "StatusCode" : "201", - "x-ms-request-id" : "37a39edf-3003-009b-4403-3a8ca5000000", - "Body" : "dfb537c2-7bd3-4418-b59b-71bd4944c13eThu, 04 Jun 2020 00:05:05 GMTThu, 11 Jun 2020 00:05:05 GMTAgAAAAMAAAAAAAAAL4jszAM61gE=Thu, 04 Jun 2020 00:05:05 GMT", - "Date" : "Thu, 04 Jun 2020 00:05:04 GMT", - "x-ms-client-request-id" : "f58414fb-c704-440b-b8bf-a58beb50af25", + "x-ms-request-id" : "edafc514-d003-008b-3477-f321c4000000", + "Body" : "97190432-134f-4364-aaf6-a65c64d1dcd4Tue, 26 Jan 2021 00:10:13 GMTTue, 02 Feb 2021 00:10:13 GMTAgAAAAMAAAAAAAAAY0uBnnfz1gE=Tue, 26 Jan 2021 00:10:13 GMT", + "Date" : "Tue, 26 Jan 2021 00:10:13 GMT", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "GET", - "Uri" : "https://REDACTED.queue.core.windows.net/queueapitestspeekmultiplemessages176332ef1f55736e/messages?numofmessages=2&peekonly=true", + "Uri" : "https://REDACTED.queue.core.windows.net/queueapitestspeekmultiplemessages04662cf70a99385d/messages?peekonly=true&numofmessages=2", "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-queue/12.6.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "6ed8c17f-41ad-42c0-836c-8416ae31e40b" + "x-ms-version" : "2018-03-28", + "User-Agent" : "azsdk-java-azure-storage-queue/12.9.0-beta.1 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "e3d5d27d-d251-4253-96cf-5afa860614ef" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-12-12", + "x-ms-version" : "2018-03-28", "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", "Cache-Control" : "no-cache", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "37a39ee1-3003-009b-4603-3a8ca5000000", - "Body" : "ef58b348-777a-47c2-ba85-ccd6322739e3Thu, 04 Jun 2020 00:05:05 GMTThu, 11 Jun 2020 00:05:05 GMT0test message 1dfb537c2-7bd3-4418-b59b-71bd4944c13eThu, 04 Jun 2020 00:05:05 GMTThu, 11 Jun 2020 00:05:05 GMT0test message 2", - "Date" : "Thu, 04 Jun 2020 00:05:04 GMT", - "x-ms-client-request-id" : "6ed8c17f-41ad-42c0-836c-8416ae31e40b", + "x-ms-request-id" : "edafc51a-d003-008b-3a77-f321c4000000", + "Body" : "d024f383-d996-4577-bcb0-4dc901cd4877Tue, 26 Jan 2021 00:10:13 GMTTue, 02 Feb 2021 00:10:13 GMT0test message 197190432-134f-4364-aaf6-a65c64d1dcd4Tue, 26 Jan 2021 00:10:13 GMTTue, 02 Feb 2021 00:10:13 GMT0test message 2", + "Date" : "Tue, 26 Jan 2021 00:10:13 GMT", "Content-Type" : "application/xml" }, "Exception" : null } ], - "variables" : [ "queueapitestspeekmultiplemessages176332ef1f55736e" ] + "variables" : [ "queueapitestspeekmultiplemessages04662cf70a99385d" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAPITestsPeekTooManyMessage.json b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAPITestsPeekTooManyMessage.json index 9bf4d9a3afd68..0ad8a48d54535 100644 --- a/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAPITestsPeekTooManyMessage.json +++ b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAPITestsPeekTooManyMessage.json @@ -1,45 +1,43 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.queue.core.windows.net/queueapitestspeektoomanymessage10227b447c25b194c", + "Uri" : "https://REDACTED.queue.core.windows.net/queueapitestspeektoomanymessage19094f54df2844b9e", "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-queue/12.6.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "a60dc43d-e882-4784-9ce4-13ed743c3a8e" + "x-ms-version" : "2018-03-28", + "User-Agent" : "azsdk-java-azure-storage-queue/12.9.0-beta.1 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "a9dde58e-3599-4167-99a7-6605021c2f00" }, "Response" : { - "x-ms-version" : "2019-12-12", + "x-ms-version" : "2018-03-28", "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "37a39ee7-3003-009b-4c03-3a8ca5000000", - "Date" : "Thu, 04 Jun 2020 00:05:04 GMT", - "x-ms-client-request-id" : "a60dc43d-e882-4784-9ce4-13ed743c3a8e" + "x-ms-request-id" : "edafc51e-d003-008b-3e77-f321c4000000", + "Date" : "Tue, 26 Jan 2021 00:10:13 GMT" }, "Exception" : null }, { "Method" : "GET", - "Uri" : "https://REDACTED.queue.core.windows.net/queueapitestspeektoomanymessage10227b447c25b194c/messages?numofmessages=33&peekonly=true", + "Uri" : "https://REDACTED.queue.core.windows.net/queueapitestspeektoomanymessage19094f54df2844b9e/messages?peekonly=true&numofmessages=33", "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-queue/12.6.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "82605610-6574-40a1-8836-2ce4429ae6c4" + "x-ms-version" : "2018-03-28", + "User-Agent" : "azsdk-java-azure-storage-queue/12.9.0-beta.1 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "20928dd4-72ae-4293-b7a2-415ee9a9eb7c" }, "Response" : { - "x-ms-version" : "2019-12-12", + "x-ms-version" : "2018-03-28", "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", "x-ms-error-code" : "OutOfRangeQueryParameterValue", "retry-after" : "0", "Content-Length" : "456", "StatusCode" : "400", - "x-ms-request-id" : "37a39eea-3003-009b-4e03-3a8ca5000000", - "Body" : "OutOfRangeQueryParameterValueOne of the query parameters specified in the request URI is outside the permissible range.\nRequestId:37a39eea-3003-009b-4e03-3a8ca5000000\nTime:2020-06-04T00:05:05.5640792Znumofmessages33132", - "Date" : "Thu, 04 Jun 2020 00:05:05 GMT", - "x-ms-client-request-id" : "82605610-6574-40a1-8836-2ce4429ae6c4", + "x-ms-request-id" : "edafc521-d003-008b-4077-f321c4000000", + "Body" : "OutOfRangeQueryParameterValueOne of the query parameters specified in the request URI is outside the permissible range.\nRequestId:edafc521-d003-008b-4077-f321c4000000\nTime:2021-01-26T00:10:14.4797086Znumofmessages33132", + "Date" : "Tue, 26 Jan 2021 00:10:13 GMT", "Content-Type" : "application/xml" }, "Exception" : null } ], - "variables" : [ "queueapitestspeektoomanymessage10227b447c25b194c" ] + "variables" : [ "queueapitestspeektoomanymessage19094f54df2844b9e" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAysncAPITestsPeekMessage.json b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAysncAPITestsPeekMessage.json index 0059264fe186d..356dbf974d3b0 100644 --- a/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAysncAPITestsPeekMessage.json +++ b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAysncAPITestsPeekMessage.json @@ -1,67 +1,64 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.queue.core.windows.net/queueaysncapitestspeekmessage7407730007a8fb3984", + "Uri" : "https://REDACTED.queue.core.windows.net/queueaysncapitestspeekmessage05016d203a21779a84", "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-queue/12.6.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "ddb3d029-386f-4133-804e-591a7fa106ca" + "x-ms-version" : "2018-03-28", + "User-Agent" : "azsdk-java-azure-storage-queue/12.9.0-beta.1 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "eb159e50-2084-4dc6-a7ba-ce13b8eef816" }, "Response" : { - "x-ms-version" : "2019-12-12", + "x-ms-version" : "2018-03-28", "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "37a3a22a-3003-009b-3003-3a8ca5000000", - "Date" : "Thu, 04 Jun 2020 00:05:23 GMT", - "x-ms-client-request-id" : "ddb3d029-386f-4133-804e-591a7fa106ca" + "x-ms-request-id" : "edafbc04-d003-008b-5d77-f321c4000000", + "Date" : "Tue, 26 Jan 2021 00:08:59 GMT" }, "Exception" : null }, { "Method" : "POST", - "Uri" : "https://REDACTED.queue.core.windows.net/queueaysncapitestspeekmessage7407730007a8fb3984/messages", + "Uri" : "https://REDACTED.queue.core.windows.net/queueaysncapitestspeekmessage05016d203a21779a84/messages", "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-queue/12.6.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "11e314fe-547d-48df-951f-827a462403ba", - "Content-Type" : "application/xml; charset=utf-8" + "x-ms-version" : "2018-03-28", + "User-Agent" : "azsdk-java-azure-storage-queue/12.9.0-beta.1 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "f1408987-77f1-4913-b43e-3c343ced7f07", + "Content-Type" : "application/xml" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-12-12", + "x-ms-version" : "2018-03-28", "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "StatusCode" : "201", - "x-ms-request-id" : "37a3a22d-3003-009b-3203-3a8ca5000000", - "Body" : "a74dba44-208c-41e5-bc88-87820b714fa7Thu, 04 Jun 2020 00:05:24 GMTThu, 11 Jun 2020 00:05:24 GMTAgAAAAMAAAAAAAAAn99S2AM61gE=Thu, 04 Jun 2020 00:05:24 GMT", - "Date" : "Thu, 04 Jun 2020 00:05:23 GMT", - "x-ms-client-request-id" : "11e314fe-547d-48df-951f-827a462403ba", + "x-ms-request-id" : "edafbc06-d003-008b-5e77-f321c4000000", + "Body" : "be6b69f3-1f0e-47f7-94ea-53be283848cbTue, 26 Jan 2021 00:08:59 GMTTue, 02 Feb 2021 00:08:59 GMTAgAAAAMAAAAAAAAAN0Mpcnfz1gE=Tue, 26 Jan 2021 00:08:59 GMT", + "Date" : "Tue, 26 Jan 2021 00:08:59 GMT", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "GET", - "Uri" : "https://REDACTED.queue.core.windows.net/queueaysncapitestspeekmessage7407730007a8fb3984/messages?peekonly=true", + "Uri" : "https://REDACTED.queue.core.windows.net/queueaysncapitestspeekmessage05016d203a21779a84/messages?peekonly=true", "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-queue/12.6.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "a5b80292-c63c-47e2-8042-5de1b13b48b7" + "x-ms-version" : "2018-03-28", + "User-Agent" : "azsdk-java-azure-storage-queue/12.9.0-beta.1 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "dd5a5603-ce1a-461c-a5a9-ffa2de24b009" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-12-12", + "x-ms-version" : "2018-03-28", "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", "Cache-Control" : "no-cache", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "37a3a235-3003-009b-3a03-3a8ca5000000", - "Body" : "a74dba44-208c-41e5-bc88-87820b714fa7Thu, 04 Jun 2020 00:05:24 GMTThu, 11 Jun 2020 00:05:24 GMT0test message", - "Date" : "Thu, 04 Jun 2020 00:05:23 GMT", - "x-ms-client-request-id" : "a5b80292-c63c-47e2-8042-5de1b13b48b7", + "x-ms-request-id" : "edafbc07-d003-008b-5f77-f321c4000000", + "Body" : "be6b69f3-1f0e-47f7-94ea-53be283848cbTue, 26 Jan 2021 00:08:59 GMTTue, 02 Feb 2021 00:08:59 GMT0test message", + "Date" : "Tue, 26 Jan 2021 00:08:59 GMT", "Content-Type" : "application/xml" }, "Exception" : null } ], - "variables" : [ "queueaysncapitestspeekmessage7407730007a8fb3984" ] + "variables" : [ "queueaysncapitestspeekmessage05016d203a21779a84" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAysncAPITestsPeekMessageFromEmptyQueue.json b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAysncAPITestsPeekMessageFromEmptyQueue.json index f97cc78d1cfb3..ad9793fa2f520 100644 --- a/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAysncAPITestsPeekMessageFromEmptyQueue.json +++ b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAysncAPITestsPeekMessageFromEmptyQueue.json @@ -1,45 +1,43 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.queue.core.windows.net/queueaysncapitestspeekmessagefromemptyqueue6885111cc03", + "Uri" : "https://REDACTED.queue.core.windows.net/queueaysncapitestspeekmessagefromemptyqueue21412b9a32f", "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-queue/12.6.0-beta.2 (11.0.4; Windows 10; 10.0)", - "x-ms-client-request-id" : "14d586e2-70c4-483d-9ccc-24cd4512dbff" + "x-ms-version" : "2018-03-28", + "User-Agent" : "azsdk-java-azure-storage-queue/12.9.0-beta.1 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "9677e465-8f6c-4b04-980a-bd5c5979360c" }, "Response" : { - "x-ms-version" : "2019-12-12", + "x-ms-version" : "2018-03-28", "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "4e09827a-5003-003a-7346-64a7ab000000", - "Date" : "Mon, 27 Jul 2020 18:48:26 GMT", - "x-ms-client-request-id" : "14d586e2-70c4-483d-9ccc-24cd4512dbff" + "x-ms-request-id" : "edafbc00-d003-008b-5a77-f321c4000000", + "Date" : "Tue, 26 Jan 2021 00:08:58 GMT" }, "Exception" : null }, { "Method" : "GET", - "Uri" : "https://REDACTED.queue.core.windows.net/queueaysncapitestspeekmessagefromemptyqueue6885111cc03/messages?peekonly=true", + "Uri" : "https://REDACTED.queue.core.windows.net/queueaysncapitestspeekmessagefromemptyqueue21412b9a32f/messages?peekonly=true", "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-queue/12.6.0-beta.2 (11.0.4; Windows 10; 10.0)", - "x-ms-client-request-id" : "c36e64b1-af8b-4aec-8b0f-602faddb88d5" + "x-ms-version" : "2018-03-28", + "User-Agent" : "azsdk-java-azure-storage-queue/12.9.0-beta.1 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "d2e1d560-3bdd-4722-80c0-acb31f03941a" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-12-12", + "x-ms-version" : "2018-03-28", "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", "Cache-Control" : "no-cache", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "4e0982f3-5003-003a-6346-64a7ab000000", + "x-ms-request-id" : "edafbc02-d003-008b-5b77-f321c4000000", "Body" : "", - "Date" : "Mon, 27 Jul 2020 18:48:27 GMT", - "x-ms-client-request-id" : "c36e64b1-af8b-4aec-8b0f-602faddb88d5", + "Date" : "Tue, 26 Jan 2021 00:08:58 GMT", "Content-Type" : "application/xml" }, "Exception" : null } ], - "variables" : [ "queueaysncapitestspeekmessagefromemptyqueue6885111cc03" ] + "variables" : [ "queueaysncapitestspeekmessagefromemptyqueue21412b9a32f" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAysncAPITestsPeekMultipleMessages.json b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAysncAPITestsPeekMultipleMessages.json index 81e197ec30d25..74e590dcf5281 100644 --- a/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAysncAPITestsPeekMultipleMessages.json +++ b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAysncAPITestsPeekMultipleMessages.json @@ -1,89 +1,85 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.queue.core.windows.net/queueaysncapitestspeekmultiplemessages7774788be0ede", + "Uri" : "https://REDACTED.queue.core.windows.net/queueaysncapitestspeekmultiplemessages47298eee6b85d", "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-queue/12.6.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "ba1083dd-1db6-4156-84b7-52449d04db86" + "x-ms-version" : "2018-03-28", + "User-Agent" : "azsdk-java-azure-storage-queue/12.9.0-beta.1 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "14434a26-9f9a-41d9-bb10-a9920de1cad1" }, "Response" : { - "x-ms-version" : "2019-12-12", + "x-ms-version" : "2018-03-28", "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "37a3a244-3003-009b-4403-3a8ca5000000", - "Date" : "Thu, 04 Jun 2020 00:05:24 GMT", - "x-ms-client-request-id" : "ba1083dd-1db6-4156-84b7-52449d04db86" + "x-ms-request-id" : "edafbc10-d003-008b-6777-f321c4000000", + "Date" : "Tue, 26 Jan 2021 00:08:59 GMT" }, "Exception" : null }, { "Method" : "POST", - "Uri" : "https://REDACTED.queue.core.windows.net/queueaysncapitestspeekmultiplemessages7774788be0ede/messages", + "Uri" : "https://REDACTED.queue.core.windows.net/queueaysncapitestspeekmultiplemessages47298eee6b85d/messages", "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-queue/12.6.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "3e353883-d43a-4633-87bf-8e09e84ef527", - "Content-Type" : "application/xml; charset=utf-8" + "x-ms-version" : "2018-03-28", + "User-Agent" : "azsdk-java-azure-storage-queue/12.9.0-beta.1 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "8ebe4692-b98b-479f-a2c4-856740195227", + "Content-Type" : "application/xml" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-12-12", + "x-ms-version" : "2018-03-28", "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "StatusCode" : "201", - "x-ms-request-id" : "37a3a246-3003-009b-4503-3a8ca5000000", - "Body" : "7d8e036d-fbca-42b2-b689-eb895cd80cb5Thu, 04 Jun 2020 00:05:24 GMTThu, 11 Jun 2020 00:05:24 GMTAgAAAAMAAAAAAAAAE5qV2AM61gE=Thu, 04 Jun 2020 00:05:24 GMT", - "Date" : "Thu, 04 Jun 2020 00:05:24 GMT", - "x-ms-client-request-id" : "3e353883-d43a-4633-87bf-8e09e84ef527", + "x-ms-request-id" : "edafbc19-d003-008b-6e77-f321c4000000", + "Body" : "1e43d572-4ae3-4a20-ae0e-d6a0cc52aabbTue, 26 Jan 2021 00:09:00 GMTTue, 02 Feb 2021 00:09:00 GMTAgAAAAMAAAAAAAAA+kdtcnfz1gE=Tue, 26 Jan 2021 00:09:00 GMT", + "Date" : "Tue, 26 Jan 2021 00:08:59 GMT", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "POST", - "Uri" : "https://REDACTED.queue.core.windows.net/queueaysncapitestspeekmultiplemessages7774788be0ede/messages", + "Uri" : "https://REDACTED.queue.core.windows.net/queueaysncapitestspeekmultiplemessages47298eee6b85d/messages", "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-queue/12.6.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "bf717cf0-1cb9-4309-97b3-a47302c07a60", - "Content-Type" : "application/xml; charset=utf-8" + "x-ms-version" : "2018-03-28", + "User-Agent" : "azsdk-java-azure-storage-queue/12.9.0-beta.1 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "1bf096f3-b17d-4c2f-81b7-c05d5dddd3dd", + "Content-Type" : "application/xml" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-12-12", + "x-ms-version" : "2018-03-28", "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "StatusCode" : "201", - "x-ms-request-id" : "37a3a247-3003-009b-4603-3a8ca5000000", - "Body" : "6eecb3a8-99f9-4479-a49d-9166491fd725Thu, 04 Jun 2020 00:05:24 GMTThu, 11 Jun 2020 00:05:24 GMTAgAAAAMAAAAAAAAAjB+i2AM61gE=Thu, 04 Jun 2020 00:05:24 GMT", - "Date" : "Thu, 04 Jun 2020 00:05:24 GMT", - "x-ms-client-request-id" : "bf717cf0-1cb9-4309-97b3-a47302c07a60", + "x-ms-request-id" : "edafbc1d-d003-008b-7277-f321c4000000", + "Body" : "2f8544ed-9129-4a48-afd1-40929d97f215Tue, 26 Jan 2021 00:09:00 GMTTue, 02 Feb 2021 00:09:00 GMTAgAAAAMAAAAAAAAA5517cnfz1gE=Tue, 26 Jan 2021 00:09:00 GMT", + "Date" : "Tue, 26 Jan 2021 00:08:59 GMT", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "GET", - "Uri" : "https://REDACTED.queue.core.windows.net/queueaysncapitestspeekmultiplemessages7774788be0ede/messages?numofmessages=2&peekonly=true", + "Uri" : "https://REDACTED.queue.core.windows.net/queueaysncapitestspeekmultiplemessages47298eee6b85d/messages?peekonly=true&numofmessages=2", "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-queue/12.6.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "d90f5679-d3d7-4db7-8f0b-a2799f468269" + "x-ms-version" : "2018-03-28", + "User-Agent" : "azsdk-java-azure-storage-queue/12.9.0-beta.1 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "55acdfd6-58bd-47c6-a824-3a5c98f52afb" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-12-12", + "x-ms-version" : "2018-03-28", "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", "Cache-Control" : "no-cache", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "37a3a24b-3003-009b-4903-3a8ca5000000", - "Body" : "7d8e036d-fbca-42b2-b689-eb895cd80cb5Thu, 04 Jun 2020 00:05:24 GMTThu, 11 Jun 2020 00:05:24 GMT0test message 16eecb3a8-99f9-4479-a49d-9166491fd725Thu, 04 Jun 2020 00:05:24 GMTThu, 11 Jun 2020 00:05:24 GMT0test message 2", - "Date" : "Thu, 04 Jun 2020 00:05:24 GMT", - "x-ms-client-request-id" : "d90f5679-d3d7-4db7-8f0b-a2799f468269", + "x-ms-request-id" : "edafbc1f-d003-008b-7477-f321c4000000", + "Body" : "1e43d572-4ae3-4a20-ae0e-d6a0cc52aabbTue, 26 Jan 2021 00:09:00 GMTTue, 02 Feb 2021 00:09:00 GMT0test message 12f8544ed-9129-4a48-afd1-40929d97f215Tue, 26 Jan 2021 00:09:00 GMTTue, 02 Feb 2021 00:09:00 GMT0test message 2", + "Date" : "Tue, 26 Jan 2021 00:08:59 GMT", "Content-Type" : "application/xml" }, "Exception" : null } ], - "variables" : [ "queueaysncapitestspeekmultiplemessages7774788be0ede" ] + "variables" : [ "queueaysncapitestspeekmultiplemessages47298eee6b85d" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAysncAPITestsPeekTooManyMessage.json b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAysncAPITestsPeekTooManyMessage.json index 94b240ac27831..4cd364fbf2847 100644 --- a/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAysncAPITestsPeekTooManyMessage.json +++ b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueAysncAPITestsPeekTooManyMessage.json @@ -1,45 +1,43 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.queue.core.windows.net/queueaysncapitestspeektoomanymessage965632b29f8608", + "Uri" : "https://REDACTED.queue.core.windows.net/queueaysncapitestspeektoomanymessage464818ee428fbd", "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-queue/12.6.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "aabd42e6-c43d-429a-bdac-17fd1f0b06f3" + "x-ms-version" : "2018-03-28", + "User-Agent" : "azsdk-java-azure-storage-queue/12.9.0-beta.1 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "96d2c4ab-d6d7-4b98-b9c0-a2ddcac9a5b8" }, "Response" : { - "x-ms-version" : "2019-12-12", + "x-ms-version" : "2018-03-28", "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "37a3a258-3003-009b-5003-3a8ca5000000", - "Date" : "Thu, 04 Jun 2020 00:05:24 GMT", - "x-ms-client-request-id" : "aabd42e6-c43d-429a-bdac-17fd1f0b06f3" + "x-ms-request-id" : "edafbc21-d003-008b-7677-f321c4000000", + "Date" : "Tue, 26 Jan 2021 00:09:00 GMT" }, "Exception" : null }, { "Method" : "GET", - "Uri" : "https://REDACTED.queue.core.windows.net/queueaysncapitestspeektoomanymessage965632b29f8608/messages?numofmessages=33&peekonly=true", + "Uri" : "https://REDACTED.queue.core.windows.net/queueaysncapitestspeektoomanymessage464818ee428fbd/messages?peekonly=true&numofmessages=33", "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-queue/12.6.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "9de27c02-af40-4e0f-b26d-04cdffdc1471" + "x-ms-version" : "2018-03-28", + "User-Agent" : "azsdk-java-azure-storage-queue/12.9.0-beta.1 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "7e3ed053-d1b5-465e-ba8c-3400454a781b" }, "Response" : { - "x-ms-version" : "2019-12-12", + "x-ms-version" : "2018-03-28", "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", "x-ms-error-code" : "OutOfRangeQueryParameterValue", "retry-after" : "0", "Content-Length" : "456", "StatusCode" : "400", - "x-ms-request-id" : "37a3a262-3003-009b-5503-3a8ca5000000", - "Body" : "OutOfRangeQueryParameterValueOne of the query parameters specified in the request URI is outside the permissible range.\nRequestId:37a3a262-3003-009b-5503-3a8ca5000000\nTime:2020-06-04T00:05:25.2653614Znumofmessages33132", - "Date" : "Thu, 04 Jun 2020 00:05:24 GMT", - "x-ms-client-request-id" : "9de27c02-af40-4e0f-b26d-04cdffdc1471", + "x-ms-request-id" : "edafbc23-d003-008b-7777-f321c4000000", + "Body" : "OutOfRangeQueryParameterValueOne of the query parameters specified in the request URI is outside the permissible range.\nRequestId:edafbc23-d003-008b-7777-f321c4000000\nTime:2021-01-26T00:09:00.6070612Znumofmessages33132", + "Date" : "Tue, 26 Jan 2021 00:09:00 GMT", "Content-Type" : "application/xml" }, "Exception" : null } ], - "variables" : [ "queueaysncapitestspeektoomanymessage965632b29f8608" ] + "variables" : [ "queueaysncapitestspeektoomanymessage464818ee428fbd" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueServiceAPITestsListEmptyQueues.json b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueServiceAPITestsListEmptyQueues.json index 33db1160607ca..ccc5a49f83fe2 100644 --- a/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueServiceAPITestsListEmptyQueues.json +++ b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueServiceAPITestsListEmptyQueues.json @@ -1,23 +1,22 @@ { "networkCallRecords" : [ { "Method" : "GET", - "Uri" : "https://REDACTED.queue.core.windows.net?prefix=QueueServiceAPITestsListEmptyQueues&include=&comp=list", + "Uri" : "https://REDACTED.queue.core.windows.net?comp=list&prefix=QueueServiceAPITestsListEmptyQueues&include=", "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-queue/12.6.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "ec0724bd-2e71-4a6a-83b4-a677c6cfc72c" + "x-ms-version" : "2018-03-28", + "User-Agent" : "azsdk-java-azure-storage-queue/12.9.0-beta.1 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "96b43b7f-8399-4fd1-99a2-fe2949771ac2" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-12-12", + "x-ms-version" : "2018-03-28", "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", "Cache-Control" : "no-cache", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "37a3b053-3003-009b-4604-3a8ca5000000", - "Body" : "QueueServiceAPITestsListEmptyQueues", - "Date" : "Thu, 04 Jun 2020 00:06:52 GMT", - "x-ms-client-request-id" : "ec0724bd-2e71-4a6a-83b4-a677c6cfc72c", + "x-ms-request-id" : "edafc2b2-d003-008b-6b77-f321c4000000", + "Body" : "QueueServiceAPITestsListEmptyQueues", + "Date" : "Tue, 26 Jan 2021 00:09:57 GMT", "Content-Type" : "application/xml" }, "Exception" : null diff --git a/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueServiceAPITestsListQueues0.json b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueServiceAPITestsListQueues0.json index 04c534c403e13..653e61f9dd669 100644 --- a/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueServiceAPITestsListQueues0.json +++ b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueServiceAPITestsListQueues0.json @@ -1,140 +1,133 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.queue.core.windows.net/queueserviceapitestslistqueues095466ecd0ba04e87e0", + "Uri" : "https://REDACTED.queue.core.windows.net/queueserviceapitestslistqueues0874059e735939df590", "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-queue/12.6.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "846c6405-aba2-4e16-93c0-f343beca3f20" + "x-ms-version" : "2018-03-28", + "User-Agent" : "azsdk-java-azure-storage-queue/12.9.0-beta.1 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "10b9a03a-fe37-478a-9e38-f82b4190fc35" }, "Response" : { - "x-ms-version" : "2019-12-12", + "x-ms-version" : "2018-03-28", "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "37a3aecc-3003-009b-1904-3a8ca5000000", - "Date" : "Thu, 04 Jun 2020 00:06:43 GMT", - "x-ms-client-request-id" : "846c6405-aba2-4e16-93c0-f343beca3f20" + "x-ms-request-id" : "edafc232-d003-008b-1c77-f321c4000000", + "Date" : "Tue, 26 Jan 2021 00:09:54 GMT" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.queue.core.windows.net/queueserviceapitestslistqueues095466ecd0ba04e87e1", + "Uri" : "https://REDACTED.queue.core.windows.net/queueserviceapitestslistqueues0874059e735939df591", "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-queue/12.6.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "78b1527c-4b5d-4728-8304-1a6a98c5faf2" + "x-ms-version" : "2018-03-28", + "User-Agent" : "azsdk-java-azure-storage-queue/12.9.0-beta.1 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "9023f716-dcee-455b-b665-c70ff564c1d0" }, "Response" : { - "x-ms-version" : "2019-12-12", + "x-ms-version" : "2018-03-28", "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "37a3aece-3003-009b-1a04-3a8ca5000000", - "Date" : "Thu, 04 Jun 2020 00:06:43 GMT", - "x-ms-client-request-id" : "78b1527c-4b5d-4728-8304-1a6a98c5faf2" + "x-ms-request-id" : "edafc23b-d003-008b-2077-f321c4000000", + "Date" : "Tue, 26 Jan 2021 00:09:54 GMT" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.queue.core.windows.net/queueserviceapitestslistqueues095466ecd0ba04e87e2", + "Uri" : "https://REDACTED.queue.core.windows.net/queueserviceapitestslistqueues0874059e735939df592", "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-queue/12.6.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "81770927-ee19-409a-ac28-17ca8df173f2" + "x-ms-version" : "2018-03-28", + "User-Agent" : "azsdk-java-azure-storage-queue/12.9.0-beta.1 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "e567c1b4-f296-46f7-88c5-426014089709" }, "Response" : { - "x-ms-version" : "2019-12-12", + "x-ms-version" : "2018-03-28", "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "37a3aed3-3003-009b-1e04-3a8ca5000000", - "Date" : "Thu, 04 Jun 2020 00:06:43 GMT", - "x-ms-client-request-id" : "81770927-ee19-409a-ac28-17ca8df173f2" + "x-ms-request-id" : "edafc23f-d003-008b-2277-f321c4000000", + "Date" : "Tue, 26 Jan 2021 00:09:54 GMT" }, "Exception" : null }, { "Method" : "GET", - "Uri" : "https://REDACTED.queue.core.windows.net?prefix=queueserviceapitestslistqueues&include=&comp=list", + "Uri" : "https://REDACTED.queue.core.windows.net?comp=list&prefix=queueserviceapitestslistqueues&include=", "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-queue/12.6.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "c882b902-d76d-4ffd-aeb2-7685d7ced83f" + "x-ms-version" : "2018-03-28", + "User-Agent" : "azsdk-java-azure-storage-queue/12.9.0-beta.1 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "fdd698b7-1762-46c1-933f-bb68743e931e" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-12-12", + "x-ms-version" : "2018-03-28", "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", "Cache-Control" : "no-cache", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "37a3aedd-3003-009b-2504-3a8ca5000000", - "Body" : "queueserviceapitestslistqueuesqueueserviceapitestslistqueues095466ecd0ba04e87e0queueserviceapitestslistqueues095466ecd0ba04e87e1queueserviceapitestslistqueues095466ecd0ba04e87e2", - "Date" : "Thu, 04 Jun 2020 00:06:43 GMT", - "x-ms-client-request-id" : "c882b902-d76d-4ffd-aeb2-7685d7ced83f", + "x-ms-request-id" : "edafc241-d003-008b-2377-f321c4000000", + "Body" : "queueserviceapitestslistqueuesqueueserviceapitestslistqueues0874059e735939df590queueserviceapitestslistqueues0874059e735939df591queueserviceapitestslistqueues0874059e735939df592", + "Date" : "Tue, 26 Jan 2021 00:09:54 GMT", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.queue.core.windows.net/queueserviceapitestslistqueues095466ecd0ba04e87e0", + "Uri" : "https://REDACTED.queue.core.windows.net/queueserviceapitestslistqueues0874059e735939df590", "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-queue/12.6.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "fda6102e-594b-48fd-b5bb-223712785c8c" + "x-ms-version" : "2018-03-28", + "User-Agent" : "azsdk-java-azure-storage-queue/12.9.0-beta.1 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "01ebb197-1a4a-4b2e-8a65-a14d01eb0f28" }, "Response" : { - "x-ms-version" : "2019-12-12", + "x-ms-version" : "2018-03-28", "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "204", - "x-ms-request-id" : "37a3aee0-3003-009b-2704-3a8ca5000000", - "Date" : "Thu, 04 Jun 2020 00:06:43 GMT", - "x-ms-client-request-id" : "fda6102e-594b-48fd-b5bb-223712785c8c" + "x-ms-request-id" : "edafc243-d003-008b-2577-f321c4000000", + "Date" : "Tue, 26 Jan 2021 00:09:54 GMT" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.queue.core.windows.net/queueserviceapitestslistqueues095466ecd0ba04e87e1", + "Uri" : "https://REDACTED.queue.core.windows.net/queueserviceapitestslistqueues0874059e735939df591", "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-queue/12.6.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "7a120044-fc19-4ab3-9a9e-db8cc67b9a1f" + "x-ms-version" : "2018-03-28", + "User-Agent" : "azsdk-java-azure-storage-queue/12.9.0-beta.1 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "40943a60-5b58-4a99-afa2-dd0836244b29" }, "Response" : { - "x-ms-version" : "2019-12-12", + "x-ms-version" : "2018-03-28", "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "204", - "x-ms-request-id" : "37a3aee5-3003-009b-2a04-3a8ca5000000", - "Date" : "Thu, 04 Jun 2020 00:06:43 GMT", - "x-ms-client-request-id" : "7a120044-fc19-4ab3-9a9e-db8cc67b9a1f" + "x-ms-request-id" : "edafc244-d003-008b-2677-f321c4000000", + "Date" : "Tue, 26 Jan 2021 00:09:54 GMT" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.queue.core.windows.net/queueserviceapitestslistqueues095466ecd0ba04e87e2", + "Uri" : "https://REDACTED.queue.core.windows.net/queueserviceapitestslistqueues0874059e735939df592", "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-queue/12.6.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "eb02e67e-0bc9-492e-9bf2-f62c76ed400d" + "x-ms-version" : "2018-03-28", + "User-Agent" : "azsdk-java-azure-storage-queue/12.9.0-beta.1 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "09563bea-6bb5-48df-a537-53c88f2a99bd" }, "Response" : { - "x-ms-version" : "2019-12-12", + "x-ms-version" : "2018-03-28", "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "204", - "x-ms-request-id" : "37a3aeec-3003-009b-2f04-3a8ca5000000", - "Date" : "Thu, 04 Jun 2020 00:06:43 GMT", - "x-ms-client-request-id" : "eb02e67e-0bc9-492e-9bf2-f62c76ed400d" + "x-ms-request-id" : "edafc255-d003-008b-2e77-f321c4000000", + "Date" : "Tue, 26 Jan 2021 00:09:55 GMT" }, "Exception" : null } ], - "variables" : [ "queueserviceapitestslistqueues095466ecd0ba04e87e" ] + "variables" : [ "queueserviceapitestslistqueues0874059e735939df59" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueServiceAPITestsListQueues1.json b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueServiceAPITestsListQueues1.json index 5400bdd593ac8..88a63296a00f7 100644 --- a/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueServiceAPITestsListQueues1.json +++ b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueServiceAPITestsListQueues1.json @@ -1,162 +1,154 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.queue.core.windows.net/queueserviceapitestslistqueues114907fa8e7798a7520", + "Uri" : "https://REDACTED.queue.core.windows.net/queueserviceapitestslistqueues17539086d5fda8dd7e0", "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-queue/12.6.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "87bb584d-d9fb-4932-a101-fb8cf55bbeca" + "x-ms-version" : "2018-03-28", + "User-Agent" : "azsdk-java-azure-storage-queue/12.9.0-beta.1 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "3306f776-df44-45ef-86ca-aa0b5b4ea80d" }, "Response" : { - "x-ms-version" : "2019-12-12", + "x-ms-version" : "2018-03-28", "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "37a3aef2-3003-009b-3404-3a8ca5000000", - "Date" : "Thu, 04 Jun 2020 00:06:44 GMT", - "x-ms-client-request-id" : "87bb584d-d9fb-4932-a101-fb8cf55bbeca" + "x-ms-request-id" : "edafc257-d003-008b-3077-f321c4000000", + "Date" : "Tue, 26 Jan 2021 00:09:55 GMT" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.queue.core.windows.net/queueserviceapitestslistqueues114907fa8e7798a7521", + "Uri" : "https://REDACTED.queue.core.windows.net/queueserviceapitestslistqueues17539086d5fda8dd7e1", "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-queue/12.6.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "4b03c7a6-a995-4aa6-80cd-28a079ff6677" + "x-ms-version" : "2018-03-28", + "User-Agent" : "azsdk-java-azure-storage-queue/12.9.0-beta.1 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "670acfa5-1c73-421b-8ca8-4c63ac512f29" }, "Response" : { - "x-ms-version" : "2019-12-12", + "x-ms-version" : "2018-03-28", "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "37a3aef4-3003-009b-3504-3a8ca5000000", - "Date" : "Thu, 04 Jun 2020 00:06:44 GMT", - "x-ms-client-request-id" : "4b03c7a6-a995-4aa6-80cd-28a079ff6677" + "x-ms-request-id" : "edafc266-d003-008b-3677-f321c4000000", + "Date" : "Tue, 26 Jan 2021 00:09:55 GMT" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.queue.core.windows.net/queueserviceapitestslistqueues114907fa8e7798a7522", + "Uri" : "https://REDACTED.queue.core.windows.net/queueserviceapitestslistqueues17539086d5fda8dd7e2", "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-queue/12.6.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "36bd09f0-2ed7-4815-83a4-6f5b64aa956e" + "x-ms-version" : "2018-03-28", + "User-Agent" : "azsdk-java-azure-storage-queue/12.9.0-beta.1 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "9018d05c-7142-4618-8336-9eb1225834b2" }, "Response" : { - "x-ms-version" : "2019-12-12", + "x-ms-version" : "2018-03-28", "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "37a3aef8-3003-009b-3804-3a8ca5000000", - "Date" : "Thu, 04 Jun 2020 00:06:44 GMT", - "x-ms-client-request-id" : "36bd09f0-2ed7-4815-83a4-6f5b64aa956e" + "x-ms-request-id" : "edafc268-d003-008b-3777-f321c4000000", + "Date" : "Tue, 26 Jan 2021 00:09:55 GMT" }, "Exception" : null }, { "Method" : "GET", - "Uri" : "https://REDACTED.queue.core.windows.net?prefix=queueserviceapitestslistqueues&maxresults=2&include=&comp=list", + "Uri" : "https://REDACTED.queue.core.windows.net?comp=list&prefix=queueserviceapitestslistqueues&maxresults=2&include=", "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-queue/12.6.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "8f21c673-b8ad-4046-a916-2de17bf7c65c" + "x-ms-version" : "2018-03-28", + "User-Agent" : "azsdk-java-azure-storage-queue/12.9.0-beta.1 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "43eea23d-e9ad-402e-b5ef-70e8d9bea332" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-12-12", + "x-ms-version" : "2018-03-28", "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", "Cache-Control" : "no-cache", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "37a3aefb-3003-009b-3a04-3a8ca5000000", - "Body" : "queueserviceapitestslistqueues2queueserviceapitestslistqueues114907fa8e7798a7520queueserviceapitestslistqueues114907fa8e7798a7521/seanmcccanary/queueserviceapitestslistqueues114907fa8e7798a7522", - "Date" : "Thu, 04 Jun 2020 00:06:44 GMT", - "x-ms-client-request-id" : "8f21c673-b8ad-4046-a916-2de17bf7c65c", + "x-ms-request-id" : "edafc26a-d003-008b-3877-f321c4000000", + "Body" : "queueserviceapitestslistqueues2queueserviceapitestslistqueues17539086d5fda8dd7e0queueserviceapitestslistqueues17539086d5fda8dd7e1/gapracanary/queueserviceapitestslistqueues17539086d5fda8dd7e2", + "Date" : "Tue, 26 Jan 2021 00:09:55 GMT", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.queue.core.windows.net/queueserviceapitestslistqueues114907fa8e7798a7520", + "Uri" : "https://REDACTED.queue.core.windows.net/queueserviceapitestslistqueues17539086d5fda8dd7e0", "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-queue/12.6.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "0d29efc1-a3fc-44f2-be3f-6075e4da7fd7" + "x-ms-version" : "2018-03-28", + "User-Agent" : "azsdk-java-azure-storage-queue/12.9.0-beta.1 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "6234e340-5c91-42a6-835f-f8eace7eef5c" }, "Response" : { - "x-ms-version" : "2019-12-12", + "x-ms-version" : "2018-03-28", "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "204", - "x-ms-request-id" : "37a3aefe-3003-009b-3d04-3a8ca5000000", - "Date" : "Thu, 04 Jun 2020 00:06:44 GMT", - "x-ms-client-request-id" : "0d29efc1-a3fc-44f2-be3f-6075e4da7fd7" + "x-ms-request-id" : "edafc279-d003-008b-3e77-f321c4000000", + "Date" : "Tue, 26 Jan 2021 00:09:55 GMT" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.queue.core.windows.net/queueserviceapitestslistqueues114907fa8e7798a7521", + "Uri" : "https://REDACTED.queue.core.windows.net/queueserviceapitestslistqueues17539086d5fda8dd7e1", "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-queue/12.6.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "85ed2eb3-dbc2-40b9-8b32-618a78063b39" + "x-ms-version" : "2018-03-28", + "User-Agent" : "azsdk-java-azure-storage-queue/12.9.0-beta.1 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "40ff94fd-8a6d-4d07-935d-42b8bb333157" }, "Response" : { - "x-ms-version" : "2019-12-12", + "x-ms-version" : "2018-03-28", "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "204", - "x-ms-request-id" : "37a3aeff-3003-009b-3e04-3a8ca5000000", - "Date" : "Thu, 04 Jun 2020 00:06:44 GMT", - "x-ms-client-request-id" : "85ed2eb3-dbc2-40b9-8b32-618a78063b39" + "x-ms-request-id" : "edafc27d-d003-008b-4177-f321c4000000", + "Date" : "Tue, 26 Jan 2021 00:09:55 GMT" }, "Exception" : null }, { "Method" : "GET", - "Uri" : "https://REDACTED.queue.core.windows.net?prefix=queueserviceapitestslistqueues&marker=/seanmcccanary/queueserviceapitestslistqueues114907fa8e7798a7522&maxresults=2&include=&comp=list", + "Uri" : "https://REDACTED.queue.core.windows.net?comp=list&prefix=queueserviceapitestslistqueues&marker=/gapracanary/queueserviceapitestslistqueues17539086d5fda8dd7e2&maxresults=2&include=", "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-queue/12.6.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "ae941196-e875-4870-80ec-b06046074563" + "x-ms-version" : "2018-03-28", + "User-Agent" : "azsdk-java-azure-storage-queue/12.9.0-beta.1 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "a2bc3753-896c-40eb-881f-8ce4453ef1a5" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-12-12", + "x-ms-version" : "2018-03-28", "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", "Cache-Control" : "no-cache", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "45ceed0c-7003-0041-0d04-3a1544000000", - "Body" : "queueserviceapitestslistqueues/seanmcccanary/queueserviceapitestslistqueues114907fa8e7798a75222queueserviceapitestslistqueues114907fa8e7798a7522", - "Date" : "Thu, 04 Jun 2020 00:06:44 GMT", - "x-ms-client-request-id" : "ae941196-e875-4870-80ec-b06046074563", + "x-ms-request-id" : "edafc27e-d003-008b-4277-f321c4000000", + "Body" : "queueserviceapitestslistqueues/gapracanary/queueserviceapitestslistqueues17539086d5fda8dd7e22queueserviceapitestslistqueues17539086d5fda8dd7e2", + "Date" : "Tue, 26 Jan 2021 00:09:55 GMT", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.queue.core.windows.net/queueserviceapitestslistqueues114907fa8e7798a7522", + "Uri" : "https://REDACTED.queue.core.windows.net/queueserviceapitestslistqueues17539086d5fda8dd7e2", "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-queue/12.6.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "a2b5b883-6446-4b19-a416-45baa5e74312" + "x-ms-version" : "2018-03-28", + "User-Agent" : "azsdk-java-azure-storage-queue/12.9.0-beta.1 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "65013c7a-ebbd-4930-9e73-3cc623cbfa3b" }, "Response" : { - "x-ms-version" : "2019-12-12", + "x-ms-version" : "2018-03-28", "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "204", - "x-ms-request-id" : "37a3af0a-3003-009b-4704-3a8ca5000000", - "Date" : "Thu, 04 Jun 2020 00:06:44 GMT", - "x-ms-client-request-id" : "a2b5b883-6446-4b19-a416-45baa5e74312" + "x-ms-request-id" : "edafc27f-d003-008b-4377-f321c4000000", + "Date" : "Tue, 26 Jan 2021 00:09:55 GMT" }, "Exception" : null } ], - "variables" : [ "queueserviceapitestslistqueues114907fa8e7798a752" ] + "variables" : [ "queueserviceapitestslistqueues17539086d5fda8dd7e" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueServiceAPITestsListQueues2.json b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueServiceAPITestsListQueues2.json index eb3f9f5f4167c..7d96fc777db61 100644 --- a/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueServiceAPITestsListQueues2.json +++ b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueServiceAPITestsListQueues2.json @@ -1,140 +1,133 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.queue.core.windows.net/queueserviceapitestslistqueues21517159e33de2889d0", + "Uri" : "https://REDACTED.queue.core.windows.net/queueserviceapitestslistqueues20810639bd86244cc90", "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-queue/12.6.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "bd5c3005-7267-4749-ad0d-f09f4b0c5175" + "x-ms-version" : "2018-03-28", + "User-Agent" : "azsdk-java-azure-storage-queue/12.9.0-beta.1 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "5bddc935-7d7d-44c3-a5f6-979cba6a0f45" }, "Response" : { - "x-ms-version" : "2019-12-12", + "x-ms-version" : "2018-03-28", "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "45ceed20-7003-0041-1d04-3a1544000000", - "Date" : "Thu, 04 Jun 2020 00:06:44 GMT", - "x-ms-client-request-id" : "bd5c3005-7267-4749-ad0d-f09f4b0c5175" + "x-ms-request-id" : "edafc28d-d003-008b-4e77-f321c4000000", + "Date" : "Tue, 26 Jan 2021 00:09:56 GMT" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.queue.core.windows.net/queueserviceapitestslistqueues21517159e33de2889d1", + "Uri" : "https://REDACTED.queue.core.windows.net/queueserviceapitestslistqueues20810639bd86244cc91", "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-queue/12.6.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "ad94213f-dc85-4a8d-af65-780e2a61ecae" + "x-ms-version" : "2018-03-28", + "User-Agent" : "azsdk-java-azure-storage-queue/12.9.0-beta.1 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "cd8603b3-4f33-44ab-ab36-9077c3ff08db" }, "Response" : { - "x-ms-version" : "2019-12-12", + "x-ms-version" : "2018-03-28", "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "37a3af14-3003-009b-5004-3a8ca5000000", - "Date" : "Thu, 04 Jun 2020 00:06:45 GMT", - "x-ms-client-request-id" : "ad94213f-dc85-4a8d-af65-780e2a61ecae" + "x-ms-request-id" : "edafc291-d003-008b-5177-f321c4000000", + "Date" : "Tue, 26 Jan 2021 00:09:56 GMT" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.queue.core.windows.net/queueserviceapitestslistqueues21517159e33de2889d2", + "Uri" : "https://REDACTED.queue.core.windows.net/queueserviceapitestslistqueues20810639bd86244cc92", "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-queue/12.6.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "d5acfe99-2c06-4a7a-991f-75c163ed7372" + "x-ms-version" : "2018-03-28", + "User-Agent" : "azsdk-java-azure-storage-queue/12.9.0-beta.1 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "75fda73e-2a23-47b0-b3d8-1dcd6d20694d" }, "Response" : { - "x-ms-version" : "2019-12-12", + "x-ms-version" : "2018-03-28", "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "45ceed30-7003-0041-2704-3a1544000000", - "Date" : "Thu, 04 Jun 2020 00:06:44 GMT", - "x-ms-client-request-id" : "d5acfe99-2c06-4a7a-991f-75c163ed7372" + "x-ms-request-id" : "edafc293-d003-008b-5277-f321c4000000", + "Date" : "Tue, 26 Jan 2021 00:09:56 GMT" }, "Exception" : null }, { "Method" : "GET", - "Uri" : "https://REDACTED.queue.core.windows.net?prefix=queueserviceapitestslistqueues&include=metadata&comp=list", + "Uri" : "https://REDACTED.queue.core.windows.net?comp=list&prefix=queueserviceapitestslistqueues&include=metadata", "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-queue/12.6.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "64fe3815-536b-4e8d-a88c-5e7c08d9acb8" + "x-ms-version" : "2018-03-28", + "User-Agent" : "azsdk-java-azure-storage-queue/12.9.0-beta.1 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "f34a8de0-27c2-4413-8b21-c49efe04838f" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-12-12", + "x-ms-version" : "2018-03-28", "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", "Cache-Control" : "no-cache", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "37a3af19-3003-009b-5304-3a8ca5000000", - "Body" : "queueserviceapitestslistqueuesqueueserviceapitestslistqueues21517159e33de2889d0value0queueserviceapitestslistqueues21517159e33de2889d1value1queueserviceapitestslistqueues21517159e33de2889d2value2", - "Date" : "Thu, 04 Jun 2020 00:06:45 GMT", - "x-ms-client-request-id" : "64fe3815-536b-4e8d-a88c-5e7c08d9acb8", + "x-ms-request-id" : "edafc298-d003-008b-5677-f321c4000000", + "Body" : "queueserviceapitestslistqueuesqueueserviceapitestslistqueues20810639bd86244cc90value0queueserviceapitestslistqueues20810639bd86244cc91value1queueserviceapitestslistqueues20810639bd86244cc92value2", + "Date" : "Tue, 26 Jan 2021 00:09:56 GMT", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.queue.core.windows.net/queueserviceapitestslistqueues21517159e33de2889d0", + "Uri" : "https://REDACTED.queue.core.windows.net/queueserviceapitestslistqueues20810639bd86244cc90", "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-queue/12.6.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "561456d3-db66-4b5a-88f4-bc0d7053d82d" + "x-ms-version" : "2018-03-28", + "User-Agent" : "azsdk-java-azure-storage-queue/12.9.0-beta.1 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "b15dbe8e-11d9-4064-b320-f9a06b6921e8" }, "Response" : { - "x-ms-version" : "2019-12-12", + "x-ms-version" : "2018-03-28", "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "204", - "x-ms-request-id" : "45ceed3f-7003-0041-3304-3a1544000000", - "Date" : "Thu, 04 Jun 2020 00:06:44 GMT", - "x-ms-client-request-id" : "561456d3-db66-4b5a-88f4-bc0d7053d82d" + "x-ms-request-id" : "edafc299-d003-008b-5777-f321c4000000", + "Date" : "Tue, 26 Jan 2021 00:09:56 GMT" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.queue.core.windows.net/queueserviceapitestslistqueues21517159e33de2889d1", + "Uri" : "https://REDACTED.queue.core.windows.net/queueserviceapitestslistqueues20810639bd86244cc91", "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-queue/12.6.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "0b5eca89-ceeb-43b1-82dc-2bf7fd0b120b" + "x-ms-version" : "2018-03-28", + "User-Agent" : "azsdk-java-azure-storage-queue/12.9.0-beta.1 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "d4445851-c2ee-430a-8cf9-6bc0b989cf30" }, "Response" : { - "x-ms-version" : "2019-12-12", + "x-ms-version" : "2018-03-28", "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "204", - "x-ms-request-id" : "37a3af22-3003-009b-5804-3a8ca5000000", - "Date" : "Thu, 04 Jun 2020 00:06:45 GMT", - "x-ms-client-request-id" : "0b5eca89-ceeb-43b1-82dc-2bf7fd0b120b" + "x-ms-request-id" : "edafc29a-d003-008b-5877-f321c4000000", + "Date" : "Tue, 26 Jan 2021 00:09:56 GMT" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.queue.core.windows.net/queueserviceapitestslistqueues21517159e33de2889d2", + "Uri" : "https://REDACTED.queue.core.windows.net/queueserviceapitestslistqueues20810639bd86244cc92", "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-queue/12.6.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "8f03a405-1b36-421c-95a4-e90f41230b0a" + "x-ms-version" : "2018-03-28", + "User-Agent" : "azsdk-java-azure-storage-queue/12.9.0-beta.1 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "916686c7-dd90-4a14-bf8e-a9ddb097039d" }, "Response" : { - "x-ms-version" : "2019-12-12", + "x-ms-version" : "2018-03-28", "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "204", - "x-ms-request-id" : "45ceed4b-7003-0041-3d04-3a1544000000", - "Date" : "Thu, 04 Jun 2020 00:06:44 GMT", - "x-ms-client-request-id" : "8f03a405-1b36-421c-95a4-e90f41230b0a" + "x-ms-request-id" : "edafc2a0-d003-008b-5e77-f321c4000000", + "Date" : "Tue, 26 Jan 2021 00:09:56 GMT" }, "Exception" : null } ], - "variables" : [ "queueserviceapitestslistqueues21517159e33de2889d" ] + "variables" : [ "queueserviceapitestslistqueues20810639bd86244cc9" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueServiceAsyncAPITestsListEmptyQueues.json b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueServiceAsyncAPITestsListEmptyQueues.json index ff6b488bba286..6750bea7350b3 100644 --- a/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueServiceAsyncAPITestsListEmptyQueues.json +++ b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueServiceAsyncAPITestsListEmptyQueues.json @@ -1,23 +1,22 @@ { "networkCallRecords" : [ { "Method" : "GET", - "Uri" : "https://REDACTED.queue.core.windows.net?prefix=QueueServiceAsyncAPITestsListEmptyQueues&include=&comp=list", + "Uri" : "https://REDACTED.queue.core.windows.net?comp=list&prefix=QueueServiceAsyncAPITestsListEmptyQueues&include=", "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-queue/12.6.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "4b7a967d-c848-4f32-a71f-c817e65f9b6a" + "x-ms-version" : "2018-03-28", + "User-Agent" : "azsdk-java-azure-storage-queue/12.9.0-beta.1 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "5408b3a7-93ad-4692-9745-8b2b499178f8" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-12-12", + "x-ms-version" : "2018-03-28", "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", "Cache-Control" : "no-cache", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "45cef0c7-7003-0041-3a04-3a1544000000", - "Body" : "QueueServiceAsyncAPITestsListEmptyQueues", - "Date" : "Thu, 04 Jun 2020 00:06:59 GMT", - "x-ms-client-request-id" : "4b7a967d-c848-4f32-a71f-c817e65f9b6a", + "x-ms-request-id" : "edafbe0f-d003-008b-6b77-f321c4000000", + "Body" : "QueueServiceAsyncAPITestsListEmptyQueues", + "Date" : "Tue, 26 Jan 2021 00:09:14 GMT", "Content-Type" : "application/xml" }, "Exception" : null diff --git a/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueServiceAsyncAPITestsListQueues0.json b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueServiceAsyncAPITestsListQueues0.json index c11be7ec84025..60f9574fa7b72 100644 --- a/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueServiceAsyncAPITestsListQueues0.json +++ b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueServiceAsyncAPITestsListQueues0.json @@ -1,83 +1,79 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.queue.core.windows.net/queueserviceasyncapitestslistqueues000774d277005d30", + "Uri" : "https://REDACTED.queue.core.windows.net/queueserviceasyncapitestslistqueues099128a3798ac080", "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-queue/12.6.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "50cad509-a73f-4a5f-9de1-cc84e2ce60a9" + "x-ms-version" : "2018-03-28", + "User-Agent" : "azsdk-java-azure-storage-queue/12.9.0-beta.1 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "2b6507f9-9d3c-4d22-b85e-0541254e38f4" }, "Response" : { - "x-ms-version" : "2019-12-12", + "x-ms-version" : "2018-03-28", "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "37a3b16e-3003-009b-0e04-3a8ca5000000", - "Date" : "Thu, 04 Jun 2020 00:06:57 GMT", - "x-ms-client-request-id" : "50cad509-a73f-4a5f-9de1-cc84e2ce60a9" + "x-ms-request-id" : "edafbdad-d003-008b-2677-f321c4000000", + "Date" : "Tue, 26 Jan 2021 00:09:12 GMT" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.queue.core.windows.net/queueserviceasyncapitestslistqueues000774d277005d31", + "Uri" : "https://REDACTED.queue.core.windows.net/queueserviceasyncapitestslistqueues099128a3798ac081", "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-queue/12.6.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "fe1b53d3-cd57-4f1f-9229-1d48f87dc555" + "x-ms-version" : "2018-03-28", + "User-Agent" : "azsdk-java-azure-storage-queue/12.9.0-beta.1 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "4d3e29a3-a25d-441e-ac46-fea95c12fbd4" }, "Response" : { - "x-ms-version" : "2019-12-12", + "x-ms-version" : "2018-03-28", "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "45cef046-7003-0041-4604-3a1544000000", - "Date" : "Thu, 04 Jun 2020 00:06:57 GMT", - "x-ms-client-request-id" : "fe1b53d3-cd57-4f1f-9229-1d48f87dc555" + "x-ms-request-id" : "edafbdb5-d003-008b-2b77-f321c4000000", + "Date" : "Tue, 26 Jan 2021 00:09:12 GMT" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.queue.core.windows.net/queueserviceasyncapitestslistqueues000774d277005d32", + "Uri" : "https://REDACTED.queue.core.windows.net/queueserviceasyncapitestslistqueues099128a3798ac082", "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-queue/12.6.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "78fc0606-d2d4-4bb7-a393-04264ffcc874" + "x-ms-version" : "2018-03-28", + "User-Agent" : "azsdk-java-azure-storage-queue/12.9.0-beta.1 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "a1ca63dc-94e0-4b73-851b-7dc9c69978ef" }, "Response" : { - "x-ms-version" : "2019-12-12", + "x-ms-version" : "2018-03-28", "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "37a3b17d-3003-009b-1a04-3a8ca5000000", - "Date" : "Thu, 04 Jun 2020 00:06:57 GMT", - "x-ms-client-request-id" : "78fc0606-d2d4-4bb7-a393-04264ffcc874" + "x-ms-request-id" : "edafbdc0-d003-008b-3177-f321c4000000", + "Date" : "Tue, 26 Jan 2021 00:09:12 GMT" }, "Exception" : null }, { "Method" : "GET", - "Uri" : "https://REDACTED.queue.core.windows.net?prefix=queueserviceasyncapitestslistqueues&include=&comp=list", + "Uri" : "https://REDACTED.queue.core.windows.net?comp=list&prefix=queueserviceasyncapitestslistqueues&include=", "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-queue/12.6.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "3642513a-f44b-4228-afc0-9bb775ad8a1a" + "x-ms-version" : "2018-03-28", + "User-Agent" : "azsdk-java-azure-storage-queue/12.9.0-beta.1 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "80139746-9f45-4971-ab5b-9f422a5b4ef2" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-12-12", + "x-ms-version" : "2018-03-28", "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", "Cache-Control" : "no-cache", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "45cef05a-7003-0041-5804-3a1544000000", - "Body" : "queueserviceasyncapitestslistqueuesqueueserviceasyncapitestslistqueues000774d277005d30queueserviceasyncapitestslistqueues000774d277005d31queueserviceasyncapitestslistqueues000774d277005d32", - "Date" : "Thu, 04 Jun 2020 00:06:57 GMT", - "x-ms-client-request-id" : "3642513a-f44b-4228-afc0-9bb775ad8a1a", + "x-ms-request-id" : "edafbdc8-d003-008b-3477-f321c4000000", + "Body" : "queueserviceasyncapitestslistqueuesqueueserviceasyncapitestslistqueues099128a3798ac080queueserviceasyncapitestslistqueues099128a3798ac081queueserviceasyncapitestslistqueues099128a3798ac082", + "Date" : "Tue, 26 Jan 2021 00:09:12 GMT", "Content-Type" : "application/xml" }, "Exception" : null } ], - "variables" : [ "queueserviceasyncapitestslistqueues000774d277005d3" ] + "variables" : [ "queueserviceasyncapitestslistqueues099128a3798ac08" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueServiceAsyncAPITestsListQueues1.json b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueServiceAsyncAPITestsListQueues1.json index 5c47d94baa16b..557901ce0ec8d 100644 --- a/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueServiceAsyncAPITestsListQueues1.json +++ b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueServiceAsyncAPITestsListQueues1.json @@ -1,105 +1,100 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.queue.core.windows.net/queueserviceasyncapitestslistqueues179419cc738e3c60", + "Uri" : "https://REDACTED.queue.core.windows.net/queueserviceasyncapitestslistqueues1775977e82aa66c0", "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-queue/12.6.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "19345b7d-ec40-4bae-a834-44a6eeb1ca28" + "x-ms-version" : "2018-03-28", + "User-Agent" : "azsdk-java-azure-storage-queue/12.9.0-beta.1 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "915acff7-8fa9-4532-8207-14eebc7afb33" }, "Response" : { - "x-ms-version" : "2019-12-12", + "x-ms-version" : "2018-03-28", "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "37a3b1a0-3003-009b-3704-3a8ca5000000", - "Date" : "Thu, 04 Jun 2020 00:06:58 GMT", - "x-ms-client-request-id" : "19345b7d-ec40-4bae-a834-44a6eeb1ca28" + "x-ms-request-id" : "edafbdce-d003-008b-3977-f321c4000000", + "Date" : "Tue, 26 Jan 2021 00:09:13 GMT" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.queue.core.windows.net/queueserviceasyncapitestslistqueues179419cc738e3c61", + "Uri" : "https://REDACTED.queue.core.windows.net/queueserviceasyncapitestslistqueues1775977e82aa66c1", "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-queue/12.6.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "999a1874-5d3e-479c-9f22-dff2cebd6857" + "x-ms-version" : "2018-03-28", + "User-Agent" : "azsdk-java-azure-storage-queue/12.9.0-beta.1 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "b24b4eec-54d6-45fa-894e-7c9987754f19" }, "Response" : { - "x-ms-version" : "2019-12-12", + "x-ms-version" : "2018-03-28", "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "45cef07b-7003-0041-7604-3a1544000000", - "Date" : "Thu, 04 Jun 2020 00:06:57 GMT", - "x-ms-client-request-id" : "999a1874-5d3e-479c-9f22-dff2cebd6857" + "x-ms-request-id" : "edafbdd3-d003-008b-3d77-f321c4000000", + "Date" : "Tue, 26 Jan 2021 00:09:13 GMT" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.queue.core.windows.net/queueserviceasyncapitestslistqueues179419cc738e3c62", + "Uri" : "https://REDACTED.queue.core.windows.net/queueserviceasyncapitestslistqueues1775977e82aa66c2", "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-queue/12.6.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "1bfe7ecc-5d69-4a2a-abe4-829bc3afab47" + "x-ms-version" : "2018-03-28", + "User-Agent" : "azsdk-java-azure-storage-queue/12.9.0-beta.1 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "37947ef3-e18e-4abf-b827-47a5d12242f2" }, "Response" : { - "x-ms-version" : "2019-12-12", + "x-ms-version" : "2018-03-28", "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "37a3b1af-3003-009b-4504-3a8ca5000000", - "Date" : "Thu, 04 Jun 2020 00:06:58 GMT", - "x-ms-client-request-id" : "1bfe7ecc-5d69-4a2a-abe4-829bc3afab47" + "x-ms-request-id" : "edafbdda-d003-008b-4177-f321c4000000", + "Date" : "Tue, 26 Jan 2021 00:09:13 GMT" }, "Exception" : null }, { "Method" : "GET", - "Uri" : "https://REDACTED.queue.core.windows.net?prefix=queueserviceasyncapitestslistqueues&maxresults=2&include=&comp=list", + "Uri" : "https://REDACTED.queue.core.windows.net?comp=list&prefix=queueserviceasyncapitestslistqueues&maxresults=2&include=", "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-queue/12.6.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "651db6be-30f8-40e6-adb6-80fa1e7caef8" + "x-ms-version" : "2018-03-28", + "User-Agent" : "azsdk-java-azure-storage-queue/12.9.0-beta.1 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "07501de3-49cc-46c2-af63-5138ab2402be" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-12-12", + "x-ms-version" : "2018-03-28", "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", "Cache-Control" : "no-cache", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "45cef085-7003-0041-7f04-3a1544000000", - "Body" : "queueserviceasyncapitestslistqueues2queueserviceasyncapitestslistqueues179419cc738e3c60queueserviceasyncapitestslistqueues179419cc738e3c61/seanmcccanary/queueserviceasyncapitestslistqueues179419cc738e3c62", - "Date" : "Thu, 04 Jun 2020 00:06:58 GMT", - "x-ms-client-request-id" : "651db6be-30f8-40e6-adb6-80fa1e7caef8", + "x-ms-request-id" : "edafbddc-d003-008b-4277-f321c4000000", + "Body" : "queueserviceasyncapitestslistqueues2queueserviceasyncapitestslistqueues1775977e82aa66c0queueserviceasyncapitestslistqueues1775977e82aa66c1/gapracanary/queueserviceasyncapitestslistqueues1775977e82aa66c2", + "Date" : "Tue, 26 Jan 2021 00:09:13 GMT", "Content-Type" : "application/xml" }, "Exception" : null }, { "Method" : "GET", - "Uri" : "https://REDACTED.queue.core.windows.net?prefix=queueserviceasyncapitestslistqueues&marker=/seanmcccanary/queueserviceasyncapitestslistqueues179419cc738e3c62&maxresults=2&include=&comp=list", + "Uri" : "https://REDACTED.queue.core.windows.net?comp=list&prefix=queueserviceasyncapitestslistqueues&marker=/gapracanary/queueserviceasyncapitestslistqueues1775977e82aa66c2&maxresults=2&include=", "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-queue/12.6.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "67280e03-9767-4b35-afe7-cec4fce7fc77" + "x-ms-version" : "2018-03-28", + "User-Agent" : "azsdk-java-azure-storage-queue/12.9.0-beta.1 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "8dbc51c7-69ab-4cfa-b3e7-caf33199b772" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-12-12", + "x-ms-version" : "2018-03-28", "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", "Cache-Control" : "no-cache", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "37a3b1b5-3003-009b-4904-3a8ca5000000", - "Body" : "queueserviceasyncapitestslistqueues/seanmcccanary/queueserviceasyncapitestslistqueues179419cc738e3c622queueserviceasyncapitestslistqueues179419cc738e3c62", - "Date" : "Thu, 04 Jun 2020 00:06:58 GMT", - "x-ms-client-request-id" : "67280e03-9767-4b35-afe7-cec4fce7fc77", + "x-ms-request-id" : "edafbddd-d003-008b-4377-f321c4000000", + "Body" : "queueserviceasyncapitestslistqueues/gapracanary/queueserviceasyncapitestslistqueues1775977e82aa66c22queueserviceasyncapitestslistqueues1775977e82aa66c2", + "Date" : "Tue, 26 Jan 2021 00:09:13 GMT", "Content-Type" : "application/xml" }, "Exception" : null } ], - "variables" : [ "queueserviceasyncapitestslistqueues179419cc738e3c6" ] + "variables" : [ "queueserviceasyncapitestslistqueues1775977e82aa66c" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueServiceAsyncAPITestsListQueues2.json b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueServiceAsyncAPITestsListQueues2.json index 77769f1157239..966c7675419d3 100644 --- a/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueServiceAsyncAPITestsListQueues2.json +++ b/sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueServiceAsyncAPITestsListQueues2.json @@ -1,83 +1,79 @@ { "networkCallRecords" : [ { "Method" : "PUT", - "Uri" : "https://REDACTED.queue.core.windows.net/queueserviceasyncapitestslistqueues2463338a026ef210", + "Uri" : "https://REDACTED.queue.core.windows.net/queueserviceasyncapitestslistqueues2632644c259954f0", "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-queue/12.6.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "9f5a8d7c-ad58-4c64-afb7-3ee2dc21cc13" + "x-ms-version" : "2018-03-28", + "User-Agent" : "azsdk-java-azure-storage-queue/12.9.0-beta.1 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "9bc38996-22a0-4b59-bcd0-21e5c449173d" }, "Response" : { - "x-ms-version" : "2019-12-12", + "x-ms-version" : "2018-03-28", "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "45cef0a5-7003-0041-1c04-3a1544000000", - "Date" : "Thu, 04 Jun 2020 00:06:58 GMT", - "x-ms-client-request-id" : "9f5a8d7c-ad58-4c64-afb7-3ee2dc21cc13" + "x-ms-request-id" : "edafbdec-d003-008b-4f77-f321c4000000", + "Date" : "Tue, 26 Jan 2021 00:09:13 GMT" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.queue.core.windows.net/queueserviceasyncapitestslistqueues2463338a026ef211", + "Uri" : "https://REDACTED.queue.core.windows.net/queueserviceasyncapitestslistqueues2632644c259954f1", "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-queue/12.6.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "4facaf37-7280-408a-94b7-d94723dd225f" + "x-ms-version" : "2018-03-28", + "User-Agent" : "azsdk-java-azure-storage-queue/12.9.0-beta.1 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "ed90978e-16d6-44ab-a991-eb4b63c77c47" }, "Response" : { - "x-ms-version" : "2019-12-12", + "x-ms-version" : "2018-03-28", "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "37a3b1c6-3003-009b-5704-3a8ca5000000", - "Date" : "Thu, 04 Jun 2020 00:06:59 GMT", - "x-ms-client-request-id" : "4facaf37-7280-408a-94b7-d94723dd225f" + "x-ms-request-id" : "edafbdee-d003-008b-5077-f321c4000000", + "Date" : "Tue, 26 Jan 2021 00:09:13 GMT" }, "Exception" : null }, { "Method" : "PUT", - "Uri" : "https://REDACTED.queue.core.windows.net/queueserviceasyncapitestslistqueues2463338a026ef212", + "Uri" : "https://REDACTED.queue.core.windows.net/queueserviceasyncapitestslistqueues2632644c259954f2", "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-queue/12.6.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "4e8f79c9-5f96-4fd0-b234-d5a6c272fcea" + "x-ms-version" : "2018-03-28", + "User-Agent" : "azsdk-java-azure-storage-queue/12.9.0-beta.1 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "9b4a17d5-caac-4198-8a5c-32b763e26e76" }, "Response" : { - "x-ms-version" : "2019-12-12", + "x-ms-version" : "2018-03-28", "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", "retry-after" : "0", "Content-Length" : "0", "StatusCode" : "201", - "x-ms-request-id" : "45cef0af-7003-0041-2404-3a1544000000", - "Date" : "Thu, 04 Jun 2020 00:06:58 GMT", - "x-ms-client-request-id" : "4e8f79c9-5f96-4fd0-b234-d5a6c272fcea" + "x-ms-request-id" : "edafbdf1-d003-008b-5277-f321c4000000", + "Date" : "Tue, 26 Jan 2021 00:09:14 GMT" }, "Exception" : null }, { "Method" : "GET", - "Uri" : "https://REDACTED.queue.core.windows.net?prefix=queueserviceasyncapitestslistqueues&include=metadata&comp=list", + "Uri" : "https://REDACTED.queue.core.windows.net?comp=list&prefix=queueserviceasyncapitestslistqueues&include=metadata", "Headers" : { - "x-ms-version" : "2019-12-12", - "User-Agent" : "azsdk-java-azure-storage-queue/12.6.0-beta.1 (11.0.6; Windows 10 10.0)", - "x-ms-client-request-id" : "fbdda18a-255e-4dbb-8615-52305ad75c31" + "x-ms-version" : "2018-03-28", + "User-Agent" : "azsdk-java-azure-storage-queue/12.9.0-beta.1 (11.0.7; Windows 10; 10.0)", + "x-ms-client-request-id" : "a7151d29-7273-4900-aa2a-2bdf348347a4" }, "Response" : { "Transfer-Encoding" : "chunked", - "x-ms-version" : "2019-12-12", + "x-ms-version" : "2018-03-28", "Server" : "Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0", "Cache-Control" : "no-cache", "retry-after" : "0", "StatusCode" : "200", - "x-ms-request-id" : "37a3b1d1-3003-009b-5f04-3a8ca5000000", - "Body" : "queueserviceasyncapitestslistqueuesqueueserviceasyncapitestslistqueues2463338a026ef210value0queueserviceasyncapitestslistqueues2463338a026ef211value1queueserviceasyncapitestslistqueues2463338a026ef212value2", - "Date" : "Thu, 04 Jun 2020 00:06:59 GMT", - "x-ms-client-request-id" : "fbdda18a-255e-4dbb-8615-52305ad75c31", + "x-ms-request-id" : "edafbdf4-d003-008b-5477-f321c4000000", + "Body" : "queueserviceasyncapitestslistqueuesqueueserviceasyncapitestslistqueues2632644c259954f0value0queueserviceasyncapitestslistqueues2632644c259954f1value1queueserviceasyncapitestslistqueues2632644c259954f2value2", + "Date" : "Tue, 26 Jan 2021 00:09:14 GMT", "Content-Type" : "application/xml" }, "Exception" : null } ], - "variables" : [ "queueserviceasyncapitestslistqueues2463338a026ef21" ] + "variables" : [ "queueserviceasyncapitestslistqueues2632644c259954f" ] } \ No newline at end of file diff --git a/sdk/storage/azure-storage-queue/swagger/README.md b/sdk/storage/azure-storage-queue/swagger/README.md index 77af6c20ea3ad..13162f88c9098 100644 --- a/sdk/storage/azure-storage-queue/swagger/README.md +++ b/sdk/storage/azure-storage-queue/swagger/README.md @@ -3,14 +3,14 @@ > see https://aka.ms/autorest ### Setup - -Increase max memory if you're using Autorest older than 3. Set the environment variable `NODE_OPTIONS` to `--max-old-space-size=8192`. +> see https://github.com/Azure/autorest.java ### Generation +> see https://github.com/Azure/autorest.java/releases for the latest version of autorest ```ps cd -# You may need to repeat this command few times if you're getting "TypeError: Cannot read property 'filename' of undefined" error -autorest --use=@microsoft.azure/autorest.java@3.0.4 --use=jianghaolu/autorest.modeler#440af3935c504cea4410133e1fd940b78f6af749 --version=2.0.4280 +mvn install +autorest --java --use:@autorest/java@4.0.x ``` ### Code generation settings @@ -20,13 +20,17 @@ java: true output-folder: ../ namespace: com.azure.storage.queue enable-xml: true +generate-client-as-impl: true generate-client-interfaces: false +service-interface-as-public: true sync-methods: none license-header: MICROSOFT_MIT_SMALL -add-context-parameter: true +context-client-method-parameter: true models-subpackage: implementation.models -custom-types: QueueErrorCode,QueueSignedIdentifier,SendMessageResult,QueueMessageItem,PeekedMessageItem,QueueItem,QueueServiceProperties,QueueServiceStatistics,QueueCorsRule,QueueAccessPolicy,QueueAnalyticsLogging,QueueMetrics,QueueRetentionPolicy,GeoReplicationStatus,GeoReplicationStatusType +custom-types: QueueErrorCode,QueueSignedIdentifier,SendMessageResult,QueueMessageItem,PeekedMessageItem,QueueItem,QueueServiceProperties,QueueServiceStatistics,QueueCorsRule,QueueAccessPolicy,QueueAnalyticsLogging,QueueMetrics,QueueRetentionPolicy,GeoReplicationStatus,GeoReplicationStatusType,GeoReplication custom-types-subpackage: models +customization-jar-path: target/azure-storage-queue-customization-1.0.0-beta.1.jar +customization-class: com.azure.storage.queue.customization.QueueStorageCustomization ``` ### /{queueName} @@ -305,68 +309,13 @@ directive: $.QueueSignedIdentifier.properties.AccessPolicy["$ref"] = "#/definitions/QueueAccessPolicy"; ``` -### QueueServiceProperties Annotation Fix -``` yaml -directive: -- from: QueueServiceProperties.java - where: $ - transform: > - return $.replace('@JsonProperty(value = "Metrics")\n private QueueMetrics hourMetrics;', '@JsonProperty(value = "HourMetrics")\n private QueueMetrics hourMetrics;'). - replace('@JsonProperty(value = "Metrics")\n private QueueMetrics minuteMetrics;', '@JsonProperty(value = "MinuteMetrics")\n private QueueMetrics minuteMetrics;'); -``` - -### Change StorageErrorException to StorageException +### ListQueuesSegment x-ms-pageable itemName ``` yaml directive: -- from: ServicesImpl.java - where: $ - transform: > - return $. - replace( - "com.azure.storage.queue.implementation.models.StorageErrorException", - "com.azure.storage.queue.models.QueueStorageException" - ). - replace( - /\@UnexpectedResponseExceptionType\(StorageErrorException\.class\)/g, - "@UnexpectedResponseExceptionType(QueueStorageException.class)" - ); -- from: QueuesImpl.java - where: $ - transform: > - return $. - replace( - "com.azure.storage.queue.implementation.models.StorageErrorException", - "com.azure.storage.queue.models.QueueStorageException" - ). - replace( - /\@UnexpectedResponseExceptionType\(StorageErrorException\.class\)/g, - "@UnexpectedResponseExceptionType(QueueStorageException.class)" - ); -- from: MessagesImpl.java - where: $ - transform: > - return $. - replace( - "com.azure.storage.queue.implementation.models.StorageErrorException", - "com.azure.storage.queue.models.QueueStorageException" - ). - replace( - /\@UnexpectedResponseExceptionType\(StorageErrorException\.class\)/g, - "@UnexpectedResponseExceptionType(QueueStorageException.class)" - ); -- from: MessageIdsImpl.java - where: $ +- from: swagger-document + where: $["x-ms-paths"]["/?comp=list"].get transform: > - return $. - replace( - "com.azure.storage.queue.implementation.models.StorageErrorException", - "com.azure.storage.queue.models.QueueStorageException" - ). - replace( - /\@UnexpectedResponseExceptionType\(StorageErrorException\.class\)/g, - "@UnexpectedResponseExceptionType(QueueStorageException.class)" - ); + $["x-ms-pageable"].itemName = "QueueItems"; ``` - ![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-java%2Fsdk%2Fstorage%2Fazure-storage-queue%2Fswagger%2FREADME.png) diff --git a/sdk/storage/azure-storage-queue/swagger/pom.xml b/sdk/storage/azure-storage-queue/swagger/pom.xml new file mode 100644 index 0000000000000..5983b19b5b329 --- /dev/null +++ b/sdk/storage/azure-storage-queue/swagger/pom.xml @@ -0,0 +1,32 @@ + + + + + azure-autorest-parent + com.azure.tools + 1.0.0-beta.1 + ../../pom.xml + + + com.azure + azure-storage-queue-customization + 1.0.0-beta.1 + 4.0.0 + + + + + com.azure.tools + azure-autorest-customization + 1.0.0-beta.2 + + + junit + junit + 4.13.1 + test + + + diff --git a/sdk/storage/azure-storage-queue/swagger/src/main/java/com/azure/storage/queue/customization/QueueStorageCustomization.java b/sdk/storage/azure-storage-queue/swagger/src/main/java/com/azure/storage/queue/customization/QueueStorageCustomization.java new file mode 100644 index 0000000000000..8b864fc138c96 --- /dev/null +++ b/sdk/storage/azure-storage-queue/swagger/src/main/java/com/azure/storage/queue/customization/QueueStorageCustomization.java @@ -0,0 +1,62 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.storage.queue.customization; + +import com.azure.autorest.customization.ClassCustomization; +import com.azure.autorest.customization.Customization; +import com.azure.autorest.customization.LibraryCustomization; +import com.azure.autorest.customization.MethodCustomization; +import com.azure.autorest.customization.PackageCustomization; +import com.azure.autorest.customization.PropertyCustomization; + +/** + * Customization class for Queue Storage. + */ +public class QueueStorageCustomization extends Customization { + @Override + public void customize(LibraryCustomization customization) { + // Update unexpected response exception type. + PackageCustomization impl = customization.getPackage("com.azure.storage.queue.implementation"); + + ClassCustomization queuesImpl = impl.getClass("QueuesImpl"); + modifyUnexpectedResponseExceptionType(queuesImpl.getMethod("create")); + modifyUnexpectedResponseExceptionType(queuesImpl.getMethod("delete")); + modifyUnexpectedResponseExceptionType(queuesImpl.getMethod("getProperties")); + modifyUnexpectedResponseExceptionType(queuesImpl.getMethod("setMetadata")); + modifyUnexpectedResponseExceptionType(queuesImpl.getMethod("getAccessPolicy")); + modifyUnexpectedResponseExceptionType(queuesImpl.getMethod("setAccessPolicy")); + + ClassCustomization messageIdsImpl = impl.getClass("MessageIdsImpl"); + modifyUnexpectedResponseExceptionType(messageIdsImpl.getMethod("update")); + modifyUnexpectedResponseExceptionType(messageIdsImpl.getMethod("delete")); + + ClassCustomization messagesImpl = impl.getClass("MessagesImpl"); + modifyUnexpectedResponseExceptionType(messagesImpl.getMethod("dequeue")); + modifyUnexpectedResponseExceptionType(messagesImpl.getMethod("clear")); + modifyUnexpectedResponseExceptionType(messagesImpl.getMethod("enqueue")); + modifyUnexpectedResponseExceptionType(messagesImpl.getMethod("peek")); + + ClassCustomization servicesImpl = impl.getClass("ServicesImpl"); + modifyUnexpectedResponseExceptionType(servicesImpl.getMethod("setProperties")); + modifyUnexpectedResponseExceptionType(servicesImpl.getMethod("getProperties")); + modifyUnexpectedResponseExceptionType(servicesImpl.getMethod("getStatistics")); + modifyUnexpectedResponseExceptionType(servicesImpl.getMethod("listQueuesSegment")); + modifyUnexpectedResponseExceptionType(servicesImpl.getMethod("listQueuesSegmentNext")); + + // Update incorrect JsonProperty of Metrics + PackageCustomization models = customization.getPackage("com.azure.storage.queue.models"); + ClassCustomization queueServiceProperties = models.getClass("QueueServiceProperties"); + PropertyCustomization hourMetrics = queueServiceProperties.getProperty("hourMetrics"); + hourMetrics.removeAnnotation("@JsonProperty(value = \"Metrics\")"); + hourMetrics.addAnnotation("@JsonProperty(value = \"HourMetrics\")"); + PropertyCustomization minuteMetrics = queueServiceProperties.getProperty("minuteMetrics"); + minuteMetrics.removeAnnotation("@JsonProperty(value = \"Metrics\")"); + minuteMetrics.addAnnotation("@JsonProperty(value = \"MinuteMetrics\")"); + } + + private void modifyUnexpectedResponseExceptionType(MethodCustomization method) { + method.removeAnnotation("@UnexpectedResponseExceptionType(StorageErrorException.class)"); + method.addAnnotation("@UnexpectedResponseExceptionType(com.azure.storage.queue.models.QueueStorageException.class)"); + } +}