From ad752734bc2cfec0e08b9fff88b7c6f2d78dd2b0 Mon Sep 17 00:00:00 2001 From: Connie Yau Date: Mon, 7 Jun 2021 12:48:52 -0700 Subject: [PATCH 01/21] Exposes management node in azure-core-amqp (#22095) * Update AmqpConnection to have a getManagementNode. * Adding AmqpManagementNode. * Update AmqpConnection, AmqpManagementNode, AmqpSession to use AsyncCloseable. * Adding AsyncCloseable to AmqpLink. * ClaimsBasedSecurityNode.java uses AsyncCloseable. * Implements CbsNode's closeAsync() and adds tests. * ReactorSession implements closeAsync() * ReactorConnection uses closeAsync(). Renames dispose() to closeAsync(). Fixes errors where some close operations were not subscribed to. * RequestResponseChannel. Remove close operation with message. * Adding DeliveryOutcome models and DeliveryState enum. * Add authorization scope to connection options. * Add MessageUtils to serialize and deserialize AmqpAnnotatedMessage * Update AmqpManagementNode to expose delivery outcomes because they can be associated with messages. * Adding MessageUtil support for converting DeliveryOutcome and Outcomes. * Fixing build breaks from ConnectionOptions. * Adding management channel class. * Adding management channel into ReactorConnection. * Update ExceptionUtil to return instead of throwing on unknown amqp error codes. * Moving ManagementChannel formatting. * Add javadocs to ReceivedDeliveryOutcome. * Add tests for ManagementChannel * Adding tests for message utils. * Fix javadoc on ModifiedDeliveryOutcome * ReactorConnection: Hook up dispose method. * EventHubs: Fixing instances of ConnectionOptions. * ServiceBus: Fix build errors using ConnectionOptions. * Adding MessageUtilsTests. * Updating CHANGELOG. --- sdk/core/azure-core-amqp/CHANGELOG.md | 3 + .../com/azure/core/amqp/AmqpConnection.java | 27 +- .../java/com/azure/core/amqp/AmqpLink.java | 14 +- .../azure/core/amqp/AmqpManagementNode.java | 33 + .../java/com/azure/core/amqp/AmqpSession.java | 8 +- .../core/amqp/ClaimsBasedSecurityNode.java | 8 +- .../ClaimsBasedSecurityChannel.java | 12 +- .../implementation/ConnectionOptions.java | 26 +- .../amqp/implementation/ExceptionUtil.java | 6 +- .../implementation/ManagementChannel.java | 134 +++ .../amqp/implementation/MessageUtils.java | 593 +++++++++++ .../implementation/ReactorConnection.java | 93 +- .../amqp/implementation/ReactorSession.java | 12 +- .../RequestResponseChannel.java | 16 +- .../core/amqp/models/DeliveryOutcome.java | 42 + .../azure/core/amqp/models/DeliveryState.java | 63 ++ .../amqp/models/ModifiedDeliveryOutcome.java | 109 ++ .../amqp/models/ReceivedDeliveryOutcome.java | 64 ++ .../amqp/models/RejectedDeliveryOutcome.java | 81 ++ .../models/TransactionalDeliveryOutcome.java | 73 ++ .../ClaimsBasedSecurityChannelTest.java | 38 + .../implementation/ConnectionOptionsTest.java | 6 +- .../implementation/ManagementChannelTest.java | 352 +++++++ .../amqp/implementation/MessageUtilsTest.java | 936 ++++++++++++++++++ .../implementation/ReactorConnectionTest.java | 52 +- .../ReactorHandlerProviderTest.java | 24 +- .../RequestResponseChannelTest.java | 4 +- .../handler/ConnectionHandlerTest.java | 10 +- .../WebSocketsConnectionHandlerTest.java | 12 +- .../WebSocketsProxyConnectionHandlerTest.java | 5 +- .../core/amqp/models/DeliveryStateTest.java | 64 ++ .../eventhubs/EventHubClientBuilder.java | 14 +- .../AmqpReceiveLinkProcessor.java | 6 +- .../EventHubConsumerAsyncClientTest.java | 9 +- .../eventhubs/EventHubConsumerClientTest.java | 10 +- .../EventHubPartitionAsyncConsumerTest.java | 4 +- .../EventHubProducerAsyncClientTest.java | 10 +- .../eventhubs/EventHubProducerClientTest.java | 8 +- .../implementation/CBSChannelTest.java | 10 +- .../EventHubConnectionProcessorTest.java | 4 +- .../EventHubReactorConnectionTest.java | 5 +- .../servicebus/ServiceBusClientBuilder.java | 7 +- .../ServiceBusReceiveLinkProcessor.java | 6 +- .../ServiceBusReceiverAsyncClientTest.java | 7 +- .../ServiceBusSenderAsyncClientTest.java | 7 +- .../ServiceBusSessionManagerTest.java | 8 +- ...viceBusSessionReceiverAsyncClientTest.java | 10 +- 47 files changed, 2910 insertions(+), 135 deletions(-) create mode 100644 sdk/core/azure-core-amqp/src/main/java/com/azure/core/amqp/AmqpManagementNode.java create mode 100644 sdk/core/azure-core-amqp/src/main/java/com/azure/core/amqp/implementation/ManagementChannel.java create mode 100644 sdk/core/azure-core-amqp/src/main/java/com/azure/core/amqp/implementation/MessageUtils.java create mode 100644 sdk/core/azure-core-amqp/src/main/java/com/azure/core/amqp/models/DeliveryOutcome.java create mode 100644 sdk/core/azure-core-amqp/src/main/java/com/azure/core/amqp/models/DeliveryState.java create mode 100644 sdk/core/azure-core-amqp/src/main/java/com/azure/core/amqp/models/ModifiedDeliveryOutcome.java create mode 100644 sdk/core/azure-core-amqp/src/main/java/com/azure/core/amqp/models/ReceivedDeliveryOutcome.java create mode 100644 sdk/core/azure-core-amqp/src/main/java/com/azure/core/amqp/models/RejectedDeliveryOutcome.java create mode 100644 sdk/core/azure-core-amqp/src/main/java/com/azure/core/amqp/models/TransactionalDeliveryOutcome.java create mode 100644 sdk/core/azure-core-amqp/src/test/java/com/azure/core/amqp/implementation/ManagementChannelTest.java create mode 100644 sdk/core/azure-core-amqp/src/test/java/com/azure/core/amqp/implementation/MessageUtilsTest.java create mode 100644 sdk/core/azure-core-amqp/src/test/java/com/azure/core/amqp/models/DeliveryStateTest.java diff --git a/sdk/core/azure-core-amqp/CHANGELOG.md b/sdk/core/azure-core-amqp/CHANGELOG.md index db88e271f4f7..6eba1b8a641a 100644 --- a/sdk/core/azure-core-amqp/CHANGELOG.md +++ b/sdk/core/azure-core-amqp/CHANGELOG.md @@ -4,6 +4,9 @@ ### New Features - Exposing CbsAuthorizationType. +- Exposing ManagementNode that can perform management and metadata operations on an AMQP message broker. +- AmqpConnection, AmqpSession, AmqpSendLink, and AmqpReceiveLink extend from AsyncCloseable. +- Delivery outcomes and delivery states are added. ### Bug Fixes - Fixed a bug where connection and sessions would not be disposed when their endpoint closed. diff --git a/sdk/core/azure-core-amqp/src/main/java/com/azure/core/amqp/AmqpConnection.java b/sdk/core/azure-core-amqp/src/main/java/com/azure/core/amqp/AmqpConnection.java index e42c696d0cab..36721d9789fc 100644 --- a/sdk/core/azure-core-amqp/src/main/java/com/azure/core/amqp/AmqpConnection.java +++ b/sdk/core/azure-core-amqp/src/main/java/com/azure/core/amqp/AmqpConnection.java @@ -4,6 +4,7 @@ package com.azure.core.amqp; import com.azure.core.amqp.exception.AmqpException; +import com.azure.core.util.AsyncCloseable; import reactor.core.Disposable; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; @@ -13,7 +14,7 @@ /** * Represents a TCP connection between the client and a service that uses the AMQP protocol. */ -public interface AmqpConnection extends Disposable { +public interface AmqpConnection extends Disposable, AsyncCloseable { /** * Gets the connection identifier. * @@ -53,6 +54,7 @@ public interface AmqpConnection extends Disposable { * Creates a new session with the given session name. * * @param sessionName Name of the session. + * * @return The AMQP session that was created. */ Mono createSession(String sessionName); @@ -61,6 +63,7 @@ public interface AmqpConnection extends Disposable { * Removes a session with the {@code sessionName} from the AMQP connection. * * @param sessionName Name of the session to remove. + * * @return {@code true} if a session with the name was removed; {@code false} otherwise. */ boolean removeSession(String sessionName); @@ -79,4 +82,26 @@ public interface AmqpConnection extends Disposable { * @return A stream of shutdown signals that occur in the AMQP endpoint. */ Flux getShutdownSignals(); + + /** + * Gets or creates the management node. + * + * @param entityPath Entity for which to get the management node of. + * + * @return A Mono that completes with the management node. + * + * @throws UnsupportedOperationException if there is no implementation of fetching a management node. + */ + default Mono getManagementNode(String entityPath) { + return Mono.error(new UnsupportedOperationException("This has not been implemented.")); + } + + /** + * Disposes of the AMQP connection. + * + * @return Mono that completes when the close operation is complete. + */ + default Mono closeAsync() { + return Mono.fromRunnable(this::dispose); + } } diff --git a/sdk/core/azure-core-amqp/src/main/java/com/azure/core/amqp/AmqpLink.java b/sdk/core/azure-core-amqp/src/main/java/com/azure/core/amqp/AmqpLink.java index 0021aa400615..4b1756826078 100644 --- a/sdk/core/azure-core-amqp/src/main/java/com/azure/core/amqp/AmqpLink.java +++ b/sdk/core/azure-core-amqp/src/main/java/com/azure/core/amqp/AmqpLink.java @@ -4,13 +4,16 @@ package com.azure.core.amqp; import com.azure.core.amqp.exception.AmqpException; +import com.azure.core.util.AsyncCloseable; import reactor.core.Disposable; import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; /** * Represents a unidirectional AMQP link. */ -public interface AmqpLink extends Disposable { +public interface AmqpLink extends Disposable, AsyncCloseable { + /** * Gets the name of the link. * @@ -39,4 +42,13 @@ public interface AmqpLink extends Disposable { * @return A stream of endpoint states for the AMQP link. */ Flux getEndpointStates(); + + /** + * Disposes of the AMQP link. + * + * @return A mono that completes when the link is disposed. + */ + default Mono closeAsync() { + return Mono.fromRunnable(() -> dispose()); + } } diff --git a/sdk/core/azure-core-amqp/src/main/java/com/azure/core/amqp/AmqpManagementNode.java b/sdk/core/azure-core-amqp/src/main/java/com/azure/core/amqp/AmqpManagementNode.java new file mode 100644 index 000000000000..f7a1e93eb136 --- /dev/null +++ b/sdk/core/azure-core-amqp/src/main/java/com/azure/core/amqp/AmqpManagementNode.java @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.core.amqp; + +import com.azure.core.amqp.models.AmqpAnnotatedMessage; +import com.azure.core.amqp.models.DeliveryOutcome; +import com.azure.core.util.AsyncCloseable; +import reactor.core.publisher.Mono; + +/** + * An AMQP endpoint that allows users to perform management and metadata operations on it. + */ +public interface AmqpManagementNode extends AsyncCloseable { + /** + * Sends a message to the management node. + * + * @param message Message to send. + * + * @return Response from management node. + */ + Mono send(AmqpAnnotatedMessage message); + + /** + * Sends a message to the management node and associates the {@code deliveryOutcome} with that message. + * + * @param message Message to send. + * @param deliveryOutcome Delivery outcome to associate with the message. + * + * @return Response from management node. + */ + Mono send(AmqpAnnotatedMessage message, DeliveryOutcome deliveryOutcome); +} diff --git a/sdk/core/azure-core-amqp/src/main/java/com/azure/core/amqp/AmqpSession.java b/sdk/core/azure-core-amqp/src/main/java/com/azure/core/amqp/AmqpSession.java index a28b346d3b3b..3cea71f81b2b 100644 --- a/sdk/core/azure-core-amqp/src/main/java/com/azure/core/amqp/AmqpSession.java +++ b/sdk/core/azure-core-amqp/src/main/java/com/azure/core/amqp/AmqpSession.java @@ -4,6 +4,7 @@ package com.azure.core.amqp; import com.azure.core.amqp.exception.AmqpException; +import com.azure.core.util.AsyncCloseable; import reactor.core.Disposable; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; @@ -13,7 +14,7 @@ /** * An AMQP session representing bidirectional communication that supports multiple {@link AmqpLink AMQP links}. */ -public interface AmqpSession extends Disposable { +public interface AmqpSession extends Disposable, AsyncCloseable { /** * Gets the name for this AMQP session. * @@ -91,4 +92,9 @@ public interface AmqpSession extends Disposable { * @return A completable mono. */ Mono rollbackTransaction(AmqpTransaction transaction); + + @Override + default Mono closeAsync() { + return Mono.fromRunnable(() -> dispose()); + } } diff --git a/sdk/core/azure-core-amqp/src/main/java/com/azure/core/amqp/ClaimsBasedSecurityNode.java b/sdk/core/azure-core-amqp/src/main/java/com/azure/core/amqp/ClaimsBasedSecurityNode.java index 218f379a6509..992393a27271 100644 --- a/sdk/core/azure-core-amqp/src/main/java/com/azure/core/amqp/ClaimsBasedSecurityNode.java +++ b/sdk/core/azure-core-amqp/src/main/java/com/azure/core/amqp/ClaimsBasedSecurityNode.java @@ -4,6 +4,7 @@ package com.azure.core.amqp; import com.azure.core.credential.TokenCredential; +import com.azure.core.util.AsyncCloseable; import reactor.core.publisher.Mono; import java.time.OffsetDateTime; @@ -14,7 +15,7 @@ * @see * AMPQ Claims-based Security v1.0 */ -public interface ClaimsBasedSecurityNode extends AutoCloseable { +public interface ClaimsBasedSecurityNode extends AutoCloseable, AsyncCloseable { /** * Authorizes the caller with the CBS node to access resources for the {@code audience}. * @@ -31,4 +32,9 @@ public interface ClaimsBasedSecurityNode extends AutoCloseable { */ @Override void close(); + + @Override + default Mono closeAsync() { + return Mono.fromRunnable(() -> close()); + } } diff --git a/sdk/core/azure-core-amqp/src/main/java/com/azure/core/amqp/implementation/ClaimsBasedSecurityChannel.java b/sdk/core/azure-core-amqp/src/main/java/com/azure/core/amqp/implementation/ClaimsBasedSecurityChannel.java index 5dee735fa688..1c9309a900f1 100644 --- a/sdk/core/azure-core-amqp/src/main/java/com/azure/core/amqp/implementation/ClaimsBasedSecurityChannel.java +++ b/sdk/core/azure-core-amqp/src/main/java/com/azure/core/amqp/implementation/ClaimsBasedSecurityChannel.java @@ -10,7 +10,6 @@ import com.azure.core.amqp.models.CbsAuthorizationType; import com.azure.core.credential.TokenCredential; import com.azure.core.credential.TokenRequestContext; -import com.azure.core.util.logging.ClientLogger; import org.apache.qpid.proton.Proton; import org.apache.qpid.proton.amqp.messaging.AmqpValue; import org.apache.qpid.proton.amqp.messaging.ApplicationProperties; @@ -35,7 +34,6 @@ public class ClaimsBasedSecurityChannel implements ClaimsBasedSecurityNode { private static final String PUT_TOKEN_OPERATION = "operation"; private static final String PUT_TOKEN_OPERATION_VALUE = "put-token"; - private final ClientLogger logger = new ClientLogger(ClaimsBasedSecurityChannel.class); private final TokenCredential credential; private final Mono cbsChannelMono; private final CbsAuthorizationType authorizationType; @@ -87,9 +85,11 @@ public Mono authorize(String tokenAudience, String scopes) { @Override public void close() { - final RequestResponseChannel channel = cbsChannelMono.block(retryOptions.getTryTimeout()); - if (channel != null) { - channel.closeAsync().block(); - } + closeAsync().block(retryOptions.getTryTimeout()); + } + + @Override + public Mono closeAsync() { + return cbsChannelMono.flatMap(channel -> channel.closeAsync()); } } diff --git a/sdk/core/azure-core-amqp/src/main/java/com/azure/core/amqp/implementation/ConnectionOptions.java b/sdk/core/azure-core-amqp/src/main/java/com/azure/core/amqp/implementation/ConnectionOptions.java index 5075a6c7529a..f6a74799caf4 100644 --- a/sdk/core/azure-core-amqp/src/main/java/com/azure/core/amqp/implementation/ConnectionOptions.java +++ b/sdk/core/azure-core-amqp/src/main/java/com/azure/core/amqp/implementation/ConnectionOptions.java @@ -23,11 +23,6 @@ */ @Immutable public class ConnectionOptions { - // These name version keys are used in our properties files to specify client product and version information. - static final String NAME_KEY = "name"; - static final String VERSION_KEY = "version"; - static final String UNKNOWN = "UNKNOWN"; - private final TokenCredential tokenCredential; private final AmqpTransportType transport; private final AmqpRetryOptions retryOptions; @@ -35,6 +30,7 @@ public class ConnectionOptions { private final Scheduler scheduler; private final String fullyQualifiedNamespace; private final CbsAuthorizationType authorizationType; + private final String authorizationScope; private final ClientOptions clientOptions; private final String product; private final String clientVersion; @@ -62,10 +58,10 @@ public class ConnectionOptions { * {@code proxyOptions} or {@code verifyMode} is null. */ public ConnectionOptions(String fullyQualifiedNamespace, TokenCredential tokenCredential, - CbsAuthorizationType authorizationType, AmqpTransportType transport, AmqpRetryOptions retryOptions, - ProxyOptions proxyOptions, Scheduler scheduler, ClientOptions clientOptions, + CbsAuthorizationType authorizationType, String authorizationScope, AmqpTransportType transport, + AmqpRetryOptions retryOptions, ProxyOptions proxyOptions, Scheduler scheduler, ClientOptions clientOptions, SslDomain.VerifyMode verifyMode, String product, String clientVersion) { - this(fullyQualifiedNamespace, tokenCredential, authorizationType, transport, retryOptions, + this(fullyQualifiedNamespace, tokenCredential, authorizationType, authorizationScope, transport, retryOptions, proxyOptions, scheduler, clientOptions, verifyMode, product, clientVersion, fullyQualifiedNamespace, getPort(transport)); } @@ -94,14 +90,15 @@ public ConnectionOptions(String fullyQualifiedNamespace, TokenCredential tokenCr * {@code clientOptions}, {@code hostname}, or {@code verifyMode} is null. */ public ConnectionOptions(String fullyQualifiedNamespace, TokenCredential tokenCredential, - CbsAuthorizationType authorizationType, AmqpTransportType transport, AmqpRetryOptions retryOptions, - ProxyOptions proxyOptions, Scheduler scheduler, ClientOptions clientOptions, + CbsAuthorizationType authorizationType, String authorizationScope, AmqpTransportType transport, + AmqpRetryOptions retryOptions, ProxyOptions proxyOptions, Scheduler scheduler, ClientOptions clientOptions, SslDomain.VerifyMode verifyMode, String product, String clientVersion, String hostname, int port) { this.fullyQualifiedNamespace = Objects.requireNonNull(fullyQualifiedNamespace, "'fullyQualifiedNamespace' is required."); this.tokenCredential = Objects.requireNonNull(tokenCredential, "'tokenCredential' is required."); this.authorizationType = Objects.requireNonNull(authorizationType, "'authorizationType' is required."); + this.authorizationScope = Objects.requireNonNull(authorizationScope, "'authorizationScope' is required."); this.transport = Objects.requireNonNull(transport, "'transport' is required."); this.retryOptions = Objects.requireNonNull(retryOptions, "'retryOptions' is required."); this.scheduler = Objects.requireNonNull(scheduler, "'scheduler' is required."); @@ -115,6 +112,15 @@ public ConnectionOptions(String fullyQualifiedNamespace, TokenCredential tokenCr this.clientVersion = Objects.requireNonNull(clientVersion, "'clientVersion' cannot be null."); } + /** + * Gets the scope to use when authorizing. + * + * @return The scope to use when authorizing. + */ + public String getAuthorizationScope() { + return authorizationScope; + } + /** * Gets the authorisation type for the CBS node. * diff --git a/sdk/core/azure-core-amqp/src/main/java/com/azure/core/amqp/implementation/ExceptionUtil.java b/sdk/core/azure-core-amqp/src/main/java/com/azure/core/amqp/implementation/ExceptionUtil.java index da4f2cd98964..27cff01d8158 100644 --- a/sdk/core/azure-core-amqp/src/main/java/com/azure/core/amqp/implementation/ExceptionUtil.java +++ b/sdk/core/azure-core-amqp/src/main/java/com/azure/core/amqp/implementation/ExceptionUtil.java @@ -8,7 +8,6 @@ import com.azure.core.amqp.exception.AmqpException; import com.azure.core.amqp.exception.AmqpResponseCode; -import java.util.Locale; import java.util.regex.Matcher; import java.util.regex.Pattern; @@ -78,8 +77,9 @@ public static Exception toException(String errorCondition, String description, A case NOT_FOUND: return distinguishNotFound(description, errorContext); default: - throw new IllegalArgumentException(String.format(Locale.ROOT, "This condition '%s' is not known.", - condition)); + return new AmqpException(false, condition, String.format("errorCondition[%s]. description[%s] " + + "Condition could not be mapped to a transient condition.", + errorCondition, description), errorContext); } return new AmqpException(isTransient, condition, description, errorContext); diff --git a/sdk/core/azure-core-amqp/src/main/java/com/azure/core/amqp/implementation/ManagementChannel.java b/sdk/core/azure-core-amqp/src/main/java/com/azure/core/amqp/implementation/ManagementChannel.java new file mode 100644 index 000000000000..f469f879dede --- /dev/null +++ b/sdk/core/azure-core-amqp/src/main/java/com/azure/core/amqp/implementation/ManagementChannel.java @@ -0,0 +1,134 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.core.amqp.implementation; + +import com.azure.core.amqp.AmqpManagementNode; +import com.azure.core.amqp.exception.AmqpErrorCondition; +import com.azure.core.amqp.exception.AmqpErrorContext; +import com.azure.core.amqp.exception.AmqpException; +import com.azure.core.amqp.exception.AmqpResponseCode; +import com.azure.core.amqp.exception.SessionErrorContext; +import com.azure.core.amqp.models.AmqpAnnotatedMessage; +import com.azure.core.amqp.models.DeliveryOutcome; +import com.azure.core.util.logging.ClientLogger; +import org.apache.qpid.proton.amqp.transport.DeliveryState; +import org.apache.qpid.proton.message.Message; +import reactor.core.publisher.Mono; +import reactor.core.publisher.SynchronousSink; + +import java.util.Objects; + +/** + * AMQP node responsible for performing management and metadata operations on an Azure AMQP message broker. + */ +public class ManagementChannel implements AmqpManagementNode { + private final TokenManager tokenManager; + private final AmqpChannelProcessor createChannel; + private final String fullyQualifiedNamespace; + private final ClientLogger logger; + private final String entityPath; + + public ManagementChannel(AmqpChannelProcessor createChannel, + String fullyQualifiedNamespace, String entityPath, TokenManager tokenManager) { + this.createChannel = Objects.requireNonNull(createChannel, "'createChannel' cannot be null."); + this.fullyQualifiedNamespace = Objects.requireNonNull(fullyQualifiedNamespace, + "'fullyQualifiedNamespace' cannot be null."); + this.logger = new ClientLogger(String.format("%s<%s>", ManagementChannel.class, entityPath)); + this.entityPath = Objects.requireNonNull(entityPath, "'entityPath' cannot be null."); + this.tokenManager = Objects.requireNonNull(tokenManager, "'tokenManager' cannot be null."); + } + + @Override + public Mono send(AmqpAnnotatedMessage message) { + return isAuthorized().then(createChannel.flatMap(channel -> { + final Message protonJMessage = MessageUtils.toProtonJMessage(message); + + return channel.sendWithAck(protonJMessage) + .handle((Message responseMessage, SynchronousSink sink) -> + handleResponse(responseMessage, sink, channel.getErrorContext())) + .switchIfEmpty(Mono.error(new AmqpException(true, String.format( + "entityPath[%s] No response received from management channel.", entityPath), + channel.getErrorContext()))); + })); + } + + @Override + public Mono send(AmqpAnnotatedMessage message, DeliveryOutcome deliveryOutcome) { + return isAuthorized().then(createChannel.flatMap(channel -> { + final Message protonJMessage = MessageUtils.toProtonJMessage(message); + final DeliveryState protonJDeliveryState = MessageUtils.toProtonJDeliveryState(deliveryOutcome); + + return channel.sendWithAck(protonJMessage, protonJDeliveryState) + .handle((Message responseMessage, SynchronousSink sink) -> + handleResponse(responseMessage, sink, channel.getErrorContext())) + .switchIfEmpty(Mono.error(new AmqpException(true, String.format( + "entityPath[%s] outcome[%s] No response received from management channel.", entityPath, + deliveryOutcome.getDeliveryState()), channel.getErrorContext()))); + })); + } + + @Override + public Mono closeAsync() { + return createChannel.flatMap(channel -> channel.closeAsync()).cache(); + } + + private void handleResponse(Message response, SynchronousSink sink, + AmqpErrorContext errorContext) { + + if (RequestResponseUtils.isSuccessful(response)) { + sink.next(MessageUtils.toAmqpAnnotatedMessage(response)); + return; + } + + final AmqpResponseCode statusCode = RequestResponseUtils.getStatusCode(response); + if (statusCode == AmqpResponseCode.NO_CONTENT) { + sink.next(MessageUtils.toAmqpAnnotatedMessage(response)); + return; + } + + final String errorCondition = RequestResponseUtils.getErrorCondition(response); + if (statusCode == AmqpResponseCode.NOT_FOUND) { + final AmqpErrorCondition amqpErrorCondition = AmqpErrorCondition.fromString(errorCondition); + + if (amqpErrorCondition == AmqpErrorCondition.MESSAGE_NOT_FOUND) { + logger.info("There was no matching message found."); + sink.next(MessageUtils.toAmqpAnnotatedMessage(response)); + } else if (amqpErrorCondition == AmqpErrorCondition.SESSION_NOT_FOUND) { + logger.info("There was no matching session found."); + sink.next(MessageUtils.toAmqpAnnotatedMessage(response)); + } + + return; + } + + final String statusDescription = RequestResponseUtils.getStatusDescription(response); + + logger.warning("status[{}] description[{}] condition[{}] Operation not successful.", + statusCode, statusDescription, errorCondition); + + final Throwable throwable = ExceptionUtil.toException(errorCondition, statusDescription, errorContext); + sink.error(throwable); + } + + private Mono isAuthorized() { + return tokenManager.getAuthorizationResults() + .next() + .switchIfEmpty(Mono.error(new AmqpException(false, "Did not get response from tokenManager: " + entityPath, getErrorContext()))) + .handle((response, sink) -> { + if (response != AmqpResponseCode.ACCEPTED && response != AmqpResponseCode.OK) { + final String message = String.format("User does not have authorization to perform operation " + + "on entity [%s]. Response: [%s]", entityPath, response); + sink.error(ExceptionUtil.amqpResponseCodeToException(response.getValue(), message, + getErrorContext())); + + } else { + sink.complete(); + } + }); + } + + private AmqpErrorContext getErrorContext() { + return new SessionErrorContext(fullyQualifiedNamespace, entityPath); + } +} diff --git a/sdk/core/azure-core-amqp/src/main/java/com/azure/core/amqp/implementation/MessageUtils.java b/sdk/core/azure-core-amqp/src/main/java/com/azure/core/amqp/implementation/MessageUtils.java new file mode 100644 index 000000000000..e7ed276300c0 --- /dev/null +++ b/sdk/core/azure-core-amqp/src/main/java/com/azure/core/amqp/implementation/MessageUtils.java @@ -0,0 +1,593 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.core.amqp.implementation; + +import com.azure.core.amqp.AmqpTransaction; +import com.azure.core.amqp.exception.AmqpErrorCondition; +import com.azure.core.amqp.models.AmqpAddress; +import com.azure.core.amqp.models.AmqpAnnotatedMessage; +import com.azure.core.amqp.models.AmqpMessageBody; +import com.azure.core.amqp.models.AmqpMessageHeader; +import com.azure.core.amqp.models.AmqpMessageId; +import com.azure.core.amqp.models.AmqpMessageProperties; +import com.azure.core.amqp.models.DeliveryOutcome; +import com.azure.core.amqp.models.DeliveryState; +import com.azure.core.amqp.models.ModifiedDeliveryOutcome; +import com.azure.core.amqp.models.ReceivedDeliveryOutcome; +import com.azure.core.amqp.models.RejectedDeliveryOutcome; +import com.azure.core.amqp.models.TransactionalDeliveryOutcome; +import com.azure.core.util.logging.ClientLogger; +import org.apache.qpid.proton.Proton; +import org.apache.qpid.proton.amqp.Binary; +import org.apache.qpid.proton.amqp.Symbol; +import org.apache.qpid.proton.amqp.UnsignedInteger; +import org.apache.qpid.proton.amqp.UnsignedLong; +import org.apache.qpid.proton.amqp.messaging.Accepted; +import org.apache.qpid.proton.amqp.messaging.ApplicationProperties; +import org.apache.qpid.proton.amqp.messaging.Data; +import org.apache.qpid.proton.amqp.messaging.DeliveryAnnotations; +import org.apache.qpid.proton.amqp.messaging.Footer; +import org.apache.qpid.proton.amqp.messaging.MessageAnnotations; +import org.apache.qpid.proton.amqp.messaging.Modified; +import org.apache.qpid.proton.amqp.messaging.Outcome; +import org.apache.qpid.proton.amqp.messaging.Properties; +import org.apache.qpid.proton.amqp.messaging.Received; +import org.apache.qpid.proton.amqp.messaging.Rejected; +import org.apache.qpid.proton.amqp.messaging.Released; +import org.apache.qpid.proton.amqp.messaging.Section; +import org.apache.qpid.proton.amqp.transaction.Declared; +import org.apache.qpid.proton.amqp.transaction.TransactionalState; +import org.apache.qpid.proton.amqp.transport.DeliveryState.DeliveryStateType; +import org.apache.qpid.proton.amqp.transport.ErrorCondition; +import org.apache.qpid.proton.message.Message; + +import java.time.Duration; +import java.time.ZoneOffset; +import java.util.Date; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** + * Converts {@link AmqpAnnotatedMessage messages} to and from proton-j messages. + */ +final class MessageUtils { + private static final ClientLogger LOGGER = new ClientLogger(MessageUtils.class); + private static final byte[] EMPTY_BYTE_ARRAY = new byte[0]; + + /** + * Converts an {@link AmqpAnnotatedMessage} to a proton-j message. + * + * @param message The message to convert. + * + * @return The corresponding proton-j message. + * + * @throws NullPointerException if {@code message} is null. + */ + static Message toProtonJMessage(AmqpAnnotatedMessage message) { + Objects.requireNonNull(message, "'message' to serialize cannot be null."); + + final Message response = Proton.message(); + + //TODO (conniey): support AMQP sequence and AMQP value. + final AmqpMessageBody body = message.getBody(); + switch (body.getBodyType()) { + case DATA: + response.setBody(new Data(new Binary(body.getFirstData()))); + break; + case VALUE: + case SEQUENCE: + default: + throw LOGGER.logExceptionAsError(new UnsupportedOperationException( + "bodyType [" + body.getBodyType() + "] is not supported yet.")); + } + + // Setting message properties. + final AmqpMessageProperties properties = message.getProperties(); + response.setMessageId(properties.getMessageId()); + response.setContentType(properties.getContentType()); + response.setCorrelationId(properties.getCorrelationId()); + response.setSubject(properties.getSubject()); + + final AmqpAddress replyTo = properties.getReplyTo(); + response.setReplyTo(replyTo != null ? replyTo.toString() : null); + + response.setReplyToGroupId(properties.getReplyToGroupId()); + response.setGroupId(properties.getGroupId()); + response.setContentEncoding(properties.getContentEncoding()); + + if (properties.getGroupSequence() != null) { + response.setGroupSequence(properties.getGroupSequence()); + } + + final AmqpAddress messageTo = properties.getTo(); + if (response.getProperties() == null) { + response.setProperties(new Properties()); + } + + response.getProperties().setTo(messageTo != null ? messageTo.toString() : null); + + response.getProperties().setUserId(new Binary(properties.getUserId())); + + if (properties.getAbsoluteExpiryTime() != null) { + response.getProperties().setAbsoluteExpiryTime( + Date.from(properties.getAbsoluteExpiryTime().toInstant())); + } + + if (properties.getCreationTime() != null) { + response.getProperties().setCreationTime(Date.from(properties.getCreationTime().toInstant())); + } + + // Set header + final AmqpMessageHeader header = message.getHeader(); + if (header.getTimeToLive() != null) { + response.setTtl(header.getTimeToLive().toMillis()); + } + if (header.getDeliveryCount() != null) { + response.setDeliveryCount(header.getDeliveryCount()); + } + if (header.getPriority() != null) { + response.setPriority(header.getPriority()); + } + if (header.isDurable() != null) { + response.setDurable(header.isDurable()); + } + if (header.isFirstAcquirer() != null) { + response.setFirstAcquirer(header.isFirstAcquirer()); + } + if (header.getTimeToLive() != null) { + response.setTtl(header.getTimeToLive().toMillis()); + } + + // Set footer + response.setFooter(new Footer(message.getFooter())); + + // Set message annotations. + final Map messageAnnotations = convert(message.getMessageAnnotations()); + response.setMessageAnnotations(new MessageAnnotations(messageAnnotations)); + + // Set Delivery Annotations. + final Map deliveryAnnotations = convert(message.getDeliveryAnnotations()); + response.setDeliveryAnnotations(new DeliveryAnnotations(deliveryAnnotations)); + + // Set application properties + response.setApplicationProperties(new ApplicationProperties(message.getApplicationProperties())); + + return response; + } + + /** + * Converts a proton-j message to {@link AmqpAnnotatedMessage}. + * + * @param message The message to convert. + * + * @return The corresponding {@link AmqpAnnotatedMessage message}. + * + * @throws NullPointerException if {@code message} is null. + */ + static AmqpAnnotatedMessage toAmqpAnnotatedMessage(Message message) { + Objects.requireNonNull(message, "'message' cannot be null"); + + final byte[] bytes; + final Section body = message.getBody(); + if (body != null) { + //TODO (conniey): Support other AMQP types like AmqpValue and AmqpSequence. + if (body instanceof Data) { + final Binary messageData = ((Data) body).getValue(); + bytes = messageData.getArray(); + } else { + LOGGER.warning("Message not of type Data. Actual: {}", + body.getType()); + bytes = EMPTY_BYTE_ARRAY; + } + } else { + LOGGER.warning("Message does not have a body."); + bytes = EMPTY_BYTE_ARRAY; + } + + final AmqpAnnotatedMessage response = new AmqpAnnotatedMessage(AmqpMessageBody.fromData(bytes)); + + // Application properties + final ApplicationProperties applicationProperties = message.getApplicationProperties(); + if (applicationProperties != null) { + final Map propertiesValue = applicationProperties.getValue(); + response.getApplicationProperties().putAll(propertiesValue); + } + + // Header + final AmqpMessageHeader responseHeader = response.getHeader(); + responseHeader.setTimeToLive(Duration.ofMillis(message.getTtl())); + responseHeader.setDeliveryCount(message.getDeliveryCount()); + responseHeader.setPriority(message.getPriority()); + + if (message.getHeader() != null) { + responseHeader.setDurable(message.getHeader().getDurable()); + responseHeader.setFirstAcquirer(message.getHeader().getFirstAcquirer()); + } + + // Footer + final Footer footer = message.getFooter(); + if (footer != null && footer.getValue() != null) { + @SuppressWarnings("unchecked") final Map footerValue = footer.getValue(); + + setValues(footerValue, response.getFooter()); + } + + // Properties + final AmqpMessageProperties responseProperties = response.getProperties(); + responseProperties.setReplyToGroupId(message.getReplyToGroupId()); + final String replyTo = message.getReplyTo(); + if (replyTo != null) { + responseProperties.setReplyTo(new AmqpAddress(message.getReplyTo())); + } + final Object messageId = message.getMessageId(); + if (messageId != null) { + responseProperties.setMessageId(new AmqpMessageId(messageId.toString())); + } + + responseProperties.setContentType(message.getContentType()); + final Object correlationId = message.getCorrelationId(); + if (correlationId != null) { + responseProperties.setCorrelationId(new AmqpMessageId(correlationId.toString())); + } + + final Properties amqpProperties = message.getProperties(); + if (amqpProperties != null) { + final String to = amqpProperties.getTo(); + if (to != null) { + responseProperties.setTo(new AmqpAddress(amqpProperties.getTo())); + } + + if (amqpProperties.getAbsoluteExpiryTime() != null) { + responseProperties.setAbsoluteExpiryTime(amqpProperties.getAbsoluteExpiryTime().toInstant() + .atOffset(ZoneOffset.UTC)); + } + if (amqpProperties.getCreationTime() != null) { + responseProperties.setCreationTime(amqpProperties.getCreationTime().toInstant() + .atOffset(ZoneOffset.UTC)); + } + } + + responseProperties.setSubject(message.getSubject()); + responseProperties.setGroupId(message.getGroupId()); + responseProperties.setContentEncoding(message.getContentEncoding()); + responseProperties.setGroupSequence(message.getGroupSequence()); + responseProperties.setUserId(message.getUserId()); + + // DeliveryAnnotations + final DeliveryAnnotations deliveryAnnotations = message.getDeliveryAnnotations(); + if (deliveryAnnotations != null) { + setValues(deliveryAnnotations.getValue(), response.getDeliveryAnnotations()); + } + + // Message Annotations + final MessageAnnotations messageAnnotations = message.getMessageAnnotations(); + if (messageAnnotations != null) { + setValues(messageAnnotations.getValue(), response.getMessageAnnotations()); + } + + return response; + } + + /** + * Converts a proton-j delivery state to one supported by azure-core-amqp. + * + * @param deliveryState Delivery state to convert. + * + * @return The corresponding delivery outcome or null if parameter was null. + * + * @throws IllegalArgumentException if {@code deliveryState} type but there is no transactional state associated + * or transaction id. If {@code deliveryState} is declared but there is no transaction id or the type is not + * {@link Declared}. + * @throws UnsupportedOperationException If the {@link DeliveryStateType} is unknown. + */ + static DeliveryOutcome toDeliveryOutcome(org.apache.qpid.proton.amqp.transport.DeliveryState deliveryState) { + if (deliveryState == null) { + return null; + } + + switch (deliveryState.getType()) { + case Accepted: + return new DeliveryOutcome(DeliveryState.ACCEPTED); + case Modified: + if (!(deliveryState instanceof Modified)) { + return new ModifiedDeliveryOutcome(); + } + + return toDeliveryOutcome((Modified) deliveryState); + case Received: + if (!(deliveryState instanceof Received)) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + "Received delivery state should have a Received state.")); + } + + final Received received = (Received) deliveryState; + if (received.getSectionNumber() == null || received.getSectionOffset() == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + "Received delivery state does not have any offset or section number. " + received)); + } + + return new ReceivedDeliveryOutcome(received.getSectionNumber().intValue(), + received.getSectionOffset().longValue()); + case Rejected: + if (!(deliveryState instanceof Rejected)) { + return new DeliveryOutcome(DeliveryState.REJECTED); + } + + return toDeliveryOutcome((Rejected) deliveryState); + case Released: + return new DeliveryOutcome(DeliveryState.RELEASED); + case Declared: + if (!(deliveryState instanceof Declared)) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + "Declared delivery type should have a declared outcome")); + } + return toDeliveryOutcome((Declared) deliveryState); + case Transactional: + if (!(deliveryState instanceof TransactionalState)) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + "Transactional delivery type should have a TransactionalState outcome.")); + } + + final TransactionalState transactionalState = (TransactionalState) deliveryState; + if (transactionalState.getTxnId() == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + "Transactional delivery states should have an associated transaction id.")); + } + + final AmqpTransaction transaction = new AmqpTransaction(transactionalState.getTxnId().asByteBuffer()); + final DeliveryOutcome outcome = toDeliveryOutcome(transactionalState.getOutcome()); + return new TransactionalDeliveryOutcome(transaction).setOutcome(outcome); + default: + throw LOGGER.logExceptionAsError(new UnsupportedOperationException( + "Delivery state not supported: " + deliveryState.getType())); + } + } + + /** + * Converts from a proton-j outcome to its corresponding {@link DeliveryOutcome}. + * + * @param outcome Outcome to convert. + * + * @return Corresponding {@link DeliveryOutcome} or null if parameter was null. + * + * @throws UnsupportedOperationException If the type of {@link Outcome} is unknown. + */ + static DeliveryOutcome toDeliveryOutcome(Outcome outcome) { + if (outcome == null) { + return null; + } + + if (outcome instanceof Accepted) { + return new DeliveryOutcome(DeliveryState.ACCEPTED); + } else if (outcome instanceof Modified) { + return toDeliveryOutcome((Modified) outcome); + } else if (outcome instanceof Rejected) { + return toDeliveryOutcome((Rejected) outcome); + } else if (outcome instanceof Released) { + return new DeliveryOutcome(DeliveryState.RELEASED); + } else if (outcome instanceof Declared) { + return toDeliveryOutcome((Declared) outcome); + } else { + throw LOGGER.logExceptionAsError(new UnsupportedOperationException( + "Outcome is not known: " + outcome)); + } + } + + /** + * Converts from a delivery outcome to its corresponding proton-j delivery state. + * + * @param deliveryOutcome Outcome to convert. {@code null} if the outcome is null. + * + * @return Proton-j delivery state. + * + * @throws IllegalArgumentException if deliveryState is {@link DeliveryState#RECEIVED} but its {@code + * deliveryOutcome} is not {@link ReceivedDeliveryOutcome}. If {@code deliveryOutcome} is {@link + * TransactionalDeliveryOutcome} but there is no transaction id. + * @throws UnsupportedOperationException if {@code deliveryState} is unsupported. + */ + static org.apache.qpid.proton.amqp.transport.DeliveryState toProtonJDeliveryState(DeliveryOutcome deliveryOutcome) { + if (deliveryOutcome == null) { + return null; + } + + if (DeliveryState.ACCEPTED.equals(deliveryOutcome.getDeliveryState())) { + return Accepted.getInstance(); + } else if (DeliveryState.REJECTED.equals(deliveryOutcome.getDeliveryState())) { + return toProtonJRejected(deliveryOutcome); + } else if (DeliveryState.RELEASED.equals(deliveryOutcome.getDeliveryState())) { + return Released.getInstance(); + } else if (DeliveryState.MODIFIED.equals(deliveryOutcome.getDeliveryState())) { + return toProtonJModified(deliveryOutcome); + } else if (DeliveryState.RECEIVED.equals(deliveryOutcome.getDeliveryState())) { + if (!(deliveryOutcome instanceof ReceivedDeliveryOutcome)) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException("Received delivery type should be " + + "ReceivedDeliveryOutcome. Actual: " + deliveryOutcome.getClass())); + } + + final ReceivedDeliveryOutcome receivedDeliveryOutcome = (ReceivedDeliveryOutcome) deliveryOutcome; + final Received received = new Received(); + + received.setSectionNumber(UnsignedInteger.valueOf(receivedDeliveryOutcome.getSectionNumber())); + received.setSectionOffset(UnsignedLong.valueOf(receivedDeliveryOutcome.getSectionOffset())); + return received; + } else if (deliveryOutcome instanceof TransactionalDeliveryOutcome) { + final TransactionalDeliveryOutcome transaction = ((TransactionalDeliveryOutcome) deliveryOutcome); + final TransactionalState state = new TransactionalState(); + if (transaction.getTransactionId() == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + "Transactional deliveries require an id.")); + } + + final Binary binary = Objects.requireNonNull(Binary.create(transaction.getTransactionId()), + "Transaction Ids are required for a transaction."); + + state.setOutcome(toProtonJOutcome(transaction.getOutcome())); + state.setTxnId(binary); + return state; + } else { + throw LOGGER.logExceptionAsError(new UnsupportedOperationException( + "Outcome could not be translated to a proton-j delivery outcome:" + deliveryOutcome.getDeliveryState())); + } + } + + /** + * Converts from delivery outcome to its corresponding proton-j outcome. + * + * @param deliveryOutcome Delivery outcome. + * + * @return Corresponding proton-j outcome. + * + * @throws UnsupportedOperationException when an unsupported delivery state is passed such as {@link + * DeliveryState#RECEIVED}; + */ + static Outcome toProtonJOutcome(DeliveryOutcome deliveryOutcome) { + if (deliveryOutcome == null) { + return null; + } + + if (DeliveryState.ACCEPTED.equals(deliveryOutcome.getDeliveryState())) { + return Accepted.getInstance(); + } else if (DeliveryState.REJECTED.equals(deliveryOutcome.getDeliveryState())) { + return toProtonJRejected(deliveryOutcome); + } else if (DeliveryState.RELEASED.equals(deliveryOutcome.getDeliveryState())) { + return Released.getInstance(); + } else if (DeliveryState.MODIFIED.equals(deliveryOutcome.getDeliveryState())) { + return toProtonJModified(deliveryOutcome); + } else { + throw LOGGER.logExceptionAsError(new UnsupportedOperationException( + "DeliveryOutcome cannot be converted to proton-j outcome: " + deliveryOutcome.getDeliveryState())); + } + } + + private static Modified toProtonJModified(DeliveryOutcome outcome) { + final Modified modified = new Modified(); + + if (!(outcome instanceof ModifiedDeliveryOutcome)) { + return modified; + } + + final ModifiedDeliveryOutcome modifiedDeliveryOutcome = (ModifiedDeliveryOutcome) outcome; + final Map annotations = convert(modifiedDeliveryOutcome.getMessageAnnotations()); + + modified.setMessageAnnotations(annotations); + modified.setUndeliverableHere(modifiedDeliveryOutcome.isUndeliverableHere()); + modified.setDeliveryFailed(modifiedDeliveryOutcome.isDeliveryFailed()); + + return modified; + } + + private static Rejected toProtonJRejected(DeliveryOutcome outcome) { + if (!(outcome instanceof RejectedDeliveryOutcome)) { + return new Rejected(); + } + final Rejected rejected = new Rejected(); + + final RejectedDeliveryOutcome rejectedDeliveryOutcome = (RejectedDeliveryOutcome) outcome; + final AmqpErrorCondition errorCondition = rejectedDeliveryOutcome.getErrorCondition(); + if (errorCondition == null) { + return rejected; + } + + + final ErrorCondition condition = new ErrorCondition( + Symbol.getSymbol(errorCondition.getErrorCondition()), errorCondition.toString()); + + condition.setInfo(convert(rejectedDeliveryOutcome.getErrorInfo())); + + rejected.setError(condition); + return rejected; + } + + private static DeliveryOutcome toDeliveryOutcome(Modified modified) { + final ModifiedDeliveryOutcome modifiedOutcome = new ModifiedDeliveryOutcome(); + + if (modified.getDeliveryFailed() != null) { + modifiedOutcome.setDeliveryFailed(modified.getDeliveryFailed()); + } + + if (modified.getUndeliverableHere() != null) { + modifiedOutcome.setUndeliverableHere(modified.getUndeliverableHere()); + } + + return modifiedOutcome.setMessageAnnotations(convertMap(modified.getMessageAnnotations())); + } + + private static DeliveryOutcome toDeliveryOutcome(Rejected rejected) { + final ErrorCondition rejectedError = rejected.getError(); + + if (rejectedError == null || rejectedError.getCondition() == null) { + return new DeliveryOutcome(DeliveryState.REJECTED); + } + + AmqpErrorCondition errorCondition = + AmqpErrorCondition.fromString(rejectedError.getCondition().toString()); + if (errorCondition == null) { + LOGGER.warning("Error condition is unknown: {}", rejected.getError()); + errorCondition = AmqpErrorCondition.INTERNAL_ERROR; + } + + return new RejectedDeliveryOutcome(errorCondition) + .setErrorInfo(convertMap(rejectedError.getInfo())); + } + + private static DeliveryOutcome toDeliveryOutcome(Declared declared) { + if (declared.getTxnId() == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + "Declared delivery states should have an associated transaction id.")); + } + + return new TransactionalDeliveryOutcome(new AmqpTransaction(declared.getTxnId().asByteBuffer())); + } + + /** + * Converts from the "raw" map type exposed by proton-j (which is backed by a Symbol, Object to a generic map. + * + * @param map the map to use. + * + * @return A corresponding map. + */ + @SuppressWarnings({"rawtypes", "unchecked"}) + private static Map convertMap(Map map) { + // proton-j only exposes "Map" even though the underlying data structure is this. + final Map outcomeMessageAnnotations = new HashMap<>(); + setValues(map, outcomeMessageAnnotations); + + return outcomeMessageAnnotations; + } + + private static void setValues(Map sourceMap, Map targetMap) { + if (sourceMap == null) { + return; + } + + for (Map.Entry entry : sourceMap.entrySet()) { + targetMap.put(entry.getKey().toString(), entry.getValue()); + } + } + + /** + * Converts a map from it's string keys to use {@link Symbol}. + * + * @param sourceMap Source map. + * + * @return A map with corresponding keys as symbols. + */ + private static Map convert(Map sourceMap) { + if (sourceMap == null) { + return null; + } + + return sourceMap.entrySet().stream() + .collect(HashMap::new, + (existing, entry) -> existing.put(Symbol.valueOf(entry.getKey()), entry.getValue()), + (HashMap::putAll)); + } + + /** + * Private constructor. + */ + private MessageUtils() { + } +} diff --git a/sdk/core/azure-core-amqp/src/main/java/com/azure/core/amqp/implementation/ReactorConnection.java b/sdk/core/azure-core-amqp/src/main/java/com/azure/core/amqp/implementation/ReactorConnection.java index 0c38ed2b5d3c..4e9bf0b850a1 100644 --- a/sdk/core/azure-core-amqp/src/main/java/com/azure/core/amqp/implementation/ReactorConnection.java +++ b/sdk/core/azure-core-amqp/src/main/java/com/azure/core/amqp/implementation/ReactorConnection.java @@ -5,6 +5,7 @@ import com.azure.core.amqp.AmqpConnection; import com.azure.core.amqp.AmqpEndpointState; +import com.azure.core.amqp.AmqpManagementNode; import com.azure.core.amqp.AmqpRetryOptions; import com.azure.core.amqp.AmqpRetryPolicy; import com.azure.core.amqp.AmqpSession; @@ -39,13 +40,21 @@ import java.util.concurrent.RejectedExecutionException; import java.util.concurrent.atomic.AtomicBoolean; +/** + * An AMQP connection backed by proton-j. + */ public class ReactorConnection implements AmqpConnection { private static final String CBS_SESSION_NAME = "cbs-session"; private static final String CBS_ADDRESS = "$cbs"; private static final String CBS_LINK_NAME = "cbs"; + private static final String MANAGEMENT_SESSION_NAME = "mgmt-session"; + private static final String MANAGEMENT_ADDRESS = "$management"; + private static final String MANAGEMENT_LINK_NAME = "mgmt"; + private final ClientLogger logger = new ClientLogger(ReactorConnection.class); private final ConcurrentMap sessionMap = new ConcurrentHashMap<>(); + private final ConcurrentHashMap managementNodes = new ConcurrentHashMap<>(); private final AtomicBoolean isDisposed = new AtomicBoolean(); private final Sinks.One shutdownSignalSink = Sinks.one(); @@ -172,6 +181,48 @@ public Flux getShutdownSignals() { return shutdownSignalSink.asMono().cache().flux(); } + @Override + public Mono getManagementNode(String entityPath) { + return Mono.defer(() -> { + if (isDisposed()) { + return Mono.error(logger.logExceptionAsError(new IllegalStateException(String.format( + "connectionId[%s]: Connection is disposed. Cannot get management instance for '%s'", + connectionId, entityPath)))); + } + + final AmqpManagementNode existing = managementNodes.get(entityPath); + if (existing != null) { + return Mono.just(existing); + } + + final TokenManager tokenManager = new AzureTokenManagerProvider(connectionOptions.getAuthorizationType(), + connectionOptions.getFullyQualifiedNamespace(), connectionOptions.getAuthorizationScope()) + .getTokenManager(getClaimsBasedSecurityNode(), entityPath); + + return tokenManager.authorize().thenReturn(managementNodes.compute(entityPath, (key, current) -> { + if (current != null) { + logger.info("A management node exists already, returning it."); + + // Close the token manager we had created during this because it is unneeded now. + tokenManager.close(); + return current; + } + + final String sessionName = entityPath + "-" + MANAGEMENT_SESSION_NAME; + final String linkName = entityPath + "-" + MANAGEMENT_LINK_NAME; + final String address = entityPath + "/" + MANAGEMENT_ADDRESS; + + logger.info("Creating management node. entityPath[{}], address[{}], linkName[{}]", + entityPath, address, linkName); + + final AmqpChannelProcessor requestResponseChannel = + createRequestResponseChannel(sessionName, linkName, address); + return new ManagementChannel(requestResponseChannel, getFullyQualifiedNamespace(), entityPath, + tokenManager); + })); + }); + } + /** * {@inheritDoc} */ @@ -302,17 +353,10 @@ public boolean isDisposed() { */ @Override public void dispose() { - if (isDisposed.getAndSet(true)) { - logger.verbose("connectionId[{}] Was already closed. Not disposing again.", connectionId); - return; - } - // Because the reactor executor schedules the pending close after the timeout, we want to give sufficient time // for the rest of the tasks to run. final Duration timeout = operationTimeout.plus(operationTimeout); - closeAsync(new AmqpShutdownSignal(false, true, "Disposed by client.")) - .publishOn(Schedulers.boundedElastic()) - .block(timeout); + closeAsync().block(timeout); } /** @@ -356,20 +400,37 @@ protected AmqpChannelProcessor createRequestResponseChan new ClientLogger(RequestResponseChannel.class + ":" + entityPath))); } + @Override + public Mono closeAsync() { + if (isDisposed.getAndSet(true)) { + logger.verbose("connectionId[{}] Was already closed. Not disposing again.", connectionId); + return isClosedMono.asMono(); + } + + return closeAsync(new AmqpShutdownSignal(false, true, + "Disposed by client.")); + } + Mono closeAsync(AmqpShutdownSignal shutdownSignal) { logger.info("connectionId[{}] signal[{}]: Disposing of ReactorConnection.", connectionId, shutdownSignal); - if (cbsChannelProcessor != null) { - cbsChannelProcessor.dispose(); - } - final Sinks.EmitResult result = shutdownSignalSink.tryEmitValue(shutdownSignal); if (result.isFailure()) { // It's possible that another one was already emitted, so it's all good. logger.info("connectionId[{}] signal[{}] result[{}] Unable to emit shutdown signal.", connectionId, result); } - return Mono.fromRunnable(() -> { + final Mono cbsCloseOperation; + if (cbsChannelProcessor != null) { + cbsCloseOperation = cbsChannelProcessor.flatMap(channel -> channel.closeAsync()); + } else { + cbsCloseOperation = Mono.empty(); + } + + final Mono managementNodeCloseOperations = Mono.when( + Flux.fromStream(managementNodes.values().stream()).flatMap(node -> node.closeAsync())); + + final Mono closeReactor = Mono.fromRunnable(() -> { final ReactorDispatcher dispatcher = reactorProvider.getReactorDispatcher(); try { @@ -383,7 +444,11 @@ Mono closeAsync(AmqpShutdownSignal shutdownSignal) { connectionId, e); closeConnectionWork(); } - }).then(isClosedMono.asMono()); + }); + + return Mono.whenDelayError(cbsCloseOperation, managementNodeCloseOperations) + .then(closeReactor) + .then(isClosedMono.asMono()); } private synchronized void closeConnectionWork() { diff --git a/sdk/core/azure-core-amqp/src/main/java/com/azure/core/amqp/implementation/ReactorSession.java b/sdk/core/azure-core-amqp/src/main/java/com/azure/core/amqp/implementation/ReactorSession.java index 5d58e2bd7592..e0274589a9f8 100644 --- a/sdk/core/azure-core-amqp/src/main/java/com/azure/core/amqp/implementation/ReactorSession.java +++ b/sdk/core/azure-core-amqp/src/main/java/com/azure/core/amqp/implementation/ReactorSession.java @@ -152,8 +152,7 @@ public boolean isDisposed() { */ @Override public void dispose() { - closeAsync("Dispose called.", null, true) - .block(retryOptions.getTryTimeout()); + closeAsync().block(retryOptions.getTryTimeout()); } /** @@ -240,6 +239,11 @@ Mono isClosed() { return isClosedMono.asMono(); } + @Override + public Mono closeAsync() { + return closeAsync(null, null, true); + } + Mono closeAsync(String message, ErrorCondition errorCondition, boolean disposeLinks) { if (isDisposed.getAndSet(true)) { return isClosedMono.asMono(); @@ -248,7 +252,7 @@ Mono closeAsync(String message, ErrorCondition errorCondition, boolean dis final String condition = errorCondition != null ? errorCondition.toString() : NOT_APPLICABLE; logger.verbose("connectionId[{}], sessionName[{}], errorCondition[{}]. Setting error condition and " + "disposing session. {}", - sessionHandler.getConnectionId(), sessionName, condition, message); + sessionHandler.getConnectionId(), sessionName, condition, message != null ? message : ""); return Mono.fromRunnable(() -> { try { @@ -596,7 +600,7 @@ private void handleClose() { "connectionId[{}] sessionName[{}] Disposing of active send and receive links due to session close.", sessionHandler.getConnectionId(), sessionName); - closeAsync("", null, true).subscribe(); + closeAsync().subscribe(); } private void handleError(Throwable error) { diff --git a/sdk/core/azure-core-amqp/src/main/java/com/azure/core/amqp/implementation/RequestResponseChannel.java b/sdk/core/azure-core-amqp/src/main/java/com/azure/core/amqp/implementation/RequestResponseChannel.java index f7bed8c8242d..cc1d55827689 100644 --- a/sdk/core/azure-core-amqp/src/main/java/com/azure/core/amqp/implementation/RequestResponseChannel.java +++ b/sdk/core/azure-core-amqp/src/main/java/com/azure/core/amqp/implementation/RequestResponseChannel.java @@ -156,7 +156,7 @@ protected RequestResponseChannel(AmqpConnection amqpConnection, String connectio handleError(error, "Error in ReceiveLinkHandler."); onTerminalState("ReceiveLinkHandler"); }, () -> { - closeAsync("ReceiveLinkHandler. Endpoint states complete.").subscribe(); + closeAsync().subscribe(); onTerminalState("ReceiveLinkHandler"); }), @@ -166,13 +166,13 @@ protected RequestResponseChannel(AmqpConnection amqpConnection, String connectio handleError(error, "Error in SendLinkHandler."); onTerminalState("SendLinkHandler"); }, () -> { - closeAsync("SendLinkHandler. Endpoint states complete.").subscribe(); + closeAsync().subscribe(); onTerminalState("SendLinkHandler"); }), amqpConnection.getShutdownSignals().next().flatMap(signal -> { logger.verbose("connectionId[{}] linkName[{}]: Shutdown signal received.", connectionId, linkName); - return closeAsync(" Shutdown signal received."); + return closeAsync(); }).subscribe() ); //@formatter:on @@ -201,17 +201,13 @@ public Flux getEndpointStates() { @Override public Mono closeAsync() { - return this.closeAsync(""); - } - - public Mono closeAsync(String message) { if (isDisposed.getAndSet(true)) { return closeMono.asMono().subscribeOn(Schedulers.boundedElastic()); } - return Mono.fromRunnable(() -> { - logger.verbose("connectionId[{}] linkName[{}] {}", connectionId, linkName, message); + logger.verbose("connectionId[{}] linkName[{}] Closing request/response channel.", connectionId, linkName); + return Mono.fromRunnable(() -> { try { provider.getReactorDispatcher().invoke(() -> { sendLink.close(); @@ -365,7 +361,7 @@ private void handleError(Throwable error, String message) { unconfirmedSends.forEach((key, value) -> value.error(error)); unconfirmedSends.clear(); - closeAsync("Disposing channel due to error.").subscribe(); + closeAsync().subscribe(); } private void onTerminalState(String handlerName) { diff --git a/sdk/core/azure-core-amqp/src/main/java/com/azure/core/amqp/models/DeliveryOutcome.java b/sdk/core/azure-core-amqp/src/main/java/com/azure/core/amqp/models/DeliveryOutcome.java new file mode 100644 index 000000000000..ae90b87f69de --- /dev/null +++ b/sdk/core/azure-core-amqp/src/main/java/com/azure/core/amqp/models/DeliveryOutcome.java @@ -0,0 +1,42 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.core.amqp.models; + +import com.azure.core.annotation.Fluent; + +/** + * Outcomes accepted by the AMQP protocol layer. Some outcomes have metadata associated with them, such as {@link + * ModifiedDeliveryOutcome Modified} while others require only a {@link DeliveryState}. An outcome with no metadata is + * {@link DeliveryState#ACCEPTED}. + * + * @see Delivery + * State: Accepted + * @see Delivery + * State: Released + * @see ModifiedDeliveryOutcome + * @see RejectedDeliveryOutcome + * @see TransactionalDeliveryOutcome + */ +@Fluent +public class DeliveryOutcome { + private final DeliveryState deliveryState; + + /** + * Creates an instance of the delivery outcome with its state. + * + * @param deliveryState The state of the delivery. + */ + public DeliveryOutcome(DeliveryState deliveryState) { + this.deliveryState = deliveryState; + } + + /** + * Gets the delivery state. + * + * @return The delivery state. + */ + public DeliveryState getDeliveryState() { + return deliveryState; + } +} diff --git a/sdk/core/azure-core-amqp/src/main/java/com/azure/core/amqp/models/DeliveryState.java b/sdk/core/azure-core-amqp/src/main/java/com/azure/core/amqp/models/DeliveryState.java new file mode 100644 index 000000000000..8b2933701eeb --- /dev/null +++ b/sdk/core/azure-core-amqp/src/main/java/com/azure/core/amqp/models/DeliveryState.java @@ -0,0 +1,63 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.core.amqp.models; + +import com.azure.core.util.ExpandableStringEnum; + +import java.util.Collection; + +/** + * States for a message delivery. + * + * @see Delivery + * state + * @see Transactional + * work + */ +public final class DeliveryState extends ExpandableStringEnum { + /** + * Indicates successful processing at the receiver. + */ + public static final DeliveryState ACCEPTED = fromString("ACCEPTED", DeliveryState.class); + /** + * Indicates an invalid and unprocessable message. + */ + public static final DeliveryState REJECTED = fromString("REJECTED", DeliveryState.class); + /** + * Indicates that the message was not (and will not be) processed. + */ + public static final DeliveryState RELEASED = fromString("RELEASED", DeliveryState.class); + /** + * indicates that the message was modified, but not processed. + */ + public static final DeliveryState MODIFIED = fromString("MODIFIED", DeliveryState.class); + /** + * indicates partial message data seen by the receiver as well as the starting point for a resumed transfer. + */ + public static final DeliveryState RECEIVED = fromString("RECEIVED", DeliveryState.class); + /** + * Indicates that this delivery is part of a transaction. + */ + public static final DeliveryState TRANSACTIONAL = fromString("TRANSACTIONAL", DeliveryState.class); + + /** + * Gets the corresponding delivery state from its string representation. + * + * @param name The delivery state to convert. + * + * @return The corresponding delivery state. + */ + public static DeliveryState fromString(String name) { + return fromString(name, DeliveryState.class); + } + + /** + * Gets all the current delivery states. + * + * @return Gets the current delivery states. + */ + public static Collection values() { + return values(DeliveryState.class); + } +} diff --git a/sdk/core/azure-core-amqp/src/main/java/com/azure/core/amqp/models/ModifiedDeliveryOutcome.java b/sdk/core/azure-core-amqp/src/main/java/com/azure/core/amqp/models/ModifiedDeliveryOutcome.java new file mode 100644 index 000000000000..d870f78afb17 --- /dev/null +++ b/sdk/core/azure-core-amqp/src/main/java/com/azure/core/amqp/models/ModifiedDeliveryOutcome.java @@ -0,0 +1,109 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.core.amqp.models; + +import com.azure.core.annotation.Fluent; + +import java.util.Map; + +/** + * The modified outcome. + *

+ * At the source the modified outcome means that the message is no longer acquired by the receiver, and has been made + * available for (re-)delivery to the same or other targets receiving from the node. The message has been changed at the + * node in the ways indicated by the fields of the outcome. As modified is a terminal outcome, transfer of payload data + * will not be able to be resumed if the link becomes suspended. A delivery can become modified at the source even + * before all transfer frames have been sent. This does not imply that the remaining transfers for the delivery will not + * be sent. The source MAY spontaneously attain the modified outcome for a message (for example the source might + * implement some sort of time-bound acquisition lock, after which the acquisition of a message at a node is revoked to + * allow for delivery to an alternative consumer with the message modified in some way to denote the previous failed, + * e.g., with delivery-failed set to true). + *

+ *

+ * At the target, the modified outcome is used to indicate that a given transfer was not and will not be acted upon, and + * that the message SHOULD be modified in the specified ways at the node. + *

+ * + * @see Modified + * outcome + */ +@Fluent +public final class ModifiedDeliveryOutcome extends DeliveryOutcome { + private Map messageAnnotations; + private Boolean isUndeliverableHere; + private Boolean isDeliveryFailed; + + /** + * Creates an instance with the delivery state modified set. + */ + public ModifiedDeliveryOutcome() { + super(DeliveryState.MODIFIED); + } + + /** + * Gets whether or not the message is undeliverable here. + * + * @return {@code true} to not redeliver message. + */ + public Boolean isUndeliverableHere() { + return this.isUndeliverableHere; + } + + /** + * Sets whether or not the message is undeliverable here. + * + * @param isUndeliverable If the message is undeliverable here. + * + * @return The updated {@link ModifiedDeliveryOutcome} outcome. + */ + public ModifiedDeliveryOutcome setUndeliverableHere(boolean isUndeliverable) { + this.isUndeliverableHere = isUndeliverable; + return this; + } + + /** + * Gets whether or not to count the transfer as an unsuccessful delivery attempt. + * + * @return {@code true} to increment the delivery count. + */ + public Boolean isDeliveryFailed() { + return isDeliveryFailed; + } + + /** + * Sets whether or not to count the transfer as an unsuccessful delivery attempt. + * + * @param isDeliveryFailed {@code true} to count the transfer as an unsuccessful delivery attempt. + * + * @return The updated {@link ModifiedDeliveryOutcome} outcome. + */ + public ModifiedDeliveryOutcome setDeliveryFailed(boolean isDeliveryFailed) { + this.isDeliveryFailed = isDeliveryFailed; + return this; + } + + /** + * Gets a map containing attributes to combine with the existing message-annotations held in the message's header + * section. Where the existing message-annotations of the message contain an entry with the same key as an entry in + * this field, the value in this field associated with that key replaces the one in the existing headers; where the + * existing message-annotations has no such value, the value in this map is added. + * + * @return Map containing attributes to combine with existing message annotations on the message. + */ + public Map getMessageAnnotations() { + return messageAnnotations; + } + + /** + * Sets the message annotations to add to the message. + * + * @param messageAnnotations the message annotations to add to the message. + * + * @return The updated {@link ModifiedDeliveryOutcome} object. + */ + public ModifiedDeliveryOutcome setMessageAnnotations(Map messageAnnotations) { + this.messageAnnotations = messageAnnotations; + return this; + } +} diff --git a/sdk/core/azure-core-amqp/src/main/java/com/azure/core/amqp/models/ReceivedDeliveryOutcome.java b/sdk/core/azure-core-amqp/src/main/java/com/azure/core/amqp/models/ReceivedDeliveryOutcome.java new file mode 100644 index 000000000000..2c4cc73a7990 --- /dev/null +++ b/sdk/core/azure-core-amqp/src/main/java/com/azure/core/amqp/models/ReceivedDeliveryOutcome.java @@ -0,0 +1,64 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.core.amqp.models; + +/** + * Represents a partial message that was received. + * + * @see DeliveryState + * @see Received + * outcome + */ +public final class ReceivedDeliveryOutcome extends DeliveryOutcome { + private final int sectionNumber; + private final long sectionOffset; + + /** + * Creates an instance of the delivery outcome with its state. + * + * @param sectionNumber Section number within the message that can be resent or may not have been received. + * @param sectionOffset First byte of the section where data can be resent, or first byte of the section where + * it may not have been received. + */ + public ReceivedDeliveryOutcome(int sectionNumber, long sectionOffset) { + super(DeliveryState.RECEIVED); + this.sectionNumber = sectionNumber; + this.sectionOffset = sectionOffset; + } + + /** + * Gets the section number. + *

+ * When sent by the sender this indicates the first section of the message (with section-number 0 being the first + * section) for which data can be resent. Data from sections prior to the given section cannot be retransmitted for + * this delivery. + *

+ * When sent by the receiver this indicates the first section of the message for which all data might not yet have + * been received. + * + * @return Gets the section number of this outcome. + */ + public int getSectionNumber() { + return sectionNumber; + } + + /** + * Gets the section offset. + *

+ * When sent by the sender this indicates the first byte of the encoded section data of the section given by + * section-number for which data can be resent (with section-offset 0 being the first byte). Bytes from the same + * section prior to the given offset section cannot be retransmitted for this delivery. + *

+ * When sent by the receiver this indicates the first byte of the given section which has not yet been received. + * Note that if a receiver has received all of section number X (which contains N bytes of data), but none of + * section number X + 1, then it can indicate this by sending either Received(section-number=X, section-offset=N) or + * Received(section-number=X+1, section-offset=0). The state Received(section-number=0, section-offset=0) indicates + * that no message data at all has been transferred. + * + * @return The section offset. + */ + public long getSectionOffset() { + return sectionOffset; + } +} diff --git a/sdk/core/azure-core-amqp/src/main/java/com/azure/core/amqp/models/RejectedDeliveryOutcome.java b/sdk/core/azure-core-amqp/src/main/java/com/azure/core/amqp/models/RejectedDeliveryOutcome.java new file mode 100644 index 000000000000..d084645d19b3 --- /dev/null +++ b/sdk/core/azure-core-amqp/src/main/java/com/azure/core/amqp/models/RejectedDeliveryOutcome.java @@ -0,0 +1,81 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.core.amqp.models; + +import com.azure.core.amqp.exception.AmqpErrorCondition; +import com.azure.core.annotation.Fluent; + +import java.util.Map; +import java.util.Objects; + +/** + * The rejected delivery outcome. + *

+ * At the target, the rejected outcome is used to indicate that an incoming message is invalid and therefore + * unprocessable. The rejected outcome when applied to a message will cause the delivery-count to be incremented in the + * header of the rejected message. + *

+ *

+ * At the source, the rejected outcome means that the target has informed the source that the message was rejected, and + * the source has taken the necessary action. The delivery SHOULD NOT ever spontaneously attain the rejected state at + * the source. + *

+ * + * @see Rejected + * outcome + */ +@Fluent +public final class RejectedDeliveryOutcome extends DeliveryOutcome { + private final AmqpErrorCondition errorCondition; + private Map errorInfo; + + /** + * Creates an instance with the given error condition. + * + * @param errorCondition The error condition. + */ + public RejectedDeliveryOutcome(AmqpErrorCondition errorCondition) { + super(DeliveryState.REJECTED); + this.errorCondition = Objects.requireNonNull(errorCondition, "'errorCondition' cannot be null."); + } + + /** + * Diagnostic information about the cause of the message rejection. + * + * @return Diagnostic information about the cause of the message rejection. + */ + public AmqpErrorCondition getErrorCondition() { + return errorCondition; + } + + /** + * Gets the error description. + * + * @return Gets the error condition. + */ + public String getErrorDescription() { + return errorCondition.getErrorCondition(); + } + + /** + * Gets a map of additional error information. + * + * @return Map of additional error information. + */ + public Map getErrorInfo() { + return errorInfo; + } + + /** + * Sets a map with additional error information. + * + * @param errorInfo Error information associated with the rejection. + * + * @return The updated {@link RejectedDeliveryOutcome} object. + */ + public RejectedDeliveryOutcome setErrorInfo(Map errorInfo) { + this.errorInfo = errorInfo; + return this; + } +} diff --git a/sdk/core/azure-core-amqp/src/main/java/com/azure/core/amqp/models/TransactionalDeliveryOutcome.java b/sdk/core/azure-core-amqp/src/main/java/com/azure/core/amqp/models/TransactionalDeliveryOutcome.java new file mode 100644 index 000000000000..9d342fcc5e75 --- /dev/null +++ b/sdk/core/azure-core-amqp/src/main/java/com/azure/core/amqp/models/TransactionalDeliveryOutcome.java @@ -0,0 +1,73 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.core.amqp.models; + +import com.azure.core.amqp.AmqpTransaction; +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; + +import java.nio.ByteBuffer; +import java.util.Objects; + +/** + * A transaction delivery outcome. + * + * @see Transactional + * state + */ +@Fluent +public final class TransactionalDeliveryOutcome extends DeliveryOutcome { + private final AmqpTransaction amqpTransaction; + private final ClientLogger logger = new ClientLogger(TransactionalDeliveryOutcome.class); + private DeliveryOutcome outcome; + + /** + * Creates an outcome with the given transaction. + * + * @param transaction The transaction. + * @throws NullPointerException if {@code transaction} is {@code null}. + */ + public TransactionalDeliveryOutcome(AmqpTransaction transaction) { + super(DeliveryState.TRANSACTIONAL); + this.amqpTransaction = Objects.requireNonNull(transaction, "'transaction' cannot be null."); + } + + /** + * Gets the transaction id associated with this delivery outcome. + * + * @return The transaction id. + */ + public ByteBuffer getTransactionId() { + return amqpTransaction.getTransactionId(); + } + + /** + * Gets the delivery outcome associated with this transaction. + * + * @return the delivery outcome associated with this transaction, {@code null} if there is no outcome. + */ + public DeliveryOutcome getOutcome() { + return outcome; + } + + /** + * Sets the outcome associated with this delivery state. + * + * @param outcome Outcome associated with this transaction delivery. + * + * @return The updated {@link TransactionalDeliveryOutcome} object. + * + * @throws IllegalArgumentException if {@code outcome} is an instance of {@link TransactionalDeliveryOutcome}. + * Cannot have nested transaction outcomes. + */ + public TransactionalDeliveryOutcome setOutcome(DeliveryOutcome outcome) { + if (outcome instanceof TransactionalDeliveryOutcome) { + throw logger.logExceptionAsError( + new IllegalArgumentException("Cannot set the outcome as another nested transaction outcome.")); + } + + this.outcome = outcome; + return this; + } +} diff --git a/sdk/core/azure-core-amqp/src/test/java/com/azure/core/amqp/implementation/ClaimsBasedSecurityChannelTest.java b/sdk/core/azure-core-amqp/src/test/java/com/azure/core/amqp/implementation/ClaimsBasedSecurityChannelTest.java index 436f8faadce0..e4972f1421ae 100644 --- a/sdk/core/azure-core-amqp/src/test/java/com/azure/core/amqp/implementation/ClaimsBasedSecurityChannelTest.java +++ b/sdk/core/azure-core-amqp/src/test/java/com/azure/core/amqp/implementation/ClaimsBasedSecurityChannelTest.java @@ -215,4 +215,42 @@ void errorsWhenNoResponse() { }) .verify(); } + + /** + * Verifies that it closes the CBS node asynchronously. + */ + @Test + void closesAsync() { + // Arrange + final ClaimsBasedSecurityChannel cbsChannel = new ClaimsBasedSecurityChannel( + Mono.defer(() -> Mono.just(requestResponseChannel)), tokenCredential, + CbsAuthorizationType.SHARED_ACCESS_SIGNATURE, options); + + when(requestResponseChannel.closeAsync()).thenReturn(Mono.empty()); + + // Act & Assert + StepVerifier.create(cbsChannel.closeAsync()) + .expectComplete() + .verify(); + + verify(requestResponseChannel).closeAsync(); + } + + /** + * Verifies that it closes the cbs node synchronously. + */ + @Test + void closes() { + // Arrange + final ClaimsBasedSecurityChannel cbsChannel = new ClaimsBasedSecurityChannel( + Mono.defer(() -> Mono.just(requestResponseChannel)), tokenCredential, + CbsAuthorizationType.SHARED_ACCESS_SIGNATURE, options); + + when(requestResponseChannel.closeAsync()).thenReturn(Mono.empty()); + + // Act & Assert + cbsChannel.close(); + + verify(requestResponseChannel).closeAsync(); + } } diff --git a/sdk/core/azure-core-amqp/src/test/java/com/azure/core/amqp/implementation/ConnectionOptionsTest.java b/sdk/core/azure-core-amqp/src/test/java/com/azure/core/amqp/implementation/ConnectionOptionsTest.java index a6426dfa83aa..35aaaea59ffa 100644 --- a/sdk/core/azure-core-amqp/src/test/java/com/azure/core/amqp/implementation/ConnectionOptionsTest.java +++ b/sdk/core/azure-core-amqp/src/test/java/com/azure/core/amqp/implementation/ConnectionOptionsTest.java @@ -48,6 +48,7 @@ public void propertiesSet() { // Arrange final String productName = "test-product"; final String clientVersion = "1.5.10"; + final String scope = "test-scope"; final String hostname = "host-name.com"; final SslDomain.VerifyMode verifyMode = SslDomain.VerifyMode.VERIFY_PEER; @@ -56,8 +57,8 @@ public void propertiesSet() { // Act final ConnectionOptions actual = new ConnectionOptions(hostname, tokenCredential, - CbsAuthorizationType.JSON_WEB_TOKEN, AmqpTransportType.AMQP, retryOptions, ProxyOptions.SYSTEM_DEFAULTS, - scheduler, clientOptions, verifyMode, productName, clientVersion); + CbsAuthorizationType.JSON_WEB_TOKEN, scope, AmqpTransportType.AMQP, retryOptions, + ProxyOptions.SYSTEM_DEFAULTS, scheduler, clientOptions, verifyMode, productName, clientVersion); // Assert assertEquals(hostname, actual.getHostname()); @@ -72,6 +73,7 @@ public void propertiesSet() { assertEquals(tokenCredential, actual.getTokenCredential()); assertEquals(CbsAuthorizationType.JSON_WEB_TOKEN, actual.getAuthorizationType()); + assertEquals(scope, actual.getAuthorizationScope()); assertEquals(retryOptions, actual.getRetry()); assertEquals(verifyMode, actual.getSslVerifyMode()); } diff --git a/sdk/core/azure-core-amqp/src/test/java/com/azure/core/amqp/implementation/ManagementChannelTest.java b/sdk/core/azure-core-amqp/src/test/java/com/azure/core/amqp/implementation/ManagementChannelTest.java new file mode 100644 index 000000000000..d5270c765886 --- /dev/null +++ b/sdk/core/azure-core-amqp/src/test/java/com/azure/core/amqp/implementation/ManagementChannelTest.java @@ -0,0 +1,352 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.core.amqp.implementation; + +import com.azure.core.amqp.AmqpRetryPolicy; +import com.azure.core.amqp.exception.AmqpErrorCondition; +import com.azure.core.amqp.exception.AmqpErrorContext; +import com.azure.core.amqp.exception.AmqpException; +import com.azure.core.amqp.exception.AmqpResponseCode; +import com.azure.core.amqp.models.AmqpAnnotatedMessage; +import com.azure.core.amqp.models.AmqpMessageBody; +import com.azure.core.amqp.models.AmqpMessageBodyType; +import com.azure.core.amqp.models.DeliveryOutcome; +import com.azure.core.amqp.models.DeliveryState; +import com.azure.core.amqp.models.ModifiedDeliveryOutcome; +import com.azure.core.util.logging.ClientLogger; +import org.apache.qpid.proton.Proton; +import org.apache.qpid.proton.amqp.Binary; +import org.apache.qpid.proton.amqp.Symbol; +import org.apache.qpid.proton.amqp.messaging.Accepted; +import org.apache.qpid.proton.amqp.messaging.ApplicationProperties; +import org.apache.qpid.proton.amqp.messaging.Data; +import org.apache.qpid.proton.amqp.messaging.Modified; +import org.apache.qpid.proton.message.Message; +import org.junit.jupiter.api.AfterAll; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.TestInfo; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; +import org.mockito.Mock; +import org.mockito.Mockito; +import org.mockito.MockitoAnnotations; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; +import reactor.test.StepVerifier; +import reactor.test.publisher.TestPublisher; + +import java.nio.ByteBuffer; +import java.nio.charset.StandardCharsets; +import java.time.Duration; +import java.util.HashMap; +import java.util.Map; +import java.util.stream.Stream; + +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertTrue; +import static org.mockito.ArgumentMatchers.any; +import static org.mockito.ArgumentMatchers.argThat; +import static org.mockito.ArgumentMatchers.eq; +import static org.mockito.Mockito.never; +import static org.mockito.Mockito.verify; +import static org.mockito.Mockito.when; + +/** + * Tests for {@link ManagementChannel}. + */ +public class ManagementChannelTest { + private static final String STATUS_CODE_KEY = "status-code"; + private static final String STATUS_DESCRIPTION_KEY = "status-description"; + private static final String ERROR_CONDITION_KEY = "errorCondition"; + + private static final String NAMESPACE = "my-namespace-foo.net"; + private static final String ENTITY_PATH = "queue-name"; + + private final ClientLogger logger = new ClientLogger(ManagementChannelTest.class); + + // Mocked response values from the RequestResponseChannel. + private final Map applicationProperties = new HashMap<>(); + private final Message responseMessage = Proton.message(); + private final TestPublisher tokenProviderResults = TestPublisher.createCold(); + private final AmqpErrorContext errorContext = new AmqpErrorContext("Foo-bar"); + private final AmqpMessageBody messageBody = AmqpMessageBody.fromData("test-body".getBytes(StandardCharsets.UTF_8)); + private final AmqpAnnotatedMessage annotatedMessage = new AmqpAnnotatedMessage(messageBody); + + private ManagementChannel managementChannel; + private AutoCloseable autoCloseable; + + @Mock + private TokenManager tokenManager; + @Mock + private RequestResponseChannel requestResponseChannel; + @Mock + private AmqpRetryPolicy retryPolicy; + + @BeforeAll + public static void beforeAll() { + StepVerifier.setDefaultTimeout(Duration.ofSeconds(10)); + } + + @AfterAll + public static void afterAll() { + StepVerifier.resetDefaultTimeout(); + } + + @BeforeEach + public void setup(TestInfo testInfo) { + logger.info("[{}] Setting up.", testInfo.getDisplayName()); + + autoCloseable = MockitoAnnotations.openMocks(this); + + final AmqpChannelProcessor requestResponseMono = + Mono.defer(() -> Mono.just(requestResponseChannel)).subscribeWith(new AmqpChannelProcessor<>( + "foo", "bar", RequestResponseChannel::getEndpointStates, + retryPolicy, logger)); + + when(tokenManager.authorize()).thenReturn(Mono.just(1000L)); + when(tokenManager.getAuthorizationResults()).thenReturn(tokenProviderResults.flux()); + + when(requestResponseChannel.getErrorContext()).thenReturn(errorContext); + when(requestResponseChannel.getEndpointStates()).thenReturn(Flux.never()); + + managementChannel = new ManagementChannel(requestResponseMono, NAMESPACE, ENTITY_PATH, tokenManager); + } + + @AfterEach + public void teardown(TestInfo testInfo) throws Exception { + logger.info("[{}] Tearing down.", testInfo.getDisplayName()); + if (autoCloseable != null) { + autoCloseable.close(); + } + + Mockito.framework().clearInlineMocks(); + } + + /** + * When an empty response is returned, an error is returned. + */ + @Test + public void sendMessageEmptyResponseErrors() { + // Arrange + when(requestResponseChannel.getErrorContext()).thenReturn(errorContext); + when(requestResponseChannel.sendWithAck(any(Message.class))).thenReturn(Mono.empty()); + + // Act & Assert + StepVerifier.create(managementChannel.send(annotatedMessage)) + .then(() -> tokenProviderResults.next(AmqpResponseCode.OK)) + .expectErrorSatisfies(error -> { + assertTrue(error instanceof AmqpException); + assertEquals(errorContext, ((AmqpException) error).getContext()); + assertTrue(((AmqpException) error).isTransient()); + }) + .verify(); + } + + /** + * Sends a message with success and asserts the response. + */ + @MethodSource("successfulResponseCodes") + @ParameterizedTest + public void sendMessage(AmqpResponseCode responseCode) { + // Arrange + when(requestResponseChannel.getErrorContext()).thenReturn(errorContext); + when(requestResponseChannel.sendWithAck(any(Message.class))).thenReturn(Mono.just(responseMessage)); + + applicationProperties.put(STATUS_CODE_KEY, responseCode.getValue()); + responseMessage.setApplicationProperties(new ApplicationProperties(applicationProperties)); + + final byte[] body = "foo".getBytes(StandardCharsets.UTF_8); + final Data dataBody = new Data(Binary.create(ByteBuffer.wrap(body))); + responseMessage.setBody(dataBody); + + // Act & Assert + StepVerifier.create(managementChannel.send(annotatedMessage)) + .then(() -> tokenProviderResults.next(AmqpResponseCode.OK)) + .assertNext(actual -> { + assertNotNull(actual.getApplicationProperties()); + assertEquals(responseCode.getValue(), actual.getApplicationProperties().get(STATUS_CODE_KEY)); + + assertEquals(AmqpMessageBodyType.DATA, actual.getBody().getBodyType()); + assertEquals(body, actual.getBody().getFirstData()); + }) + .expectComplete() + .verify(); + } + + /** + * Sends a message and a delivery outcome with success and asserts the response. + */ + @MethodSource("successfulResponseCodes") + @ParameterizedTest + public void sendMessageWithOutcome(AmqpResponseCode responseCode) { + // Arrange + final ModifiedDeliveryOutcome outcome = new ModifiedDeliveryOutcome(); + when(requestResponseChannel.getErrorContext()).thenReturn(errorContext); + when(requestResponseChannel.sendWithAck(any(Message.class), argThat(p -> p instanceof Modified))) + .thenReturn(Mono.just(responseMessage)); + + applicationProperties.put(STATUS_CODE_KEY, responseCode.getValue()); + responseMessage.setApplicationProperties(new ApplicationProperties(applicationProperties)); + + final byte[] body = "foo-bar".getBytes(StandardCharsets.UTF_8); + final Data dataBody = new Data(Binary.create(ByteBuffer.wrap(body))); + responseMessage.setBody(dataBody); + + // Act & Assert + StepVerifier.create(managementChannel.send(annotatedMessage, outcome)) + .then(() -> tokenProviderResults.next(AmqpResponseCode.OK)) + .assertNext(actual -> { + assertNotNull(actual.getApplicationProperties()); + assertEquals(responseCode.getValue(), actual.getApplicationProperties().get(STATUS_CODE_KEY)); + + assertEquals(AmqpMessageBodyType.DATA, actual.getBody().getBodyType()); + assertEquals(body, actual.getBody().getFirstData()); + }) + .expectComplete() + .verify(); + } + + /** + * When an empty response is returned for sending a message with deliveryOutcome, an error is returned. + */ + @Test + public void sendMessageDeliveryOutcomeEmptyResponseErrors() { + // Arrange + final DeliveryOutcome outcome = new DeliveryOutcome(DeliveryState.ACCEPTED); + + when(requestResponseChannel.getErrorContext()).thenReturn(errorContext); + when(requestResponseChannel.sendWithAck(any(Message.class), eq(Accepted.getInstance()))) + .thenReturn(Mono.empty()); + + // Act & Assert + StepVerifier.create(managementChannel.send(annotatedMessage, outcome)) + .then(() -> tokenProviderResults.next(AmqpResponseCode.OK)) + .expectErrorSatisfies(error -> { + assertTrue(error instanceof AmqpException); + assertEquals(errorContext, ((AmqpException) error).getContext()); + assertTrue(((AmqpException) error).isTransient()); + }) + .verify(); + } + + /** + * When an authorization returns no response, it errors. + */ + @Test + public void sendMessageDeliveryOutcomeNoAuthErrors() { + // Arrange + final DeliveryOutcome outcome = new DeliveryOutcome(DeliveryState.ACCEPTED); + + when(requestResponseChannel.getErrorContext()).thenReturn(errorContext); + when(requestResponseChannel.sendWithAck(any(Message.class), eq(Accepted.getInstance()))) + .thenReturn(Mono.empty()); + + // Act & Assert + StepVerifier.create(managementChannel.send(annotatedMessage, outcome)) + .then(() -> tokenProviderResults.complete()) + .expectErrorSatisfies(error -> { + assertTrue(error instanceof AmqpException); + assertFalse(((AmqpException) error).isTransient()); + }) + .verify(); + + verify(requestResponseChannel, never()).sendWithAck(any(), any()); + } + + /** + * Sends a message with {@link AmqpResponseCode#NOT_FOUND} and asserts the response. + */ + @MethodSource + @ParameterizedTest + public void sendMessageNotFound(AmqpErrorCondition errorCondition) { + // Arrange + when(requestResponseChannel.getErrorContext()).thenReturn(errorContext); + when(requestResponseChannel.sendWithAck(any(Message.class))).thenReturn(Mono.just(responseMessage)); + + final AmqpResponseCode responseCode = AmqpResponseCode.NOT_FOUND; + applicationProperties.put(STATUS_CODE_KEY, responseCode.getValue()); + applicationProperties.put(ERROR_CONDITION_KEY, Symbol.getSymbol(errorCondition.getErrorCondition())); + + responseMessage.setApplicationProperties(new ApplicationProperties(applicationProperties)); + + final byte[] body = "foo".getBytes(StandardCharsets.UTF_8); + final Data dataBody = new Data(Binary.create(ByteBuffer.wrap(body))); + responseMessage.setBody(dataBody); + + // Act & Assert + StepVerifier.create(managementChannel.send(annotatedMessage)) + .then(() -> tokenProviderResults.next(AmqpResponseCode.OK)) + .assertNext(actual -> { + assertNotNull(actual.getApplicationProperties()); + assertEquals(responseCode.getValue(), actual.getApplicationProperties().get(STATUS_CODE_KEY)); + + assertEquals(AmqpMessageBodyType.DATA, actual.getBody().getBodyType()); + assertEquals(body, actual.getBody().getFirstData()); + }) + .expectComplete() + .verify(); + } + + /** + * Tests that we propagate any management errors. + */ + @Test + public void sendMessageUnsuccessful() { + // Arrange + when(requestResponseChannel.getErrorContext()).thenReturn(errorContext); + when(requestResponseChannel.sendWithAck(any(Message.class))).thenReturn(Mono.just(responseMessage)); + + final String statusDescription = "a status description"; + final AmqpResponseCode responseCode = AmqpResponseCode.FORBIDDEN; + final AmqpErrorCondition errorCondition = AmqpErrorCondition.ILLEGAL_STATE; + applicationProperties.put(STATUS_CODE_KEY, responseCode.getValue()); + applicationProperties.put(STATUS_DESCRIPTION_KEY, statusDescription); + applicationProperties.put(ERROR_CONDITION_KEY, Symbol.getSymbol(errorCondition.getErrorCondition())); + + responseMessage.setApplicationProperties(new ApplicationProperties(applicationProperties)); + + // Act & Assert + StepVerifier.create(managementChannel.send(annotatedMessage)) + .then(() -> tokenProviderResults.next(AmqpResponseCode.OK)) + .expectErrorSatisfies(error -> { + assertTrue(error instanceof AmqpException); + assertFalse(((AmqpException) error).isTransient()); + assertEquals(errorCondition, ((AmqpException) error).getErrorCondition()); + assertEquals(errorContext, ((AmqpException) error).getContext()); + }) + .verify(); + } + + public static Stream sendMessageNotFound() { + return Stream.of(AmqpErrorCondition.MESSAGE_NOT_FOUND, AmqpErrorCondition.SESSION_NOT_FOUND); + } + + public static Stream successfulResponseCodes() { + return Stream.of(AmqpResponseCode.ACCEPTED, AmqpResponseCode.OK, AmqpResponseCode.NO_CONTENT); + } + + /** + * Verifies that an error is emitted when user is unauthorized. + */ + @Test + void unauthorized() { + // Arrange + final AmqpResponseCode responseCode = AmqpResponseCode.UNAUTHORIZED; + final AmqpErrorCondition expected = AmqpErrorCondition.UNAUTHORIZED_ACCESS; + + // Act & Assert + StepVerifier.create(managementChannel.send(annotatedMessage)) + .then(() -> tokenProviderResults.next(responseCode)) + .expectErrorSatisfies(error -> { + assertTrue(error instanceof AmqpException); + assertEquals(expected, ((AmqpException) error).getErrorCondition()); + }) + .verify(); + } +} diff --git a/sdk/core/azure-core-amqp/src/test/java/com/azure/core/amqp/implementation/MessageUtilsTest.java b/sdk/core/azure-core-amqp/src/test/java/com/azure/core/amqp/implementation/MessageUtilsTest.java new file mode 100644 index 000000000000..161f75402209 --- /dev/null +++ b/sdk/core/azure-core-amqp/src/test/java/com/azure/core/amqp/implementation/MessageUtilsTest.java @@ -0,0 +1,936 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.core.amqp.implementation; + +import com.azure.core.amqp.exception.AmqpErrorCondition; +import com.azure.core.amqp.models.AmqpAddress; +import com.azure.core.amqp.models.AmqpAnnotatedMessage; +import com.azure.core.amqp.models.AmqpMessageBody; +import com.azure.core.amqp.models.AmqpMessageBodyType; +import com.azure.core.amqp.models.AmqpMessageHeader; +import com.azure.core.amqp.models.AmqpMessageId; +import com.azure.core.amqp.models.AmqpMessageProperties; +import com.azure.core.amqp.models.DeliveryOutcome; +import com.azure.core.amqp.models.DeliveryState; +import com.azure.core.amqp.models.ModifiedDeliveryOutcome; +import com.azure.core.amqp.models.ReceivedDeliveryOutcome; +import com.azure.core.amqp.models.RejectedDeliveryOutcome; +import com.azure.core.amqp.models.TransactionalDeliveryOutcome; +import org.apache.qpid.proton.Proton; +import org.apache.qpid.proton.amqp.Binary; +import org.apache.qpid.proton.amqp.Symbol; +import org.apache.qpid.proton.amqp.UnsignedByte; +import org.apache.qpid.proton.amqp.UnsignedInteger; +import org.apache.qpid.proton.amqp.messaging.Accepted; +import org.apache.qpid.proton.amqp.messaging.ApplicationProperties; +import org.apache.qpid.proton.amqp.messaging.Data; +import org.apache.qpid.proton.amqp.messaging.DeliveryAnnotations; +import org.apache.qpid.proton.amqp.messaging.Footer; +import org.apache.qpid.proton.amqp.messaging.Header; +import org.apache.qpid.proton.amqp.messaging.MessageAnnotations; +import org.apache.qpid.proton.amqp.messaging.Modified; +import org.apache.qpid.proton.amqp.messaging.Outcome; +import org.apache.qpid.proton.amqp.messaging.Properties; +import org.apache.qpid.proton.amqp.messaging.Received; +import org.apache.qpid.proton.amqp.messaging.Rejected; +import org.apache.qpid.proton.amqp.messaging.Released; +import org.apache.qpid.proton.amqp.transaction.Declared; +import org.apache.qpid.proton.amqp.transaction.TransactionalState; +import org.apache.qpid.proton.amqp.transport.DeliveryState.DeliveryStateType; +import org.apache.qpid.proton.amqp.transport.ErrorCondition; +import org.apache.qpid.proton.message.Message; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.Arguments; +import org.junit.jupiter.params.provider.MethodSource; + +import java.nio.ByteBuffer; +import java.nio.charset.StandardCharsets; +import java.time.Duration; +import java.time.OffsetDateTime; +import java.util.Date; +import java.util.HashMap; +import java.util.Map; +import java.util.stream.Stream; + +import static org.junit.jupiter.api.Assertions.assertArrayEquals; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertNull; +import static org.junit.jupiter.api.Assertions.assertThrows; +import static org.junit.jupiter.api.Assertions.assertTrue; +import static org.mockito.Mockito.mock; +import static org.mockito.Mockito.when; + +/** + * Tests utility methods in {@link MessageUtilsTest}. + */ +public class MessageUtilsTest { + + /** + * Parameters to pass into {@link #toDeliveryOutcomeFromOutcome(Outcome, DeliveryOutcome)} and {@link + * #toDeliveryOutcomeFromDeliveryState(org.apache.qpid.proton.amqp.transport.DeliveryState, DeliveryOutcome)}. + * Proton-j classes inherit from two interfaces, so can be used as inputs to both tests. + * + * @return Stream of arguments. + */ + public static Stream getProtonJOutcomesAndDeliveryStates() { + return Stream.of( + Arguments.of(Accepted.getInstance(), new DeliveryOutcome(DeliveryState.ACCEPTED)), + Arguments.of(Released.getInstance(), new DeliveryOutcome(DeliveryState.RELEASED))); + } + + /** + * Simple arguments where the proton-j delivery state is also its outcome. + * + * @return A stream of arguments. + */ + public static Stream getDeliveryStatesToTest() { + return Stream.of( + Arguments.arguments(DeliveryState.ACCEPTED, Accepted.getInstance(), + DeliveryStateType.Accepted), + Arguments.arguments(DeliveryState.RELEASED, Released.getInstance(), + DeliveryStateType.Released), + Arguments.arguments(DeliveryState.MODIFIED, new Modified(), + DeliveryStateType.Modified), + Arguments.arguments(DeliveryState.REJECTED, new Rejected(), + DeliveryStateType.Rejected)); + } + + /** + * Unsupported message bodies. + * + * @return Unsupported messaged bodies. + */ + public static Stream getUnsupportedMessageBody() { + return Stream.of(AmqpMessageBodyType.VALUE, AmqpMessageBodyType.SEQUENCE); + } + + /** + * Converts from a proton-j message to an AMQP annotated message. + */ + @Test + public void toAmqpAnnotatedMessage() { + final byte[] contents = "foo-bar".getBytes(StandardCharsets.UTF_8); + final Data body = new Data(Binary.create(ByteBuffer.wrap(contents))); + + final Header header = new Header(); + header.setDurable(true); + header.setDeliveryCount(new UnsignedInteger(17)); + header.setPriority(new UnsignedByte((byte) 2)); + header.setFirstAcquirer(false); + header.setTtl(new UnsignedInteger(10)); + final String messageId = "Test-message-id"; + final String correlationId = "correlation-id-test"; + final byte[] userId = "baz".getBytes(StandardCharsets.UTF_8); + final Properties properties = new Properties(); + + final OffsetDateTime absoluteDate = OffsetDateTime.parse("2021-02-04T10:15:30+00:00"); + properties.setAbsoluteExpiryTime(Date.from(absoluteDate.toInstant())); + properties.setContentEncoding(Symbol.valueOf("content-encoding-test")); + properties.setContentType(Symbol.valueOf("content-type-test")); + properties.setCorrelationId(correlationId); + + final OffsetDateTime creationTime = OffsetDateTime.parse("2021-02-03T10:15:30+00:00"); + properties.setCreationTime(Date.from(creationTime.toInstant())); + properties.setGroupId("group-id-test"); + properties.setGroupSequence(new UnsignedInteger(16)); + properties.setMessageId(messageId); + properties.setReplyToGroupId("reply-to-group-id-test"); + properties.setReplyTo("foo"); + properties.setTo("bar"); + properties.setSubject("subject-item"); + properties.setUserId(Binary.create(ByteBuffer.wrap(userId))); + + final Map applicationProperties = new HashMap<>(); + applicationProperties.put("1", "one"); + applicationProperties.put("two", 2); + + final Map deliveryAnnotations = new HashMap<>(); + deliveryAnnotations.put(Symbol.valueOf("delivery1"), 1); + deliveryAnnotations.put(Symbol.valueOf("delivery2"), 2); + + final Map messageAnnotations = new HashMap<>(); + messageAnnotations.put(Symbol.valueOf("something"), "else"); + + final Map footer = new HashMap<>(); + footer.put(Symbol.valueOf("1"), false); + + final Message message = Proton.message(); + message.setBody(body); + message.setHeader(header); + message.setProperties(properties); + message.setApplicationProperties(new ApplicationProperties(applicationProperties)); + message.setMessageAnnotations(new MessageAnnotations(messageAnnotations)); + message.setDeliveryAnnotations(new DeliveryAnnotations(deliveryAnnotations)); + message.setFooter(new Footer(footer)); + + // Act + final AmqpAnnotatedMessage actual = MessageUtils.toAmqpAnnotatedMessage(message); + + // Assert + assertNotNull(actual); + assertNotNull(actual.getBody()); + assertArrayEquals(contents, actual.getBody().getFirstData()); + + assertHeader(actual.getHeader(), header); + assertProperties(actual.getProperties(), properties); + + assertNotNull(actual.getApplicationProperties()); + assertEquals(applicationProperties.size(), actual.getApplicationProperties().size()); + applicationProperties.forEach((key, value) -> assertEquals(value, actual.getApplicationProperties().get(key))); + + assertSymbolMap(deliveryAnnotations, actual.getDeliveryAnnotations()); + assertSymbolMap(messageAnnotations, actual.getMessageAnnotations()); + assertSymbolMap(footer, actual.getFooter()); + } + + /** + * Tests a conversion from {@link AmqpAnnotatedMessage} to proton-j Message. + */ + @Test + public void toProtonJMessage() { + // Arrange + final byte[] contents = "foo-bar".getBytes(StandardCharsets.UTF_8); + final AmqpMessageBody body = AmqpMessageBody.fromData(contents); + final AmqpAnnotatedMessage expected = new AmqpAnnotatedMessage(body); + final AmqpMessageHeader header = expected.getHeader().setDurable(true) + .setDeliveryCount(17L) + .setPriority((short) 2) + .setFirstAcquirer(false) + .setTimeToLive(Duration.ofSeconds(10)); + final String messageId = "Test-message-id"; + final AmqpMessageId amqpMessageId = new AmqpMessageId(messageId); + final AmqpMessageId correlationId = new AmqpMessageId("correlation-id-test"); + final AmqpAddress replyTo = new AmqpAddress("foo"); + final AmqpAddress to = new AmqpAddress("bar"); + final byte[] userId = "baz".getBytes(StandardCharsets.UTF_8); + final AmqpMessageProperties properties = expected.getProperties() + .setAbsoluteExpiryTime(OffsetDateTime.parse("2021-02-04T10:15:30+00:00")) + .setContentEncoding("content-encoding-test") + .setContentType("content-type-test") + .setCorrelationId(correlationId) + .setCreationTime(OffsetDateTime.parse("2021-02-03T10:15:30+00:00")) + .setGroupId("group-id-test") + .setGroupSequence(22L) + .setMessageId(amqpMessageId) + .setReplyToGroupId("reply-to-group-id-test") + .setReplyTo(replyTo) + .setTo(to) + .setSubject("subject-item") + .setUserId(userId); + + final Map applicationProperties = new HashMap<>(); + applicationProperties.put("1", "one"); + applicationProperties.put("two", 2); + + applicationProperties.forEach((key, value) -> + expected.getApplicationProperties().put(key, value)); + + final Map deliveryAnnotations = new HashMap<>(); + deliveryAnnotations.put("delivery1", 1); + deliveryAnnotations.put("delivery2", 2); + + deliveryAnnotations.forEach((key, value) -> expected.getDeliveryAnnotations().put(key, value)); + + final Map messageAnnotations = new HashMap<>(); + messageAnnotations.put("something", "else"); + + messageAnnotations.forEach((key, value) -> expected.getMessageAnnotations().put(key, value)); + + final Map footer = new HashMap<>(); + footer.put("1", false); + + footer.forEach((key, value) -> expected.getFooter().put(key, value)); + + // Act + final Message actual = MessageUtils.toProtonJMessage(expected); + + // Assert + assertNotNull(actual); + + assertTrue(actual.getBody() instanceof Data); + + final Data dataBody = (Data) actual.getBody(); + assertArrayEquals(body.getFirstData(), dataBody.getValue().getArray()); + + assertHeader(header, actual.getHeader()); + assertProperties(properties, actual.getProperties()); + } + + /** + * Tests the unsupported message bodies. AMQP sequence and value. + */ + @MethodSource("getUnsupportedMessageBody") + @ParameterizedTest + public void toProtonJMessageUnsupportedMessageBody(AmqpMessageBodyType bodyType) { + final AmqpMessageBody messageBody = mock(AmqpMessageBody.class); + when(messageBody.getBodyType()).thenReturn(bodyType); + + final AmqpAnnotatedMessage message = new AmqpAnnotatedMessage(messageBody); + + // Act & Assert + assertThrows(UnsupportedOperationException.class, () -> MessageUtils.toProtonJMessage(message)); + } + + /** + * Converts from proton-j DeliveryState to delivery outcome. + */ + @MethodSource("getProtonJOutcomesAndDeliveryStates") + @ParameterizedTest + public void toDeliveryOutcomeFromDeliveryState(org.apache.qpid.proton.amqp.transport.DeliveryState deliveryState, + DeliveryOutcome expected) { + + // Act + final DeliveryOutcome actual = MessageUtils.toDeliveryOutcome(deliveryState); + + // Assert + assertNotNull(actual); + assertEquals(expected.getDeliveryState(), actual.getDeliveryState()); + } + + /** + * Tests that we can convert from a Modified delivery state to the appropriate delivery outcome. + */ + @Test + public void toDeliveryOutcomeFromModifiedDeliveryState() { + // Arrange + final Map messageAnnotations = new HashMap<>(); + messageAnnotations.put(Symbol.getSymbol("bar"), "foo"); + messageAnnotations.put(Symbol.getSymbol("baz"), 10); + + final Modified modified = new Modified(); + modified.setDeliveryFailed(true); + modified.setMessageAnnotations(messageAnnotations); + + // Act + final DeliveryOutcome actual = MessageUtils.toDeliveryOutcome( + (org.apache.qpid.proton.amqp.transport.DeliveryState) modified); + + // Assert + assertTrue(actual instanceof ModifiedDeliveryOutcome); + assertModified((ModifiedDeliveryOutcome) actual, modified); + } + + /** + * Tests that we can convert from Modified delivery state type to the appropriate delivery outcome. The difference + * is that this does not use the {@link Modified} class. + */ + @Test + public void toDeliveryOutcomeFromModifiedDeliveryStateNotSameClass() { + // Arrange + final org.apache.qpid.proton.amqp.transport.DeliveryState state = + mock(org.apache.qpid.proton.amqp.transport.DeliveryState.class); + + when(state.getType()).thenReturn(DeliveryStateType.Modified); + + // Act + final DeliveryOutcome actual = MessageUtils.toDeliveryOutcome(state); + + // Assert + assertTrue(actual instanceof ModifiedDeliveryOutcome); + assertEquals(DeliveryState.MODIFIED, actual.getDeliveryState()); + } + + /** + * Tests that we can convert from a Rejected delivery state to the appropriate delivery outcome. + */ + @Test + public void toDeliveryOutcomeFromRejectedDeliveryState() { + // Arrange + final Map errorInfo = new HashMap<>(); + errorInfo.put(Symbol.getSymbol("bar"), "foo"); + errorInfo.put(Symbol.getSymbol("baz"), 10); + + final AmqpErrorCondition error = AmqpErrorCondition.INTERNAL_ERROR; + final String errorDescription = "test: " + error.getErrorCondition(); + + final ErrorCondition errorCondition = new ErrorCondition(Symbol.getSymbol(error.getErrorCondition()), + errorDescription); + errorCondition.setInfo(errorInfo); + + final Rejected rejected = new Rejected(); + rejected.setError(errorCondition); + + // Act + final DeliveryOutcome actual = MessageUtils.toDeliveryOutcome( + (org.apache.qpid.proton.amqp.transport.DeliveryState) rejected); + + // Assert + assertTrue(actual instanceof RejectedDeliveryOutcome); + assertRejected((RejectedDeliveryOutcome) actual, rejected); + } + + /** + * Tests that we can convert from Rejected delivery state type to the appropriate delivery outcome. The difference + * is that this does not use the {@link Rejected} class. + */ + @Test + public void toDeliveryOutcomeFromRejectedDeliveryStateNotSameClass() { + // Arrange + final org.apache.qpid.proton.amqp.transport.DeliveryState state = + mock(org.apache.qpid.proton.amqp.transport.DeliveryState.class); + + when(state.getType()).thenReturn(DeliveryStateType.Rejected); + + // Act + final DeliveryOutcome actual = MessageUtils.toDeliveryOutcome(state); + + // Assert + assertEquals(DeliveryState.REJECTED, actual.getDeliveryState()); + } + + /** + * Tests that we can convert from a Declared delivery state to the appropriate delivery outcome. + */ + @Test + public void toDeliveryOutcomeFromDeclaredDeliveryState() { + // Arrange + final ByteBuffer transactionId = ByteBuffer.wrap("foo".getBytes(StandardCharsets.UTF_8)); + final Binary binary = Binary.create(transactionId); + final Declared declared = new Declared(); + declared.setTxnId(binary); + + // Act + final DeliveryOutcome actual = MessageUtils.toDeliveryOutcome( + (org.apache.qpid.proton.amqp.transport.DeliveryState) declared); + + // Assert + assertTrue(actual instanceof TransactionalDeliveryOutcome); + + final TransactionalDeliveryOutcome actualOutcome = (TransactionalDeliveryOutcome) actual; + assertEquals(DeliveryState.TRANSACTIONAL, actualOutcome.getDeliveryState()); + assertNull(actualOutcome.getOutcome()); + + assertEquals(transactionId, actualOutcome.getTransactionId()); + } + + /** + * Tests that Declared delivery state with no transaction id has an exception thrown. + */ + @Test + public void toDeliveryOutcomeFromDeclaredDeliveryStateNoTransactionId() { + // Arrange + final Declared declared = new Declared(); + + // Act & Assert + assertThrows(IllegalArgumentException.class, () -> MessageUtils.toDeliveryOutcome( + (org.apache.qpid.proton.amqp.transport.DeliveryState) declared)); + } + + /** + * Tests that an Declared delivery state type that is not also {@link Declared} throws. + */ + @Test + public void toDeliveryOutcomeDeclaredDeliveryStateNotSameClass() { + // Arrange + final org.apache.qpid.proton.amqp.transport.DeliveryState deliveryState = mock( + org.apache.qpid.proton.amqp.transport.DeliveryState.class); + + when(deliveryState.getType()).thenReturn(DeliveryStateType.Declared); + + // Act & Assert + assertThrows(IllegalArgumentException.class, () -> MessageUtils.toDeliveryOutcome(deliveryState)); + } + + /** + * Tests that we can convert from a Transactional delivery state to the appropriate delivery outcome. The + * transaction does not have an outcome associated with it. + */ + @Test + public void toDeliveryOutcomeFromTransactionalDeliveryStateNoOutcome() { + // Arrange + final ByteBuffer transactionId = ByteBuffer.wrap("foo".getBytes(StandardCharsets.UTF_8)); + final Binary binary = Binary.create(transactionId); + final TransactionalState transactionalState = new TransactionalState(); + transactionalState.setTxnId(binary); + + // Act + final DeliveryOutcome actual = MessageUtils.toDeliveryOutcome(transactionalState); + + // Assert + assertTrue(actual instanceof TransactionalDeliveryOutcome); + + final TransactionalDeliveryOutcome actualOutcome = (TransactionalDeliveryOutcome) actual; + assertEquals(DeliveryState.TRANSACTIONAL, actualOutcome.getDeliveryState()); + assertEquals(transactionId, actualOutcome.getTransactionId()); + + assertNull(actualOutcome.getOutcome()); + } + + /** + * Tests that we can convert from a Transactional delivery state to the appropriate delivery outcome. + */ + @Test + public void toDeliveryOutcomeFromTransactionalDeliveryState() { + // Arrange + final Map messageAnnotations = new HashMap<>(); + messageAnnotations.put(Symbol.getSymbol("bar"), "foo"); + messageAnnotations.put(Symbol.getSymbol("baz"), 10); + + final Modified modifiedOutcome = new Modified(); + modifiedOutcome.setDeliveryFailed(false); + modifiedOutcome.setUndeliverableHere(false); + modifiedOutcome.setMessageAnnotations(messageAnnotations); + + final ByteBuffer transactionId = ByteBuffer.wrap("foo".getBytes(StandardCharsets.UTF_8)); + final Binary binary = Binary.create(transactionId); + final TransactionalState transactionalState = new TransactionalState(); + transactionalState.setTxnId(binary); + transactionalState.setOutcome(modifiedOutcome); + + // Act + final DeliveryOutcome actual = MessageUtils.toDeliveryOutcome(transactionalState); + + // Assert + assertTrue(actual instanceof TransactionalDeliveryOutcome); + + final TransactionalDeliveryOutcome actualOutcome = (TransactionalDeliveryOutcome) actual; + assertEquals(DeliveryState.TRANSACTIONAL, actualOutcome.getDeliveryState()); + assertEquals(transactionId, actualOutcome.getTransactionId()); + + assertNotNull(actualOutcome.getOutcome()); + assertTrue(actualOutcome.getOutcome() instanceof ModifiedDeliveryOutcome); + assertModified((ModifiedDeliveryOutcome) actualOutcome.getOutcome(), modifiedOutcome); + } + + /** + * Tests that Transactional delivery state with no transaction id has an exception thrown. + */ + @Test + public void toDeliveryOutcomeFromTransactionalDeliveryStateNoTransactionId() { + // Arrange + final TransactionalState transactionalState = new TransactionalState(); + + // Act & Assert + assertThrows(IllegalArgumentException.class, () -> MessageUtils.toDeliveryOutcome(transactionalState)); + } + + /** + * Tests that an Transactional delivery state type that is not also {@link TransactionalState} throws. + */ + @Test + public void toDeliveryOutcomeTransactionDeliveryStateNotSameClass() { + // Arrange + final org.apache.qpid.proton.amqp.transport.DeliveryState deliveryState = mock( + org.apache.qpid.proton.amqp.transport.DeliveryState.class); + + when(deliveryState.getType()).thenReturn(DeliveryStateType.Transactional); + + // Act & Assert + assertThrows(IllegalArgumentException.class, () -> MessageUtils.toDeliveryOutcome(deliveryState)); + } + + /** + * Converts from proton-j outcome to delivery outcome. + */ + @MethodSource("getProtonJOutcomesAndDeliveryStates") + @ParameterizedTest + public void toDeliveryOutcomeFromOutcome(Outcome outcome, DeliveryOutcome expected) { + // Act + final DeliveryOutcome actual = MessageUtils.toDeliveryOutcome(outcome); + + // Assert + assertNotNull(actual); + assertEquals(expected.getDeliveryState(), actual.getDeliveryState()); + } + + /** + * Tests that we can convert from a Modified outcome to the appropriate delivery outcome. + */ + @Test + public void toDeliveryOutcomeFromModifiedOutcome() { + // Arrange + final Map messageAnnotations = new HashMap<>(); + messageAnnotations.put(Symbol.getSymbol("bar"), "foo"); + messageAnnotations.put(Symbol.getSymbol("baz"), 10); + + final Modified modified = new Modified(); + modified.setDeliveryFailed(true); + modified.setMessageAnnotations(messageAnnotations); + + // Act + final DeliveryOutcome actual = MessageUtils.toDeliveryOutcome((Outcome) modified); + + // Assert + assertTrue(actual instanceof ModifiedDeliveryOutcome); + + final ModifiedDeliveryOutcome actualOutcome = (ModifiedDeliveryOutcome) actual; + assertEquals(DeliveryState.MODIFIED, actualOutcome.getDeliveryState()); + assertEquals(modified.getUndeliverableHere(), actualOutcome.isUndeliverableHere()); + assertEquals(modified.getDeliveryFailed(), actualOutcome.isDeliveryFailed()); + + assertSymbolMap(messageAnnotations, actualOutcome.getMessageAnnotations()); + } + + /** + * Tests that we can convert from a Rejected outcome to the appropriate delivery outcome. + */ + @Test + public void toDeliveryOutcomeFromRejectedOutcome() { + // Arrange + final Map errorInfo = new HashMap<>(); + errorInfo.put(Symbol.getSymbol("bar"), "foo"); + errorInfo.put(Symbol.getSymbol("baz"), 10); + + final AmqpErrorCondition error = AmqpErrorCondition.INTERNAL_ERROR; + final String errorDescription = "test: " + error.getErrorCondition(); + + final ErrorCondition errorCondition = new ErrorCondition(Symbol.getSymbol(error.getErrorCondition()), + errorDescription); + errorCondition.setInfo(errorInfo); + + final Rejected rejected = new Rejected(); + rejected.setError(errorCondition); + + // Act + final DeliveryOutcome actual = MessageUtils.toDeliveryOutcome((Outcome) rejected); + + // Assert + assertTrue(actual instanceof RejectedDeliveryOutcome); + + final RejectedDeliveryOutcome actualOutcome = (RejectedDeliveryOutcome) actual; + assertEquals(DeliveryState.REJECTED, actualOutcome.getDeliveryState()); + assertEquals(error, actualOutcome.getErrorCondition()); + assertEquals(actualOutcome.getErrorCondition().getErrorCondition(), + actualOutcome.getErrorDescription()); + assertSymbolMap(errorInfo, actualOutcome.getErrorInfo()); + } + + /** + * Tests that an unsupported outcome will throw an exception. + */ + @Test + public void toDeliveryOutcomeUnsupportedOutcome() { + // Arrange + final Outcome outcome = mock(Outcome.class); + + // Act & Assert + assertThrows(UnsupportedOperationException.class, () -> MessageUtils.toDeliveryOutcome(outcome)); + } + + /** + * Tests simple conversions where the delivery states are just their statuses. + * + * @param deliveryState Delivery state. + * @param expected Expected outcome. + * @param expectedType Expected type. + */ + @MethodSource("getDeliveryStatesToTest") + @ParameterizedTest + public void toProtonJDeliveryState(DeliveryState deliveryState, + org.apache.qpid.proton.amqp.transport.DeliveryState expected, + DeliveryStateType expectedType) { + + // Arrange + final DeliveryOutcome outcome = new DeliveryOutcome(deliveryState); + + // Act + final org.apache.qpid.proton.amqp.transport.DeliveryState actual = MessageUtils.toProtonJDeliveryState(outcome); + + // Assert + assertEquals(expected.getClass(), actual.getClass()); + assertEquals(expected.getType(), actual.getType()); + + assertEquals(expectedType, actual.getType()); + } + + /** + * Tests the received outcome is mapped to its delivery state. + */ + @Test + public void toProtonJDeliveryStateReceived() { + // Arrange + final ReceivedDeliveryOutcome expected = new ReceivedDeliveryOutcome(10, 1053L); + + // Act + org.apache.qpid.proton.amqp.transport.DeliveryState actual = MessageUtils.toProtonJDeliveryState(expected); + + // Assert + assertTrue(actual instanceof Received); + + final Received received = (Received) actual; + assertNotNull(received.getSectionNumber()); + assertNotNull(received.getSectionOffset()); + + assertEquals(expected.getSectionNumber(), received.getSectionNumber().intValue()); + assertEquals(expected.getSectionOffset(), received.getSectionOffset().longValue()); + } + + /** + * Tests that the rejected delivery state is mapped correctly. + */ + @Test + public void toProtonJDeliveryStateRejected() { + // Arrange + final AmqpErrorCondition condition = AmqpErrorCondition.ILLEGAL_STATE; + final Map errorInfo = new HashMap<>(); + errorInfo.put("foo", 10); + errorInfo.put("bar", "baz"); + final RejectedDeliveryOutcome expected = new RejectedDeliveryOutcome(condition) + .setErrorInfo(errorInfo); + + // Act + org.apache.qpid.proton.amqp.transport.DeliveryState actual = MessageUtils.toProtonJDeliveryState(expected); + + // Assert + assertTrue(actual instanceof Rejected); + assertRejected(expected, (Rejected) actual); + } + + /** + * Tests that the modified delivery state is mapped correctly. + */ + @Test + public void toProtonJDeliveryStateModified() { + // Arrange + final Map annotations = new HashMap<>(); + annotations.put("foo", 10); + annotations.put("bar", "baz"); + final ModifiedDeliveryOutcome expected = new ModifiedDeliveryOutcome() + .setDeliveryFailed(true).setUndeliverableHere(true) + .setMessageAnnotations(annotations); + + // Act + final org.apache.qpid.proton.amqp.transport.DeliveryState actual = MessageUtils.toProtonJDeliveryState(expected); + + // Assert + assertTrue(actual instanceof Modified); + assertModified(expected, (Modified) actual); + } + + /** + * Tests simple conversions where the outcomes are just their statuses. + * + * @param deliveryState Delivery state. + * @param expectedType Expected type. + * @param expected Expected outcome. + */ + @MethodSource("getDeliveryStatesToTest") + @ParameterizedTest + public void toProtonJOutcome(DeliveryState deliveryState, Outcome expected, + DeliveryStateType expectedType) { + // Arrange + final DeliveryOutcome outcome = new DeliveryOutcome(deliveryState); + + // Act + final Outcome actual = MessageUtils.toProtonJOutcome(outcome); + + // Assert + assertEquals(expected.getClass(), actual.getClass()); + + if (actual instanceof org.apache.qpid.proton.amqp.transport.DeliveryState) { + assertEquals(expectedType, ((org.apache.qpid.proton.amqp.transport.DeliveryState) actual).getType()); + } + } + + /** + * Tests that an exception is thrown when an unsupported state is passed. + */ + @Test + public void toProtonJOutcomeUnsupported() { + // Arrange + // Received is not an outcome because it represents a partial message. + final DeliveryOutcome outcome = new DeliveryOutcome(DeliveryState.RECEIVED); + + // Act & Assert + assertThrows(UnsupportedOperationException.class, () -> MessageUtils.toProtonJOutcome(outcome)); + } + + /** + * Tests that the modified outcome is mapped correctly. + */ + @Test + public void toProtonJOutcomeModified() { + // Arrange + final Map annotations = new HashMap<>(); + annotations.put("foo", 10); + annotations.put("bar", "baz"); + final ModifiedDeliveryOutcome expected = new ModifiedDeliveryOutcome() + .setDeliveryFailed(true).setUndeliverableHere(true) + .setMessageAnnotations(annotations); + + // Act + final Outcome actual = MessageUtils.toProtonJOutcome(expected); + + // Assert + assertTrue(actual instanceof Modified); + assertModified(expected, (Modified) actual); + } + + /** + * Tests that the rejected outcome is mapped correctly. + */ + @Test + public void toProtonJOutcomeRejected() { + // Arrange + final AmqpErrorCondition condition = AmqpErrorCondition.RESOURCE_LIMIT_EXCEEDED; + final Map errorInfo = new HashMap<>(); + errorInfo.put("foo", 10); + errorInfo.put("bar", "baz"); + final RejectedDeliveryOutcome expected = new RejectedDeliveryOutcome(condition) + .setErrorInfo(errorInfo); + + // Act + final Outcome actual = MessageUtils.toProtonJOutcome(expected); + + // Assert + assertTrue(actual instanceof Rejected); + assertRejected(expected, (Rejected) actual); + } + + /** + * When input is null, returns null. + */ + @Test + public void nullInputs() { + + assertThrows(NullPointerException.class, () -> MessageUtils.toProtonJMessage(null)); + assertThrows(NullPointerException.class, () -> MessageUtils.toAmqpAnnotatedMessage(null)); + + assertNull(MessageUtils.toProtonJOutcome(null)); + assertNull(MessageUtils.toProtonJDeliveryState(null)); + + assertNull(MessageUtils.toDeliveryOutcome((Outcome) null)); + assertNull(MessageUtils.toDeliveryOutcome((org.apache.qpid.proton.amqp.transport.DeliveryState) null)); + } + + private static void assertRejected(RejectedDeliveryOutcome rejected, Rejected protonJRejected) { + if (rejected == null) { + assertNull(protonJRejected); + return; + } + + assertNotNull(protonJRejected); + final AmqpErrorCondition expectedCondition = rejected.getErrorCondition(); + + assertNotNull(protonJRejected.getError()); + assertEquals(expectedCondition.getErrorCondition(), protonJRejected.getError().getCondition().toString()); + + @SuppressWarnings("unchecked") final Map actualMap = protonJRejected.getError().getInfo(); + assertSymbolMap(actualMap, rejected.getErrorInfo()); + } + + private static void assertModified(ModifiedDeliveryOutcome modified, Modified protonJModified) { + if (modified == null) { + assertNull(protonJModified); + return; + } + + assertNotNull(protonJModified); + assertEquals(modified.isDeliveryFailed(), protonJModified.getDeliveryFailed()); + assertEquals(modified.isUndeliverableHere(), protonJModified.getUndeliverableHere()); + + @SuppressWarnings("unchecked") final Map actualMap = protonJModified.getMessageAnnotations(); + assertSymbolMap(actualMap, modified.getMessageAnnotations()); + } + + private static void assertSymbolMap(Map symbolMap, Map stringMap) { + if (symbolMap == null) { + assertNull(stringMap); + return; + } + + assertNotNull(stringMap); + assertEquals(symbolMap.size(), stringMap.size()); + + symbolMap.forEach((key, value) -> { + assertTrue(stringMap.containsKey(key.toString())); + assertEquals(value, stringMap.get(key.toString())); + }); + } + + private static void assertHeader(AmqpMessageHeader header, Header protonJHeader) { + if (header == null) { + assertNull(protonJHeader); + return; + } + + assertNotNull(protonJHeader); + if (header.getDeliveryCount() == null) { + assertNull(protonJHeader.getDeliveryCount()); + } else { + assertNotNull(protonJHeader.getDeliveryCount()); + assertEquals(header.getDeliveryCount(), protonJHeader.getDeliveryCount().longValue()); + } + + assertEquals(header.isDurable(), protonJHeader.getDurable()); + assertEquals(header.isFirstAcquirer(), protonJHeader.getFirstAcquirer()); + + if (header.getPriority() == null) { + assertNull(protonJHeader.getPriority()); + } else { + assertNotNull(protonJHeader.getPriority()); + assertEquals(header.getPriority(), protonJHeader.getPriority().byteValue()); + } + + if (header.getTimeToLive() == null) { + assertNotNull(protonJHeader.getTtl()); + } else { + assertEquals(header.getTimeToLive().toMillis(), protonJHeader.getTtl().longValue()); + } + } + + private static void assertProperties(AmqpMessageProperties properties, Properties protonJProperties) { + assertDate(properties.getAbsoluteExpiryTime(), protonJProperties.getAbsoluteExpiryTime()); + assertSymbol(properties.getContentEncoding(), protonJProperties.getContentEncoding()); + assertSymbol(properties.getContentType(), protonJProperties.getContentType()); + + assertMessageId(properties.getCorrelationId(), protonJProperties.getCorrelationId()); + assertMessageId(properties.getMessageId(), protonJProperties.getMessageId()); + + assertDate(properties.getCreationTime(), protonJProperties.getCreationTime()); + assertEquals(properties.getGroupId(), protonJProperties.getGroupId()); + + assertAddress(properties.getReplyTo(), protonJProperties.getReplyTo()); + assertEquals(properties.getReplyToGroupId(), protonJProperties.getReplyToGroupId()); + + assertAddress(properties.getTo(), protonJProperties.getTo()); + assertEquals(properties.getSubject(), protonJProperties.getSubject()); + + if (properties.getUserId() != null) { + assertNotNull(protonJProperties.getUserId()); + assertArrayEquals(properties.getUserId(), protonJProperties.getUserId().getArray()); + } else { + assertNull(protonJProperties.getUserId()); + } + } + + private static void assertMessageId(AmqpMessageId amqpMessageId, Object id) { + if (amqpMessageId == null) { + assertNull(id); + return; + } + + assertNotNull(id); + assertEquals(amqpMessageId.toString(), id.toString()); + } + + private static void assertDate(OffsetDateTime offsetDateTime, Date date) { + if (offsetDateTime == null) { + assertNull(date); + } else { + assertNotNull(date); + assertEquals(offsetDateTime.toInstant(), date.toInstant()); + } + } + + private static void assertSymbol(String content, Symbol symbol) { + if (content == null) { + assertNull(symbol); + } else { + assertNotNull(symbol); + assertEquals(content, symbol.toString()); + } + } + + private static void assertAddress(AmqpAddress amqpAddress, String address) { + if (amqpAddress == null) { + assertNull(address); + } else { + assertNotNull(address); + assertEquals(amqpAddress.toString(), address); + } + } +} diff --git a/sdk/core/azure-core-amqp/src/test/java/com/azure/core/amqp/implementation/ReactorConnectionTest.java b/sdk/core/azure-core-amqp/src/test/java/com/azure/core/amqp/implementation/ReactorConnectionTest.java index e2016cca0998..1df2b35753bb 100644 --- a/sdk/core/azure-core-amqp/src/test/java/com/azure/core/amqp/implementation/ReactorConnectionTest.java +++ b/sdk/core/azure-core-amqp/src/test/java/com/azure/core/amqp/implementation/ReactorConnectionTest.java @@ -11,6 +11,7 @@ import com.azure.core.amqp.ProxyOptions; import com.azure.core.amqp.exception.AmqpErrorCondition; import com.azure.core.amqp.exception.AmqpException; +import com.azure.core.amqp.exception.AmqpResponseCode; import com.azure.core.amqp.implementation.handler.ConnectionHandler; import com.azure.core.amqp.implementation.handler.SessionHandler; import com.azure.core.amqp.models.CbsAuthorizationType; @@ -47,6 +48,7 @@ import reactor.core.scheduler.Scheduler; import reactor.core.scheduler.Schedulers; import reactor.test.StepVerifier; +import reactor.test.publisher.TestPublisher; import java.io.IOException; import java.nio.channels.Pipe; @@ -66,6 +68,7 @@ import static org.mockito.ArgumentMatchers.any; import static org.mockito.ArgumentMatchers.anyInt; import static org.mockito.ArgumentMatchers.anyString; +import static org.mockito.ArgumentMatchers.argThat; import static org.mockito.Mockito.doAnswer; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.times; @@ -137,8 +140,9 @@ void setup() throws IOException { final AmqpRetryOptions retryOptions = new AmqpRetryOptions().setMaxRetries(0).setTryTimeout(TEST_DURATION); connectionOptions = new ConnectionOptions(CREDENTIAL_INFO.getEndpoint().getHost(), - tokenCredential, CbsAuthorizationType.SHARED_ACCESS_SIGNATURE, AmqpTransportType.AMQP, retryOptions, - ProxyOptions.SYSTEM_DEFAULTS, SCHEDULER, CLIENT_OPTIONS, VERIFY_MODE, PRODUCT, CLIENT_VERSION); + tokenCredential, CbsAuthorizationType.SHARED_ACCESS_SIGNATURE, "scope", + AmqpTransportType.AMQP, retryOptions, ProxyOptions.SYSTEM_DEFAULTS, SCHEDULER, CLIENT_OPTIONS, VERIFY_MODE, + PRODUCT, CLIENT_VERSION); connectionHandler = new ConnectionHandler(CONNECTION_ID, connectionOptions, peerDetails); @@ -397,8 +401,9 @@ void createCBSNodeTimeoutException() throws IOException { .setMode(AmqpRetryMode.FIXED) .setTryTimeout(timeout); final ConnectionOptions connectionOptions = new ConnectionOptions(CREDENTIAL_INFO.getEndpoint().getHost(), - tokenCredential, CbsAuthorizationType.SHARED_ACCESS_SIGNATURE, AmqpTransportType.AMQP, retryOptions, - ProxyOptions.SYSTEM_DEFAULTS, Schedulers.parallel(), CLIENT_OPTIONS, VERIFY_MODE, PRODUCT, CLIENT_VERSION); + tokenCredential, CbsAuthorizationType.SHARED_ACCESS_SIGNATURE, "scope", + AmqpTransportType.AMQP, retryOptions, ProxyOptions.SYSTEM_DEFAULTS, Schedulers.parallel(), + CLIENT_OPTIONS, VERIFY_MODE, PRODUCT, CLIENT_VERSION); final ConnectionHandler handler = new ConnectionHandler(CONNECTION_ID, connectionOptions, peerDetails); final ReactorHandlerProvider handlerProvider = mock(ReactorHandlerProvider.class); @@ -632,7 +637,7 @@ void setsPropertiesUsingCustomEndpoint() throws IOException { final String hostname = "custom-endpoint.com"; final int port = 10002; final ConnectionOptions connectionOptions = new ConnectionOptions(CREDENTIAL_INFO.getEndpoint().getHost(), - tokenCredential, CbsAuthorizationType.SHARED_ACCESS_SIGNATURE, AmqpTransportType.AMQP, + tokenCredential, CbsAuthorizationType.SHARED_ACCESS_SIGNATURE, "scope", AmqpTransportType.AMQP, new AmqpRetryOptions(), ProxyOptions.SYSTEM_DEFAULTS, SCHEDULER, CLIENT_OPTIONS, VERIFY_MODE, PRODUCT, CLIENT_VERSION, hostname, port); @@ -716,4 +721,41 @@ void dispose() throws IOException { connection2.dispose(); } + + @Test + void createManagementNode() { + final String entityPath = "foo"; + final Session session = mock(Session.class); + final Record record = mock(Record.class); + when(session.attachments()).thenReturn(record); + + when(connectionProtonJ.getRemoteState()).thenReturn(EndpointState.ACTIVE); + when(connectionProtonJ.session()).thenReturn(session); + + final Event mock = mock(Event.class); + when(mock.getConnection()).thenReturn(connectionProtonJ); + connectionHandler.onConnectionRemoteOpen(mock); + + final TestPublisher resultsPublisher = TestPublisher.createCold(); + resultsPublisher.next(AmqpResponseCode.ACCEPTED); + + final TokenManager manager = mock(TokenManager.class); + when(manager.authorize()).thenReturn(Mono.just(Duration.ofMinutes(20).toMillis())); + when(manager.getAuthorizationResults()).thenReturn(resultsPublisher.flux()); + + when(tokenManager.getTokenManager(any(), any())).thenReturn(manager); + + final TestPublisher sessionEndpoints = TestPublisher.createCold(); + sessionEndpoints.next(EndpointState.ACTIVE); + + final SessionHandler sessionHandler = mock(SessionHandler.class); + when(sessionHandler.getEndpointStates()).thenReturn(sessionEndpoints.flux()); + when(reactorHandlerProvider.createSessionHandler(any(), argThat(path -> path.contains("mgmt") && path.contains(entityPath)), + anyString(), any())).thenReturn(sessionHandler); + + // Act and Assert + StepVerifier.create(connection.getManagementNode(entityPath)) + .assertNext(node -> assertTrue(node instanceof ManagementChannel)) + .verifyComplete(); + } } diff --git a/sdk/core/azure-core-amqp/src/test/java/com/azure/core/amqp/implementation/ReactorHandlerProviderTest.java b/sdk/core/azure-core-amqp/src/test/java/com/azure/core/amqp/implementation/ReactorHandlerProviderTest.java index 0c3ad885e5a7..3df45ecea23c 100644 --- a/sdk/core/azure-core-amqp/src/test/java/com/azure/core/amqp/implementation/ReactorHandlerProviderTest.java +++ b/sdk/core/azure-core-amqp/src/test/java/com/azure/core/amqp/implementation/ReactorHandlerProviderTest.java @@ -129,8 +129,9 @@ public void constructorNull() { public void connectionHandlerNull() { // Arrange final ConnectionOptions connectionOptions = new ConnectionOptions("fqdn", tokenCredential, - CbsAuthorizationType.SHARED_ACCESS_SIGNATURE, AmqpTransportType.AMQP_WEB_SOCKETS, new AmqpRetryOptions(), - null, scheduler, CLIENT_OPTIONS, VERIFY_MODE, PRODUCT, CLIENT_VERSION); + CbsAuthorizationType.SHARED_ACCESS_SIGNATURE, "scope", + AmqpTransportType.AMQP_WEB_SOCKETS, new AmqpRetryOptions(), null, scheduler, CLIENT_OPTIONS, + VERIFY_MODE, PRODUCT, CLIENT_VERSION); // Act assertThrows(NullPointerException.class, @@ -151,7 +152,7 @@ public static Stream getHostnameAndPorts() { public void getsConnectionHandlerAMQP(String hostname, int port, String expectedHostname, int expectedPort) { // Act final ConnectionOptions connectionOptions = new ConnectionOptions(FULLY_QUALIFIED_DOMAIN_NAME, tokenCredential, - CbsAuthorizationType.SHARED_ACCESS_SIGNATURE, AmqpTransportType.AMQP, + CbsAuthorizationType.SHARED_ACCESS_SIGNATURE, "scope", AmqpTransportType.AMQP, new AmqpRetryOptions(), ProxyOptions.SYSTEM_DEFAULTS, scheduler, CLIENT_OPTIONS, VERIFY_MODE, PRODUCT, CLIENT_VERSION, hostname, port); @@ -171,7 +172,7 @@ public void getsConnectionHandlerAMQP(String hostname, int port, String expected public void getsConnectionHandlerWebSockets(ProxyOptions configuration) { // Act final ConnectionOptions connectionOptions = new ConnectionOptions(FULLY_QUALIFIED_DOMAIN_NAME, tokenCredential, - CbsAuthorizationType.SHARED_ACCESS_SIGNATURE, AmqpTransportType.AMQP_WEB_SOCKETS, + CbsAuthorizationType.SHARED_ACCESS_SIGNATURE, "scope", AmqpTransportType.AMQP_WEB_SOCKETS, new AmqpRetryOptions(), configuration, scheduler, CLIENT_OPTIONS, VERIFY_MODE, PRODUCT, CLIENT_VERSION); // Act @@ -194,7 +195,7 @@ public void getsConnectionHandlerProxy() { PASSWORD); final String hostname = "foo.eventhubs.azure.com"; final ConnectionOptions connectionOptions = new ConnectionOptions(hostname, tokenCredential, - CbsAuthorizationType.SHARED_ACCESS_SIGNATURE, AmqpTransportType.AMQP_WEB_SOCKETS, + CbsAuthorizationType.SHARED_ACCESS_SIGNATURE, "scope", AmqpTransportType.AMQP_WEB_SOCKETS, new AmqpRetryOptions(), configuration, scheduler, CLIENT_OPTIONS, VERIFY_MODE, PRODUCT, CLIENT_VERSION); // Act @@ -228,8 +229,9 @@ public void getsConnectionHandlerSystemProxy(String hostname, Integer port, Stri final String fullyQualifiedDomainName = "foo.eventhubs.azure.com"; final ConnectionOptions connectionOptions = new ConnectionOptions(fullyQualifiedDomainName, tokenCredential, - CbsAuthorizationType.SHARED_ACCESS_SIGNATURE, AmqpTransportType.AMQP_WEB_SOCKETS, new AmqpRetryOptions(), - null, scheduler, CLIENT_OPTIONS, VERIFY_MODE, PRODUCT, CLIENT_VERSION, hostname, port); + CbsAuthorizationType.SHARED_ACCESS_SIGNATURE, "scope", AmqpTransportType.AMQP_WEB_SOCKETS, + new AmqpRetryOptions(), null, scheduler, CLIENT_OPTIONS, VERIFY_MODE, PRODUCT, CLIENT_VERSION, + hostname, port); when(proxySelector.select(any())).thenAnswer(invocation -> { final URI uri = invocation.getArgument(0); @@ -269,7 +271,7 @@ public void noProxySelected(ProxyOptions configuration) { .thenReturn(Collections.singletonList(PROXY)); final ConnectionOptions connectionOptions = new ConnectionOptions(hostname, tokenCredential, - CbsAuthorizationType.SHARED_ACCESS_SIGNATURE, AmqpTransportType.AMQP_WEB_SOCKETS, + CbsAuthorizationType.SHARED_ACCESS_SIGNATURE, "scope", AmqpTransportType.AMQP_WEB_SOCKETS, new AmqpRetryOptions(), configuration, scheduler, CLIENT_OPTIONS, VERIFY_MODE, PRODUCT, CLIENT_VERSION); // Act @@ -322,7 +324,7 @@ public void correctPeerDetailsProxy() { final String anotherFakeHostname = "hostname.fake"; final ProxyOptions proxyOptions = new ProxyOptions(ProxyAuthenticationType.BASIC, PROXY, USERNAME, PASSWORD); final ConnectionOptions connectionOptions = new ConnectionOptions(HOSTNAME, tokenCredential, - CbsAuthorizationType.SHARED_ACCESS_SIGNATURE, AmqpTransportType.AMQP_WEB_SOCKETS, + CbsAuthorizationType.SHARED_ACCESS_SIGNATURE, "scope", AmqpTransportType.AMQP_WEB_SOCKETS, new AmqpRetryOptions(), proxyOptions, scheduler, CLIENT_OPTIONS, SslDomain.VerifyMode.VERIFY_PEER_NAME, PRODUCT, CLIENT_VERSION); @@ -357,7 +359,7 @@ public void correctPeerDetailsCustomEndpoint() throws MalformedURLException { final URL customEndpoint = new URL("https://myappservice.windows.net"); final String anotherFakeHostname = "hostname.fake"; final ConnectionOptions connectionOptions = new ConnectionOptions(HOSTNAME, tokenCredential, - CbsAuthorizationType.SHARED_ACCESS_SIGNATURE, AmqpTransportType.AMQP_WEB_SOCKETS, + CbsAuthorizationType.SHARED_ACCESS_SIGNATURE, "scope", AmqpTransportType.AMQP_WEB_SOCKETS, new AmqpRetryOptions(), ProxyOptions.SYSTEM_DEFAULTS, scheduler, CLIENT_OPTIONS, SslDomain.VerifyMode.VERIFY_PEER_NAME, PRODUCT, CLIENT_VERSION, customEndpoint.getHost(), customEndpoint.getDefaultPort()); @@ -393,7 +395,7 @@ public void correctPeerDetails(AmqpTransportType transportType) { // Arrange final String anotherFakeHostname = "hostname.fake"; final ConnectionOptions connectionOptions = new ConnectionOptions(HOSTNAME, tokenCredential, - CbsAuthorizationType.SHARED_ACCESS_SIGNATURE, transportType, new AmqpRetryOptions(), + CbsAuthorizationType.SHARED_ACCESS_SIGNATURE, "scope", transportType, new AmqpRetryOptions(), ProxyOptions.SYSTEM_DEFAULTS, scheduler, CLIENT_OPTIONS, SslDomain.VerifyMode.VERIFY_PEER_NAME, PRODUCT, CLIENT_VERSION); diff --git a/sdk/core/azure-core-amqp/src/test/java/com/azure/core/amqp/implementation/RequestResponseChannelTest.java b/sdk/core/azure-core-amqp/src/test/java/com/azure/core/amqp/implementation/RequestResponseChannelTest.java index b6691edf2e72..de01026e502d 100644 --- a/sdk/core/azure-core-amqp/src/test/java/com/azure/core/amqp/implementation/RequestResponseChannelTest.java +++ b/sdk/core/azure-core-amqp/src/test/java/com/azure/core/amqp/implementation/RequestResponseChannelTest.java @@ -163,7 +163,7 @@ void getsProperties() { receiverSettleMode); final AmqpErrorContext errorContext = channel.getErrorContext(); - StepVerifier.create(channel.closeAsync("Test-method")) + StepVerifier.create(channel.closeAsync()) .then(() -> { sendEndpoints.complete(); receiveEndpoints.complete(); @@ -192,7 +192,7 @@ void disposeAsync() { sendEndpoints.next(EndpointState.ACTIVE); // Act - StepVerifier.create(channel.closeAsync("Test")) + StepVerifier.create(channel.closeAsync()) .then(() -> { sendEndpoints.complete(); receiveEndpoints.complete(); diff --git a/sdk/core/azure-core-amqp/src/test/java/com/azure/core/amqp/implementation/handler/ConnectionHandlerTest.java b/sdk/core/azure-core-amqp/src/test/java/com/azure/core/amqp/implementation/handler/ConnectionHandlerTest.java index 763c2e6eca71..e121cb4f34db 100644 --- a/sdk/core/azure-core-amqp/src/test/java/com/azure/core/amqp/implementation/handler/ConnectionHandlerTest.java +++ b/sdk/core/azure-core-amqp/src/test/java/com/azure/core/amqp/implementation/handler/ConnectionHandlerTest.java @@ -85,8 +85,9 @@ public void setup() { mocksCloseable = MockitoAnnotations.openMocks(this); this.connectionOptions = new ConnectionOptions(HOSTNAME, tokenCredential, - CbsAuthorizationType.SHARED_ACCESS_SIGNATURE, AmqpTransportType.AMQP, new AmqpRetryOptions(), - ProxyOptions.SYSTEM_DEFAULTS, scheduler, CLIENT_OPTIONS, VERIFY_MODE, CLIENT_PRODUCT, CLIENT_VERSION); + CbsAuthorizationType.SHARED_ACCESS_SIGNATURE, "authorization-scope", + AmqpTransportType.AMQP, new AmqpRetryOptions(), ProxyOptions.SYSTEM_DEFAULTS, scheduler, CLIENT_OPTIONS, + VERIFY_MODE, CLIENT_PRODUCT, CLIENT_VERSION); this.handler = new ConnectionHandler(CONNECTION_ID, connectionOptions, peerDetails); } @@ -117,8 +118,9 @@ void applicationIdNotSet() { .setHeaders(HEADER_LIST); final String expected = UserAgentUtil.toUserAgentString(null, CLIENT_PRODUCT, CLIENT_VERSION, null); final ConnectionOptions options = new ConnectionOptions(HOSTNAME, tokenCredential, - CbsAuthorizationType.SHARED_ACCESS_SIGNATURE, AmqpTransportType.AMQP, new AmqpRetryOptions(), - ProxyOptions.SYSTEM_DEFAULTS, scheduler, clientOptions, VERIFY_MODE, CLIENT_PRODUCT, CLIENT_VERSION); + CbsAuthorizationType.SHARED_ACCESS_SIGNATURE, "scope", AmqpTransportType.AMQP, + new AmqpRetryOptions(), ProxyOptions.SYSTEM_DEFAULTS, scheduler, clientOptions, VERIFY_MODE, CLIENT_PRODUCT, + CLIENT_VERSION); // Act final ConnectionHandler handler = new ConnectionHandler(CONNECTION_ID, options, peerDetails); diff --git a/sdk/core/azure-core-amqp/src/test/java/com/azure/core/amqp/implementation/handler/WebSocketsConnectionHandlerTest.java b/sdk/core/azure-core-amqp/src/test/java/com/azure/core/amqp/implementation/handler/WebSocketsConnectionHandlerTest.java index af00cfea64dd..be2193a5ebbb 100644 --- a/sdk/core/azure-core-amqp/src/test/java/com/azure/core/amqp/implementation/handler/WebSocketsConnectionHandlerTest.java +++ b/sdk/core/azure-core-amqp/src/test/java/com/azure/core/amqp/implementation/handler/WebSocketsConnectionHandlerTest.java @@ -69,8 +69,10 @@ public void setup() { mocksCloseable = MockitoAnnotations.openMocks(this); this.connectionOptions = new ConnectionOptions(HOSTNAME, tokenCredential, - CbsAuthorizationType.SHARED_ACCESS_SIGNATURE, AmqpTransportType.AMQP_WEB_SOCKETS, new AmqpRetryOptions(), - ProxyOptions.SYSTEM_DEFAULTS, scheduler, CLIENT_OPTIONS, VERIFY_MODE, PRODUCT, CLIENT_VERSION); + CbsAuthorizationType.SHARED_ACCESS_SIGNATURE, "authorization-scope", + AmqpTransportType.AMQP_WEB_SOCKETS, new AmqpRetryOptions(), ProxyOptions.SYSTEM_DEFAULTS, + scheduler, CLIENT_OPTIONS, VERIFY_MODE, PRODUCT, CLIENT_VERSION); + this.handler = new WebSocketsConnectionHandler(CONNECTION_ID, connectionOptions, peerDetails); } @@ -181,9 +183,9 @@ public void onConnectionInitDifferentEndpoint() { final int port = 9888; final ConnectionOptions connectionOptions = new ConnectionOptions(fullyQualifiedNamespace, tokenCredential, - CbsAuthorizationType.SHARED_ACCESS_SIGNATURE, AmqpTransportType.AMQP_WEB_SOCKETS, new AmqpRetryOptions(), - ProxyOptions.SYSTEM_DEFAULTS, scheduler, CLIENT_OPTIONS, VERIFY_MODE, PRODUCT, CLIENT_VERSION, - customEndpoint, port); + CbsAuthorizationType.SHARED_ACCESS_SIGNATURE, "authorization-scope", + AmqpTransportType.AMQP_WEB_SOCKETS, new AmqpRetryOptions(), ProxyOptions.SYSTEM_DEFAULTS, scheduler, + CLIENT_OPTIONS, VERIFY_MODE, PRODUCT, CLIENT_VERSION, customEndpoint, port); try (WebSocketsConnectionHandler handler = new WebSocketsConnectionHandler(CONNECTION_ID, connectionOptions, peerDetails)) { diff --git a/sdk/core/azure-core-amqp/src/test/java/com/azure/core/amqp/implementation/handler/WebSocketsProxyConnectionHandlerTest.java b/sdk/core/azure-core-amqp/src/test/java/com/azure/core/amqp/implementation/handler/WebSocketsProxyConnectionHandlerTest.java index c11a815e05a4..bb9019cbc7b6 100644 --- a/sdk/core/azure-core-amqp/src/test/java/com/azure/core/amqp/implementation/handler/WebSocketsProxyConnectionHandlerTest.java +++ b/sdk/core/azure-core-amqp/src/test/java/com/azure/core/amqp/implementation/handler/WebSocketsProxyConnectionHandlerTest.java @@ -77,8 +77,9 @@ public void setup() { mocksCloseable = MockitoAnnotations.openMocks(this); this.connectionOptions = new ConnectionOptions(HOSTNAME, tokenCredential, - CbsAuthorizationType.SHARED_ACCESS_SIGNATURE, AmqpTransportType.AMQP, new AmqpRetryOptions(), - ProxyOptions.SYSTEM_DEFAULTS, scheduler, CLIENT_OPTIONS, VERIFY_MODE, PRODUCT, CLIENT_VERSION); + CbsAuthorizationType.SHARED_ACCESS_SIGNATURE, "scope", AmqpTransportType.AMQP, + new AmqpRetryOptions(), ProxyOptions.SYSTEM_DEFAULTS, scheduler, CLIENT_OPTIONS, VERIFY_MODE, PRODUCT, + CLIENT_VERSION); this.originalProxySelector = ProxySelector.getDefault(); this.proxySelector = mock(ProxySelector.class, Mockito.CALLS_REAL_METHODS); diff --git a/sdk/core/azure-core-amqp/src/test/java/com/azure/core/amqp/models/DeliveryStateTest.java b/sdk/core/azure-core-amqp/src/test/java/com/azure/core/amqp/models/DeliveryStateTest.java new file mode 100644 index 000000000000..6f712e04a622 --- /dev/null +++ b/sdk/core/azure-core-amqp/src/test/java/com/azure/core/amqp/models/DeliveryStateTest.java @@ -0,0 +1,64 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.core.amqp.models; + +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +import java.util.Collection; +import java.util.stream.Stream; + +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertTrue; + +/** + * Tests {@link DeliveryState} + */ +public class DeliveryStateTest { + /** + * Tests that all the values are available. + */ + @Test + public void values() { + // Arrange + final DeliveryState[] expected = new DeliveryState[] { + DeliveryState.ACCEPTED, DeliveryState.MODIFIED, DeliveryState.RECEIVED, DeliveryState.REJECTED, + DeliveryState.RELEASED, DeliveryState.TRANSACTIONAL + }; + + // Act + final Collection actual = DeliveryState.values(); + + // Assert + for (DeliveryState state : expected) { + assertTrue(actual.contains(state)); + } + } + + /** + * Arguments for fromString. + * @return Test arguments. + */ + public static Stream fromString() { + return Stream.of("MODIFIED", "FOO-BAR-NEW"); + } + + /** + * Tests that we can get the corresponding value and a new one if it does not exist. + * + * @param deliveryState Delivery states to test. + */ + @MethodSource + @ParameterizedTest + public void fromString(String deliveryState) { + // Act + final DeliveryState state = DeliveryState.fromString(deliveryState); + + // Assert + assertNotNull(state); + assertEquals(deliveryState, state.toString()); + } +} diff --git a/sdk/eventhubs/azure-messaging-eventhubs/src/main/java/com/azure/messaging/eventhubs/EventHubClientBuilder.java b/sdk/eventhubs/azure-messaging-eventhubs/src/main/java/com/azure/messaging/eventhubs/EventHubClientBuilder.java index d2c59007da6d..ec959b903ac0 100644 --- a/sdk/eventhubs/azure-messaging-eventhubs/src/main/java/com/azure/messaging/eventhubs/EventHubClientBuilder.java +++ b/sdk/eventhubs/azure-messaging-eventhubs/src/main/java/com/azure/messaging/eventhubs/EventHubClientBuilder.java @@ -636,7 +636,7 @@ private EventHubConnectionProcessor buildConnectionProcessor(MessageSerializer m final TokenManagerProvider tokenManagerProvider = new AzureTokenManagerProvider( connectionOptions.getAuthorizationType(), connectionOptions.getFullyQualifiedNamespace(), - ClientConstants.AZURE_ACTIVE_DIRECTORY_SCOPE); + connectionOptions.getAuthorizationScope()); final ReactorProvider provider = new ReactorProvider(); final ReactorHandlerProvider handlerProvider = new ReactorHandlerProvider(provider); @@ -694,12 +694,14 @@ private ConnectionOptions getConnectionOptions() { final String clientVersion = properties.getOrDefault(VERSION_KEY, UNKNOWN); if (customEndpointAddress == null) { - return new ConnectionOptions(fullyQualifiedNamespace, credentials, authorizationType, transport, - retryOptions, proxyOptions, scheduler, options, verificationMode, product, clientVersion); + return new ConnectionOptions(fullyQualifiedNamespace, credentials, authorizationType, + ClientConstants.AZURE_ACTIVE_DIRECTORY_SCOPE, transport, retryOptions, proxyOptions, scheduler, + options, verificationMode, product, clientVersion); } else { - return new ConnectionOptions(fullyQualifiedNamespace, credentials, authorizationType, transport, - retryOptions, proxyOptions, scheduler, options, verificationMode, product, clientVersion, - customEndpointAddress.getHost(), customEndpointAddress.getPort()); + return new ConnectionOptions(fullyQualifiedNamespace, credentials, authorizationType, + ClientConstants.AZURE_ACTIVE_DIRECTORY_SCOPE, transport, retryOptions, proxyOptions, scheduler, + options, verificationMode, product, clientVersion, customEndpointAddress.getHost(), + customEndpointAddress.getPort()); } } diff --git a/sdk/eventhubs/azure-messaging-eventhubs/src/main/java/com/azure/messaging/eventhubs/implementation/AmqpReceiveLinkProcessor.java b/sdk/eventhubs/azure-messaging-eventhubs/src/main/java/com/azure/messaging/eventhubs/implementation/AmqpReceiveLinkProcessor.java index abceceef10d3..5c4bb0c57dd4 100644 --- a/sdk/eventhubs/azure-messaging-eventhubs/src/main/java/com/azure/messaging/eventhubs/implementation/AmqpReceiveLinkProcessor.java +++ b/sdk/eventhubs/azure-messaging-eventhubs/src/main/java/com/azure/messaging/eventhubs/implementation/AmqpReceiveLinkProcessor.java @@ -599,11 +599,7 @@ private void disposeReceiver(AmqpReceiveLink link) { } try { - if (link instanceof AsyncCloseable) { - ((AsyncCloseable) link).closeAsync().subscribe(); - } else { - link.dispose(); - } + ((AsyncCloseable) link).closeAsync().subscribe(); } catch (Exception error) { logger.warning("linkName[{}] entityPath[{}] Unable to dispose of link.", link.getLinkName(), link.getEntityPath(), error); diff --git a/sdk/eventhubs/azure-messaging-eventhubs/src/test/java/com/azure/messaging/eventhubs/EventHubConsumerAsyncClientTest.java b/sdk/eventhubs/azure-messaging-eventhubs/src/test/java/com/azure/messaging/eventhubs/EventHubConsumerAsyncClientTest.java index 377d9e8ce904..7cb9a44c69d6 100644 --- a/sdk/eventhubs/azure-messaging-eventhubs/src/test/java/com/azure/messaging/eventhubs/EventHubConsumerAsyncClientTest.java +++ b/sdk/eventhubs/azure-messaging-eventhubs/src/test/java/com/azure/messaging/eventhubs/EventHubConsumerAsyncClientTest.java @@ -14,6 +14,7 @@ import com.azure.core.credential.TokenCredential; import com.azure.core.util.ClientOptions; import com.azure.core.util.logging.ClientLogger; +import com.azure.messaging.eventhubs.implementation.ClientConstants; import com.azure.messaging.eventhubs.implementation.EventHubAmqpConnection; import com.azure.messaging.eventhubs.implementation.EventHubConnectionProcessor; import com.azure.messaging.eventhubs.implementation.EventHubManagementNode; @@ -127,8 +128,9 @@ void setup() { when(amqpReceiveLink.addCredits(anyInt())).thenReturn(Mono.empty()); final ConnectionOptions connectionOptions = new ConnectionOptions(HOSTNAME, tokenCredential, - CbsAuthorizationType.SHARED_ACCESS_SIGNATURE, AmqpTransportType.AMQP_WEB_SOCKETS, new AmqpRetryOptions(), - ProxyOptions.SYSTEM_DEFAULTS, Schedulers.parallel(), CLIENT_OPTIONS, SslDomain.VerifyMode.VERIFY_PEER, + CbsAuthorizationType.SHARED_ACCESS_SIGNATURE, ClientConstants.AZURE_ACTIVE_DIRECTORY_SCOPE, + AmqpTransportType.AMQP_WEB_SOCKETS, new AmqpRetryOptions(), ProxyOptions.SYSTEM_DEFAULTS, + Schedulers.parallel(), CLIENT_OPTIONS, SslDomain.VerifyMode.VERIFY_PEER, "test-product", "test-client-version"); when(connection.getEndpointStates()).thenReturn(endpointProcessor.flux()); @@ -136,6 +138,9 @@ CbsAuthorizationType.SHARED_ACCESS_SIGNATURE, AmqpTransportType.AMQP_WEB_SOCKETS when(connection.createReceiveLink(anyString(), argThat(name -> name.endsWith(PARTITION_ID)), any(EventPosition.class), any(ReceiveOptions.class))).thenReturn(Mono.just(amqpReceiveLink)); + + when(connection.closeAsync()).thenReturn(Mono.empty()); + connectionProcessor = Flux.create(sink -> sink.next(connection)) .subscribeWith(new EventHubConnectionProcessor(connectionOptions.getFullyQualifiedNamespace(), "event-hub-name", connectionOptions.getRetry())); diff --git a/sdk/eventhubs/azure-messaging-eventhubs/src/test/java/com/azure/messaging/eventhubs/EventHubConsumerClientTest.java b/sdk/eventhubs/azure-messaging-eventhubs/src/test/java/com/azure/messaging/eventhubs/EventHubConsumerClientTest.java index 49d8c3cb19b0..19a7c07abe83 100644 --- a/sdk/eventhubs/azure-messaging-eventhubs/src/test/java/com/azure/messaging/eventhubs/EventHubConsumerClientTest.java +++ b/sdk/eventhubs/azure-messaging-eventhubs/src/test/java/com/azure/messaging/eventhubs/EventHubConsumerClientTest.java @@ -14,6 +14,7 @@ import com.azure.core.credential.TokenCredential; import com.azure.core.util.ClientOptions; import com.azure.core.util.IterableStream; +import com.azure.messaging.eventhubs.implementation.ClientConstants; import com.azure.messaging.eventhubs.implementation.EventHubAmqpConnection; import com.azure.messaging.eventhubs.implementation.EventHubConnectionProcessor; import com.azure.messaging.eventhubs.models.EventPosition; @@ -110,9 +111,10 @@ public void setup() { when(amqpReceiveLink.addCredits(anyInt())).thenReturn(Mono.empty()); connectionOptions = new ConnectionOptions(HOSTNAME, tokenCredential, - CbsAuthorizationType.SHARED_ACCESS_SIGNATURE, AmqpTransportType.AMQP_WEB_SOCKETS, new AmqpRetryOptions(), - ProxyOptions.SYSTEM_DEFAULTS, Schedulers.parallel(), CLIENT_OPTIONS, SslDomain.VerifyMode.VERIFY_PEER, - "test-product", "test-client-version"); + CbsAuthorizationType.SHARED_ACCESS_SIGNATURE, ClientConstants.AZURE_ACTIVE_DIRECTORY_SCOPE, + AmqpTransportType.AMQP_WEB_SOCKETS, new AmqpRetryOptions(), ProxyOptions.SYSTEM_DEFAULTS, + Schedulers.parallel(), CLIENT_OPTIONS, SslDomain.VerifyMode.VERIFY_PEER, "test-product", "test-client-version"); + connectionProcessor = Flux.create(sink -> sink.next(connection)) .subscribeWith(new EventHubConnectionProcessor(connectionOptions.getFullyQualifiedNamespace(), "event-hub-path", connectionOptions.getRetry())); @@ -130,6 +132,8 @@ CbsAuthorizationType.SHARED_ACCESS_SIGNATURE, AmqpTransportType.AMQP_WEB_SOCKETS return amqpReceiveLink2; })); + when(connection.closeAsync()).thenReturn(Mono.empty()); + asyncConsumer = new EventHubConsumerAsyncClient(HOSTNAME, EVENT_HUB_NAME, connectionProcessor, messageSerializer, CONSUMER_GROUP, PREFETCH, false, onClientClosed); consumer = new EventHubConsumerClient(asyncConsumer, Duration.ofSeconds(10)); diff --git a/sdk/eventhubs/azure-messaging-eventhubs/src/test/java/com/azure/messaging/eventhubs/EventHubPartitionAsyncConsumerTest.java b/sdk/eventhubs/azure-messaging-eventhubs/src/test/java/com/azure/messaging/eventhubs/EventHubPartitionAsyncConsumerTest.java index c66e0254a99d..47083dde0f47 100644 --- a/sdk/eventhubs/azure-messaging-eventhubs/src/test/java/com/azure/messaging/eventhubs/EventHubPartitionAsyncConsumerTest.java +++ b/sdk/eventhubs/azure-messaging-eventhubs/src/test/java/com/azure/messaging/eventhubs/EventHubPartitionAsyncConsumerTest.java @@ -49,6 +49,7 @@ import static org.mockito.ArgumentMatchers.anyInt; import static org.mockito.ArgumentMatchers.eq; import static org.mockito.ArgumentMatchers.same; +import static org.mockito.Mockito.atMost; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.verify; import static org.mockito.Mockito.when; @@ -229,7 +230,6 @@ void receiveMultipleTimes() { Assertions.assertTrue(linkProcessor.isTerminated()); } - /** * Verifies that the consumer closes and completes any listeners on a shutdown signal. */ @@ -277,7 +277,7 @@ void listensToShutdownSignals() throws InterruptedException { Assertions.assertTrue(successful); Assertions.assertEquals(0, shutdownReceived.getCount()); - verify(link1).dispose(); + verify(link1, atMost(1)).dispose(); } finally { subscriptions.dispose(); } diff --git a/sdk/eventhubs/azure-messaging-eventhubs/src/test/java/com/azure/messaging/eventhubs/EventHubProducerAsyncClientTest.java b/sdk/eventhubs/azure-messaging-eventhubs/src/test/java/com/azure/messaging/eventhubs/EventHubProducerAsyncClientTest.java index 0bf81bc5a2bb..b95c25a404cf 100644 --- a/sdk/eventhubs/azure-messaging-eventhubs/src/test/java/com/azure/messaging/eventhubs/EventHubProducerAsyncClientTest.java +++ b/sdk/eventhubs/azure-messaging-eventhubs/src/test/java/com/azure/messaging/eventhubs/EventHubProducerAsyncClientTest.java @@ -140,13 +140,16 @@ void setup(TestInfo testInfo) { tracerProvider = new TracerProvider(Collections.emptyList()); connectionOptions = new ConnectionOptions(HOSTNAME, tokenCredential, - CbsAuthorizationType.SHARED_ACCESS_SIGNATURE, AmqpTransportType.AMQP_WEB_SOCKETS, retryOptions, - ProxyOptions.SYSTEM_DEFAULTS, testScheduler, CLIENT_OPTIONS, SslDomain.VerifyMode.VERIFY_PEER_NAME, + CbsAuthorizationType.SHARED_ACCESS_SIGNATURE, ClientConstants.AZURE_ACTIVE_DIRECTORY_SCOPE, + AmqpTransportType.AMQP_WEB_SOCKETS, retryOptions, ProxyOptions.SYSTEM_DEFAULTS, testScheduler, + CLIENT_OPTIONS, SslDomain.VerifyMode.VERIFY_PEER_NAME, "client-product", "client-version"); when(connection.getEndpointStates()).thenReturn(endpointProcessor); endpointSink.next(AmqpEndpointState.ACTIVE); + when(connection.closeAsync()).thenReturn(Mono.empty()); + connectionProcessor = Mono.fromCallable(() -> connection).repeat(10).subscribeWith( new EventHubConnectionProcessor(connectionOptions.getFullyQualifiedNamespace(), "event-hub-path", connectionOptions.getRetry())); @@ -162,7 +165,8 @@ void setup(TestInfo testInfo) { void teardown(TestInfo testInfo) { testScheduler.dispose(); Mockito.framework().clearInlineMocks(); - Mockito.reset(sendLink, connection); + Mockito.reset(sendLink); + Mockito.reset(connection); singleMessageCaptor = null; messagesCaptor = null; } diff --git a/sdk/eventhubs/azure-messaging-eventhubs/src/test/java/com/azure/messaging/eventhubs/EventHubProducerClientTest.java b/sdk/eventhubs/azure-messaging-eventhubs/src/test/java/com/azure/messaging/eventhubs/EventHubProducerClientTest.java index daa39bc7e652..a5bf582b62b2 100644 --- a/sdk/eventhubs/azure-messaging-eventhubs/src/test/java/com/azure/messaging/eventhubs/EventHubProducerClientTest.java +++ b/sdk/eventhubs/azure-messaging-eventhubs/src/test/java/com/azure/messaging/eventhubs/EventHubProducerClientTest.java @@ -101,9 +101,10 @@ public void setup() { final TracerProvider tracerProvider = new TracerProvider(Collections.emptyList()); ConnectionOptions connectionOptions = new ConnectionOptions(HOSTNAME, tokenCredential, - CbsAuthorizationType.SHARED_ACCESS_SIGNATURE, AmqpTransportType.AMQP_WEB_SOCKETS, retryOptions, - ProxyOptions.SYSTEM_DEFAULTS, Schedulers.parallel(), new ClientOptions(), - SslDomain.VerifyMode.ANONYMOUS_PEER, "test-product", "test-client-version"); + CbsAuthorizationType.SHARED_ACCESS_SIGNATURE, ClientConstants.AZURE_ACTIVE_DIRECTORY_SCOPE, + AmqpTransportType.AMQP_WEB_SOCKETS, retryOptions, ProxyOptions.SYSTEM_DEFAULTS, Schedulers.parallel(), + new ClientOptions(), SslDomain.VerifyMode.ANONYMOUS_PEER, "test-product", + "test-client-version"); connectionProcessor = Flux.create(sink -> sink.next(connection)) .subscribeWith(new EventHubConnectionProcessor(connectionOptions.getFullyQualifiedNamespace(), "event-hub-path", connectionOptions.getRetry())); @@ -111,6 +112,7 @@ public void setup() { tracerProvider, messageSerializer, Schedulers.parallel(), false, onClientClosed); when(connection.getEndpointStates()).thenReturn(Flux.create(sink -> sink.next(AmqpEndpointState.ACTIVE))); + when(connection.closeAsync()).thenReturn(Mono.empty()); } @AfterEach diff --git a/sdk/eventhubs/azure-messaging-eventhubs/src/test/java/com/azure/messaging/eventhubs/implementation/CBSChannelTest.java b/sdk/eventhubs/azure-messaging-eventhubs/src/test/java/com/azure/messaging/eventhubs/implementation/CBSChannelTest.java index a1571fd908c8..a5f86baf4057 100644 --- a/sdk/eventhubs/azure-messaging-eventhubs/src/test/java/com/azure/messaging/eventhubs/implementation/CBSChannelTest.java +++ b/sdk/eventhubs/azure-messaging-eventhubs/src/test/java/com/azure/messaging/eventhubs/implementation/CBSChannelTest.java @@ -112,8 +112,8 @@ void successfullyAuthorizes() { TokenCredential tokenCredential = new EventHubSharedKeyCredential( connectionProperties.getSharedAccessKeyName(), connectionProperties.getSharedAccessKey()); ConnectionOptions connectionOptions = new ConnectionOptions(connectionProperties.getEndpoint().getHost(), - tokenCredential, CbsAuthorizationType.SHARED_ACCESS_SIGNATURE, AmqpTransportType.AMQP, - RETRY_OPTIONS, ProxyOptions.SYSTEM_DEFAULTS, Schedulers.elastic(), clientOptions, + tokenCredential, CbsAuthorizationType.SHARED_ACCESS_SIGNATURE, ClientConstants.AZURE_ACTIVE_DIRECTORY_SCOPE, + AmqpTransportType.AMQP, RETRY_OPTIONS, ProxyOptions.SYSTEM_DEFAULTS, Schedulers.elastic(), clientOptions, SslDomain.VerifyMode.VERIFY_PEER_NAME, "test-product", "test-client-version"); connection = new TestReactorConnection(CONNECTION_ID, connectionOptions, reactorProvider, handlerProvider, azureTokenManagerProvider, messageSerializer); @@ -135,9 +135,9 @@ void unsuccessfulAuthorize() { connectionProperties.getSharedAccessKeyName(), "Invalid shared access key."); final ConnectionOptions connectionOptions = new ConnectionOptions(connectionProperties.getEndpoint().getHost(), - invalidToken, CbsAuthorizationType.SHARED_ACCESS_SIGNATURE, AmqpTransportType.AMQP, RETRY_OPTIONS, ProxyOptions.SYSTEM_DEFAULTS, - Schedulers.elastic(), clientOptions, SslDomain.VerifyMode.VERIFY_PEER, - "test-product", "test-client-version"); + invalidToken, CbsAuthorizationType.SHARED_ACCESS_SIGNATURE, ClientConstants.AZURE_ACTIVE_DIRECTORY_SCOPE, + AmqpTransportType.AMQP, RETRY_OPTIONS, ProxyOptions.SYSTEM_DEFAULTS, Schedulers.elastic(), clientOptions, + SslDomain.VerifyMode.VERIFY_PEER, "test-product", "test-client-version"); connection = new TestReactorConnection(CONNECTION_ID, connectionOptions, reactorProvider, handlerProvider, azureTokenManagerProvider, messageSerializer); diff --git a/sdk/eventhubs/azure-messaging-eventhubs/src/test/java/com/azure/messaging/eventhubs/implementation/EventHubConnectionProcessorTest.java b/sdk/eventhubs/azure-messaging-eventhubs/src/test/java/com/azure/messaging/eventhubs/implementation/EventHubConnectionProcessorTest.java index 793963aafe1d..434f21d798a9 100644 --- a/sdk/eventhubs/azure-messaging-eventhubs/src/test/java/com/azure/messaging/eventhubs/implementation/EventHubConnectionProcessorTest.java +++ b/sdk/eventhubs/azure-messaging-eventhubs/src/test/java/com/azure/messaging/eventhubs/implementation/EventHubConnectionProcessorTest.java @@ -63,6 +63,7 @@ void setup() { when(connection.getEndpointStates()).thenReturn(endpointProcessor); when(connection.getShutdownSignals()).thenReturn(shutdownSignalProcessor); + when(connection.closeAsync()).thenReturn(Mono.empty()); } @AfterEach @@ -125,10 +126,9 @@ void newConnectionOnClose() { connection2Endpoint.next(AmqpEndpointState.ACTIVE); when(connection2.getEndpointStates()).thenReturn(connection2EndpointProcessor); + when(connection2.closeAsync()).thenReturn(Mono.empty()); // Act & Assert - - // Verify that we get the first connection. StepVerifier.create(processor) .then(() -> endpointSink.next(AmqpEndpointState.ACTIVE)) .expectNext(connection) diff --git a/sdk/eventhubs/azure-messaging-eventhubs/src/test/java/com/azure/messaging/eventhubs/implementation/EventHubReactorConnectionTest.java b/sdk/eventhubs/azure-messaging-eventhubs/src/test/java/com/azure/messaging/eventhubs/implementation/EventHubReactorConnectionTest.java index 70a02f5f999e..478b8aff67c5 100644 --- a/sdk/eventhubs/azure-messaging-eventhubs/src/test/java/com/azure/messaging/eventhubs/implementation/EventHubReactorConnectionTest.java +++ b/sdk/eventhubs/azure-messaging-eventhubs/src/test/java/com/azure/messaging/eventhubs/implementation/EventHubReactorConnectionTest.java @@ -115,8 +115,9 @@ public void setup() throws IOException { final ProxyOptions proxy = ProxyOptions.SYSTEM_DEFAULTS; this.connectionOptions = new ConnectionOptions(HOSTNAME, tokenCredential, - CbsAuthorizationType.SHARED_ACCESS_SIGNATURE, AmqpTransportType.AMQP, new AmqpRetryOptions(), proxy, - scheduler, clientOptions, SslDomain.VerifyMode.VERIFY_PEER_NAME, "product-test", + CbsAuthorizationType.SHARED_ACCESS_SIGNATURE, ClientConstants.AZURE_ACTIVE_DIRECTORY_SCOPE, + AmqpTransportType.AMQP, new AmqpRetryOptions(), proxy, scheduler, clientOptions, + SslDomain.VerifyMode.VERIFY_PEER_NAME, "product-test", "client-test-version"); final SslPeerDetails peerDetails = Proton.sslPeerDetails(HOSTNAME, ConnectionHandler.AMQPS_PORT); diff --git a/sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/ServiceBusClientBuilder.java b/sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/ServiceBusClientBuilder.java index 110619cac5a7..1da1431a127a 100644 --- a/sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/ServiceBusClientBuilder.java +++ b/sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/ServiceBusClientBuilder.java @@ -388,7 +388,7 @@ private ServiceBusConnectionProcessor getOrCreateConnectionProcessor(MessageSeri final ReactorHandlerProvider handlerProvider = new ReactorHandlerProvider(provider); final TokenManagerProvider tokenManagerProvider = new AzureTokenManagerProvider( connectionOptions.getAuthorizationType(), connectionOptions.getFullyQualifiedNamespace(), - ServiceBusConstants.AZURE_ACTIVE_DIRECTORY_SCOPE); + connectionOptions.getAuthorizationScope()); return (ServiceBusAmqpConnection) new ServiceBusReactorAmqpConnection(connectionId, connectionOptions, provider, handlerProvider, tokenManagerProvider, serializer); @@ -439,8 +439,9 @@ private ConnectionOptions getConnectionOptions() { final String product = properties.getOrDefault(NAME_KEY, UNKNOWN); final String clientVersion = properties.getOrDefault(VERSION_KEY, UNKNOWN); - return new ConnectionOptions(fullyQualifiedNamespace, credentials, authorizationType, transport, retryOptions, - proxyOptions, scheduler, options, verificationMode, product, clientVersion); + return new ConnectionOptions(fullyQualifiedNamespace, credentials, authorizationType, + ServiceBusConstants.AZURE_ACTIVE_DIRECTORY_SCOPE, transport, retryOptions, proxyOptions, scheduler, + options, verificationMode, product, clientVersion); } private ProxyOptions getDefaultProxyConfiguration(Configuration configuration) { diff --git a/sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/implementation/ServiceBusReceiveLinkProcessor.java b/sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/implementation/ServiceBusReceiveLinkProcessor.java index 4d7f18b4902d..f1ee95d2e1b2 100644 --- a/sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/implementation/ServiceBusReceiveLinkProcessor.java +++ b/sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/implementation/ServiceBusReceiveLinkProcessor.java @@ -595,11 +595,7 @@ private void disposeReceiver(AmqpReceiveLink link) { } try { - if (link instanceof AsyncCloseable) { - ((AsyncCloseable) link).closeAsync().subscribe(); - } else { - link.dispose(); - } + ((AsyncCloseable) link).closeAsync().subscribe(); } catch (Exception error) { logger.warning("linkName[{}] entityPath[{}] Unable to dispose of link.", link.getLinkName(), link.getEntityPath(), error); diff --git a/sdk/servicebus/azure-messaging-servicebus/src/test/java/com/azure/messaging/servicebus/ServiceBusReceiverAsyncClientTest.java b/sdk/servicebus/azure-messaging-servicebus/src/test/java/com/azure/messaging/servicebus/ServiceBusReceiverAsyncClientTest.java index bd7207a2dc97..293369a8f9bb 100644 --- a/sdk/servicebus/azure-messaging-servicebus/src/test/java/com/azure/messaging/servicebus/ServiceBusReceiverAsyncClientTest.java +++ b/sdk/servicebus/azure-messaging-servicebus/src/test/java/com/azure/messaging/servicebus/ServiceBusReceiverAsyncClientTest.java @@ -24,6 +24,7 @@ import com.azure.messaging.servicebus.implementation.MessagingEntityType; import com.azure.messaging.servicebus.implementation.ServiceBusAmqpConnection; import com.azure.messaging.servicebus.implementation.ServiceBusConnectionProcessor; +import com.azure.messaging.servicebus.implementation.ServiceBusConstants; import com.azure.messaging.servicebus.implementation.ServiceBusManagementNode; import com.azure.messaging.servicebus.implementation.ServiceBusReactorReceiver; import com.azure.messaging.servicebus.models.AbandonOptions; @@ -166,9 +167,9 @@ void setup(TestInfo testInfo) { when(sessionReceiveLink.addCredits(anyInt())).thenReturn(Mono.empty()); ConnectionOptions connectionOptions = new ConnectionOptions(NAMESPACE, tokenCredential, - CbsAuthorizationType.SHARED_ACCESS_SIGNATURE, AmqpTransportType.AMQP, new AmqpRetryOptions(), - ProxyOptions.SYSTEM_DEFAULTS, Schedulers.boundedElastic(), CLIENT_OPTIONS, - SslDomain.VerifyMode.VERIFY_PEER_NAME, "test-product", "test-version"); + CbsAuthorizationType.SHARED_ACCESS_SIGNATURE, ServiceBusConstants.AZURE_ACTIVE_DIRECTORY_SCOPE, + AmqpTransportType.AMQP, new AmqpRetryOptions(), ProxyOptions.SYSTEM_DEFAULTS, Schedulers.boundedElastic(), + CLIENT_OPTIONS, SslDomain.VerifyMode.VERIFY_PEER_NAME, "test-product", "test-version"); when(connection.getEndpointStates()).thenReturn(endpointProcessor); endpointSink.next(AmqpEndpointState.ACTIVE); diff --git a/sdk/servicebus/azure-messaging-servicebus/src/test/java/com/azure/messaging/servicebus/ServiceBusSenderAsyncClientTest.java b/sdk/servicebus/azure-messaging-servicebus/src/test/java/com/azure/messaging/servicebus/ServiceBusSenderAsyncClientTest.java index 50f1699f1f2f..01e39e8d95e0 100644 --- a/sdk/servicebus/azure-messaging-servicebus/src/test/java/com/azure/messaging/servicebus/ServiceBusSenderAsyncClientTest.java +++ b/sdk/servicebus/azure-messaging-servicebus/src/test/java/com/azure/messaging/servicebus/ServiceBusSenderAsyncClientTest.java @@ -24,6 +24,7 @@ import com.azure.messaging.servicebus.implementation.MessagingEntityType; import com.azure.messaging.servicebus.implementation.ServiceBusAmqpConnection; import com.azure.messaging.servicebus.implementation.ServiceBusConnectionProcessor; +import com.azure.messaging.servicebus.implementation.ServiceBusConstants; import com.azure.messaging.servicebus.implementation.ServiceBusManagementNode; import com.azure.messaging.servicebus.models.CreateMessageBatchOptions; import org.apache.qpid.proton.amqp.messaging.Section; @@ -153,9 +154,9 @@ void setup() { MockitoAnnotations.initMocks(this); connectionOptions = new ConnectionOptions(NAMESPACE, tokenCredential, - CbsAuthorizationType.SHARED_ACCESS_SIGNATURE, AmqpTransportType.AMQP, retryOptions, - ProxyOptions.SYSTEM_DEFAULTS, Schedulers.parallel(), CLIENT_OPTIONS, SslDomain.VerifyMode.VERIFY_PEER_NAME, - "test-product", "test-version"); + CbsAuthorizationType.SHARED_ACCESS_SIGNATURE, ServiceBusConstants.AZURE_ACTIVE_DIRECTORY_SCOPE, + AmqpTransportType.AMQP, retryOptions, ProxyOptions.SYSTEM_DEFAULTS, Schedulers.parallel(), CLIENT_OPTIONS, + SslDomain.VerifyMode.VERIFY_PEER_NAME, "test-product", "test-version"); when(connection.getEndpointStates()).thenReturn(endpointProcessor); endpointSink.next(AmqpEndpointState.ACTIVE); diff --git a/sdk/servicebus/azure-messaging-servicebus/src/test/java/com/azure/messaging/servicebus/ServiceBusSessionManagerTest.java b/sdk/servicebus/azure-messaging-servicebus/src/test/java/com/azure/messaging/servicebus/ServiceBusSessionManagerTest.java index cc58b9c3e46e..9d26ff6d0486 100644 --- a/sdk/servicebus/azure-messaging-servicebus/src/test/java/com/azure/messaging/servicebus/ServiceBusSessionManagerTest.java +++ b/sdk/servicebus/azure-messaging-servicebus/src/test/java/com/azure/messaging/servicebus/ServiceBusSessionManagerTest.java @@ -17,6 +17,7 @@ import com.azure.messaging.servicebus.implementation.MessagingEntityType; import com.azure.messaging.servicebus.implementation.ServiceBusAmqpConnection; import com.azure.messaging.servicebus.implementation.ServiceBusConnectionProcessor; +import com.azure.messaging.servicebus.implementation.ServiceBusConstants; import com.azure.messaging.servicebus.implementation.ServiceBusManagementNode; import com.azure.messaging.servicebus.implementation.ServiceBusReceiveLink; import com.azure.messaging.servicebus.models.ServiceBusReceiveMode; @@ -127,9 +128,10 @@ void beforeEach(TestInfo testInfo) { when(amqpReceiveLink.closeAsync()).thenReturn(Mono.empty()); ConnectionOptions connectionOptions = new ConnectionOptions(NAMESPACE, tokenCredential, - CbsAuthorizationType.SHARED_ACCESS_SIGNATURE, AmqpTransportType.AMQP, - new AmqpRetryOptions().setTryTimeout(TIMEOUT), ProxyOptions.SYSTEM_DEFAULTS, Schedulers.boundedElastic(), - CLIENT_OPTIONS, SslDomain.VerifyMode.VERIFY_PEER_NAME, "test-product", "test-version"); + CbsAuthorizationType.SHARED_ACCESS_SIGNATURE, ServiceBusConstants.AZURE_ACTIVE_DIRECTORY_SCOPE, + AmqpTransportType.AMQP, new AmqpRetryOptions().setTryTimeout(TIMEOUT), ProxyOptions.SYSTEM_DEFAULTS, + Schedulers.boundedElastic(), CLIENT_OPTIONS, SslDomain.VerifyMode.VERIFY_PEER_NAME, + "test-product", "test-version"); when(connection.getEndpointStates()).thenReturn(endpointProcessor); endpointSink.next(AmqpEndpointState.ACTIVE); diff --git a/sdk/servicebus/azure-messaging-servicebus/src/test/java/com/azure/messaging/servicebus/ServiceBusSessionReceiverAsyncClientTest.java b/sdk/servicebus/azure-messaging-servicebus/src/test/java/com/azure/messaging/servicebus/ServiceBusSessionReceiverAsyncClientTest.java index 60710582addd..beae7284d467 100644 --- a/sdk/servicebus/azure-messaging-servicebus/src/test/java/com/azure/messaging/servicebus/ServiceBusSessionReceiverAsyncClientTest.java +++ b/sdk/servicebus/azure-messaging-servicebus/src/test/java/com/azure/messaging/servicebus/ServiceBusSessionReceiverAsyncClientTest.java @@ -17,6 +17,7 @@ import com.azure.messaging.servicebus.implementation.MessagingEntityType; import com.azure.messaging.servicebus.implementation.ServiceBusAmqpConnection; import com.azure.messaging.servicebus.implementation.ServiceBusConnectionProcessor; +import com.azure.messaging.servicebus.implementation.ServiceBusConstants; import com.azure.messaging.servicebus.implementation.ServiceBusManagementNode; import com.azure.messaging.servicebus.implementation.ServiceBusReceiveLink; import com.azure.messaging.servicebus.models.ServiceBusReceiveMode; @@ -114,9 +115,10 @@ void beforeEach(TestInfo testInfo) { when(amqpReceiveLink.addCredits(anyInt())).thenReturn(Mono.empty()); ConnectionOptions connectionOptions = new ConnectionOptions(NAMESPACE, tokenCredential, - CbsAuthorizationType.SHARED_ACCESS_SIGNATURE, AmqpTransportType.AMQP, - new AmqpRetryOptions().setTryTimeout(TIMEOUT), ProxyOptions.SYSTEM_DEFAULTS, Schedulers.boundedElastic(), - CLIENT_OPTIONS, SslDomain.VerifyMode.VERIFY_PEER_NAME, "test-product", "test-version"); + CbsAuthorizationType.SHARED_ACCESS_SIGNATURE, ServiceBusConstants.AZURE_ACTIVE_DIRECTORY_SCOPE, + AmqpTransportType.AMQP, new AmqpRetryOptions().setTryTimeout(TIMEOUT), ProxyOptions.SYSTEM_DEFAULTS, + Schedulers.boundedElastic(), CLIENT_OPTIONS, SslDomain.VerifyMode.VERIFY_PEER_NAME, + "test-product", "test-version"); when(connection.getEndpointStates()).thenReturn(endpointProcessor); endpointSink.next(AmqpEndpointState.ACTIVE); @@ -124,6 +126,8 @@ void beforeEach(TestInfo testInfo) { when(connection.getManagementNode(ENTITY_PATH, ENTITY_TYPE)) .thenReturn(Mono.just(managementNode)); + when(connection.closeAsync()).thenReturn(Mono.empty()); + connectionProcessor = Flux.create(sink -> sink.next(connection)) .subscribeWith(new ServiceBusConnectionProcessor(connectionOptions.getFullyQualifiedNamespace(), From 940c22d27f979dcd4b8546437eb48ecabc17dc36 Mon Sep 17 00:00:00 2001 From: Alan Zimmer <48699787+alzimmermsft@users.noreply.github.com> Date: Mon, 7 Jun 2021 13:06:41 -0700 Subject: [PATCH 02/21] Annotate HttpRange with Immutable (#22119) --- .../azure-core/src/main/java/com/azure/core/http/HttpRange.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sdk/core/azure-core/src/main/java/com/azure/core/http/HttpRange.java b/sdk/core/azure-core/src/main/java/com/azure/core/http/HttpRange.java index 293b02940a2f..5f9743d8a40f 100644 --- a/sdk/core/azure-core/src/main/java/com/azure/core/http/HttpRange.java +++ b/sdk/core/azure-core/src/main/java/com/azure/core/http/HttpRange.java @@ -3,6 +3,7 @@ package com.azure.core.http; +import com.azure.core.annotation.Immutable; import com.azure.core.util.logging.ClientLogger; import java.util.Objects; @@ -15,6 +16,7 @@ *

* If {@link #getLength() length} is unspecified, null, then the range extends to the end of the HTTP resource. */ +@Immutable public final class HttpRange { private final long offset; private final Long length; From 779a485c789b88586757fb250a7fafea50c56b60 Mon Sep 17 00:00:00 2001 From: Matias Quaranta Date: Mon, 7 Jun 2021 13:09:27 -0700 Subject: [PATCH 03/21] Cosmos Spark: Changing inferSchema.forceNullableProperties default to true (#22049) * Changing default * Docs * Tests * new test * doc update * Change log --- .../azure-cosmos-spark_3-1_2-12/CHANGELOG.md | 2 + .../docs/configuration-reference.md | 2 +- .../com/azure/cosmos/spark/CosmosConfig.scala | 2 +- .../cosmos/spark/SparkE2EQueryITest.scala | 108 ++++++++++++++++++ 4 files changed, 112 insertions(+), 2 deletions(-) diff --git a/sdk/cosmos/azure-cosmos-spark_3-1_2-12/CHANGELOG.md b/sdk/cosmos/azure-cosmos-spark_3-1_2-12/CHANGELOG.md index a18590f59165..66680eb6342f 100644 --- a/sdk/cosmos/azure-cosmos-spark_3-1_2-12/CHANGELOG.md +++ b/sdk/cosmos/azure-cosmos-spark_3-1_2-12/CHANGELOG.md @@ -1,6 +1,8 @@ ## Release History ### 4.2.0-beta.1 (Unreleased) +#### Configuration Changes +* Changed the default value of `spark.cosmos.read.inferSchema.forceNullableProperties` from `false` to `true` based on user feedback, see [PR](https://github.com/Azure/azure-sdk-for-java/pull/22049). ### 4.1.0 (2021-05-27) #### New Features diff --git a/sdk/cosmos/azure-cosmos-spark_3-1_2-12/docs/configuration-reference.md b/sdk/cosmos/azure-cosmos-spark_3-1_2-12/docs/configuration-reference.md index 3a0afb9a4a09..40265f5a4179 100644 --- a/sdk/cosmos/azure-cosmos-spark_3-1_2-12/docs/configuration-reference.md +++ b/sdk/cosmos/azure-cosmos-spark_3-1_2-12/docs/configuration-reference.md @@ -48,7 +48,7 @@ When doing read operations, users can specify a custom schema or allow the conne | `spark.cosmos.read.inferSchema.samplingSize` | `1000` | Sampling size to use when inferring schema and not using a query. | | `spark.cosmos.read.inferSchema.includeSystemProperties` | `false` | When schema inference is enabled, whether the resulting schema will include all [Cosmos DB system properties](https://docs.microsoft.com/azure/cosmos-db/account-databases-containers-items#properties-of-an-item). | | `spark.cosmos.read.inferSchema.includeTimestamp` | `false` | When schema inference is enabled, whether the resulting schema will include the document Timestamp (`_ts`). Not required if `spark.cosmos.read.inferSchema.includeSystemProperties` is enabled, as it will already include all system properties. | -| `spark.cosmos.read.inferSchema.forceNullableProperties` | `false` | When schema inference is enabled, whether the resulting schema will make all columns nullable. By default whether inferred columns are treated as nullable or not will depend on whether any record in the sample set has null-values within a column. If set to `true` all columns will be treated as nullable even if all rows within the sample set have non-null values. | +| `spark.cosmos.read.inferSchema.forceNullableProperties` | `true` | When schema inference is enabled, whether the resulting schema will make all columns nullable. By default, all columns (except cosmos system properties) will be treated as nullable even if all rows within the sample set have non-null values. When disabled, the inferred columns are treated as nullable or not depending on whether any record in the sample set has null-values within a column. | #### Json conversion configuration diff --git a/sdk/cosmos/azure-cosmos-spark_3-1_2-12/src/main/scala/com/azure/cosmos/spark/CosmosConfig.scala b/sdk/cosmos/azure-cosmos-spark_3-1_2-12/src/main/scala/com/azure/cosmos/spark/CosmosConfig.scala index 38ded7ceb95d..48f1152bde45 100644 --- a/sdk/cosmos/azure-cosmos-spark_3-1_2-12/src/main/scala/com/azure/cosmos/spark/CosmosConfig.scala +++ b/sdk/cosmos/azure-cosmos-spark_3-1_2-12/src/main/scala/com/azure/cosmos/spark/CosmosConfig.scala @@ -533,7 +533,7 @@ private object CosmosSchemaInferenceConfig { private val inferSchemaForceNullableProperties = CosmosConfigEntry[Boolean]( key = CosmosConfigNames.ReadInferSchemaForceNullableProperties, mandatory = false, - defaultValue = Some(false), + defaultValue = Some(true), parseFromStringFunction = include => include.toBoolean, helpMessage = "Whether schema inference should enforce inferred properties to be nullable - even when no null-values are contained in the sample set") diff --git a/sdk/cosmos/azure-cosmos-spark_3-1_2-12/src/test/scala/com/azure/cosmos/spark/SparkE2EQueryITest.scala b/sdk/cosmos/azure-cosmos-spark_3-1_2-12/src/test/scala/com/azure/cosmos/spark/SparkE2EQueryITest.scala index d16cd05e6d79..bae610c7bf0e 100644 --- a/sdk/cosmos/azure-cosmos-spark_3-1_2-12/src/test/scala/com/azure/cosmos/spark/SparkE2EQueryITest.scala +++ b/sdk/cosmos/azure-cosmos-spark_3-1_2-12/src/test/scala/com/azure/cosmos/spark/SparkE2EQueryITest.scala @@ -460,6 +460,57 @@ class SparkE2EQueryITest fieldNames.contains(CosmosTableSchemaInferrer.AttachmentsAttributeName) shouldBe false } + "spark query" can "when forceNullableProperties is false and rows have different schema" in { + val cosmosEndpoint = TestConfigurations.HOST + val cosmosMasterKey = TestConfigurations.MASTER_KEY + val samplingSize = 100 + val expectedResults = samplingSize * 2 + val container = cosmosClient.getDatabase(cosmosDatabase).getContainer(cosmosContainer) + + // Inserting documents with slightly different schema + for( _ <- 1 to expectedResults) { + val objectNode = Utils.getSimpleObjectMapper.createObjectNode() + val arr = objectNode.putArray("object_array") + val nested = Utils.getSimpleObjectMapper.createObjectNode() + nested.put("A", "test") + nested.put("B", "test") + arr.add(nested) + objectNode.put("id", UUID.randomUUID().toString) + container.createItem(objectNode).block() + } + + for( _ <- 1 to samplingSize) { + val objectNode2 = Utils.getSimpleObjectMapper.createObjectNode() + val arr = objectNode2.putArray("object_array") + val nested = Utils.getSimpleObjectMapper.createObjectNode() + nested.put("A", "test") + arr.add(nested) + objectNode2.put("id", UUID.randomUUID().toString) + container.createItem(objectNode2).block() + } + + val cfgWithInference = Map("spark.cosmos.accountEndpoint" -> cosmosEndpoint, + "spark.cosmos.accountKey" -> cosmosMasterKey, + "spark.cosmos.database" -> cosmosDatabase, + "spark.cosmos.container" -> cosmosContainer, + "spark.cosmos.read.inferSchema.enabled" -> "true", + "spark.cosmos.read.inferSchema.forceNullableProperties" -> "false", + "spark.cosmos.read.inferSchema.samplingSize" -> samplingSize.toString, + "spark.cosmos.read.inferSchema.query" -> "SELECT * FROM c ORDER BY c._ts", + "spark.cosmos.read.partitioning.strategy" -> "Restrictive" + ) + + val dfWithInference = spark.read.format("cosmos.oltp").options(cfgWithInference).load() + try { + dfWithInference.collect() + fail("Should have thrown an exception") + } + catch { + case inner: Exception => + inner.toString.contains("The 1th field 'B' of input row cannot be null") shouldBe true + } + } + "spark query" can "use custom sampling size" in { val cosmosEndpoint = TestConfigurations.HOST val cosmosMasterKey = TestConfigurations.MASTER_KEY @@ -580,6 +631,7 @@ class SparkE2EQueryITest "spark.cosmos.accountKey" -> cosmosMasterKey, "spark.cosmos.database" -> cosmosDatabase, "spark.cosmos.container" -> cosmosContainer, + "spark.cosmos.read.inferSchema.forceNullableProperties" -> "false", "spark.cosmos.read.partitioning.strategy" -> "Restrictive" ) @@ -652,6 +704,62 @@ class SparkE2EQueryITest fieldNames.contains(CosmosTableSchemaInferrer.AttachmentsAttributeName) shouldBe false } + "spark query" can "return proper Cosmos specific query plan on explain with nullable properties" in { + val cosmosEndpoint = TestConfigurations.HOST + val cosmosMasterKey = TestConfigurations.MASTER_KEY + + val id = UUID.randomUUID().toString + + val rawItem = s""" + | { + | "id" : "${id}", + | "nestedObject" : { + | "prop1" : 5, + | "prop2" : "6" + | } + | } + |""".stripMargin + + val objectNode = objectMapper.readValue(rawItem, classOf[ObjectNode]) + + val container = cosmosClient.getDatabase(cosmosDatabase).getContainer(cosmosContainer) + container.createItem(objectNode).block() + + val cfg = Map("spark.cosmos.accountEndpoint" -> cosmosEndpoint, + "spark.cosmos.accountKey" -> cosmosMasterKey, + "spark.cosmos.database" -> cosmosDatabase, + "spark.cosmos.container" -> cosmosContainer, + "spark.cosmos.read.inferSchema.forceNullableProperties" -> "true", + "spark.cosmos.read.partitioning.strategy" -> "Restrictive" + ) + + val df = spark.read.format("cosmos.oltp").options(cfg).load() + val rowsArray = df.where("nestedObject.prop2 = '6'").collect() + rowsArray should have size 1 + + var output = new java.io.ByteArrayOutputStream() + Console.withOut(output) { + df.explain() + } + var queryPlan = output.toString.replaceAll("#\\d+", "#x") + logInfo(s"Query Plan: $queryPlan") + queryPlan.contains("Cosmos Query: SELECT * FROM r") shouldEqual true + + output = new java.io.ByteArrayOutputStream() + Console.withOut(output) { + df.where("nestedObject.prop2 = '6'").explain() + } + queryPlan = output.toString.replaceAll("#\\d+", "#x") + logInfo(s"Query Plan: $queryPlan") + val expected = s"Cosmos Query: SELECT * FROM r WHERE NOT(IS_NULL(r['nestedObject'])) " + + s"AND r['nestedObject']['prop2']=" + + s"@param0${System.getProperty("line.separator")} > param: @param0 = 6" + queryPlan.contains(expected) shouldEqual true + + val item = rowsArray(0) + item.getAs[String]("id") shouldEqual id + } + //scalastyle:on magic.number //scalastyle:on multiple.string.literals } From e80d82e5c136d6c251c2ce0db77b30d046a91954 Mon Sep 17 00:00:00 2001 From: Alan Zimmer <48699787+alzimmermsft@users.noreply.github.com> Date: Mon, 7 Jun 2021 14:08:35 -0700 Subject: [PATCH 04/21] Make getScopes in the ARM Authentication Policy Public (#22120) Make getScopes in the ARM Authentication Policy Public --- .../policy/ArmChallengeAuthenticationPolicy.java | 12 ++++++++++-- .../fluentcore/policy/AuthenticationPolicy.java | 2 +- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/sdk/core/azure-core-management/src/main/java/com/azure/core/management/http/policy/ArmChallengeAuthenticationPolicy.java b/sdk/core/azure-core-management/src/main/java/com/azure/core/management/http/policy/ArmChallengeAuthenticationPolicy.java index 3b74abbcd487..599f18db6537 100644 --- a/sdk/core/azure-core-management/src/main/java/com/azure/core/management/http/policy/ArmChallengeAuthenticationPolicy.java +++ b/sdk/core/azure-core-management/src/main/java/com/azure/core/management/http/policy/ArmChallengeAuthenticationPolicy.java @@ -9,6 +9,7 @@ import com.azure.core.http.HttpResponse; import com.azure.core.http.policy.BearerTokenAuthenticationPolicy; import com.azure.core.management.implementation.http.AuthenticationChallenge; +import com.azure.core.util.CoreUtils; import reactor.core.publisher.Mono; import java.nio.charset.StandardCharsets; @@ -98,8 +99,15 @@ public Mono authorizeRequestOnChallenge(HttpPipelineCallContext context }); } - protected String[] getScopes(HttpPipelineCallContext context, String[] scopes) { - return scopes; + /** + * Gets the scopes for the specific request. + * + * @param context The request. + * @param scopes Default scopes used by the policy. + * @return The scopes for the specific request. + */ + public String[] getScopes(HttpPipelineCallContext context, String[] scopes) { + return CoreUtils.clone(scopes); } List parseChallenges(String header) { diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluentcore/policy/AuthenticationPolicy.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluentcore/policy/AuthenticationPolicy.java index ae8a4c06a37c..fade979209d5 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluentcore/policy/AuthenticationPolicy.java +++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluentcore/policy/AuthenticationPolicy.java @@ -30,7 +30,7 @@ public AuthenticationPolicy(TokenCredential credential, AzureEnvironment environ } @Override - protected String[] getScopes(HttpPipelineCallContext context, String[] scopes) { + public String[] getScopes(HttpPipelineCallContext context, String[] scopes) { if (CoreUtils.isNullOrEmpty(scopes)) { scopes = new String[1]; scopes[0] = ResourceManagerUtils.getDefaultScopeFromRequest(context.getHttpRequest(), environment); From 513f071f71bcfad7dd97ece904bf20db483abf47 Mon Sep 17 00:00:00 2001 From: Jianping Chen Date: Mon, 7 Jun 2021 17:27:18 -0700 Subject: [PATCH 05/21] [Communication]: Update version, changelog, and dependency for June release (#22061) * Update version, changelog, and dependency for June release * Update Chat, SMS, and PhoneNumbers for release * Correction for chat version number * Typo in chat pom * Unrelease Chat; update change logs for other sdks * Nit fix Co-authored-by: JP Chen --- eng/jacoco-test-coverage/pom.xml | 8 ++++---- eng/versioning/version_client.txt | 8 ++++---- sdk/communication/azure-communication-chat/pom.xml | 4 ++-- sdk/communication/azure-communication-common/CHANGELOG.md | 3 ++- sdk/communication/azure-communication-common/pom.xml | 2 +- .../azure-communication-identity/CHANGELOG.md | 3 ++- sdk/communication/azure-communication-identity/pom.xml | 4 ++-- .../azure-communication-phonenumbers/CHANGELOG.md | 3 ++- .../azure-communication-phonenumbers/pom.xml | 4 ++-- sdk/communication/azure-communication-sms/CHANGELOG.md | 3 ++- sdk/communication/azure-communication-sms/pom.xml | 4 ++-- 11 files changed, 25 insertions(+), 21 deletions(-) diff --git a/eng/jacoco-test-coverage/pom.xml b/eng/jacoco-test-coverage/pom.xml index 73828a1aa49e..4f7e61d7a243 100644 --- a/eng/jacoco-test-coverage/pom.xml +++ b/eng/jacoco-test-coverage/pom.xml @@ -64,22 +64,22 @@ com.azure azure-communication-common - 1.1.0-beta.1 + 1.0.2 com.azure azure-communication-identity - 1.2.0-beta.1 + 1.1.1 com.azure azure-communication-sms - 1.1.0-beta.1 + 1.0.3 com.azure azure-communication-phonenumbers - 1.1.0-beta.1 + 1.0.3 com.azure diff --git a/eng/versioning/version_client.txt b/eng/versioning/version_client.txt index 9e5709f9db1e..2a92af91398f 100644 --- a/eng/versioning/version_client.txt +++ b/eng/versioning/version_client.txt @@ -52,10 +52,10 @@ com.azure:azure-analytics-synapse-spark;1.0.0-beta.3;1.0.0-beta.4 com.azure:azure-analytics-synapse-managedprivateendpoints;1.0.0-beta.3;1.0.0-beta.4 com.azure:azure-analytics-synapse-monitoring;1.0.0-beta.3;1.0.0-beta.4 com.azure:azure-communication-chat;1.0.0;1.1.0-beta.1 -com.azure:azure-communication-common;1.0.1;1.1.0-beta.1 -com.azure:azure-communication-sms;1.0.1;1.1.0-beta.1 -com.azure:azure-communication-identity;1.1.0;1.2.0-beta.1 -com.azure:azure-communication-phonenumbers;1.0.1;1.1.0-beta.1 +com.azure:azure-communication-common;1.0.2;1.0.2 +com.azure:azure-communication-sms;1.0.1;1.0.3 +com.azure:azure-communication-identity;1.1.0;1.1.1 +com.azure:azure-communication-phonenumbers;1.0.1;1.0.3 com.azure:azure-containers-containerregistry;1.0.0-beta.2;1.0.0-beta.3 com.azure:azure-core;1.16.0;1.17.0 com.azure:azure-core-amqp;2.0.6;2.1.0-beta.1 diff --git a/sdk/communication/azure-communication-chat/pom.xml b/sdk/communication/azure-communication-chat/pom.xml index f0a85bb294e3..e48c15bf2f26 100644 --- a/sdk/communication/azure-communication-chat/pom.xml +++ b/sdk/communication/azure-communication-chat/pom.xml @@ -50,12 +50,12 @@ com.azure azure-communication-common - 1.1.0-beta.1 + 1.0.2 com.azure azure-communication-identity - 1.2.0-beta.1 + 1.1.1 test diff --git a/sdk/communication/azure-communication-common/CHANGELOG.md b/sdk/communication/azure-communication-common/CHANGELOG.md index 3648cb110f84..d7b63ae0d7bf 100644 --- a/sdk/communication/azure-communication-common/CHANGELOG.md +++ b/sdk/communication/azure-communication-common/CHANGELOG.md @@ -1,6 +1,7 @@ # Release History -## 1.1.0-beta.1 (Unreleased) +## 1.0.2 (2021-06-08) +- Updated 'azure-communication-common' version ## 1.0.1 (2021-05-27) - Dependency versions updated. diff --git a/sdk/communication/azure-communication-common/pom.xml b/sdk/communication/azure-communication-common/pom.xml index 27fda19aa2ac..9f90268ac67f 100644 --- a/sdk/communication/azure-communication-common/pom.xml +++ b/sdk/communication/azure-communication-common/pom.xml @@ -13,7 +13,7 @@ com.azure azure-communication-common jar - 1.1.0-beta.1 + 1.0.2 Microsoft Azure common library for communication service client diff --git a/sdk/communication/azure-communication-identity/CHANGELOG.md b/sdk/communication/azure-communication-identity/CHANGELOG.md index a535cafc3a48..d227a7b49e9a 100644 --- a/sdk/communication/azure-communication-identity/CHANGELOG.md +++ b/sdk/communication/azure-communication-identity/CHANGELOG.md @@ -1,6 +1,7 @@ # Release History -## 1.2.0-beta.1 (Unreleased) +## 1.1.1 (2021-06-08) +- Updated 'azure-communication-identity' version ## 1.1.0 (2021-05-27) ### Added diff --git a/sdk/communication/azure-communication-identity/pom.xml b/sdk/communication/azure-communication-identity/pom.xml index b699d5458ba6..e01aa05fef26 100644 --- a/sdk/communication/azure-communication-identity/pom.xml +++ b/sdk/communication/azure-communication-identity/pom.xml @@ -16,7 +16,7 @@ com.azure azure-communication-identity jar - 1.2.0-beta.1 + 1.1.1 Microsoft Azure identity client library for communication @@ -63,7 +63,7 @@ com.azure azure-communication-common - 1.1.0-beta.1 + 1.0.2 org.junit.jupiter diff --git a/sdk/communication/azure-communication-phonenumbers/CHANGELOG.md b/sdk/communication/azure-communication-phonenumbers/CHANGELOG.md index d3485299f998..1f47f0a5f874 100644 --- a/sdk/communication/azure-communication-phonenumbers/CHANGELOG.md +++ b/sdk/communication/azure-communication-phonenumbers/CHANGELOG.md @@ -1,6 +1,7 @@ # Release History -## 1.1.0-beta.1 (Unreleased) +## 1.0.3 (2021-06-08) +- Updated 'azure-communication-phonenumbers' version ## 1.0.2 (2021-05-27) - Dependency versions updated. diff --git a/sdk/communication/azure-communication-phonenumbers/pom.xml b/sdk/communication/azure-communication-phonenumbers/pom.xml index 414f997d37fd..f657d5e4be19 100644 --- a/sdk/communication/azure-communication-phonenumbers/pom.xml +++ b/sdk/communication/azure-communication-phonenumbers/pom.xml @@ -16,7 +16,7 @@ com.azure azure-communication-phonenumbers jar - 1.1.0-beta.1 + 1.0.3 Microsoft Azure client phone numbers library for communication @@ -63,7 +63,7 @@ com.azure azure-communication-common - 1.1.0-beta.1 + 1.0.2 org.junit.jupiter diff --git a/sdk/communication/azure-communication-sms/CHANGELOG.md b/sdk/communication/azure-communication-sms/CHANGELOG.md index 686b710f4383..a91186f26507 100644 --- a/sdk/communication/azure-communication-sms/CHANGELOG.md +++ b/sdk/communication/azure-communication-sms/CHANGELOG.md @@ -1,6 +1,7 @@ # Release History -## 1.1.0-beta.1 (Unreleased) +## 1.0.3 (2021-06-08) +- Updated 'azure-communication-sms' version ## 1.0.2 (2021-05-27) - Dependency versions updated. diff --git a/sdk/communication/azure-communication-sms/pom.xml b/sdk/communication/azure-communication-sms/pom.xml index 9ac2c2216164..355f87fcce9c 100644 --- a/sdk/communication/azure-communication-sms/pom.xml +++ b/sdk/communication/azure-communication-sms/pom.xml @@ -15,7 +15,7 @@ com.azure azure-communication-sms jar - 1.1.0-beta.1 + 1.0.3 Microsoft Azure library for sending SMS messages @@ -55,7 +55,7 @@ com.azure azure-communication-common - 1.1.0-beta.1 + 1.0.2 com.azure From 2878f5dbba961d28d4b17fa5d151c0aa8dad56cd Mon Sep 17 00:00:00 2001 From: Azure SDK Bot <53356347+azure-sdk@users.noreply.github.com> Date: Mon, 7 Jun 2021 18:05:54 -0700 Subject: [PATCH 06/21] Increment version for videoanalyzer releases (#21814) * Increment package version after release of com.azure azure-media-videoanalyzer-edge * Update version_client.txt Co-authored-by: giakas --- eng/versioning/version_client.txt | 2 +- sdk/videoanalyzer/azure-media-videoanalyzer-edge/CHANGELOG.md | 3 +++ sdk/videoanalyzer/azure-media-videoanalyzer-edge/pom.xml | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/eng/versioning/version_client.txt b/eng/versioning/version_client.txt index 2a92af91398f..02a722170a8b 100644 --- a/eng/versioning/version_client.txt +++ b/eng/versioning/version_client.txt @@ -126,7 +126,7 @@ com.azure:azure-storage-internal-avro;12.0.4;12.0.5-beta.1 com.azure:azure-storage-perf;1.0.0-beta.1;1.0.0-beta.1 com.azure:azure-storage-queue;12.9.1;12.10.0-beta.2 com.azure:azure-template-perf;1.0.0-beta.1;1.0.0-beta.1 -com.azure:azure-media-videoanalyzer-edge;1.0.0-beta.2;1.0.0-beta.3 +com.azure:azure-media-videoanalyzer-edge;1.0.0-beta.3;1.0.0-beta.4 com.azure:azure-verticals-agrifood-farming;1.0.0-beta.2;1.0.0-beta.3 com.azure:perf-test-core;1.0.0-beta.1;1.0.0-beta.1 com.microsoft.azure:spring-cloud-azure-appconfiguration-config-web;1.3.0;1.4.0-beta.1 diff --git a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/CHANGELOG.md b/sdk/videoanalyzer/azure-media-videoanalyzer-edge/CHANGELOG.md index d95a461b5d95..1fce2b0841df 100644 --- a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/CHANGELOG.md +++ b/sdk/videoanalyzer/azure-media-videoanalyzer-edge/CHANGELOG.md @@ -1,5 +1,8 @@ # Release History +## 1.0.0-beta.4 (Unreleased) + + ## 1.0.0-beta.3 (2021-05-24) - Updated the title and description of the package and updates to readme. diff --git a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/pom.xml b/sdk/videoanalyzer/azure-media-videoanalyzer-edge/pom.xml index ec98bd23b702..261ef0e43988 100644 --- a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/pom.xml +++ b/sdk/videoanalyzer/azure-media-videoanalyzer-edge/pom.xml @@ -11,7 +11,7 @@ com.azure azure-media-videoanalyzer-edge - 1.0.0-beta.3 + 1.0.0-beta.4 Azure Video Analyzer Edge client library for Java This package contains the edge client library for Azure Video Analyzer. From 26f9c7d85384b1c6aa678897bc674c7c4b247e56 Mon Sep 17 00:00:00 2001 From: michaelqi793 <78671298+michaelqi793@users.noreply.github.com> Date: Tue, 8 Jun 2021 09:47:24 +0800 Subject: [PATCH 07/21] Add module-info to jca and jca test module and change package name of jca test module (#22041) --- .../azure/security/keyvault/jca/AuthClient.java | 7 ++++--- .../security/keyvault/jca/KeyVaultClient.java | 10 +++++----- .../azure/security/keyvault/jca/RestClient.java | 3 ++- .../src/main/java/module-info.java | 15 +++++++++++++++ .../src/main/module-info.java | 7 +++++++ .../keyvault/jca/test/TestModularization.java | 16 ++++++++++++++++ .../src/main/java/module-info.java | 9 +++++++++ .../keyvault/jca/{ => test}/AuthClientTest.java | 3 ++- .../keyvault/jca/{ => test}/JreKeyStoreTest.java | 4 +++- .../jca/{ => test}/KeyVaultCertificatesTest.java | 7 ++++--- .../jca/{ => test}/KeyVaultClientTest.java | 3 ++- .../jca/{ => test}/KeyVaultJcaProviderTest.java | 5 +++-- .../jca/{ => test}/KeyVaultKeyManagerTest.java | 6 ++++-- .../jca/{ => test}/KeyVaultKeyStoreTest.java | 7 +++++-- .../jca/{ => test}/PropertyConvertorUtils.java | 4 +++- .../jca/{ => test}/ServerSocketTest.java | 6 ++++-- 16 files changed, 88 insertions(+), 24 deletions(-) create mode 100644 sdk/keyvault/azure-security-keyvault-jca/src/main/java/module-info.java create mode 100644 sdk/keyvault/azure-security-test-keyvault-jca/src/main/java/com/azure/security/keyvault/jca/test/TestModularization.java create mode 100644 sdk/keyvault/azure-security-test-keyvault-jca/src/main/java/module-info.java rename sdk/keyvault/azure-security-test-keyvault-jca/src/test/java/com/azure/security/keyvault/jca/{ => test}/AuthClientTest.java (92%) rename sdk/keyvault/azure-security-test-keyvault-jca/src/test/java/com/azure/security/keyvault/jca/{ => test}/JreKeyStoreTest.java (95%) rename sdk/keyvault/azure-security-test-keyvault-jca/src/test/java/com/azure/security/keyvault/jca/{ => test}/KeyVaultCertificatesTest.java (95%) rename sdk/keyvault/azure-security-test-keyvault-jca/src/test/java/com/azure/security/keyvault/jca/{ => test}/KeyVaultClientTest.java (93%) rename sdk/keyvault/azure-security-test-keyvault-jca/src/test/java/com/azure/security/keyvault/jca/{ => test}/KeyVaultJcaProviderTest.java (83%) rename sdk/keyvault/azure-security-test-keyvault-jca/src/test/java/com/azure/security/keyvault/jca/{ => test}/KeyVaultKeyManagerTest.java (85%) rename sdk/keyvault/azure-security-test-keyvault-jca/src/test/java/com/azure/security/keyvault/jca/{ => test}/KeyVaultKeyStoreTest.java (95%) rename sdk/keyvault/azure-security-test-keyvault-jca/src/test/java/com/azure/security/keyvault/jca/{ => test}/PropertyConvertorUtils.java (93%) rename sdk/keyvault/azure-security-test-keyvault-jca/src/test/java/com/azure/security/keyvault/jca/{ => test}/ServerSocketTest.java (96%) diff --git a/sdk/keyvault/azure-security-keyvault-jca/src/main/java/com/azure/security/keyvault/jca/AuthClient.java b/sdk/keyvault/azure-security-keyvault-jca/src/main/java/com/azure/security/keyvault/jca/AuthClient.java index 9a4d5e61b1db..4295b6d4c81a 100644 --- a/sdk/keyvault/azure-security-keyvault-jca/src/main/java/com/azure/security/keyvault/jca/AuthClient.java +++ b/sdk/keyvault/azure-security-keyvault-jca/src/main/java/com/azure/security/keyvault/jca/AuthClient.java @@ -13,7 +13,7 @@ /** * The REST client specific to getting an access token for Azure REST APIs. */ -class AuthClient extends DelegateRestClient { +public class AuthClient extends DelegateRestClient { /** * Stores the Client ID fragment. @@ -63,7 +63,7 @@ class AuthClient extends DelegateRestClient { * The constructor creates a default RestClient. *

*/ - AuthClient() { + public AuthClient() { super(RestClientFactory.createClient()); } @@ -91,13 +91,14 @@ public String getAccessToken(String resource, String identity) { * * @param resource the resource. * @param tenantId the tenant ID. + * @param aadAuthenticationUrl the AAD authentication url * @param clientId the client ID. * @param clientSecret the client secret. * @return the authorization token. */ public String getAccessToken(String resource, String aadAuthenticationUrl, String tenantId, String clientId, String clientSecret) { - + LOGGER.entering("AuthClient", "getAccessToken", new Object[]{ resource, tenantId, clientId, clientSecret}); LOGGER.info("Getting access token using client ID / client secret"); diff --git a/sdk/keyvault/azure-security-keyvault-jca/src/main/java/com/azure/security/keyvault/jca/KeyVaultClient.java b/sdk/keyvault/azure-security-keyvault-jca/src/main/java/com/azure/security/keyvault/jca/KeyVaultClient.java index e1aad104359f..bffc9a68ada1 100644 --- a/sdk/keyvault/azure-security-keyvault-jca/src/main/java/com/azure/security/keyvault/jca/KeyVaultClient.java +++ b/sdk/keyvault/azure-security-keyvault-jca/src/main/java/com/azure/security/keyvault/jca/KeyVaultClient.java @@ -41,7 +41,7 @@ /** * The REST client specific to Azure Key Vault. */ -class KeyVaultClient extends DelegateRestClient { +public class KeyVaultClient extends DelegateRestClient { /** * Stores the logger. @@ -118,7 +118,7 @@ class KeyVaultClient extends DelegateRestClient { * @param clientId the client ID. * @param clientSecret the client secret. */ - KeyVaultClient(final String keyVaultUri, final String tenantId, final String clientId, final String clientSecret) { + public KeyVaultClient(final String keyVaultUri, final String tenantId, final String clientId, final String clientSecret) { this(keyVaultUri, tenantId, clientId, clientSecret, null); } @@ -186,7 +186,7 @@ private String getAccessToken() { * * @return the list of aliases. */ - List getAliases() { + public List getAliases() { ArrayList result = new ArrayList<>(); HashMap headers = new HashMap<>(); headers.put("Authorization", "Bearer " + getAccessToken()); @@ -239,7 +239,7 @@ private CertificateBundle getCertificateBundle(String alias) { * @param alias the alias. * @return the certificate, or null if not found. */ - Certificate getCertificate(String alias) { + public Certificate getCertificate(String alias) { LOGGER.entering("KeyVaultClient", "getCertificate", alias); LOGGER.log(INFO, "Getting certificate for alias: {0}", alias); X509Certificate certificate = null; @@ -268,7 +268,7 @@ Certificate getCertificate(String alias) { * @param password the password. * @return the key. */ - Key getKey(String alias, char[] password) { + public Key getKey(String alias, char[] password) { LOGGER.entering("KeyVaultClient", "getKey", new Object[]{alias, password}); LOGGER.log(INFO, "Getting key for alias: {0}", alias); Key key = null; diff --git a/sdk/keyvault/azure-security-keyvault-jca/src/main/java/com/azure/security/keyvault/jca/RestClient.java b/sdk/keyvault/azure-security-keyvault-jca/src/main/java/com/azure/security/keyvault/jca/RestClient.java index 510262d5b810..e23bed644170 100644 --- a/sdk/keyvault/azure-security-keyvault-jca/src/main/java/com/azure/security/keyvault/jca/RestClient.java +++ b/sdk/keyvault/azure-security-keyvault-jca/src/main/java/com/azure/security/keyvault/jca/RestClient.java @@ -8,7 +8,7 @@ /** * The REST client API. */ -interface RestClient { +public interface RestClient { /** * Issue a GET request. @@ -24,6 +24,7 @@ interface RestClient { * * @param url the URL. * @param body the request body. + * @param contentType the content type * @return the response body as a string. */ String post(String url, String body, String contentType); diff --git a/sdk/keyvault/azure-security-keyvault-jca/src/main/java/module-info.java b/sdk/keyvault/azure-security-keyvault-jca/src/main/java/module-info.java new file mode 100644 index 000000000000..c65dbd30e7d8 --- /dev/null +++ b/sdk/keyvault/azure-security-keyvault-jca/src/main/java/module-info.java @@ -0,0 +1,15 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +/** + * This module info is only for development purpose. Maven shade plugin will ignore this file. The one actually deployed is src/main/module-info.java + */ +module azure.security.keyvault.jca { + requires java.logging; + requires org.apache.httpcomponents.httpclient; + requires org.apache.httpcomponents.httpcore; + requires com.fasterxml.jackson.databind; + + exports com.azure.security.keyvault.jca; + exports com.azure.security.keyvault.jca.model; +} diff --git a/sdk/keyvault/azure-security-keyvault-jca/src/main/module-info.java b/sdk/keyvault/azure-security-keyvault-jca/src/main/module-info.java index 9b77beae78ad..8d6c3ea6045a 100644 --- a/sdk/keyvault/azure-security-keyvault-jca/src/main/module-info.java +++ b/sdk/keyvault/azure-security-keyvault-jca/src/main/module-info.java @@ -1,3 +1,10 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + + +/** + * This module info will be deployed instead of the one under src/main/java. + */ module azure.security.keyvault.jca { requires java.logging; diff --git a/sdk/keyvault/azure-security-test-keyvault-jca/src/main/java/com/azure/security/keyvault/jca/test/TestModularization.java b/sdk/keyvault/azure-security-test-keyvault-jca/src/main/java/com/azure/security/keyvault/jca/test/TestModularization.java new file mode 100644 index 000000000000..85f7654d2b0e --- /dev/null +++ b/sdk/keyvault/azure-security-test-keyvault-jca/src/main/java/com/azure/security/keyvault/jca/test/TestModularization.java @@ -0,0 +1,16 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +package com.azure.security.keyvault.jca.test; + +import com.azure.security.keyvault.jca.KeyVaultJcaProvider; +import com.azure.security.keyvault.jca.model.CertificateBundle; + +public class TestModularization { + /** + * Simply test compiling ok. + */ + void testCompile() { + KeyVaultJcaProvider keyVaultJcaProvider = new KeyVaultJcaProvider(); + CertificateBundle certificateBundle = new CertificateBundle(); + } +} diff --git a/sdk/keyvault/azure-security-test-keyvault-jca/src/main/java/module-info.java b/sdk/keyvault/azure-security-test-keyvault-jca/src/main/java/module-info.java new file mode 100644 index 000000000000..a558268220d6 --- /dev/null +++ b/sdk/keyvault/azure-security-test-keyvault-jca/src/main/java/module-info.java @@ -0,0 +1,9 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +/** + * This is for testing the modularization of module azure.security.keyvault.jca + */ +module azure.security.keyvault.jca.test { + requires azure.security.keyvault.jca; +} diff --git a/sdk/keyvault/azure-security-test-keyvault-jca/src/test/java/com/azure/security/keyvault/jca/AuthClientTest.java b/sdk/keyvault/azure-security-test-keyvault-jca/src/test/java/com/azure/security/keyvault/jca/test/AuthClientTest.java similarity index 92% rename from sdk/keyvault/azure-security-test-keyvault-jca/src/test/java/com/azure/security/keyvault/jca/AuthClientTest.java rename to sdk/keyvault/azure-security-test-keyvault-jca/src/test/java/com/azure/security/keyvault/jca/test/AuthClientTest.java index 2e9de840fb1f..e65ca3e0a5a0 100644 --- a/sdk/keyvault/azure-security-test-keyvault-jca/src/test/java/com/azure/security/keyvault/jca/AuthClientTest.java +++ b/sdk/keyvault/azure-security-test-keyvault-jca/src/test/java/com/azure/security/keyvault/jca/test/AuthClientTest.java @@ -1,8 +1,9 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -package com.azure.security.keyvault.jca; +package com.azure.security.keyvault.jca.test; +import com.azure.security.keyvault.jca.AuthClient; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.condition.EnabledIfEnvironmentVariable; diff --git a/sdk/keyvault/azure-security-test-keyvault-jca/src/test/java/com/azure/security/keyvault/jca/JreKeyStoreTest.java b/sdk/keyvault/azure-security-test-keyvault-jca/src/test/java/com/azure/security/keyvault/jca/test/JreKeyStoreTest.java similarity index 95% rename from sdk/keyvault/azure-security-test-keyvault-jca/src/test/java/com/azure/security/keyvault/jca/JreKeyStoreTest.java rename to sdk/keyvault/azure-security-test-keyvault-jca/src/test/java/com/azure/security/keyvault/jca/test/JreKeyStoreTest.java index 11fb18b66285..4227eabccbb8 100644 --- a/sdk/keyvault/azure-security-test-keyvault-jca/src/test/java/com/azure/security/keyvault/jca/JreKeyStoreTest.java +++ b/sdk/keyvault/azure-security-test-keyvault-jca/src/test/java/com/azure/security/keyvault/jca/test/JreKeyStoreTest.java @@ -1,8 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -package com.azure.security.keyvault.jca; +package com.azure.security.keyvault.jca.test; +import com.azure.security.keyvault.jca.JreCertificates; +import com.azure.security.keyvault.jca.KeyVaultJcaProvider; import org.apache.http.HttpResponse; import org.apache.http.client.ResponseHandler; import org.apache.http.client.methods.HttpGet; diff --git a/sdk/keyvault/azure-security-test-keyvault-jca/src/test/java/com/azure/security/keyvault/jca/KeyVaultCertificatesTest.java b/sdk/keyvault/azure-security-test-keyvault-jca/src/test/java/com/azure/security/keyvault/jca/test/KeyVaultCertificatesTest.java similarity index 95% rename from sdk/keyvault/azure-security-test-keyvault-jca/src/test/java/com/azure/security/keyvault/jca/KeyVaultCertificatesTest.java rename to sdk/keyvault/azure-security-test-keyvault-jca/src/test/java/com/azure/security/keyvault/jca/test/KeyVaultCertificatesTest.java index 571067245f4a..eb24818db85f 100644 --- a/sdk/keyvault/azure-security-test-keyvault-jca/src/test/java/com/azure/security/keyvault/jca/KeyVaultCertificatesTest.java +++ b/sdk/keyvault/azure-security-test-keyvault-jca/src/test/java/com/azure/security/keyvault/jca/test/KeyVaultCertificatesTest.java @@ -1,8 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -package com.azure.security.keyvault.jca; +package com.azure.security.keyvault.jca.test; +import com.azure.security.keyvault.jca.KeyVaultCertificates; +import com.azure.security.keyvault.jca.KeyVaultJcaProvider; import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.condition.EnabledIfEnvironmentVariable; @@ -16,7 +18,6 @@ import java.security.cert.X509Certificate; import java.util.Base64; -import static com.azure.security.keyvault.jca.PropertyConvertorUtils.SYSTEM_PROPERTIES; import static org.junit.jupiter.api.Assertions.assertNotNull; import static org.junit.jupiter.api.Assertions.assertNull; import static org.junit.jupiter.api.Assertions.assertTrue; @@ -55,7 +56,7 @@ public class KeyVaultCertificatesTest { @BeforeAll public static void setEnvironmentProperty() { - PropertyConvertorUtils.putEnvironmentPropertyToSystemProperty(SYSTEM_PROPERTIES); + PropertyConvertorUtils.putEnvironmentPropertyToSystemProperty(PropertyConvertorUtils.SYSTEM_PROPERTIES); KeyVaultJcaProvider provider = new KeyVaultJcaProvider(); Security.addProvider(provider); certificateName = System.getenv("AZURE_KEYVAULT_CERTIFICATE_NAME"); diff --git a/sdk/keyvault/azure-security-test-keyvault-jca/src/test/java/com/azure/security/keyvault/jca/KeyVaultClientTest.java b/sdk/keyvault/azure-security-test-keyvault-jca/src/test/java/com/azure/security/keyvault/jca/test/KeyVaultClientTest.java similarity index 93% rename from sdk/keyvault/azure-security-test-keyvault-jca/src/test/java/com/azure/security/keyvault/jca/KeyVaultClientTest.java rename to sdk/keyvault/azure-security-test-keyvault-jca/src/test/java/com/azure/security/keyvault/jca/test/KeyVaultClientTest.java index 767aeb615eae..622b0521882b 100644 --- a/sdk/keyvault/azure-security-test-keyvault-jca/src/test/java/com/azure/security/keyvault/jca/KeyVaultClientTest.java +++ b/sdk/keyvault/azure-security-test-keyvault-jca/src/test/java/com/azure/security/keyvault/jca/test/KeyVaultClientTest.java @@ -1,8 +1,9 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -package com.azure.security.keyvault.jca; +package com.azure.security.keyvault.jca.test; +import com.azure.security.keyvault.jca.KeyVaultClient; import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.condition.EnabledIfEnvironmentVariable; diff --git a/sdk/keyvault/azure-security-test-keyvault-jca/src/test/java/com/azure/security/keyvault/jca/KeyVaultJcaProviderTest.java b/sdk/keyvault/azure-security-test-keyvault-jca/src/test/java/com/azure/security/keyvault/jca/test/KeyVaultJcaProviderTest.java similarity index 83% rename from sdk/keyvault/azure-security-test-keyvault-jca/src/test/java/com/azure/security/keyvault/jca/KeyVaultJcaProviderTest.java rename to sdk/keyvault/azure-security-test-keyvault-jca/src/test/java/com/azure/security/keyvault/jca/test/KeyVaultJcaProviderTest.java index 77dffcecdb99..178af1895cfc 100644 --- a/sdk/keyvault/azure-security-test-keyvault-jca/src/test/java/com/azure/security/keyvault/jca/KeyVaultJcaProviderTest.java +++ b/sdk/keyvault/azure-security-test-keyvault-jca/src/test/java/com/azure/security/keyvault/jca/test/KeyVaultJcaProviderTest.java @@ -1,15 +1,16 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -package com.azure.security.keyvault.jca; +package com.azure.security.keyvault.jca.test; +import com.azure.security.keyvault.jca.KeyVaultJcaProvider; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.condition.EnabledIfEnvironmentVariable; import java.security.KeyStore; import java.security.Security; -import static com.azure.security.keyvault.jca.PropertyConvertorUtils.SYSTEM_PROPERTIES; +import static com.azure.security.keyvault.jca.test.PropertyConvertorUtils.SYSTEM_PROPERTIES; import static org.junit.jupiter.api.Assertions.assertNotNull; /** diff --git a/sdk/keyvault/azure-security-test-keyvault-jca/src/test/java/com/azure/security/keyvault/jca/KeyVaultKeyManagerTest.java b/sdk/keyvault/azure-security-test-keyvault-jca/src/test/java/com/azure/security/keyvault/jca/test/KeyVaultKeyManagerTest.java similarity index 85% rename from sdk/keyvault/azure-security-test-keyvault-jca/src/test/java/com/azure/security/keyvault/jca/KeyVaultKeyManagerTest.java rename to sdk/keyvault/azure-security-test-keyvault-jca/src/test/java/com/azure/security/keyvault/jca/test/KeyVaultKeyManagerTest.java index 0190a24ee0a2..8e4066e47581 100644 --- a/sdk/keyvault/azure-security-test-keyvault-jca/src/test/java/com/azure/security/keyvault/jca/KeyVaultKeyManagerTest.java +++ b/sdk/keyvault/azure-security-test-keyvault-jca/src/test/java/com/azure/security/keyvault/jca/test/KeyVaultKeyManagerTest.java @@ -1,8 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -package com.azure.security.keyvault.jca; +package com.azure.security.keyvault.jca.test; +import com.azure.security.keyvault.jca.KeyVaultJcaProvider; +import com.azure.security.keyvault.jca.KeyVaultKeyManager; import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.condition.EnabledIfEnvironmentVariable; @@ -14,7 +16,7 @@ import java.security.Security; import java.security.cert.CertificateException; -import static com.azure.security.keyvault.jca.PropertyConvertorUtils.SYSTEM_PROPERTIES; +import static com.azure.security.keyvault.jca.test.PropertyConvertorUtils.SYSTEM_PROPERTIES; import static org.junit.jupiter.api.Assertions.assertNotNull; @EnabledIfEnvironmentVariable(named = "AZURE_KEYVAULT_CERTIFICATE_NAME", matches = "myalias") diff --git a/sdk/keyvault/azure-security-test-keyvault-jca/src/test/java/com/azure/security/keyvault/jca/KeyVaultKeyStoreTest.java b/sdk/keyvault/azure-security-test-keyvault-jca/src/test/java/com/azure/security/keyvault/jca/test/KeyVaultKeyStoreTest.java similarity index 95% rename from sdk/keyvault/azure-security-test-keyvault-jca/src/test/java/com/azure/security/keyvault/jca/KeyVaultKeyStoreTest.java rename to sdk/keyvault/azure-security-test-keyvault-jca/src/test/java/com/azure/security/keyvault/jca/test/KeyVaultKeyStoreTest.java index 7acae0be4fc2..f3c42e193771 100644 --- a/sdk/keyvault/azure-security-test-keyvault-jca/src/test/java/com/azure/security/keyvault/jca/KeyVaultKeyStoreTest.java +++ b/sdk/keyvault/azure-security-test-keyvault-jca/src/test/java/com/azure/security/keyvault/jca/test/KeyVaultKeyStoreTest.java @@ -1,8 +1,11 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -package com.azure.security.keyvault.jca; +package com.azure.security.keyvault.jca.test; +import com.azure.security.keyvault.jca.KeyVaultJcaProvider; +import com.azure.security.keyvault.jca.KeyVaultKeyStore; +import com.azure.security.keyvault.jca.KeyVaultLoadStoreParameter; import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.condition.EnabledIfEnvironmentVariable; @@ -17,7 +20,7 @@ import java.security.cert.X509Certificate; import java.util.Base64; -import static com.azure.security.keyvault.jca.PropertyConvertorUtils.SYSTEM_PROPERTIES; +import static com.azure.security.keyvault.jca.test.PropertyConvertorUtils.SYSTEM_PROPERTIES; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertFalse; import static org.junit.jupiter.api.Assertions.assertNotNull; diff --git a/sdk/keyvault/azure-security-test-keyvault-jca/src/test/java/com/azure/security/keyvault/jca/PropertyConvertorUtils.java b/sdk/keyvault/azure-security-test-keyvault-jca/src/test/java/com/azure/security/keyvault/jca/test/PropertyConvertorUtils.java similarity index 93% rename from sdk/keyvault/azure-security-test-keyvault-jca/src/test/java/com/azure/security/keyvault/jca/PropertyConvertorUtils.java rename to sdk/keyvault/azure-security-test-keyvault-jca/src/test/java/com/azure/security/keyvault/jca/test/PropertyConvertorUtils.java index 0e960acfb906..e94f475699b2 100644 --- a/sdk/keyvault/azure-security-test-keyvault-jca/src/test/java/com/azure/security/keyvault/jca/PropertyConvertorUtils.java +++ b/sdk/keyvault/azure-security-test-keyvault-jca/src/test/java/com/azure/security/keyvault/jca/test/PropertyConvertorUtils.java @@ -1,7 +1,9 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -package com.azure.security.keyvault.jca; +package com.azure.security.keyvault.jca.test; + +import com.azure.security.keyvault.jca.KeyVaultLoadStoreParameter; import java.io.IOException; import java.security.KeyStore; diff --git a/sdk/keyvault/azure-security-test-keyvault-jca/src/test/java/com/azure/security/keyvault/jca/ServerSocketTest.java b/sdk/keyvault/azure-security-test-keyvault-jca/src/test/java/com/azure/security/keyvault/jca/test/ServerSocketTest.java similarity index 96% rename from sdk/keyvault/azure-security-test-keyvault-jca/src/test/java/com/azure/security/keyvault/jca/ServerSocketTest.java rename to sdk/keyvault/azure-security-test-keyvault-jca/src/test/java/com/azure/security/keyvault/jca/test/ServerSocketTest.java index 7329d53360a0..02164bb42c93 100644 --- a/sdk/keyvault/azure-security-test-keyvault-jca/src/test/java/com/azure/security/keyvault/jca/ServerSocketTest.java +++ b/sdk/keyvault/azure-security-test-keyvault-jca/src/test/java/com/azure/security/keyvault/jca/test/ServerSocketTest.java @@ -1,8 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -package com.azure.security.keyvault.jca; +package com.azure.security.keyvault.jca.test; +import com.azure.security.keyvault.jca.KeyVaultJcaProvider; +import com.azure.security.keyvault.jca.KeyVaultTrustManagerFactoryProvider; import org.apache.http.HttpResponse; import org.apache.http.client.ResponseHandler; import org.apache.http.client.methods.HttpGet; @@ -33,7 +35,7 @@ import java.security.cert.X509Certificate; import java.util.Map; -import static com.azure.security.keyvault.jca.PropertyConvertorUtils.SYSTEM_PROPERTIES; +import static com.azure.security.keyvault.jca.test.PropertyConvertorUtils.SYSTEM_PROPERTIES; import static org.junit.jupiter.api.Assertions.assertEquals; /** From a30e93821cd5092b2daf71b4aade17db71eb35d5 Mon Sep 17 00:00:00 2001 From: Rujun Chen Date: Tue, 8 Jun 2021 10:56:40 +0800 Subject: [PATCH 08/21] Fix error in aad-starter-sample (#22109) --- .../azure/spring/sample/aad/utils/JsonMapper.java | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/sdk/spring/azure-spring-boot-samples/azure-spring-boot-sample-active-directory-webapp/src/main/java/com/azure/spring/sample/aad/utils/JsonMapper.java b/sdk/spring/azure-spring-boot-samples/azure-spring-boot-sample-active-directory-webapp/src/main/java/com/azure/spring/sample/aad/utils/JsonMapper.java index d26dd5d37680..0d809634a573 100644 --- a/sdk/spring/azure-spring-boot-samples/azure-spring-boot-sample-active-directory-webapp/src/main/java/com/azure/spring/sample/aad/utils/JsonMapper.java +++ b/sdk/spring/azure-spring-boot-samples/azure-spring-boot-sample-active-directory-webapp/src/main/java/com/azure/spring/sample/aad/utils/JsonMapper.java @@ -6,6 +6,7 @@ import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.SerializationFeature; +import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.security.oauth2.client.OAuth2AuthorizedClient; @@ -13,17 +14,18 @@ public class JsonMapper { private static final Logger LOGGER = LoggerFactory.getLogger(JsonMapper.class); private static final ObjectMapper MAPPER = new ObjectMapper().enable(SerializationFeature.INDENT_OUTPUT); + static { + MAPPER.registerModule(new JavaTimeModule()); + } - public static final String toJsonString(OAuth2AuthorizedClient authorizedClient) { - String clientJsonString = "Json String for OAuth2AuthorizedClient"; - + public static String toJsonString(OAuth2AuthorizedClient authorizedClient) { + String clientJsonString; try { clientJsonString = MAPPER.writeValueAsString(authorizedClient); } catch (JsonProcessingException e) { - LOGGER.warn("Error with transfer OAuth2AuthorizedClient to Json"); + LOGGER.warn("Error when transfer OAuth2AuthorizedClient to Json", e); clientJsonString = "Fail to generate Json String of current OAuth2AuthorizedClient"; } - LOGGER.info(clientJsonString); return clientJsonString; } From 52f11be756a5dc7c4498d83ccc85a46ce18bc20d Mon Sep 17 00:00:00 2001 From: Yijun Xie <48257664+YijunXieMS@users.noreply.github.com> Date: Mon, 7 Jun 2021 20:42:02 -0700 Subject: [PATCH 09/21] EventGrid Add 4.4.0 new system events. (#22126) --- .../messaging/eventgrid/SystemEventNames.java | 108 ++++++ .../SystemEventMappingNames.java | 107 +++++- .../AcsRecordingChunkInfoProperties.java | 52 +++ ...armingApplicationDataChangedEventData.java | 307 +++++++++++++++ ...riFoodFarmingBoundaryChangedEventData.java | 359 ++++++++++++++++++ .../AgriFoodFarmingCropChangedEventData.java | 255 +++++++++++++ ...oodFarmingCropVarietyChangedEventData.java | 281 ++++++++++++++ .../AgriFoodFarmingFarmChangedEventData.java | 281 ++++++++++++++ ...ataIngestionJobStatusChangedEventData.java | 289 ++++++++++++++ ...AgriFoodFarmingFarmerChangedEventData.java | 255 +++++++++++++ .../AgriFoodFarmingFieldChangedEventData.java | 307 +++++++++++++++ ...oodFarmingHarvestDataChangedEventData.java | 307 +++++++++++++++ .../AgriFoodFarmingJobStatus.java | 43 +++ ...odFarmingPlantingDataChangedEventData.java | 307 +++++++++++++++ .../AgriFoodFarmingResourceActionType.java | 37 ++ ...ataIngestionJobStatusChangedEventData.java | 288 ++++++++++++++ ...AgriFoodFarmingSeasonChangedEventData.java | 255 +++++++++++++ ...dFarmingSeasonalFieldChangedEventData.java | 359 ++++++++++++++++++ ...oodFarmingTillageDataChangedEventData.java | 307 +++++++++++++++ ...ataIngestionJobStatusChangedEventData.java | 287 ++++++++++++++ ...BlobInventoryPolicyCompletedEventData.java | 196 ++++++++++ .../swagger/README.md | 49 +-- 22 files changed, 5004 insertions(+), 32 deletions(-) create mode 100644 sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AgriFoodFarmingApplicationDataChangedEventData.java create mode 100644 sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AgriFoodFarmingBoundaryChangedEventData.java create mode 100644 sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AgriFoodFarmingCropChangedEventData.java create mode 100644 sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AgriFoodFarmingCropVarietyChangedEventData.java create mode 100644 sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AgriFoodFarmingFarmChangedEventData.java create mode 100644 sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AgriFoodFarmingFarmOperationDataIngestionJobStatusChangedEventData.java create mode 100644 sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AgriFoodFarmingFarmerChangedEventData.java create mode 100644 sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AgriFoodFarmingFieldChangedEventData.java create mode 100644 sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AgriFoodFarmingHarvestDataChangedEventData.java create mode 100644 sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AgriFoodFarmingJobStatus.java create mode 100644 sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AgriFoodFarmingPlantingDataChangedEventData.java create mode 100644 sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AgriFoodFarmingResourceActionType.java create mode 100644 sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AgriFoodFarmingSatelliteDataIngestionJobStatusChangedEventData.java create mode 100644 sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AgriFoodFarmingSeasonChangedEventData.java create mode 100644 sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AgriFoodFarmingSeasonalFieldChangedEventData.java create mode 100644 sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AgriFoodFarmingTillageDataChangedEventData.java create mode 100644 sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AgriFoodFarmingWeatherDataIngestionJobStatusChangedEventData.java create mode 100644 sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/StorageBlobInventoryPolicyCompletedEventData.java diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/SystemEventNames.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/SystemEventNames.java index f1b5b7df0d9e..257988d5f239 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/SystemEventNames.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/SystemEventNames.java @@ -24,6 +24,21 @@ import com.azure.messaging.eventgrid.systemevents.AcsRecordingFileStatusUpdatedEventData; import com.azure.messaging.eventgrid.systemevents.AcsSmsDeliveryReportReceivedEventData; import com.azure.messaging.eventgrid.systemevents.AcsSmsReceivedEventData; +import com.azure.messaging.eventgrid.systemevents.AgriFoodFarmingApplicationDataChangedEventData; +import com.azure.messaging.eventgrid.systemevents.AgriFoodFarmingBoundaryChangedEventData; +import com.azure.messaging.eventgrid.systemevents.AgriFoodFarmingCropChangedEventData; +import com.azure.messaging.eventgrid.systemevents.AgriFoodFarmingCropVarietyChangedEventData; +import com.azure.messaging.eventgrid.systemevents.AgriFoodFarmingFarmChangedEventData; +import com.azure.messaging.eventgrid.systemevents.AgriFoodFarmingFarmOperationDataIngestionJobStatusChangedEventData; +import com.azure.messaging.eventgrid.systemevents.AgriFoodFarmingFarmerChangedEventData; +import com.azure.messaging.eventgrid.systemevents.AgriFoodFarmingFieldChangedEventData; +import com.azure.messaging.eventgrid.systemevents.AgriFoodFarmingHarvestDataChangedEventData; +import com.azure.messaging.eventgrid.systemevents.AgriFoodFarmingPlantingDataChangedEventData; +import com.azure.messaging.eventgrid.systemevents.AgriFoodFarmingSatelliteDataIngestionJobStatusChangedEventData; +import com.azure.messaging.eventgrid.systemevents.AgriFoodFarmingSeasonChangedEventData; +import com.azure.messaging.eventgrid.systemevents.AgriFoodFarmingSeasonalFieldChangedEventData; +import com.azure.messaging.eventgrid.systemevents.AgriFoodFarmingTillageDataChangedEventData; +import com.azure.messaging.eventgrid.systemevents.AgriFoodFarmingWeatherDataIngestionJobStatusChangedEventData; import com.azure.messaging.eventgrid.systemevents.AppConfigurationKeyValueDeletedEventData; import com.azure.messaging.eventgrid.systemevents.AppConfigurationKeyValueModifiedEventData; import com.azure.messaging.eventgrid.systemevents.ContainerRegistryChartDeletedEventData; @@ -103,6 +118,7 @@ import com.azure.messaging.eventgrid.systemevents.StorageAsyncOperationInitiatedEventData; import com.azure.messaging.eventgrid.systemevents.StorageBlobCreatedEventData; import com.azure.messaging.eventgrid.systemevents.StorageBlobDeletedEventData; +import com.azure.messaging.eventgrid.systemevents.StorageBlobInventoryPolicyCompletedEventData; import com.azure.messaging.eventgrid.systemevents.StorageBlobRenamedEventData; import com.azure.messaging.eventgrid.systemevents.StorageBlobTierChangedEventData; import com.azure.messaging.eventgrid.systemevents.StorageDirectoryCreatedEventData; @@ -406,6 +422,11 @@ public final class SystemEventNames { */ public static final String STORAGE_BLOB_DELETED = "Microsoft.Storage.BlobDeleted"; + /** Schema of the Data property of an EventGridEvent for an Microsoft.Storage.BlobInventoryPolicyCompleted event. */ + public static final String STORAGE_BLOB_INVENTORY_POLICY_COMPLETED = + "Microsoft.Storage.BlobInventoryPolicyCompleted"; + + /** * indicates an event of blob renaming. */ @@ -532,6 +553,67 @@ public final class SystemEventNames { public static final String POLICY_INSIGHTS_POLICY_STATE_CHANGED = "Microsoft.PolicyInsights.PolicyStateChanged"; public static final String POLICY_INSIGHTS_POLICY_STATE_DELETED = "Microsoft.PolicyInsights.PolicyStateDeleted"; + // Agriculture Food Farming + /** Schema of the Data property of an EventGridEvent for a Microsoft.AgFoodPlatform.ApplicationDataChanged event. */ + public static final String AGRI_FOOD_FARMING_APPLICATION_DATA_CHANGED = + "Microsoft.AgFoodPlatform.ApplicationDataChanged"; + + /** Schema of the Data property of an EventGridEvent for a Microsoft.AgFoodPlatform.BoundaryChanged event. */ + public static final String AGRI_FOOD_FARMING_BOUNDARY_CHANGED = "Microsoft.AgFoodPlatform.BoundaryChanged"; + + /** Schema of the Data property of an EventGridEvent for a Microsoft.AgFoodPlatform.CropChanged event. */ + public static final String AGRI_FOOD_FARMING_CROP_CHANGED = "Microsoft.AgFoodPlatform.CropChanged"; + + /** Schema of the Data property of an EventGridEvent for a Microsoft.AgFoodPlatform.CropVarietyChanged event. */ + public static final String AGRI_FOOD_FARMING_CROP_VARIETY_CHANGED = "Microsoft.AgFoodPlatform.CropVarietyChanged"; + + /** Schema of the Data property of an EventGridEvent for a Microsoft.AgFoodPlatform.FarmChanged event. */ + public static final String AGRI_FOOD_FARMING_FARM_CHANGED = "Microsoft.AgFoodPlatform.FarmChanged"; + + /** + * Schema of the Data property of an EventGridEvent for a + * Microsoft.AgFoodPlatform.FarmOperationDataIngestionJobStatusChanged event. + */ + public static final String AGRI_FOOD_FARMING_FARM_OPERATION_DATA_INGESTION_JOB_STATUS_CHANGED = + "Microsoft.AgFoodPlatform.FarmOperationDataIngestionJobStatusChanged"; + + /** Schema of the Data property of an EventGridEvent for a Microsoft.AgFoodPlatform.FarmerChanged event. */ + public static final String AGRI_FOOD_FARMING_FARMER_CHANGED = "Microsoft.AgFoodPlatform.FarmerChanged"; + + /** Schema of the Data property of an EventGridEvent for a Microsoft.AgFoodPlatform.FieldChanged event. */ + public static final String AGRI_FOOD_FARMING_FIELD_CHANGED = "Microsoft.AgFoodPlatform.FieldChanged"; + + /** Schema of the Data property of an EventGridEvent for a Microsoft.AgFoodPlatform.HarvestDataChanged event. */ + public static final String AGRI_FOOD_FARMING_HARVEST_DATA_CHANGED = "Microsoft.AgFoodPlatform.HarvestDataChanged"; + + /** Schema of the Data property of an EventGridEvent for a Microsoft.AgFoodPlatform.PlantingDataChanged event. */ + public static final String AGRI_FOOD_FARMING_PLANTING_DATA_CHANGED = "Microsoft.AgFoodPlatform.PlantingDataChanged"; + + /** + * Schema of the Data property of an EventGridEvent for a + * Microsoft.AgFoodPlatform.SatelliteDataIngestionJobStatusChanged event. + */ + public static final String AGRI_FOOD_FARMING_SATELLITE_DATA_INGESTION_JOB_STATUS_CHANGED = + "Microsoft.AgFoodPlatform.SatelliteDataIngestionJobStatusChanged"; + + /** Schema of the Data property of an EventGridEvent for a Microsoft.AgFoodPlatform.SeasonChanged event. */ + public static final String AGRI_FOOD_FARMING_SEASON_CHANGED = "Microsoft.AgFoodPlatform.SeasonChanged"; + + /** Schema of the Data property of an EventGridEvent for a Microsoft.AgFoodPlatform.SeasonalFieldChanged event. */ + public static final String AGRI_FOOD_FARMING_SEASONAL_FIELD_CHANGED = + "Microsoft.AgFoodPlatform.SeasonalFieldChanged"; + + /** Schema of the Data property of an EventGridEvent for a Microsoft.AgFoodPlatform.TillageDataChanged event. */ + public static final String AGRI_FOOD_FARMING_TILLAGE_DATA_CHANGED = "Microsoft.AgFoodPlatform.TillageDataChanged"; + + /** + * Schema of the Data property of an EventGridEvent for a + * Microsoft.AgFoodPlatform.WeatherDataIngestionJobStatusChanged event. + */ + public static final String AGRI_FOOD_FARMING_WEATHER_DATA_INGESTION_JOB_STATUS_CHANGED = + "Microsoft.AgFoodPlatform.WeatherDataIngestionJobStatusChanged"; + + private static final Map> SYSTEM_EVENT_MAPPINGS = new HashMap>() { { // AppConfiguration events. @@ -608,6 +690,7 @@ public final class SystemEventNames { // Storage events. put(STORAGE_BLOB_CREATED, StorageBlobCreatedEventData.class); put(STORAGE_BLOB_DELETED, StorageBlobDeletedEventData.class); + put(STORAGE_BLOB_INVENTORY_POLICY_COMPLETED, StorageBlobInventoryPolicyCompletedEventData.class); put(STORAGE_BLOB_RENAMED, StorageBlobRenamedEventData.class); put(STORAGE_BLOB_TIER_CHANGED, StorageBlobTierChangedEventData.class); put(STORAGE_DIRECTORY_CREATED, StorageDirectoryCreatedEventData.class); @@ -689,6 +772,31 @@ public final class SystemEventNames { put(POLICY_INSIGHTS_POLICY_STATE_CREATED, PolicyInsightsPolicyStateCreatedEventData.class); put(POLICY_INSIGHTS_POLICY_STATE_CHANGED, PolicyInsightsPolicyStateChangedEventData.class); put(POLICY_INSIGHTS_POLICY_STATE_DELETED, PolicyInsightsPolicyStateDeletedEventData.class); + + // Agriculture Food Farming + put( + AGRI_FOOD_FARMING_APPLICATION_DATA_CHANGED, + AgriFoodFarmingApplicationDataChangedEventData.class); + put(AGRI_FOOD_FARMING_BOUNDARY_CHANGED, AgriFoodFarmingBoundaryChangedEventData.class); + put(AGRI_FOOD_FARMING_CROP_CHANGED, AgriFoodFarmingCropChangedEventData.class); + put(AGRI_FOOD_FARMING_CROP_VARIETY_CHANGED, AgriFoodFarmingCropVarietyChangedEventData.class); + put(AGRI_FOOD_FARMING_FARM_CHANGED, AgriFoodFarmingFarmChangedEventData.class); + put( + AGRI_FOOD_FARMING_FARM_OPERATION_DATA_INGESTION_JOB_STATUS_CHANGED, + AgriFoodFarmingFarmOperationDataIngestionJobStatusChangedEventData.class); + put(AGRI_FOOD_FARMING_FARMER_CHANGED, AgriFoodFarmingFarmerChangedEventData.class); + put(AGRI_FOOD_FARMING_FIELD_CHANGED, AgriFoodFarmingFieldChangedEventData.class); + put(AGRI_FOOD_FARMING_HARVEST_DATA_CHANGED, AgriFoodFarmingHarvestDataChangedEventData.class); + put(AGRI_FOOD_FARMING_PLANTING_DATA_CHANGED, AgriFoodFarmingPlantingDataChangedEventData.class); + put( + AGRI_FOOD_FARMING_SATELLITE_DATA_INGESTION_JOB_STATUS_CHANGED, + AgriFoodFarmingSatelliteDataIngestionJobStatusChangedEventData.class); + put(AGRI_FOOD_FARMING_SEASON_CHANGED, AgriFoodFarmingSeasonChangedEventData.class); + put(AGRI_FOOD_FARMING_SEASONAL_FIELD_CHANGED, AgriFoodFarmingSeasonalFieldChangedEventData.class); + put(AGRI_FOOD_FARMING_TILLAGE_DATA_CHANGED, AgriFoodFarmingTillageDataChangedEventData.class); + put( + AGRI_FOOD_FARMING_WEATHER_DATA_INGESTION_JOB_STATUS_CHANGED, + AgriFoodFarmingWeatherDataIngestionJobStatusChangedEventData.class); } }; diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/implementation/SystemEventMappingNames.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/implementation/SystemEventMappingNames.java index 8ab97f788160..f971bb252e0e 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/implementation/SystemEventMappingNames.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/implementation/SystemEventMappingNames.java @@ -24,6 +24,21 @@ import com.azure.messaging.eventgrid.systemevents.AcsRecordingFileStatusUpdatedEventData; import com.azure.messaging.eventgrid.systemevents.AcsSmsDeliveryReportReceivedEventData; import com.azure.messaging.eventgrid.systemevents.AcsSmsReceivedEventData; +import com.azure.messaging.eventgrid.systemevents.AgriFoodFarmingApplicationDataChangedEventData; +import com.azure.messaging.eventgrid.systemevents.AgriFoodFarmingBoundaryChangedEventData; +import com.azure.messaging.eventgrid.systemevents.AgriFoodFarmingCropChangedEventData; +import com.azure.messaging.eventgrid.systemevents.AgriFoodFarmingCropVarietyChangedEventData; +import com.azure.messaging.eventgrid.systemevents.AgriFoodFarmingFarmChangedEventData; +import com.azure.messaging.eventgrid.systemevents.AgriFoodFarmingFarmOperationDataIngestionJobStatusChangedEventData; +import com.azure.messaging.eventgrid.systemevents.AgriFoodFarmingFarmerChangedEventData; +import com.azure.messaging.eventgrid.systemevents.AgriFoodFarmingFieldChangedEventData; +import com.azure.messaging.eventgrid.systemevents.AgriFoodFarmingHarvestDataChangedEventData; +import com.azure.messaging.eventgrid.systemevents.AgriFoodFarmingPlantingDataChangedEventData; +import com.azure.messaging.eventgrid.systemevents.AgriFoodFarmingSatelliteDataIngestionJobStatusChangedEventData; +import com.azure.messaging.eventgrid.systemevents.AgriFoodFarmingSeasonChangedEventData; +import com.azure.messaging.eventgrid.systemevents.AgriFoodFarmingSeasonalFieldChangedEventData; +import com.azure.messaging.eventgrid.systemevents.AgriFoodFarmingTillageDataChangedEventData; +import com.azure.messaging.eventgrid.systemevents.AgriFoodFarmingWeatherDataIngestionJobStatusChangedEventData; import com.azure.messaging.eventgrid.systemevents.AppConfigurationKeyValueDeletedEventData; import com.azure.messaging.eventgrid.systemevents.AppConfigurationKeyValueModifiedEventData; import com.azure.messaging.eventgrid.systemevents.ContainerRegistryChartDeletedEventData; @@ -103,6 +118,7 @@ import com.azure.messaging.eventgrid.systemevents.StorageAsyncOperationInitiatedEventData; import com.azure.messaging.eventgrid.systemevents.StorageBlobCreatedEventData; import com.azure.messaging.eventgrid.systemevents.StorageBlobDeletedEventData; +import com.azure.messaging.eventgrid.systemevents.StorageBlobInventoryPolicyCompletedEventData; import com.azure.messaging.eventgrid.systemevents.StorageBlobRenamedEventData; import com.azure.messaging.eventgrid.systemevents.StorageBlobTierChangedEventData; import com.azure.messaging.eventgrid.systemevents.StorageDirectoryCreatedEventData; @@ -231,6 +247,65 @@ public final class SystemEventMappingNames { /** Schema of the Data property of an EventGridEvent for a Microsoft.Communication.SMSReceived event. */ public static final String ACS_SMS_RECEIVED = "Microsoft.Communication.SMSReceived"; + /** Schema of the Data property of an EventGridEvent for a Microsoft.AgFoodPlatform.ApplicationDataChanged event. */ + public static final String AGRI_FOOD_FARMING_APPLICATION_DATA_CHANGED = + "Microsoft.AgFoodPlatform.ApplicationDataChanged"; + + /** Schema of the Data property of an EventGridEvent for a Microsoft.AgFoodPlatform.BoundaryChanged event. */ + public static final String AGRI_FOOD_FARMING_BOUNDARY_CHANGED = "Microsoft.AgFoodPlatform.BoundaryChanged"; + + /** Schema of the Data property of an EventGridEvent for a Microsoft.AgFoodPlatform.CropChanged event. */ + public static final String AGRI_FOOD_FARMING_CROP_CHANGED = "Microsoft.AgFoodPlatform.CropChanged"; + + /** Schema of the Data property of an EventGridEvent for a Microsoft.AgFoodPlatform.CropVarietyChanged event. */ + public static final String AGRI_FOOD_FARMING_CROP_VARIETY_CHANGED = "Microsoft.AgFoodPlatform.CropVarietyChanged"; + + /** Schema of the Data property of an EventGridEvent for a Microsoft.AgFoodPlatform.FarmChanged event. */ + public static final String AGRI_FOOD_FARMING_FARM_CHANGED = "Microsoft.AgFoodPlatform.FarmChanged"; + + /** + * Schema of the Data property of an EventGridEvent for a + * Microsoft.AgFoodPlatform.FarmOperationDataIngestionJobStatusChanged event. + */ + public static final String AGRI_FOOD_FARMING_FARM_OPERATION_DATA_INGESTION_JOB_STATUS_CHANGED = + "Microsoft.AgFoodPlatform.FarmOperationDataIngestionJobStatusChanged"; + + /** Schema of the Data property of an EventGridEvent for a Microsoft.AgFoodPlatform.FarmerChanged event. */ + public static final String AGRI_FOOD_FARMING_FARMER_CHANGED = "Microsoft.AgFoodPlatform.FarmerChanged"; + + /** Schema of the Data property of an EventGridEvent for a Microsoft.AgFoodPlatform.FieldChanged event. */ + public static final String AGRI_FOOD_FARMING_FIELD_CHANGED = "Microsoft.AgFoodPlatform.FieldChanged"; + + /** Schema of the Data property of an EventGridEvent for a Microsoft.AgFoodPlatform.HarvestDataChanged event. */ + public static final String AGRI_FOOD_FARMING_HARVEST_DATA_CHANGED = "Microsoft.AgFoodPlatform.HarvestDataChanged"; + + /** Schema of the Data property of an EventGridEvent for a Microsoft.AgFoodPlatform.PlantingDataChanged event. */ + public static final String AGRI_FOOD_FARMING_PLANTING_DATA_CHANGED = "Microsoft.AgFoodPlatform.PlantingDataChanged"; + + /** + * Schema of the Data property of an EventGridEvent for a + * Microsoft.AgFoodPlatform.SatelliteDataIngestionJobStatusChanged event. + */ + public static final String AGRI_FOOD_FARMING_SATELLITE_DATA_INGESTION_JOB_STATUS_CHANGED = + "Microsoft.AgFoodPlatform.SatelliteDataIngestionJobStatusChanged"; + + /** Schema of the Data property of an EventGridEvent for a Microsoft.AgFoodPlatform.SeasonChanged event. */ + public static final String AGRI_FOOD_FARMING_SEASON_CHANGED = "Microsoft.AgFoodPlatform.SeasonChanged"; + + /** Schema of the Data property of an EventGridEvent for a Microsoft.AgFoodPlatform.SeasonalFieldChanged event. */ + public static final String AGRI_FOOD_FARMING_SEASONAL_FIELD_CHANGED = + "Microsoft.AgFoodPlatform.SeasonalFieldChanged"; + + /** Schema of the Data property of an EventGridEvent for a Microsoft.AgFoodPlatform.TillageDataChanged event. */ + public static final String AGRI_FOOD_FARMING_TILLAGE_DATA_CHANGED = "Microsoft.AgFoodPlatform.TillageDataChanged"; + + /** + * Schema of the Data property of an EventGridEvent for a + * Microsoft.AgFoodPlatform.WeatherDataIngestionJobStatusChanged event. + */ + public static final String AGRI_FOOD_FARMING_WEATHER_DATA_INGESTION_JOB_STATUS_CHANGED = + "Microsoft.AgFoodPlatform.WeatherDataIngestionJobStatusChanged"; + /** Schema of the Data property of an EventGridEvent for a Microsoft.AppConfiguration.KeyValueDeleted event. */ public static final String APP_CONFIGURATION_KEY_VALUE_DELETED = "Microsoft.AppConfiguration.KeyValueDeleted"; @@ -602,6 +677,10 @@ public final class SystemEventMappingNames { /** Schema of the Data property of an EventGridEvent for a Microsoft.Storage.BlobDeleted event. */ public static final String STORAGE_BLOB_DELETED = "Microsoft.Storage.BlobDeleted"; + /** Schema of the Data property of an EventGridEvent for an Microsoft.Storage.BlobInventoryPolicyCompleted event. */ + public static final String STORAGE_BLOB_INVENTORY_POLICY_COMPLETED = + "Microsoft.Storage.BlobInventoryPolicyCompleted"; + /** Schema of the Data property of an EventGridEvent for a Microsoft.Storage.BlobRenamed event. */ public static final String STORAGE_BLOB_RENAMED = "Microsoft.Storage.BlobRenamed"; @@ -693,6 +772,29 @@ public final class SystemEventMappingNames { put(ACS_RECORDING_FILE_STATUS_UPDATED, AcsRecordingFileStatusUpdatedEventData.class); put(ACS_SMS_DELIVERY_REPORT_RECEIVED, AcsSmsDeliveryReportReceivedEventData.class); put(ACS_SMS_RECEIVED, AcsSmsReceivedEventData.class); + put( + AGRI_FOOD_FARMING_APPLICATION_DATA_CHANGED, + AgriFoodFarmingApplicationDataChangedEventData.class); + put(AGRI_FOOD_FARMING_BOUNDARY_CHANGED, AgriFoodFarmingBoundaryChangedEventData.class); + put(AGRI_FOOD_FARMING_CROP_CHANGED, AgriFoodFarmingCropChangedEventData.class); + put(AGRI_FOOD_FARMING_CROP_VARIETY_CHANGED, AgriFoodFarmingCropVarietyChangedEventData.class); + put(AGRI_FOOD_FARMING_FARM_CHANGED, AgriFoodFarmingFarmChangedEventData.class); + put( + AGRI_FOOD_FARMING_FARM_OPERATION_DATA_INGESTION_JOB_STATUS_CHANGED, + AgriFoodFarmingFarmOperationDataIngestionJobStatusChangedEventData.class); + put(AGRI_FOOD_FARMING_FARMER_CHANGED, AgriFoodFarmingFarmerChangedEventData.class); + put(AGRI_FOOD_FARMING_FIELD_CHANGED, AgriFoodFarmingFieldChangedEventData.class); + put(AGRI_FOOD_FARMING_HARVEST_DATA_CHANGED, AgriFoodFarmingHarvestDataChangedEventData.class); + put(AGRI_FOOD_FARMING_PLANTING_DATA_CHANGED, AgriFoodFarmingPlantingDataChangedEventData.class); + put( + AGRI_FOOD_FARMING_SATELLITE_DATA_INGESTION_JOB_STATUS_CHANGED, + AgriFoodFarmingSatelliteDataIngestionJobStatusChangedEventData.class); + put(AGRI_FOOD_FARMING_SEASON_CHANGED, AgriFoodFarmingSeasonChangedEventData.class); + put(AGRI_FOOD_FARMING_SEASONAL_FIELD_CHANGED, AgriFoodFarmingSeasonalFieldChangedEventData.class); + put(AGRI_FOOD_FARMING_TILLAGE_DATA_CHANGED, AgriFoodFarmingTillageDataChangedEventData.class); + put( + AGRI_FOOD_FARMING_WEATHER_DATA_INGESTION_JOB_STATUS_CHANGED, + AgriFoodFarmingWeatherDataIngestionJobStatusChangedEventData.class); put(APP_CONFIGURATION_KEY_VALUE_DELETED, AppConfigurationKeyValueDeletedEventData.class); put(APP_CONFIGURATION_KEY_VALUE_MODIFIED, AppConfigurationKeyValueModifiedEventData.class); put(CONTAINER_REGISTRY_CHART_DELETED, ContainerRegistryChartDeletedEventData.class); @@ -798,6 +900,7 @@ public final class SystemEventMappingNames { put(STORAGE_ASYNC_OPERATION_INITIATED, StorageAsyncOperationInitiatedEventData.class); put(STORAGE_BLOB_CREATED, StorageBlobCreatedEventData.class); put(STORAGE_BLOB_DELETED, StorageBlobDeletedEventData.class); + put(STORAGE_BLOB_INVENTORY_POLICY_COMPLETED, StorageBlobInventoryPolicyCompletedEventData.class); put(STORAGE_BLOB_RENAMED, StorageBlobRenamedEventData.class); put(STORAGE_BLOB_TIER_CHANGED, StorageBlobTierChangedEventData.class); put(STORAGE_DIRECTORY_CREATED, StorageDirectoryCreatedEventData.class); @@ -831,7 +934,5 @@ public static Map> getSystemEventMappings() { return Collections.unmodifiableMap(SYSTEM_EVENT_MAPPINGS); } - private SystemEventMappingNames() { - // No instances allowed - } + private SystemEventMappingNames() { } } diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AcsRecordingChunkInfoProperties.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AcsRecordingChunkInfoProperties.java index 962c5479915a..3759fc5b0be6 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AcsRecordingChunkInfoProperties.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AcsRecordingChunkInfoProperties.java @@ -28,6 +28,18 @@ public final class AcsRecordingChunkInfoProperties { @JsonProperty(value = "endReason") private String endReason; + /* + * The location of the metadata for this chunk + */ + @JsonProperty(value = "metadataLocation") + private String metadataLocation; + + /* + * The location of the content for this chunk + */ + @JsonProperty(value = "contentLocation") + private String contentLocation; + /** * Get the documentId property: The documentId of the recording chunk. * @@ -87,4 +99,44 @@ public AcsRecordingChunkInfoProperties setEndReason(String endReason) { this.endReason = endReason; return this; } + + /** + * Get the metadataLocation property: The location of the metadata for this chunk. + * + * @return the metadataLocation value. + */ + public String getMetadataLocation() { + return this.metadataLocation; + } + + /** + * Set the metadataLocation property: The location of the metadata for this chunk. + * + * @param metadataLocation the metadataLocation value to set. + * @return the AcsRecordingChunkInfoProperties object itself. + */ + public AcsRecordingChunkInfoProperties setMetadataLocation(String metadataLocation) { + this.metadataLocation = metadataLocation; + return this; + } + + /** + * Get the contentLocation property: The location of the content for this chunk. + * + * @return the contentLocation value. + */ + public String getContentLocation() { + return this.contentLocation; + } + + /** + * Set the contentLocation property: The location of the content for this chunk. + * + * @param contentLocation the contentLocation value to set. + * @return the AcsRecordingChunkInfoProperties object itself. + */ + public AcsRecordingChunkInfoProperties setContentLocation(String contentLocation) { + this.contentLocation = contentLocation; + return this; + } } diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AgriFoodFarmingApplicationDataChangedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AgriFoodFarmingApplicationDataChangedEventData.java new file mode 100644 index 000000000000..adc5fed3e3b3 --- /dev/null +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AgriFoodFarmingApplicationDataChangedEventData.java @@ -0,0 +1,307 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.messaging.eventgrid.systemevents; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; +import java.util.Map; + +/** Schema of the Data property of an EventGridEvent for a Microsoft.AgFoodPlatform.ApplicationDataChanged event. */ +@Fluent +public final class AgriFoodFarmingApplicationDataChangedEventData { + /* + * Action occurred on a resource. + */ + @JsonProperty(value = "actionType") + private AgriFoodFarmingResourceActionType actionType; + + /* + * Id of the farmer it belongs to. + */ + @JsonProperty(value = "farmerId") + private String farmerId; + + /* + * Status of the resource. + */ + @JsonProperty(value = "status") + private String status; + + /* + * Source of the farm operation data. + */ + @JsonProperty(value = "source") + private String source; + + /* + * Date-time when resource was last modified, sample format: + * yyyy-MM-ddTHH:mm:ssZ. + */ + @JsonProperty(value = "modifiedDateTime") + private OffsetDateTime modifiedDateTime; + + /* + * The ETag value to implement optimistic concurrency. + */ + @JsonProperty(value = "eTag") + private String eTag; + + /* + * Unique id of resource. + */ + @JsonProperty(value = "id") + private String id; + + /* + * Name to identify resource. + */ + @JsonProperty(value = "name") + private String name; + + /* + * Textual description of resource. + */ + @JsonProperty(value = "description") + private String description; + + /* + * Date-time when resource was created, sample format: + * yyyy-MM-ddTHH:mm:ssZ. + */ + @JsonProperty(value = "createdDateTime") + private OffsetDateTime createdDateTime; + + /* + * A list of key value pairs that describe the resource. + * Only string and numeral values are supported. + */ + @JsonProperty(value = "properties") + private Map properties; + + /** + * Get the actionType property: Action occurred on a resource. + * + * @return the actionType value. + */ + public AgriFoodFarmingResourceActionType getActionType() { + return this.actionType; + } + + /** + * Set the actionType property: Action occurred on a resource. + * + * @param actionType the actionType value to set. + * @return the AgriFoodFarmingApplicationDataChangedEventData object itself. + */ + public AgriFoodFarmingApplicationDataChangedEventData setActionType(AgriFoodFarmingResourceActionType actionType) { + this.actionType = actionType; + return this; + } + + /** + * Get the farmerId property: Id of the farmer it belongs to. + * + * @return the farmerId value. + */ + public String getFarmerId() { + return this.farmerId; + } + + /** + * Set the farmerId property: Id of the farmer it belongs to. + * + * @param farmerId the farmerId value to set. + * @return the AgriFoodFarmingApplicationDataChangedEventData object itself. + */ + public AgriFoodFarmingApplicationDataChangedEventData setFarmerId(String farmerId) { + this.farmerId = farmerId; + return this; + } + + /** + * Get the status property: Status of the resource. + * + * @return the status value. + */ + public String getStatus() { + return this.status; + } + + /** + * Set the status property: Status of the resource. + * + * @param status the status value to set. + * @return the AgriFoodFarmingApplicationDataChangedEventData object itself. + */ + public AgriFoodFarmingApplicationDataChangedEventData setStatus(String status) { + this.status = status; + return this; + } + + /** + * Get the source property: Source of the farm operation data. + * + * @return the source value. + */ + public String getSource() { + return this.source; + } + + /** + * Set the source property: Source of the farm operation data. + * + * @param source the source value to set. + * @return the AgriFoodFarmingApplicationDataChangedEventData object itself. + */ + public AgriFoodFarmingApplicationDataChangedEventData setSource(String source) { + this.source = source; + return this; + } + + /** + * Get the modifiedDateTime property: Date-time when resource was last modified, sample format: + * yyyy-MM-ddTHH:mm:ssZ. + * + * @return the modifiedDateTime value. + */ + public OffsetDateTime getModifiedDateTime() { + return this.modifiedDateTime; + } + + /** + * Set the modifiedDateTime property: Date-time when resource was last modified, sample format: + * yyyy-MM-ddTHH:mm:ssZ. + * + * @param modifiedDateTime the modifiedDateTime value to set. + * @return the AgriFoodFarmingApplicationDataChangedEventData object itself. + */ + public AgriFoodFarmingApplicationDataChangedEventData setModifiedDateTime(OffsetDateTime modifiedDateTime) { + this.modifiedDateTime = modifiedDateTime; + return this; + } + + /** + * Get the eTag property: The ETag value to implement optimistic concurrency. + * + * @return the eTag value. + */ + public String getETag() { + return this.eTag; + } + + /** + * Set the eTag property: The ETag value to implement optimistic concurrency. + * + * @param eTag the eTag value to set. + * @return the AgriFoodFarmingApplicationDataChangedEventData object itself. + */ + public AgriFoodFarmingApplicationDataChangedEventData setETag(String eTag) { + this.eTag = eTag; + return this; + } + + /** + * Get the id property: Unique id of resource. + * + * @return the id value. + */ + public String getId() { + return this.id; + } + + /** + * Set the id property: Unique id of resource. + * + * @param id the id value to set. + * @return the AgriFoodFarmingApplicationDataChangedEventData object itself. + */ + public AgriFoodFarmingApplicationDataChangedEventData setId(String id) { + this.id = id; + return this; + } + + /** + * Get the name property: Name to identify resource. + * + * @return the name value. + */ + public String getName() { + return this.name; + } + + /** + * Set the name property: Name to identify resource. + * + * @param name the name value to set. + * @return the AgriFoodFarmingApplicationDataChangedEventData object itself. + */ + public AgriFoodFarmingApplicationDataChangedEventData setName(String name) { + this.name = name; + return this; + } + + /** + * Get the description property: Textual description of resource. + * + * @return the description value. + */ + public String getDescription() { + return this.description; + } + + /** + * Set the description property: Textual description of resource. + * + * @param description the description value to set. + * @return the AgriFoodFarmingApplicationDataChangedEventData object itself. + */ + public AgriFoodFarmingApplicationDataChangedEventData setDescription(String description) { + this.description = description; + return this; + } + + /** + * Get the createdDateTime property: Date-time when resource was created, sample format: yyyy-MM-ddTHH:mm:ssZ. + * + * @return the createdDateTime value. + */ + public OffsetDateTime getCreatedDateTime() { + return this.createdDateTime; + } + + /** + * Set the createdDateTime property: Date-time when resource was created, sample format: yyyy-MM-ddTHH:mm:ssZ. + * + * @param createdDateTime the createdDateTime value to set. + * @return the AgriFoodFarmingApplicationDataChangedEventData object itself. + */ + public AgriFoodFarmingApplicationDataChangedEventData setCreatedDateTime(OffsetDateTime createdDateTime) { + this.createdDateTime = createdDateTime; + return this; + } + + /** + * Get the properties property: A list of key value pairs that describe the resource. Only string and numeral values + * are supported. + * + * @return the properties value. + */ + public Map getProperties() { + return this.properties; + } + + /** + * Set the properties property: A list of key value pairs that describe the resource. Only string and numeral values + * are supported. + * + * @param properties the properties value to set. + * @return the AgriFoodFarmingApplicationDataChangedEventData object itself. + */ + public AgriFoodFarmingApplicationDataChangedEventData setProperties(Map properties) { + this.properties = properties; + return this; + } +} diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AgriFoodFarmingBoundaryChangedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AgriFoodFarmingBoundaryChangedEventData.java new file mode 100644 index 000000000000..328031adb257 --- /dev/null +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AgriFoodFarmingBoundaryChangedEventData.java @@ -0,0 +1,359 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.messaging.eventgrid.systemevents; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; +import java.util.Map; + +/** Schema of the Data property of an EventGridEvent for a Microsoft.AgFoodPlatform.BoundaryChanged event. */ +@Fluent +public final class AgriFoodFarmingBoundaryChangedEventData { + /* + * Id of the farmer it belongs to. + */ + @JsonProperty(value = "farmerId") + private String farmerId; + + /* + * Id of the parent(field or seasonalField) it belongs to. + */ + @JsonProperty(value = "parentId") + private String parentId; + + /* + * Type of the parent it belongs to. + */ + @JsonProperty(value = "parentType") + private String parentType; + + /* + * A boolean flag indicating whether the boundary is primary or not. + */ + @JsonProperty(value = "isPrimary") + private Boolean isPrimary; + + /* + * Action occurred on a resource. + */ + @JsonProperty(value = "actionType") + private AgriFoodFarmingResourceActionType actionType; + + /* + * Status of the resource. + */ + @JsonProperty(value = "status") + private String status; + + /* + * Date-time when resource was last modified, sample format: + * yyyy-MM-ddTHH:mm:ssZ. + */ + @JsonProperty(value = "modifiedDateTime") + private OffsetDateTime modifiedDateTime; + + /* + * The ETag value to implement optimistic concurrency. + */ + @JsonProperty(value = "eTag") + private String eTag; + + /* + * Unique id of resource. + */ + @JsonProperty(value = "id") + private String id; + + /* + * Name to identify resource. + */ + @JsonProperty(value = "name") + private String name; + + /* + * Textual description of resource. + */ + @JsonProperty(value = "description") + private String description; + + /* + * Date-time when resource was created, sample format: + * yyyy-MM-ddTHH:mm:ssZ. + */ + @JsonProperty(value = "createdDateTime") + private OffsetDateTime createdDateTime; + + /* + * A list of key value pairs that describe the resource. + * Only string and numeral values are supported. + */ + @JsonProperty(value = "properties") + private Map properties; + + /** + * Get the farmerId property: Id of the farmer it belongs to. + * + * @return the farmerId value. + */ + public String getFarmerId() { + return this.farmerId; + } + + /** + * Set the farmerId property: Id of the farmer it belongs to. + * + * @param farmerId the farmerId value to set. + * @return the AgriFoodFarmingBoundaryChangedEventData object itself. + */ + public AgriFoodFarmingBoundaryChangedEventData setFarmerId(String farmerId) { + this.farmerId = farmerId; + return this; + } + + /** + * Get the parentId property: Id of the parent(field or seasonalField) it belongs to. + * + * @return the parentId value. + */ + public String getParentId() { + return this.parentId; + } + + /** + * Set the parentId property: Id of the parent(field or seasonalField) it belongs to. + * + * @param parentId the parentId value to set. + * @return the AgriFoodFarmingBoundaryChangedEventData object itself. + */ + public AgriFoodFarmingBoundaryChangedEventData setParentId(String parentId) { + this.parentId = parentId; + return this; + } + + /** + * Get the parentType property: Type of the parent it belongs to. + * + * @return the parentType value. + */ + public String getParentType() { + return this.parentType; + } + + /** + * Set the parentType property: Type of the parent it belongs to. + * + * @param parentType the parentType value to set. + * @return the AgriFoodFarmingBoundaryChangedEventData object itself. + */ + public AgriFoodFarmingBoundaryChangedEventData setParentType(String parentType) { + this.parentType = parentType; + return this; + } + + /** + * Get the isPrimary property: A boolean flag indicating whether the boundary is primary or not. + * + * @return the isPrimary value. + */ + public Boolean isPrimary() { + return this.isPrimary; + } + + /** + * Set the isPrimary property: A boolean flag indicating whether the boundary is primary or not. + * + * @param isPrimary the isPrimary value to set. + * @return the AgriFoodFarmingBoundaryChangedEventData object itself. + */ + public AgriFoodFarmingBoundaryChangedEventData setIsPrimary(Boolean isPrimary) { + this.isPrimary = isPrimary; + return this; + } + + /** + * Get the actionType property: Action occurred on a resource. + * + * @return the actionType value. + */ + public AgriFoodFarmingResourceActionType getActionType() { + return this.actionType; + } + + /** + * Set the actionType property: Action occurred on a resource. + * + * @param actionType the actionType value to set. + * @return the AgriFoodFarmingBoundaryChangedEventData object itself. + */ + public AgriFoodFarmingBoundaryChangedEventData setActionType(AgriFoodFarmingResourceActionType actionType) { + this.actionType = actionType; + return this; + } + + /** + * Get the status property: Status of the resource. + * + * @return the status value. + */ + public String getStatus() { + return this.status; + } + + /** + * Set the status property: Status of the resource. + * + * @param status the status value to set. + * @return the AgriFoodFarmingBoundaryChangedEventData object itself. + */ + public AgriFoodFarmingBoundaryChangedEventData setStatus(String status) { + this.status = status; + return this; + } + + /** + * Get the modifiedDateTime property: Date-time when resource was last modified, sample format: + * yyyy-MM-ddTHH:mm:ssZ. + * + * @return the modifiedDateTime value. + */ + public OffsetDateTime getModifiedDateTime() { + return this.modifiedDateTime; + } + + /** + * Set the modifiedDateTime property: Date-time when resource was last modified, sample format: + * yyyy-MM-ddTHH:mm:ssZ. + * + * @param modifiedDateTime the modifiedDateTime value to set. + * @return the AgriFoodFarmingBoundaryChangedEventData object itself. + */ + public AgriFoodFarmingBoundaryChangedEventData setModifiedDateTime(OffsetDateTime modifiedDateTime) { + this.modifiedDateTime = modifiedDateTime; + return this; + } + + /** + * Get the eTag property: The ETag value to implement optimistic concurrency. + * + * @return the eTag value. + */ + public String getETag() { + return this.eTag; + } + + /** + * Set the eTag property: The ETag value to implement optimistic concurrency. + * + * @param eTag the eTag value to set. + * @return the AgriFoodFarmingBoundaryChangedEventData object itself. + */ + public AgriFoodFarmingBoundaryChangedEventData setETag(String eTag) { + this.eTag = eTag; + return this; + } + + /** + * Get the id property: Unique id of resource. + * + * @return the id value. + */ + public String getId() { + return this.id; + } + + /** + * Set the id property: Unique id of resource. + * + * @param id the id value to set. + * @return the AgriFoodFarmingBoundaryChangedEventData object itself. + */ + public AgriFoodFarmingBoundaryChangedEventData setId(String id) { + this.id = id; + return this; + } + + /** + * Get the name property: Name to identify resource. + * + * @return the name value. + */ + public String getName() { + return this.name; + } + + /** + * Set the name property: Name to identify resource. + * + * @param name the name value to set. + * @return the AgriFoodFarmingBoundaryChangedEventData object itself. + */ + public AgriFoodFarmingBoundaryChangedEventData setName(String name) { + this.name = name; + return this; + } + + /** + * Get the description property: Textual description of resource. + * + * @return the description value. + */ + public String getDescription() { + return this.description; + } + + /** + * Set the description property: Textual description of resource. + * + * @param description the description value to set. + * @return the AgriFoodFarmingBoundaryChangedEventData object itself. + */ + public AgriFoodFarmingBoundaryChangedEventData setDescription(String description) { + this.description = description; + return this; + } + + /** + * Get the createdDateTime property: Date-time when resource was created, sample format: yyyy-MM-ddTHH:mm:ssZ. + * + * @return the createdDateTime value. + */ + public OffsetDateTime getCreatedDateTime() { + return this.createdDateTime; + } + + /** + * Set the createdDateTime property: Date-time when resource was created, sample format: yyyy-MM-ddTHH:mm:ssZ. + * + * @param createdDateTime the createdDateTime value to set. + * @return the AgriFoodFarmingBoundaryChangedEventData object itself. + */ + public AgriFoodFarmingBoundaryChangedEventData setCreatedDateTime(OffsetDateTime createdDateTime) { + this.createdDateTime = createdDateTime; + return this; + } + + /** + * Get the properties property: A list of key value pairs that describe the resource. Only string and numeral values + * are supported. + * + * @return the properties value. + */ + public Map getProperties() { + return this.properties; + } + + /** + * Set the properties property: A list of key value pairs that describe the resource. Only string and numeral values + * are supported. + * + * @param properties the properties value to set. + * @return the AgriFoodFarmingBoundaryChangedEventData object itself. + */ + public AgriFoodFarmingBoundaryChangedEventData setProperties(Map properties) { + this.properties = properties; + return this; + } +} diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AgriFoodFarmingCropChangedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AgriFoodFarmingCropChangedEventData.java new file mode 100644 index 000000000000..e3d7613f1421 --- /dev/null +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AgriFoodFarmingCropChangedEventData.java @@ -0,0 +1,255 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.messaging.eventgrid.systemevents; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; +import java.util.Map; + +/** Schema of the Data property of an EventGridEvent for a Microsoft.AgFoodPlatform.CropChanged event. */ +@Fluent +public final class AgriFoodFarmingCropChangedEventData { + /* + * Action occurred on a resource. + */ + @JsonProperty(value = "actionType") + private AgriFoodFarmingResourceActionType actionType; + + /* + * Status of the resource. + */ + @JsonProperty(value = "status") + private String status; + + /* + * Date-time when resource was last modified, sample format: + * yyyy-MM-ddTHH:mm:ssZ. + */ + @JsonProperty(value = "modifiedDateTime") + private OffsetDateTime modifiedDateTime; + + /* + * The ETag value to implement optimistic concurrency. + */ + @JsonProperty(value = "eTag") + private String eTag; + + /* + * Unique id of resource. + */ + @JsonProperty(value = "id") + private String id; + + /* + * Name to identify resource. + */ + @JsonProperty(value = "name") + private String name; + + /* + * Textual description of resource. + */ + @JsonProperty(value = "description") + private String description; + + /* + * Date-time when resource was created, sample format: + * yyyy-MM-ddTHH:mm:ssZ. + */ + @JsonProperty(value = "createdDateTime") + private OffsetDateTime createdDateTime; + + /* + * A list of key value pairs that describe the resource. + * Only string and numeral values are supported. + */ + @JsonProperty(value = "properties") + private Map properties; + + /** + * Get the actionType property: Action occurred on a resource. + * + * @return the actionType value. + */ + public AgriFoodFarmingResourceActionType getActionType() { + return this.actionType; + } + + /** + * Set the actionType property: Action occurred on a resource. + * + * @param actionType the actionType value to set. + * @return the AgriFoodFarmingCropChangedEventData object itself. + */ + public AgriFoodFarmingCropChangedEventData setActionType(AgriFoodFarmingResourceActionType actionType) { + this.actionType = actionType; + return this; + } + + /** + * Get the status property: Status of the resource. + * + * @return the status value. + */ + public String getStatus() { + return this.status; + } + + /** + * Set the status property: Status of the resource. + * + * @param status the status value to set. + * @return the AgriFoodFarmingCropChangedEventData object itself. + */ + public AgriFoodFarmingCropChangedEventData setStatus(String status) { + this.status = status; + return this; + } + + /** + * Get the modifiedDateTime property: Date-time when resource was last modified, sample format: + * yyyy-MM-ddTHH:mm:ssZ. + * + * @return the modifiedDateTime value. + */ + public OffsetDateTime getModifiedDateTime() { + return this.modifiedDateTime; + } + + /** + * Set the modifiedDateTime property: Date-time when resource was last modified, sample format: + * yyyy-MM-ddTHH:mm:ssZ. + * + * @param modifiedDateTime the modifiedDateTime value to set. + * @return the AgriFoodFarmingCropChangedEventData object itself. + */ + public AgriFoodFarmingCropChangedEventData setModifiedDateTime(OffsetDateTime modifiedDateTime) { + this.modifiedDateTime = modifiedDateTime; + return this; + } + + /** + * Get the eTag property: The ETag value to implement optimistic concurrency. + * + * @return the eTag value. + */ + public String getETag() { + return this.eTag; + } + + /** + * Set the eTag property: The ETag value to implement optimistic concurrency. + * + * @param eTag the eTag value to set. + * @return the AgriFoodFarmingCropChangedEventData object itself. + */ + public AgriFoodFarmingCropChangedEventData setETag(String eTag) { + this.eTag = eTag; + return this; + } + + /** + * Get the id property: Unique id of resource. + * + * @return the id value. + */ + public String getId() { + return this.id; + } + + /** + * Set the id property: Unique id of resource. + * + * @param id the id value to set. + * @return the AgriFoodFarmingCropChangedEventData object itself. + */ + public AgriFoodFarmingCropChangedEventData setId(String id) { + this.id = id; + return this; + } + + /** + * Get the name property: Name to identify resource. + * + * @return the name value. + */ + public String getName() { + return this.name; + } + + /** + * Set the name property: Name to identify resource. + * + * @param name the name value to set. + * @return the AgriFoodFarmingCropChangedEventData object itself. + */ + public AgriFoodFarmingCropChangedEventData setName(String name) { + this.name = name; + return this; + } + + /** + * Get the description property: Textual description of resource. + * + * @return the description value. + */ + public String getDescription() { + return this.description; + } + + /** + * Set the description property: Textual description of resource. + * + * @param description the description value to set. + * @return the AgriFoodFarmingCropChangedEventData object itself. + */ + public AgriFoodFarmingCropChangedEventData setDescription(String description) { + this.description = description; + return this; + } + + /** + * Get the createdDateTime property: Date-time when resource was created, sample format: yyyy-MM-ddTHH:mm:ssZ. + * + * @return the createdDateTime value. + */ + public OffsetDateTime getCreatedDateTime() { + return this.createdDateTime; + } + + /** + * Set the createdDateTime property: Date-time when resource was created, sample format: yyyy-MM-ddTHH:mm:ssZ. + * + * @param createdDateTime the createdDateTime value to set. + * @return the AgriFoodFarmingCropChangedEventData object itself. + */ + public AgriFoodFarmingCropChangedEventData setCreatedDateTime(OffsetDateTime createdDateTime) { + this.createdDateTime = createdDateTime; + return this; + } + + /** + * Get the properties property: A list of key value pairs that describe the resource. Only string and numeral values + * are supported. + * + * @return the properties value. + */ + public Map getProperties() { + return this.properties; + } + + /** + * Set the properties property: A list of key value pairs that describe the resource. Only string and numeral values + * are supported. + * + * @param properties the properties value to set. + * @return the AgriFoodFarmingCropChangedEventData object itself. + */ + public AgriFoodFarmingCropChangedEventData setProperties(Map properties) { + this.properties = properties; + return this; + } +} diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AgriFoodFarmingCropVarietyChangedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AgriFoodFarmingCropVarietyChangedEventData.java new file mode 100644 index 000000000000..5cab7b0a6323 --- /dev/null +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AgriFoodFarmingCropVarietyChangedEventData.java @@ -0,0 +1,281 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.messaging.eventgrid.systemevents; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; +import java.util.Map; + +/** Schema of the Data property of an EventGridEvent for a Microsoft.AgFoodPlatform.CropVarietyChanged event. */ +@Fluent +public final class AgriFoodFarmingCropVarietyChangedEventData { + /* + * Id of the crop it belongs to. + */ + @JsonProperty(value = "cropId") + private String cropId; + + /* + * Action occurred on a resource. + */ + @JsonProperty(value = "actionType") + private AgriFoodFarmingResourceActionType actionType; + + /* + * Status of the resource. + */ + @JsonProperty(value = "status") + private String status; + + /* + * Date-time when resource was last modified, sample format: + * yyyy-MM-ddTHH:mm:ssZ. + */ + @JsonProperty(value = "modifiedDateTime") + private OffsetDateTime modifiedDateTime; + + /* + * The ETag value to implement optimistic concurrency. + */ + @JsonProperty(value = "eTag") + private String eTag; + + /* + * Unique id of resource. + */ + @JsonProperty(value = "id") + private String id; + + /* + * Name to identify resource. + */ + @JsonProperty(value = "name") + private String name; + + /* + * Textual description of resource. + */ + @JsonProperty(value = "description") + private String description; + + /* + * Date-time when resource was created, sample format: + * yyyy-MM-ddTHH:mm:ssZ. + */ + @JsonProperty(value = "createdDateTime") + private OffsetDateTime createdDateTime; + + /* + * A list of key value pairs that describe the resource. + * Only string and numeral values are supported. + */ + @JsonProperty(value = "properties") + private Map properties; + + /** + * Get the cropId property: Id of the crop it belongs to. + * + * @return the cropId value. + */ + public String getCropId() { + return this.cropId; + } + + /** + * Set the cropId property: Id of the crop it belongs to. + * + * @param cropId the cropId value to set. + * @return the AgriFoodFarmingCropVarietyChangedEventData object itself. + */ + public AgriFoodFarmingCropVarietyChangedEventData setCropId(String cropId) { + this.cropId = cropId; + return this; + } + + /** + * Get the actionType property: Action occurred on a resource. + * + * @return the actionType value. + */ + public AgriFoodFarmingResourceActionType getActionType() { + return this.actionType; + } + + /** + * Set the actionType property: Action occurred on a resource. + * + * @param actionType the actionType value to set. + * @return the AgriFoodFarmingCropVarietyChangedEventData object itself. + */ + public AgriFoodFarmingCropVarietyChangedEventData setActionType(AgriFoodFarmingResourceActionType actionType) { + this.actionType = actionType; + return this; + } + + /** + * Get the status property: Status of the resource. + * + * @return the status value. + */ + public String getStatus() { + return this.status; + } + + /** + * Set the status property: Status of the resource. + * + * @param status the status value to set. + * @return the AgriFoodFarmingCropVarietyChangedEventData object itself. + */ + public AgriFoodFarmingCropVarietyChangedEventData setStatus(String status) { + this.status = status; + return this; + } + + /** + * Get the modifiedDateTime property: Date-time when resource was last modified, sample format: + * yyyy-MM-ddTHH:mm:ssZ. + * + * @return the modifiedDateTime value. + */ + public OffsetDateTime getModifiedDateTime() { + return this.modifiedDateTime; + } + + /** + * Set the modifiedDateTime property: Date-time when resource was last modified, sample format: + * yyyy-MM-ddTHH:mm:ssZ. + * + * @param modifiedDateTime the modifiedDateTime value to set. + * @return the AgriFoodFarmingCropVarietyChangedEventData object itself. + */ + public AgriFoodFarmingCropVarietyChangedEventData setModifiedDateTime(OffsetDateTime modifiedDateTime) { + this.modifiedDateTime = modifiedDateTime; + return this; + } + + /** + * Get the eTag property: The ETag value to implement optimistic concurrency. + * + * @return the eTag value. + */ + public String getETag() { + return this.eTag; + } + + /** + * Set the eTag property: The ETag value to implement optimistic concurrency. + * + * @param eTag the eTag value to set. + * @return the AgriFoodFarmingCropVarietyChangedEventData object itself. + */ + public AgriFoodFarmingCropVarietyChangedEventData setETag(String eTag) { + this.eTag = eTag; + return this; + } + + /** + * Get the id property: Unique id of resource. + * + * @return the id value. + */ + public String getId() { + return this.id; + } + + /** + * Set the id property: Unique id of resource. + * + * @param id the id value to set. + * @return the AgriFoodFarmingCropVarietyChangedEventData object itself. + */ + public AgriFoodFarmingCropVarietyChangedEventData setId(String id) { + this.id = id; + return this; + } + + /** + * Get the name property: Name to identify resource. + * + * @return the name value. + */ + public String getName() { + return this.name; + } + + /** + * Set the name property: Name to identify resource. + * + * @param name the name value to set. + * @return the AgriFoodFarmingCropVarietyChangedEventData object itself. + */ + public AgriFoodFarmingCropVarietyChangedEventData setName(String name) { + this.name = name; + return this; + } + + /** + * Get the description property: Textual description of resource. + * + * @return the description value. + */ + public String getDescription() { + return this.description; + } + + /** + * Set the description property: Textual description of resource. + * + * @param description the description value to set. + * @return the AgriFoodFarmingCropVarietyChangedEventData object itself. + */ + public AgriFoodFarmingCropVarietyChangedEventData setDescription(String description) { + this.description = description; + return this; + } + + /** + * Get the createdDateTime property: Date-time when resource was created, sample format: yyyy-MM-ddTHH:mm:ssZ. + * + * @return the createdDateTime value. + */ + public OffsetDateTime getCreatedDateTime() { + return this.createdDateTime; + } + + /** + * Set the createdDateTime property: Date-time when resource was created, sample format: yyyy-MM-ddTHH:mm:ssZ. + * + * @param createdDateTime the createdDateTime value to set. + * @return the AgriFoodFarmingCropVarietyChangedEventData object itself. + */ + public AgriFoodFarmingCropVarietyChangedEventData setCreatedDateTime(OffsetDateTime createdDateTime) { + this.createdDateTime = createdDateTime; + return this; + } + + /** + * Get the properties property: A list of key value pairs that describe the resource. Only string and numeral values + * are supported. + * + * @return the properties value. + */ + public Map getProperties() { + return this.properties; + } + + /** + * Set the properties property: A list of key value pairs that describe the resource. Only string and numeral values + * are supported. + * + * @param properties the properties value to set. + * @return the AgriFoodFarmingCropVarietyChangedEventData object itself. + */ + public AgriFoodFarmingCropVarietyChangedEventData setProperties(Map properties) { + this.properties = properties; + return this; + } +} diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AgriFoodFarmingFarmChangedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AgriFoodFarmingFarmChangedEventData.java new file mode 100644 index 000000000000..41f972ad64d8 --- /dev/null +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AgriFoodFarmingFarmChangedEventData.java @@ -0,0 +1,281 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.messaging.eventgrid.systemevents; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; +import java.util.Map; + +/** Schema of the Data property of an EventGridEvent for a Microsoft.AgFoodPlatform.FarmChanged event. */ +@Fluent +public final class AgriFoodFarmingFarmChangedEventData { + /* + * Id of the farmer it belongs to. + */ + @JsonProperty(value = "farmerId") + private String farmerId; + + /* + * Action occurred on a resource. + */ + @JsonProperty(value = "actionType") + private AgriFoodFarmingResourceActionType actionType; + + /* + * Status of the resource. + */ + @JsonProperty(value = "status") + private String status; + + /* + * Date-time when resource was last modified, sample format: + * yyyy-MM-ddTHH:mm:ssZ. + */ + @JsonProperty(value = "modifiedDateTime") + private OffsetDateTime modifiedDateTime; + + /* + * The ETag value to implement optimistic concurrency. + */ + @JsonProperty(value = "eTag") + private String eTag; + + /* + * Unique id of resource. + */ + @JsonProperty(value = "id") + private String id; + + /* + * Name to identify resource. + */ + @JsonProperty(value = "name") + private String name; + + /* + * Textual description of resource. + */ + @JsonProperty(value = "description") + private String description; + + /* + * Date-time when resource was created, sample format: + * yyyy-MM-ddTHH:mm:ssZ. + */ + @JsonProperty(value = "createdDateTime") + private OffsetDateTime createdDateTime; + + /* + * A list of key value pairs that describe the resource. + * Only string and numeral values are supported. + */ + @JsonProperty(value = "properties") + private Map properties; + + /** + * Get the farmerId property: Id of the farmer it belongs to. + * + * @return the farmerId value. + */ + public String getFarmerId() { + return this.farmerId; + } + + /** + * Set the farmerId property: Id of the farmer it belongs to. + * + * @param farmerId the farmerId value to set. + * @return the AgriFoodFarmingFarmChangedEventData object itself. + */ + public AgriFoodFarmingFarmChangedEventData setFarmerId(String farmerId) { + this.farmerId = farmerId; + return this; + } + + /** + * Get the actionType property: Action occurred on a resource. + * + * @return the actionType value. + */ + public AgriFoodFarmingResourceActionType getActionType() { + return this.actionType; + } + + /** + * Set the actionType property: Action occurred on a resource. + * + * @param actionType the actionType value to set. + * @return the AgriFoodFarmingFarmChangedEventData object itself. + */ + public AgriFoodFarmingFarmChangedEventData setActionType(AgriFoodFarmingResourceActionType actionType) { + this.actionType = actionType; + return this; + } + + /** + * Get the status property: Status of the resource. + * + * @return the status value. + */ + public String getStatus() { + return this.status; + } + + /** + * Set the status property: Status of the resource. + * + * @param status the status value to set. + * @return the AgriFoodFarmingFarmChangedEventData object itself. + */ + public AgriFoodFarmingFarmChangedEventData setStatus(String status) { + this.status = status; + return this; + } + + /** + * Get the modifiedDateTime property: Date-time when resource was last modified, sample format: + * yyyy-MM-ddTHH:mm:ssZ. + * + * @return the modifiedDateTime value. + */ + public OffsetDateTime getModifiedDateTime() { + return this.modifiedDateTime; + } + + /** + * Set the modifiedDateTime property: Date-time when resource was last modified, sample format: + * yyyy-MM-ddTHH:mm:ssZ. + * + * @param modifiedDateTime the modifiedDateTime value to set. + * @return the AgriFoodFarmingFarmChangedEventData object itself. + */ + public AgriFoodFarmingFarmChangedEventData setModifiedDateTime(OffsetDateTime modifiedDateTime) { + this.modifiedDateTime = modifiedDateTime; + return this; + } + + /** + * Get the eTag property: The ETag value to implement optimistic concurrency. + * + * @return the eTag value. + */ + public String getETag() { + return this.eTag; + } + + /** + * Set the eTag property: The ETag value to implement optimistic concurrency. + * + * @param eTag the eTag value to set. + * @return the AgriFoodFarmingFarmChangedEventData object itself. + */ + public AgriFoodFarmingFarmChangedEventData setETag(String eTag) { + this.eTag = eTag; + return this; + } + + /** + * Get the id property: Unique id of resource. + * + * @return the id value. + */ + public String getId() { + return this.id; + } + + /** + * Set the id property: Unique id of resource. + * + * @param id the id value to set. + * @return the AgriFoodFarmingFarmChangedEventData object itself. + */ + public AgriFoodFarmingFarmChangedEventData setId(String id) { + this.id = id; + return this; + } + + /** + * Get the name property: Name to identify resource. + * + * @return the name value. + */ + public String getName() { + return this.name; + } + + /** + * Set the name property: Name to identify resource. + * + * @param name the name value to set. + * @return the AgriFoodFarmingFarmChangedEventData object itself. + */ + public AgriFoodFarmingFarmChangedEventData setName(String name) { + this.name = name; + return this; + } + + /** + * Get the description property: Textual description of resource. + * + * @return the description value. + */ + public String getDescription() { + return this.description; + } + + /** + * Set the description property: Textual description of resource. + * + * @param description the description value to set. + * @return the AgriFoodFarmingFarmChangedEventData object itself. + */ + public AgriFoodFarmingFarmChangedEventData setDescription(String description) { + this.description = description; + return this; + } + + /** + * Get the createdDateTime property: Date-time when resource was created, sample format: yyyy-MM-ddTHH:mm:ssZ. + * + * @return the createdDateTime value. + */ + public OffsetDateTime getCreatedDateTime() { + return this.createdDateTime; + } + + /** + * Set the createdDateTime property: Date-time when resource was created, sample format: yyyy-MM-ddTHH:mm:ssZ. + * + * @param createdDateTime the createdDateTime value to set. + * @return the AgriFoodFarmingFarmChangedEventData object itself. + */ + public AgriFoodFarmingFarmChangedEventData setCreatedDateTime(OffsetDateTime createdDateTime) { + this.createdDateTime = createdDateTime; + return this; + } + + /** + * Get the properties property: A list of key value pairs that describe the resource. Only string and numeral values + * are supported. + * + * @return the properties value. + */ + public Map getProperties() { + return this.properties; + } + + /** + * Set the properties property: A list of key value pairs that describe the resource. Only string and numeral values + * are supported. + * + * @param properties the properties value to set. + * @return the AgriFoodFarmingFarmChangedEventData object itself. + */ + public AgriFoodFarmingFarmChangedEventData setProperties(Map properties) { + this.properties = properties; + return this; + } +} diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AgriFoodFarmingFarmOperationDataIngestionJobStatusChangedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AgriFoodFarmingFarmOperationDataIngestionJobStatusChangedEventData.java new file mode 100644 index 000000000000..42b79019e228 --- /dev/null +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AgriFoodFarmingFarmOperationDataIngestionJobStatusChangedEventData.java @@ -0,0 +1,289 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.messaging.eventgrid.systemevents; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; +import java.util.Map; + +/** + * Schema of the Data property of an EventGridEvent for a + * Microsoft.AgFoodPlatform.FarmOperationDataIngestionJobStatusChanged event. + */ +@Fluent +public final class AgriFoodFarmingFarmOperationDataIngestionJobStatusChangedEventData { + /* + * Farmer id for which job was created. + */ + @JsonProperty(value = "farmerId") + private String farmerId; + + /* + * Status message to capture more details of the job. + */ + @JsonProperty(value = "message") + private String message; + + /* + * Various states a job can be in. + */ + @JsonProperty(value = "status") + private AgriFoodFarmingJobStatus status; + + /* + * Date-time when last action was taken on job, sample format: + * yyyy-MM-ddTHH:mm:ssZ. + */ + @JsonProperty(value = "lastActionDateTime") + private OffsetDateTime lastActionDateTime; + + /* + * Flag that gets set when job cancellation is requested. + */ + @JsonProperty(value = "isCancellationRequested") + private Boolean isCancellationRequested; + + /* + * Unique id of resource. + */ + @JsonProperty(value = "id") + private String id; + + /* + * Name to identify resource. + */ + @JsonProperty(value = "name") + private String name; + + /* + * Textual description of resource. + */ + @JsonProperty(value = "description") + private String description; + + /* + * Date-time when resource was created, sample format: + * yyyy-MM-ddTHH:mm:ssZ. + */ + @JsonProperty(value = "createdDateTime") + private OffsetDateTime createdDateTime; + + /* + * A list of key value pairs that describe the resource. + * Only string and numeral values are supported. + */ + @JsonProperty(value = "properties") + private Map properties; + + /** + * Get the farmerId property: Farmer id for which job was created. + * + * @return the farmerId value. + */ + public String getFarmerId() { + return this.farmerId; + } + + /** + * Set the farmerId property: Farmer id for which job was created. + * + * @param farmerId the farmerId value to set. + * @return the AgriFoodFarmingFarmOperationDataIngestionJobStatusChangedEventData object itself. + */ + public AgriFoodFarmingFarmOperationDataIngestionJobStatusChangedEventData setFarmerId(String farmerId) { + this.farmerId = farmerId; + return this; + } + + /** + * Get the message property: Status message to capture more details of the job. + * + * @return the message value. + */ + public String getMessage() { + return this.message; + } + + /** + * Set the message property: Status message to capture more details of the job. + * + * @param message the message value to set. + * @return the AgriFoodFarmingFarmOperationDataIngestionJobStatusChangedEventData object itself. + */ + public AgriFoodFarmingFarmOperationDataIngestionJobStatusChangedEventData setMessage(String message) { + this.message = message; + return this; + } + + /** + * Get the status property: Various states a job can be in. + * + * @return the status value. + */ + public AgriFoodFarmingJobStatus getStatus() { + return this.status; + } + + /** + * Set the status property: Various states a job can be in. + * + * @param status the status value to set. + * @return the AgriFoodFarmingFarmOperationDataIngestionJobStatusChangedEventData object itself. + */ + public AgriFoodFarmingFarmOperationDataIngestionJobStatusChangedEventData setStatus( + AgriFoodFarmingJobStatus status) { + this.status = status; + return this; + } + + /** + * Get the lastActionDateTime property: Date-time when last action was taken on job, sample format: + * yyyy-MM-ddTHH:mm:ssZ. + * + * @return the lastActionDateTime value. + */ + public OffsetDateTime getLastActionDateTime() { + return this.lastActionDateTime; + } + + /** + * Set the lastActionDateTime property: Date-time when last action was taken on job, sample format: + * yyyy-MM-ddTHH:mm:ssZ. + * + * @param lastActionDateTime the lastActionDateTime value to set. + * @return the AgriFoodFarmingFarmOperationDataIngestionJobStatusChangedEventData object itself. + */ + public AgriFoodFarmingFarmOperationDataIngestionJobStatusChangedEventData setLastActionDateTime( + OffsetDateTime lastActionDateTime) { + this.lastActionDateTime = lastActionDateTime; + return this; + } + + /** + * Get the isCancellationRequested property: Flag that gets set when job cancellation is requested. + * + * @return the isCancellationRequested value. + */ + public Boolean isCancellationRequested() { + return this.isCancellationRequested; + } + + /** + * Set the isCancellationRequested property: Flag that gets set when job cancellation is requested. + * + * @param isCancellationRequested the isCancellationRequested value to set. + * @return the AgriFoodFarmingFarmOperationDataIngestionJobStatusChangedEventData object itself. + */ + public AgriFoodFarmingFarmOperationDataIngestionJobStatusChangedEventData setIsCancellationRequested( + Boolean isCancellationRequested) { + this.isCancellationRequested = isCancellationRequested; + return this; + } + + /** + * Get the id property: Unique id of resource. + * + * @return the id value. + */ + public String getId() { + return this.id; + } + + /** + * Set the id property: Unique id of resource. + * + * @param id the id value to set. + * @return the AgriFoodFarmingFarmOperationDataIngestionJobStatusChangedEventData object itself. + */ + public AgriFoodFarmingFarmOperationDataIngestionJobStatusChangedEventData setId(String id) { + this.id = id; + return this; + } + + /** + * Get the name property: Name to identify resource. + * + * @return the name value. + */ + public String getName() { + return this.name; + } + + /** + * Set the name property: Name to identify resource. + * + * @param name the name value to set. + * @return the AgriFoodFarmingFarmOperationDataIngestionJobStatusChangedEventData object itself. + */ + public AgriFoodFarmingFarmOperationDataIngestionJobStatusChangedEventData setName(String name) { + this.name = name; + return this; + } + + /** + * Get the description property: Textual description of resource. + * + * @return the description value. + */ + public String getDescription() { + return this.description; + } + + /** + * Set the description property: Textual description of resource. + * + * @param description the description value to set. + * @return the AgriFoodFarmingFarmOperationDataIngestionJobStatusChangedEventData object itself. + */ + public AgriFoodFarmingFarmOperationDataIngestionJobStatusChangedEventData setDescription(String description) { + this.description = description; + return this; + } + + /** + * Get the createdDateTime property: Date-time when resource was created, sample format: yyyy-MM-ddTHH:mm:ssZ. + * + * @return the createdDateTime value. + */ + public OffsetDateTime getCreatedDateTime() { + return this.createdDateTime; + } + + /** + * Set the createdDateTime property: Date-time when resource was created, sample format: yyyy-MM-ddTHH:mm:ssZ. + * + * @param createdDateTime the createdDateTime value to set. + * @return the AgriFoodFarmingFarmOperationDataIngestionJobStatusChangedEventData object itself. + */ + public AgriFoodFarmingFarmOperationDataIngestionJobStatusChangedEventData setCreatedDateTime( + OffsetDateTime createdDateTime) { + this.createdDateTime = createdDateTime; + return this; + } + + /** + * Get the properties property: A list of key value pairs that describe the resource. Only string and numeral values + * are supported. + * + * @return the properties value. + */ + public Map getProperties() { + return this.properties; + } + + /** + * Set the properties property: A list of key value pairs that describe the resource. Only string and numeral values + * are supported. + * + * @param properties the properties value to set. + * @return the AgriFoodFarmingFarmOperationDataIngestionJobStatusChangedEventData object itself. + */ + public AgriFoodFarmingFarmOperationDataIngestionJobStatusChangedEventData setProperties( + Map properties) { + this.properties = properties; + return this; + } +} diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AgriFoodFarmingFarmerChangedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AgriFoodFarmingFarmerChangedEventData.java new file mode 100644 index 000000000000..fd523025e293 --- /dev/null +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AgriFoodFarmingFarmerChangedEventData.java @@ -0,0 +1,255 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.messaging.eventgrid.systemevents; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; +import java.util.Map; + +/** Schema of the Data property of an EventGridEvent for a Microsoft.AgFoodPlatform.FarmerChanged event. */ +@Fluent +public final class AgriFoodFarmingFarmerChangedEventData { + /* + * Action occurred on a resource. + */ + @JsonProperty(value = "actionType") + private AgriFoodFarmingResourceActionType actionType; + + /* + * Status of the resource. + */ + @JsonProperty(value = "status") + private String status; + + /* + * Date-time when resource was last modified, sample format: + * yyyy-MM-ddTHH:mm:ssZ. + */ + @JsonProperty(value = "modifiedDateTime") + private OffsetDateTime modifiedDateTime; + + /* + * The ETag value to implement optimistic concurrency. + */ + @JsonProperty(value = "eTag") + private String eTag; + + /* + * Unique id of resource. + */ + @JsonProperty(value = "id") + private String id; + + /* + * Name to identify resource. + */ + @JsonProperty(value = "name") + private String name; + + /* + * Textual description of resource. + */ + @JsonProperty(value = "description") + private String description; + + /* + * Date-time when resource was created, sample format: + * yyyy-MM-ddTHH:mm:ssZ. + */ + @JsonProperty(value = "createdDateTime") + private OffsetDateTime createdDateTime; + + /* + * A list of key value pairs that describe the resource. + * Only string and numeral values are supported. + */ + @JsonProperty(value = "properties") + private Map properties; + + /** + * Get the actionType property: Action occurred on a resource. + * + * @return the actionType value. + */ + public AgriFoodFarmingResourceActionType getActionType() { + return this.actionType; + } + + /** + * Set the actionType property: Action occurred on a resource. + * + * @param actionType the actionType value to set. + * @return the AgriFoodFarmingFarmerChangedEventData object itself. + */ + public AgriFoodFarmingFarmerChangedEventData setActionType(AgriFoodFarmingResourceActionType actionType) { + this.actionType = actionType; + return this; + } + + /** + * Get the status property: Status of the resource. + * + * @return the status value. + */ + public String getStatus() { + return this.status; + } + + /** + * Set the status property: Status of the resource. + * + * @param status the status value to set. + * @return the AgriFoodFarmingFarmerChangedEventData object itself. + */ + public AgriFoodFarmingFarmerChangedEventData setStatus(String status) { + this.status = status; + return this; + } + + /** + * Get the modifiedDateTime property: Date-time when resource was last modified, sample format: + * yyyy-MM-ddTHH:mm:ssZ. + * + * @return the modifiedDateTime value. + */ + public OffsetDateTime getModifiedDateTime() { + return this.modifiedDateTime; + } + + /** + * Set the modifiedDateTime property: Date-time when resource was last modified, sample format: + * yyyy-MM-ddTHH:mm:ssZ. + * + * @param modifiedDateTime the modifiedDateTime value to set. + * @return the AgriFoodFarmingFarmerChangedEventData object itself. + */ + public AgriFoodFarmingFarmerChangedEventData setModifiedDateTime(OffsetDateTime modifiedDateTime) { + this.modifiedDateTime = modifiedDateTime; + return this; + } + + /** + * Get the eTag property: The ETag value to implement optimistic concurrency. + * + * @return the eTag value. + */ + public String getETag() { + return this.eTag; + } + + /** + * Set the eTag property: The ETag value to implement optimistic concurrency. + * + * @param eTag the eTag value to set. + * @return the AgriFoodFarmingFarmerChangedEventData object itself. + */ + public AgriFoodFarmingFarmerChangedEventData setETag(String eTag) { + this.eTag = eTag; + return this; + } + + /** + * Get the id property: Unique id of resource. + * + * @return the id value. + */ + public String getId() { + return this.id; + } + + /** + * Set the id property: Unique id of resource. + * + * @param id the id value to set. + * @return the AgriFoodFarmingFarmerChangedEventData object itself. + */ + public AgriFoodFarmingFarmerChangedEventData setId(String id) { + this.id = id; + return this; + } + + /** + * Get the name property: Name to identify resource. + * + * @return the name value. + */ + public String getName() { + return this.name; + } + + /** + * Set the name property: Name to identify resource. + * + * @param name the name value to set. + * @return the AgriFoodFarmingFarmerChangedEventData object itself. + */ + public AgriFoodFarmingFarmerChangedEventData setName(String name) { + this.name = name; + return this; + } + + /** + * Get the description property: Textual description of resource. + * + * @return the description value. + */ + public String getDescription() { + return this.description; + } + + /** + * Set the description property: Textual description of resource. + * + * @param description the description value to set. + * @return the AgriFoodFarmingFarmerChangedEventData object itself. + */ + public AgriFoodFarmingFarmerChangedEventData setDescription(String description) { + this.description = description; + return this; + } + + /** + * Get the createdDateTime property: Date-time when resource was created, sample format: yyyy-MM-ddTHH:mm:ssZ. + * + * @return the createdDateTime value. + */ + public OffsetDateTime getCreatedDateTime() { + return this.createdDateTime; + } + + /** + * Set the createdDateTime property: Date-time when resource was created, sample format: yyyy-MM-ddTHH:mm:ssZ. + * + * @param createdDateTime the createdDateTime value to set. + * @return the AgriFoodFarmingFarmerChangedEventData object itself. + */ + public AgriFoodFarmingFarmerChangedEventData setCreatedDateTime(OffsetDateTime createdDateTime) { + this.createdDateTime = createdDateTime; + return this; + } + + /** + * Get the properties property: A list of key value pairs that describe the resource. Only string and numeral values + * are supported. + * + * @return the properties value. + */ + public Map getProperties() { + return this.properties; + } + + /** + * Set the properties property: A list of key value pairs that describe the resource. Only string and numeral values + * are supported. + * + * @param properties the properties value to set. + * @return the AgriFoodFarmingFarmerChangedEventData object itself. + */ + public AgriFoodFarmingFarmerChangedEventData setProperties(Map properties) { + this.properties = properties; + return this; + } +} diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AgriFoodFarmingFieldChangedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AgriFoodFarmingFieldChangedEventData.java new file mode 100644 index 000000000000..c5c0acbcfd34 --- /dev/null +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AgriFoodFarmingFieldChangedEventData.java @@ -0,0 +1,307 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.messaging.eventgrid.systemevents; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; +import java.util.Map; + +/** Schema of the Data property of an EventGridEvent for a Microsoft.AgFoodPlatform.FieldChanged event. */ +@Fluent +public final class AgriFoodFarmingFieldChangedEventData { + /* + * Farmer Id. + */ + @JsonProperty(value = "farmerId") + private String farmerId; + + /* + * Id of the associated Farm. + */ + @JsonProperty(value = "farmId") + private String farmId; + + /* + * Action occurred on a resource. + */ + @JsonProperty(value = "actionType") + private AgriFoodFarmingResourceActionType actionType; + + /* + * Status of the resource. + */ + @JsonProperty(value = "status") + private String status; + + /* + * Date-time when resource was last modified, sample format: + * yyyy-MM-ddTHH:mm:ssZ. + */ + @JsonProperty(value = "modifiedDateTime") + private OffsetDateTime modifiedDateTime; + + /* + * The ETag value to implement optimistic concurrency. + */ + @JsonProperty(value = "eTag") + private String eTag; + + /* + * Unique id of resource. + */ + @JsonProperty(value = "id") + private String id; + + /* + * Name to identify resource. + */ + @JsonProperty(value = "name") + private String name; + + /* + * Textual description of resource. + */ + @JsonProperty(value = "description") + private String description; + + /* + * Date-time when resource was created, sample format: + * yyyy-MM-ddTHH:mm:ssZ. + */ + @JsonProperty(value = "createdDateTime") + private OffsetDateTime createdDateTime; + + /* + * A list of key value pairs that describe the resource. + * Only string and numeral values are supported. + */ + @JsonProperty(value = "properties") + private Map properties; + + /** + * Get the farmerId property: Farmer Id. + * + * @return the farmerId value. + */ + public String getFarmerId() { + return this.farmerId; + } + + /** + * Set the farmerId property: Farmer Id. + * + * @param farmerId the farmerId value to set. + * @return the AgriFoodFarmingFieldChangedEventData object itself. + */ + public AgriFoodFarmingFieldChangedEventData setFarmerId(String farmerId) { + this.farmerId = farmerId; + return this; + } + + /** + * Get the farmId property: Id of the associated Farm. + * + * @return the farmId value. + */ + public String getFarmId() { + return this.farmId; + } + + /** + * Set the farmId property: Id of the associated Farm. + * + * @param farmId the farmId value to set. + * @return the AgriFoodFarmingFieldChangedEventData object itself. + */ + public AgriFoodFarmingFieldChangedEventData setFarmId(String farmId) { + this.farmId = farmId; + return this; + } + + /** + * Get the actionType property: Action occurred on a resource. + * + * @return the actionType value. + */ + public AgriFoodFarmingResourceActionType getActionType() { + return this.actionType; + } + + /** + * Set the actionType property: Action occurred on a resource. + * + * @param actionType the actionType value to set. + * @return the AgriFoodFarmingFieldChangedEventData object itself. + */ + public AgriFoodFarmingFieldChangedEventData setActionType(AgriFoodFarmingResourceActionType actionType) { + this.actionType = actionType; + return this; + } + + /** + * Get the status property: Status of the resource. + * + * @return the status value. + */ + public String getStatus() { + return this.status; + } + + /** + * Set the status property: Status of the resource. + * + * @param status the status value to set. + * @return the AgriFoodFarmingFieldChangedEventData object itself. + */ + public AgriFoodFarmingFieldChangedEventData setStatus(String status) { + this.status = status; + return this; + } + + /** + * Get the modifiedDateTime property: Date-time when resource was last modified, sample format: + * yyyy-MM-ddTHH:mm:ssZ. + * + * @return the modifiedDateTime value. + */ + public OffsetDateTime getModifiedDateTime() { + return this.modifiedDateTime; + } + + /** + * Set the modifiedDateTime property: Date-time when resource was last modified, sample format: + * yyyy-MM-ddTHH:mm:ssZ. + * + * @param modifiedDateTime the modifiedDateTime value to set. + * @return the AgriFoodFarmingFieldChangedEventData object itself. + */ + public AgriFoodFarmingFieldChangedEventData setModifiedDateTime(OffsetDateTime modifiedDateTime) { + this.modifiedDateTime = modifiedDateTime; + return this; + } + + /** + * Get the eTag property: The ETag value to implement optimistic concurrency. + * + * @return the eTag value. + */ + public String getETag() { + return this.eTag; + } + + /** + * Set the eTag property: The ETag value to implement optimistic concurrency. + * + * @param eTag the eTag value to set. + * @return the AgriFoodFarmingFieldChangedEventData object itself. + */ + public AgriFoodFarmingFieldChangedEventData setETag(String eTag) { + this.eTag = eTag; + return this; + } + + /** + * Get the id property: Unique id of resource. + * + * @return the id value. + */ + public String getId() { + return this.id; + } + + /** + * Set the id property: Unique id of resource. + * + * @param id the id value to set. + * @return the AgriFoodFarmingFieldChangedEventData object itself. + */ + public AgriFoodFarmingFieldChangedEventData setId(String id) { + this.id = id; + return this; + } + + /** + * Get the name property: Name to identify resource. + * + * @return the name value. + */ + public String getName() { + return this.name; + } + + /** + * Set the name property: Name to identify resource. + * + * @param name the name value to set. + * @return the AgriFoodFarmingFieldChangedEventData object itself. + */ + public AgriFoodFarmingFieldChangedEventData setName(String name) { + this.name = name; + return this; + } + + /** + * Get the description property: Textual description of resource. + * + * @return the description value. + */ + public String getDescription() { + return this.description; + } + + /** + * Set the description property: Textual description of resource. + * + * @param description the description value to set. + * @return the AgriFoodFarmingFieldChangedEventData object itself. + */ + public AgriFoodFarmingFieldChangedEventData setDescription(String description) { + this.description = description; + return this; + } + + /** + * Get the createdDateTime property: Date-time when resource was created, sample format: yyyy-MM-ddTHH:mm:ssZ. + * + * @return the createdDateTime value. + */ + public OffsetDateTime getCreatedDateTime() { + return this.createdDateTime; + } + + /** + * Set the createdDateTime property: Date-time when resource was created, sample format: yyyy-MM-ddTHH:mm:ssZ. + * + * @param createdDateTime the createdDateTime value to set. + * @return the AgriFoodFarmingFieldChangedEventData object itself. + */ + public AgriFoodFarmingFieldChangedEventData setCreatedDateTime(OffsetDateTime createdDateTime) { + this.createdDateTime = createdDateTime; + return this; + } + + /** + * Get the properties property: A list of key value pairs that describe the resource. Only string and numeral values + * are supported. + * + * @return the properties value. + */ + public Map getProperties() { + return this.properties; + } + + /** + * Set the properties property: A list of key value pairs that describe the resource. Only string and numeral values + * are supported. + * + * @param properties the properties value to set. + * @return the AgriFoodFarmingFieldChangedEventData object itself. + */ + public AgriFoodFarmingFieldChangedEventData setProperties(Map properties) { + this.properties = properties; + return this; + } +} diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AgriFoodFarmingHarvestDataChangedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AgriFoodFarmingHarvestDataChangedEventData.java new file mode 100644 index 000000000000..ae903a27b10d --- /dev/null +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AgriFoodFarmingHarvestDataChangedEventData.java @@ -0,0 +1,307 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.messaging.eventgrid.systemevents; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; +import java.util.Map; + +/** Schema of the Data property of an EventGridEvent for a Microsoft.AgFoodPlatform.HarvestDataChanged event. */ +@Fluent +public final class AgriFoodFarmingHarvestDataChangedEventData { + /* + * Action occurred on a resource. + */ + @JsonProperty(value = "actionType") + private AgriFoodFarmingResourceActionType actionType; + + /* + * Id of the farmer it belongs to. + */ + @JsonProperty(value = "farmerId") + private String farmerId; + + /* + * Status of the resource. + */ + @JsonProperty(value = "status") + private String status; + + /* + * Source of the farm operation data. + */ + @JsonProperty(value = "source") + private String source; + + /* + * Date-time when resource was last modified, sample format: + * yyyy-MM-ddTHH:mm:ssZ. + */ + @JsonProperty(value = "modifiedDateTime") + private OffsetDateTime modifiedDateTime; + + /* + * The ETag value to implement optimistic concurrency. + */ + @JsonProperty(value = "eTag") + private String eTag; + + /* + * Unique id of resource. + */ + @JsonProperty(value = "id") + private String id; + + /* + * Name to identify resource. + */ + @JsonProperty(value = "name") + private String name; + + /* + * Textual description of resource. + */ + @JsonProperty(value = "description") + private String description; + + /* + * Date-time when resource was created, sample format: + * yyyy-MM-ddTHH:mm:ssZ. + */ + @JsonProperty(value = "createdDateTime") + private OffsetDateTime createdDateTime; + + /* + * A list of key value pairs that describe the resource. + * Only string and numeral values are supported. + */ + @JsonProperty(value = "properties") + private Map properties; + + /** + * Get the actionType property: Action occurred on a resource. + * + * @return the actionType value. + */ + public AgriFoodFarmingResourceActionType getActionType() { + return this.actionType; + } + + /** + * Set the actionType property: Action occurred on a resource. + * + * @param actionType the actionType value to set. + * @return the AgriFoodFarmingHarvestDataChangedEventData object itself. + */ + public AgriFoodFarmingHarvestDataChangedEventData setActionType(AgriFoodFarmingResourceActionType actionType) { + this.actionType = actionType; + return this; + } + + /** + * Get the farmerId property: Id of the farmer it belongs to. + * + * @return the farmerId value. + */ + public String getFarmerId() { + return this.farmerId; + } + + /** + * Set the farmerId property: Id of the farmer it belongs to. + * + * @param farmerId the farmerId value to set. + * @return the AgriFoodFarmingHarvestDataChangedEventData object itself. + */ + public AgriFoodFarmingHarvestDataChangedEventData setFarmerId(String farmerId) { + this.farmerId = farmerId; + return this; + } + + /** + * Get the status property: Status of the resource. + * + * @return the status value. + */ + public String getStatus() { + return this.status; + } + + /** + * Set the status property: Status of the resource. + * + * @param status the status value to set. + * @return the AgriFoodFarmingHarvestDataChangedEventData object itself. + */ + public AgriFoodFarmingHarvestDataChangedEventData setStatus(String status) { + this.status = status; + return this; + } + + /** + * Get the source property: Source of the farm operation data. + * + * @return the source value. + */ + public String getSource() { + return this.source; + } + + /** + * Set the source property: Source of the farm operation data. + * + * @param source the source value to set. + * @return the AgriFoodFarmingHarvestDataChangedEventData object itself. + */ + public AgriFoodFarmingHarvestDataChangedEventData setSource(String source) { + this.source = source; + return this; + } + + /** + * Get the modifiedDateTime property: Date-time when resource was last modified, sample format: + * yyyy-MM-ddTHH:mm:ssZ. + * + * @return the modifiedDateTime value. + */ + public OffsetDateTime getModifiedDateTime() { + return this.modifiedDateTime; + } + + /** + * Set the modifiedDateTime property: Date-time when resource was last modified, sample format: + * yyyy-MM-ddTHH:mm:ssZ. + * + * @param modifiedDateTime the modifiedDateTime value to set. + * @return the AgriFoodFarmingHarvestDataChangedEventData object itself. + */ + public AgriFoodFarmingHarvestDataChangedEventData setModifiedDateTime(OffsetDateTime modifiedDateTime) { + this.modifiedDateTime = modifiedDateTime; + return this; + } + + /** + * Get the eTag property: The ETag value to implement optimistic concurrency. + * + * @return the eTag value. + */ + public String getETag() { + return this.eTag; + } + + /** + * Set the eTag property: The ETag value to implement optimistic concurrency. + * + * @param eTag the eTag value to set. + * @return the AgriFoodFarmingHarvestDataChangedEventData object itself. + */ + public AgriFoodFarmingHarvestDataChangedEventData setETag(String eTag) { + this.eTag = eTag; + return this; + } + + /** + * Get the id property: Unique id of resource. + * + * @return the id value. + */ + public String getId() { + return this.id; + } + + /** + * Set the id property: Unique id of resource. + * + * @param id the id value to set. + * @return the AgriFoodFarmingHarvestDataChangedEventData object itself. + */ + public AgriFoodFarmingHarvestDataChangedEventData setId(String id) { + this.id = id; + return this; + } + + /** + * Get the name property: Name to identify resource. + * + * @return the name value. + */ + public String getName() { + return this.name; + } + + /** + * Set the name property: Name to identify resource. + * + * @param name the name value to set. + * @return the AgriFoodFarmingHarvestDataChangedEventData object itself. + */ + public AgriFoodFarmingHarvestDataChangedEventData setName(String name) { + this.name = name; + return this; + } + + /** + * Get the description property: Textual description of resource. + * + * @return the description value. + */ + public String getDescription() { + return this.description; + } + + /** + * Set the description property: Textual description of resource. + * + * @param description the description value to set. + * @return the AgriFoodFarmingHarvestDataChangedEventData object itself. + */ + public AgriFoodFarmingHarvestDataChangedEventData setDescription(String description) { + this.description = description; + return this; + } + + /** + * Get the createdDateTime property: Date-time when resource was created, sample format: yyyy-MM-ddTHH:mm:ssZ. + * + * @return the createdDateTime value. + */ + public OffsetDateTime getCreatedDateTime() { + return this.createdDateTime; + } + + /** + * Set the createdDateTime property: Date-time when resource was created, sample format: yyyy-MM-ddTHH:mm:ssZ. + * + * @param createdDateTime the createdDateTime value to set. + * @return the AgriFoodFarmingHarvestDataChangedEventData object itself. + */ + public AgriFoodFarmingHarvestDataChangedEventData setCreatedDateTime(OffsetDateTime createdDateTime) { + this.createdDateTime = createdDateTime; + return this; + } + + /** + * Get the properties property: A list of key value pairs that describe the resource. Only string and numeral values + * are supported. + * + * @return the properties value. + */ + public Map getProperties() { + return this.properties; + } + + /** + * Set the properties property: A list of key value pairs that describe the resource. Only string and numeral values + * are supported. + * + * @param properties the properties value to set. + * @return the AgriFoodFarmingHarvestDataChangedEventData object itself. + */ + public AgriFoodFarmingHarvestDataChangedEventData setProperties(Map properties) { + this.properties = properties; + return this; + } +} diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AgriFoodFarmingJobStatus.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AgriFoodFarmingJobStatus.java new file mode 100644 index 000000000000..ffb5f3773059 --- /dev/null +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AgriFoodFarmingJobStatus.java @@ -0,0 +1,43 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.messaging.eventgrid.systemevents; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Defines values for AgriFoodFarmingJobStatus. */ +public final class AgriFoodFarmingJobStatus extends ExpandableStringEnum { + /** Static value Waiting for AgriFoodFarmingJobStatus. */ + public static final AgriFoodFarmingJobStatus WAITING = fromString("Waiting"); + + /** Static value Running for AgriFoodFarmingJobStatus. */ + public static final AgriFoodFarmingJobStatus RUNNING = fromString("Running"); + + /** Static value Succeeded for AgriFoodFarmingJobStatus. */ + public static final AgriFoodFarmingJobStatus SUCCEEDED = fromString("Succeeded"); + + /** Static value Failed for AgriFoodFarmingJobStatus. */ + public static final AgriFoodFarmingJobStatus FAILED = fromString("Failed"); + + /** Static value Cancelled for AgriFoodFarmingJobStatus. */ + public static final AgriFoodFarmingJobStatus CANCELLED = fromString("Cancelled"); + + /** + * Creates or finds a AgriFoodFarmingJobStatus from its string representation. + * + * @param name a name to look for. + * @return the corresponding AgriFoodFarmingJobStatus. + */ + @JsonCreator + public static AgriFoodFarmingJobStatus fromString(String name) { + return fromString(name, AgriFoodFarmingJobStatus.class); + } + + /** @return known AgriFoodFarmingJobStatus values. */ + public static Collection values() { + return values(AgriFoodFarmingJobStatus.class); + } +} diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AgriFoodFarmingPlantingDataChangedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AgriFoodFarmingPlantingDataChangedEventData.java new file mode 100644 index 000000000000..8ecc13b9134d --- /dev/null +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AgriFoodFarmingPlantingDataChangedEventData.java @@ -0,0 +1,307 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.messaging.eventgrid.systemevents; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; +import java.util.Map; + +/** Schema of the Data property of an EventGridEvent for a Microsoft.AgFoodPlatform.PlantingDataChanged event. */ +@Fluent +public final class AgriFoodFarmingPlantingDataChangedEventData { + /* + * Action occurred on a resource. + */ + @JsonProperty(value = "actionType") + private AgriFoodFarmingResourceActionType actionType; + + /* + * Id of the farmer it belongs to. + */ + @JsonProperty(value = "farmerId") + private String farmerId; + + /* + * Status of the resource. + */ + @JsonProperty(value = "status") + private String status; + + /* + * Source of the farm operation data. + */ + @JsonProperty(value = "source") + private String source; + + /* + * Date-time when resource was last modified, sample format: + * yyyy-MM-ddTHH:mm:ssZ. + */ + @JsonProperty(value = "modifiedDateTime") + private OffsetDateTime modifiedDateTime; + + /* + * The ETag value to implement optimistic concurrency. + */ + @JsonProperty(value = "eTag") + private String eTag; + + /* + * Unique id of resource. + */ + @JsonProperty(value = "id") + private String id; + + /* + * Name to identify resource. + */ + @JsonProperty(value = "name") + private String name; + + /* + * Textual description of resource. + */ + @JsonProperty(value = "description") + private String description; + + /* + * Date-time when resource was created, sample format: + * yyyy-MM-ddTHH:mm:ssZ. + */ + @JsonProperty(value = "createdDateTime") + private OffsetDateTime createdDateTime; + + /* + * A list of key value pairs that describe the resource. + * Only string and numeral values are supported. + */ + @JsonProperty(value = "properties") + private Map properties; + + /** + * Get the actionType property: Action occurred on a resource. + * + * @return the actionType value. + */ + public AgriFoodFarmingResourceActionType getActionType() { + return this.actionType; + } + + /** + * Set the actionType property: Action occurred on a resource. + * + * @param actionType the actionType value to set. + * @return the AgriFoodFarmingPlantingDataChangedEventData object itself. + */ + public AgriFoodFarmingPlantingDataChangedEventData setActionType(AgriFoodFarmingResourceActionType actionType) { + this.actionType = actionType; + return this; + } + + /** + * Get the farmerId property: Id of the farmer it belongs to. + * + * @return the farmerId value. + */ + public String getFarmerId() { + return this.farmerId; + } + + /** + * Set the farmerId property: Id of the farmer it belongs to. + * + * @param farmerId the farmerId value to set. + * @return the AgriFoodFarmingPlantingDataChangedEventData object itself. + */ + public AgriFoodFarmingPlantingDataChangedEventData setFarmerId(String farmerId) { + this.farmerId = farmerId; + return this; + } + + /** + * Get the status property: Status of the resource. + * + * @return the status value. + */ + public String getStatus() { + return this.status; + } + + /** + * Set the status property: Status of the resource. + * + * @param status the status value to set. + * @return the AgriFoodFarmingPlantingDataChangedEventData object itself. + */ + public AgriFoodFarmingPlantingDataChangedEventData setStatus(String status) { + this.status = status; + return this; + } + + /** + * Get the source property: Source of the farm operation data. + * + * @return the source value. + */ + public String getSource() { + return this.source; + } + + /** + * Set the source property: Source of the farm operation data. + * + * @param source the source value to set. + * @return the AgriFoodFarmingPlantingDataChangedEventData object itself. + */ + public AgriFoodFarmingPlantingDataChangedEventData setSource(String source) { + this.source = source; + return this; + } + + /** + * Get the modifiedDateTime property: Date-time when resource was last modified, sample format: + * yyyy-MM-ddTHH:mm:ssZ. + * + * @return the modifiedDateTime value. + */ + public OffsetDateTime getModifiedDateTime() { + return this.modifiedDateTime; + } + + /** + * Set the modifiedDateTime property: Date-time when resource was last modified, sample format: + * yyyy-MM-ddTHH:mm:ssZ. + * + * @param modifiedDateTime the modifiedDateTime value to set. + * @return the AgriFoodFarmingPlantingDataChangedEventData object itself. + */ + public AgriFoodFarmingPlantingDataChangedEventData setModifiedDateTime(OffsetDateTime modifiedDateTime) { + this.modifiedDateTime = modifiedDateTime; + return this; + } + + /** + * Get the eTag property: The ETag value to implement optimistic concurrency. + * + * @return the eTag value. + */ + public String getETag() { + return this.eTag; + } + + /** + * Set the eTag property: The ETag value to implement optimistic concurrency. + * + * @param eTag the eTag value to set. + * @return the AgriFoodFarmingPlantingDataChangedEventData object itself. + */ + public AgriFoodFarmingPlantingDataChangedEventData setETag(String eTag) { + this.eTag = eTag; + return this; + } + + /** + * Get the id property: Unique id of resource. + * + * @return the id value. + */ + public String getId() { + return this.id; + } + + /** + * Set the id property: Unique id of resource. + * + * @param id the id value to set. + * @return the AgriFoodFarmingPlantingDataChangedEventData object itself. + */ + public AgriFoodFarmingPlantingDataChangedEventData setId(String id) { + this.id = id; + return this; + } + + /** + * Get the name property: Name to identify resource. + * + * @return the name value. + */ + public String getName() { + return this.name; + } + + /** + * Set the name property: Name to identify resource. + * + * @param name the name value to set. + * @return the AgriFoodFarmingPlantingDataChangedEventData object itself. + */ + public AgriFoodFarmingPlantingDataChangedEventData setName(String name) { + this.name = name; + return this; + } + + /** + * Get the description property: Textual description of resource. + * + * @return the description value. + */ + public String getDescription() { + return this.description; + } + + /** + * Set the description property: Textual description of resource. + * + * @param description the description value to set. + * @return the AgriFoodFarmingPlantingDataChangedEventData object itself. + */ + public AgriFoodFarmingPlantingDataChangedEventData setDescription(String description) { + this.description = description; + return this; + } + + /** + * Get the createdDateTime property: Date-time when resource was created, sample format: yyyy-MM-ddTHH:mm:ssZ. + * + * @return the createdDateTime value. + */ + public OffsetDateTime getCreatedDateTime() { + return this.createdDateTime; + } + + /** + * Set the createdDateTime property: Date-time when resource was created, sample format: yyyy-MM-ddTHH:mm:ssZ. + * + * @param createdDateTime the createdDateTime value to set. + * @return the AgriFoodFarmingPlantingDataChangedEventData object itself. + */ + public AgriFoodFarmingPlantingDataChangedEventData setCreatedDateTime(OffsetDateTime createdDateTime) { + this.createdDateTime = createdDateTime; + return this; + } + + /** + * Get the properties property: A list of key value pairs that describe the resource. Only string and numeral values + * are supported. + * + * @return the properties value. + */ + public Map getProperties() { + return this.properties; + } + + /** + * Set the properties property: A list of key value pairs that describe the resource. Only string and numeral values + * are supported. + * + * @param properties the properties value to set. + * @return the AgriFoodFarmingPlantingDataChangedEventData object itself. + */ + public AgriFoodFarmingPlantingDataChangedEventData setProperties(Map properties) { + this.properties = properties; + return this; + } +} diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AgriFoodFarmingResourceActionType.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AgriFoodFarmingResourceActionType.java new file mode 100644 index 000000000000..9c32c05ac5a0 --- /dev/null +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AgriFoodFarmingResourceActionType.java @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.messaging.eventgrid.systemevents; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Defines values for AgriFoodFarmingResourceActionType. */ +public final class AgriFoodFarmingResourceActionType extends ExpandableStringEnum { + /** Static value Created for AgriFoodFarmingResourceActionType. */ + public static final AgriFoodFarmingResourceActionType CREATED = fromString("Created"); + + /** Static value Updated for AgriFoodFarmingResourceActionType. */ + public static final AgriFoodFarmingResourceActionType UPDATED = fromString("Updated"); + + /** Static value Deleted for AgriFoodFarmingResourceActionType. */ + public static final AgriFoodFarmingResourceActionType DELETED = fromString("Deleted"); + + /** + * Creates or finds a AgriFoodFarmingResourceActionType from its string representation. + * + * @param name a name to look for. + * @return the corresponding AgriFoodFarmingResourceActionType. + */ + @JsonCreator + public static AgriFoodFarmingResourceActionType fromString(String name) { + return fromString(name, AgriFoodFarmingResourceActionType.class); + } + + /** @return known AgriFoodFarmingResourceActionType values. */ + public static Collection values() { + return values(AgriFoodFarmingResourceActionType.class); + } +} diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AgriFoodFarmingSatelliteDataIngestionJobStatusChangedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AgriFoodFarmingSatelliteDataIngestionJobStatusChangedEventData.java new file mode 100644 index 000000000000..b02d5257be1f --- /dev/null +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AgriFoodFarmingSatelliteDataIngestionJobStatusChangedEventData.java @@ -0,0 +1,288 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.messaging.eventgrid.systemevents; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; +import java.util.Map; + +/** + * Schema of the Data property of an EventGridEvent for a + * Microsoft.AgFoodPlatform.SatelliteDataIngestionJobStatusChanged event. + */ +@Fluent +public final class AgriFoodFarmingSatelliteDataIngestionJobStatusChangedEventData { + /* + * Farmer id for which job was created. + */ + @JsonProperty(value = "farmerId") + private String farmerId; + + /* + * Status message to capture more details of the job. + */ + @JsonProperty(value = "message") + private String message; + + /* + * Various states a job can be in. + */ + @JsonProperty(value = "status") + private AgriFoodFarmingJobStatus status; + + /* + * Date-time when last action was taken on job, sample format: + * yyyy-MM-ddTHH:mm:ssZ. + */ + @JsonProperty(value = "lastActionDateTime") + private OffsetDateTime lastActionDateTime; + + /* + * Flag that gets set when job cancellation is requested. + */ + @JsonProperty(value = "isCancellationRequested") + private Boolean isCancellationRequested; + + /* + * Unique id of resource. + */ + @JsonProperty(value = "id") + private String id; + + /* + * Name to identify resource. + */ + @JsonProperty(value = "name") + private String name; + + /* + * Textual description of resource. + */ + @JsonProperty(value = "description") + private String description; + + /* + * Date-time when resource was created, sample format: + * yyyy-MM-ddTHH:mm:ssZ. + */ + @JsonProperty(value = "createdDateTime") + private OffsetDateTime createdDateTime; + + /* + * A list of key value pairs that describe the resource. + * Only string and numeral values are supported. + */ + @JsonProperty(value = "properties") + private Map properties; + + /** + * Get the farmerId property: Farmer id for which job was created. + * + * @return the farmerId value. + */ + public String getFarmerId() { + return this.farmerId; + } + + /** + * Set the farmerId property: Farmer id for which job was created. + * + * @param farmerId the farmerId value to set. + * @return the AgriFoodFarmingSatelliteDataIngestionJobStatusChangedEventData object itself. + */ + public AgriFoodFarmingSatelliteDataIngestionJobStatusChangedEventData setFarmerId(String farmerId) { + this.farmerId = farmerId; + return this; + } + + /** + * Get the message property: Status message to capture more details of the job. + * + * @return the message value. + */ + public String getMessage() { + return this.message; + } + + /** + * Set the message property: Status message to capture more details of the job. + * + * @param message the message value to set. + * @return the AgriFoodFarmingSatelliteDataIngestionJobStatusChangedEventData object itself. + */ + public AgriFoodFarmingSatelliteDataIngestionJobStatusChangedEventData setMessage(String message) { + this.message = message; + return this; + } + + /** + * Get the status property: Various states a job can be in. + * + * @return the status value. + */ + public AgriFoodFarmingJobStatus getStatus() { + return this.status; + } + + /** + * Set the status property: Various states a job can be in. + * + * @param status the status value to set. + * @return the AgriFoodFarmingSatelliteDataIngestionJobStatusChangedEventData object itself. + */ + public AgriFoodFarmingSatelliteDataIngestionJobStatusChangedEventData setStatus(AgriFoodFarmingJobStatus status) { + this.status = status; + return this; + } + + /** + * Get the lastActionDateTime property: Date-time when last action was taken on job, sample format: + * yyyy-MM-ddTHH:mm:ssZ. + * + * @return the lastActionDateTime value. + */ + public OffsetDateTime getLastActionDateTime() { + return this.lastActionDateTime; + } + + /** + * Set the lastActionDateTime property: Date-time when last action was taken on job, sample format: + * yyyy-MM-ddTHH:mm:ssZ. + * + * @param lastActionDateTime the lastActionDateTime value to set. + * @return the AgriFoodFarmingSatelliteDataIngestionJobStatusChangedEventData object itself. + */ + public AgriFoodFarmingSatelliteDataIngestionJobStatusChangedEventData setLastActionDateTime( + OffsetDateTime lastActionDateTime) { + this.lastActionDateTime = lastActionDateTime; + return this; + } + + /** + * Get the isCancellationRequested property: Flag that gets set when job cancellation is requested. + * + * @return the isCancellationRequested value. + */ + public Boolean isCancellationRequested() { + return this.isCancellationRequested; + } + + /** + * Set the isCancellationRequested property: Flag that gets set when job cancellation is requested. + * + * @param isCancellationRequested the isCancellationRequested value to set. + * @return the AgriFoodFarmingSatelliteDataIngestionJobStatusChangedEventData object itself. + */ + public AgriFoodFarmingSatelliteDataIngestionJobStatusChangedEventData setIsCancellationRequested( + Boolean isCancellationRequested) { + this.isCancellationRequested = isCancellationRequested; + return this; + } + + /** + * Get the id property: Unique id of resource. + * + * @return the id value. + */ + public String getId() { + return this.id; + } + + /** + * Set the id property: Unique id of resource. + * + * @param id the id value to set. + * @return the AgriFoodFarmingSatelliteDataIngestionJobStatusChangedEventData object itself. + */ + public AgriFoodFarmingSatelliteDataIngestionJobStatusChangedEventData setId(String id) { + this.id = id; + return this; + } + + /** + * Get the name property: Name to identify resource. + * + * @return the name value. + */ + public String getName() { + return this.name; + } + + /** + * Set the name property: Name to identify resource. + * + * @param name the name value to set. + * @return the AgriFoodFarmingSatelliteDataIngestionJobStatusChangedEventData object itself. + */ + public AgriFoodFarmingSatelliteDataIngestionJobStatusChangedEventData setName(String name) { + this.name = name; + return this; + } + + /** + * Get the description property: Textual description of resource. + * + * @return the description value. + */ + public String getDescription() { + return this.description; + } + + /** + * Set the description property: Textual description of resource. + * + * @param description the description value to set. + * @return the AgriFoodFarmingSatelliteDataIngestionJobStatusChangedEventData object itself. + */ + public AgriFoodFarmingSatelliteDataIngestionJobStatusChangedEventData setDescription(String description) { + this.description = description; + return this; + } + + /** + * Get the createdDateTime property: Date-time when resource was created, sample format: yyyy-MM-ddTHH:mm:ssZ. + * + * @return the createdDateTime value. + */ + public OffsetDateTime getCreatedDateTime() { + return this.createdDateTime; + } + + /** + * Set the createdDateTime property: Date-time when resource was created, sample format: yyyy-MM-ddTHH:mm:ssZ. + * + * @param createdDateTime the createdDateTime value to set. + * @return the AgriFoodFarmingSatelliteDataIngestionJobStatusChangedEventData object itself. + */ + public AgriFoodFarmingSatelliteDataIngestionJobStatusChangedEventData setCreatedDateTime( + OffsetDateTime createdDateTime) { + this.createdDateTime = createdDateTime; + return this; + } + + /** + * Get the properties property: A list of key value pairs that describe the resource. Only string and numeral values + * are supported. + * + * @return the properties value. + */ + public Map getProperties() { + return this.properties; + } + + /** + * Set the properties property: A list of key value pairs that describe the resource. Only string and numeral values + * are supported. + * + * @param properties the properties value to set. + * @return the AgriFoodFarmingSatelliteDataIngestionJobStatusChangedEventData object itself. + */ + public AgriFoodFarmingSatelliteDataIngestionJobStatusChangedEventData setProperties( + Map properties) { + this.properties = properties; + return this; + } +} diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AgriFoodFarmingSeasonChangedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AgriFoodFarmingSeasonChangedEventData.java new file mode 100644 index 000000000000..3b1f73825718 --- /dev/null +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AgriFoodFarmingSeasonChangedEventData.java @@ -0,0 +1,255 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.messaging.eventgrid.systemevents; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; +import java.util.Map; + +/** Schema of the Data property of an EventGridEvent for a Microsoft.AgFoodPlatform.SeasonChanged event. */ +@Fluent +public final class AgriFoodFarmingSeasonChangedEventData { + /* + * Action occurred on a resource. + */ + @JsonProperty(value = "actionType") + private AgriFoodFarmingResourceActionType actionType; + + /* + * Status of the resource. + */ + @JsonProperty(value = "status") + private String status; + + /* + * Date-time when resource was last modified, sample format: + * yyyy-MM-ddTHH:mm:ssZ. + */ + @JsonProperty(value = "modifiedDateTime") + private OffsetDateTime modifiedDateTime; + + /* + * The ETag value to implement optimistic concurrency. + */ + @JsonProperty(value = "eTag") + private String eTag; + + /* + * Unique id of resource. + */ + @JsonProperty(value = "id") + private String id; + + /* + * Name to identify resource. + */ + @JsonProperty(value = "name") + private String name; + + /* + * Textual description of resource. + */ + @JsonProperty(value = "description") + private String description; + + /* + * Date-time when resource was created, sample format: + * yyyy-MM-ddTHH:mm:ssZ. + */ + @JsonProperty(value = "createdDateTime") + private OffsetDateTime createdDateTime; + + /* + * A list of key value pairs that describe the resource. + * Only string and numeral values are supported. + */ + @JsonProperty(value = "properties") + private Map properties; + + /** + * Get the actionType property: Action occurred on a resource. + * + * @return the actionType value. + */ + public AgriFoodFarmingResourceActionType getActionType() { + return this.actionType; + } + + /** + * Set the actionType property: Action occurred on a resource. + * + * @param actionType the actionType value to set. + * @return the AgriFoodFarmingSeasonChangedEventData object itself. + */ + public AgriFoodFarmingSeasonChangedEventData setActionType(AgriFoodFarmingResourceActionType actionType) { + this.actionType = actionType; + return this; + } + + /** + * Get the status property: Status of the resource. + * + * @return the status value. + */ + public String getStatus() { + return this.status; + } + + /** + * Set the status property: Status of the resource. + * + * @param status the status value to set. + * @return the AgriFoodFarmingSeasonChangedEventData object itself. + */ + public AgriFoodFarmingSeasonChangedEventData setStatus(String status) { + this.status = status; + return this; + } + + /** + * Get the modifiedDateTime property: Date-time when resource was last modified, sample format: + * yyyy-MM-ddTHH:mm:ssZ. + * + * @return the modifiedDateTime value. + */ + public OffsetDateTime getModifiedDateTime() { + return this.modifiedDateTime; + } + + /** + * Set the modifiedDateTime property: Date-time when resource was last modified, sample format: + * yyyy-MM-ddTHH:mm:ssZ. + * + * @param modifiedDateTime the modifiedDateTime value to set. + * @return the AgriFoodFarmingSeasonChangedEventData object itself. + */ + public AgriFoodFarmingSeasonChangedEventData setModifiedDateTime(OffsetDateTime modifiedDateTime) { + this.modifiedDateTime = modifiedDateTime; + return this; + } + + /** + * Get the eTag property: The ETag value to implement optimistic concurrency. + * + * @return the eTag value. + */ + public String getETag() { + return this.eTag; + } + + /** + * Set the eTag property: The ETag value to implement optimistic concurrency. + * + * @param eTag the eTag value to set. + * @return the AgriFoodFarmingSeasonChangedEventData object itself. + */ + public AgriFoodFarmingSeasonChangedEventData setETag(String eTag) { + this.eTag = eTag; + return this; + } + + /** + * Get the id property: Unique id of resource. + * + * @return the id value. + */ + public String getId() { + return this.id; + } + + /** + * Set the id property: Unique id of resource. + * + * @param id the id value to set. + * @return the AgriFoodFarmingSeasonChangedEventData object itself. + */ + public AgriFoodFarmingSeasonChangedEventData setId(String id) { + this.id = id; + return this; + } + + /** + * Get the name property: Name to identify resource. + * + * @return the name value. + */ + public String getName() { + return this.name; + } + + /** + * Set the name property: Name to identify resource. + * + * @param name the name value to set. + * @return the AgriFoodFarmingSeasonChangedEventData object itself. + */ + public AgriFoodFarmingSeasonChangedEventData setName(String name) { + this.name = name; + return this; + } + + /** + * Get the description property: Textual description of resource. + * + * @return the description value. + */ + public String getDescription() { + return this.description; + } + + /** + * Set the description property: Textual description of resource. + * + * @param description the description value to set. + * @return the AgriFoodFarmingSeasonChangedEventData object itself. + */ + public AgriFoodFarmingSeasonChangedEventData setDescription(String description) { + this.description = description; + return this; + } + + /** + * Get the createdDateTime property: Date-time when resource was created, sample format: yyyy-MM-ddTHH:mm:ssZ. + * + * @return the createdDateTime value. + */ + public OffsetDateTime getCreatedDateTime() { + return this.createdDateTime; + } + + /** + * Set the createdDateTime property: Date-time when resource was created, sample format: yyyy-MM-ddTHH:mm:ssZ. + * + * @param createdDateTime the createdDateTime value to set. + * @return the AgriFoodFarmingSeasonChangedEventData object itself. + */ + public AgriFoodFarmingSeasonChangedEventData setCreatedDateTime(OffsetDateTime createdDateTime) { + this.createdDateTime = createdDateTime; + return this; + } + + /** + * Get the properties property: A list of key value pairs that describe the resource. Only string and numeral values + * are supported. + * + * @return the properties value. + */ + public Map getProperties() { + return this.properties; + } + + /** + * Set the properties property: A list of key value pairs that describe the resource. Only string and numeral values + * are supported. + * + * @param properties the properties value to set. + * @return the AgriFoodFarmingSeasonChangedEventData object itself. + */ + public AgriFoodFarmingSeasonChangedEventData setProperties(Map properties) { + this.properties = properties; + return this; + } +} diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AgriFoodFarmingSeasonalFieldChangedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AgriFoodFarmingSeasonalFieldChangedEventData.java new file mode 100644 index 000000000000..653cf1a78a65 --- /dev/null +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AgriFoodFarmingSeasonalFieldChangedEventData.java @@ -0,0 +1,359 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.messaging.eventgrid.systemevents; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; +import java.util.Map; + +/** Schema of the Data property of an EventGridEvent for a Microsoft.AgFoodPlatform.SeasonalFieldChanged event. */ +@Fluent +public final class AgriFoodFarmingSeasonalFieldChangedEventData { + /* + * Id of the farmer it belongs to. + */ + @JsonProperty(value = "farmerId") + private String farmerId; + + /* + * Id of the season it belongs to. + */ + @JsonProperty(value = "seasonId") + private String seasonId; + + /* + * Id of the field it belongs to. + */ + @JsonProperty(value = "fieldId") + private String fieldId; + + /* + * Id of the associated Farm. + */ + @JsonProperty(value = "farmId") + private String farmId; + + /* + * Action occurred on a resource. + */ + @JsonProperty(value = "actionType") + private AgriFoodFarmingResourceActionType actionType; + + /* + * Status of the resource. + */ + @JsonProperty(value = "status") + private String status; + + /* + * Date-time when resource was last modified, sample format: + * yyyy-MM-ddTHH:mm:ssZ. + */ + @JsonProperty(value = "modifiedDateTime") + private OffsetDateTime modifiedDateTime; + + /* + * The ETag value to implement optimistic concurrency. + */ + @JsonProperty(value = "eTag") + private String eTag; + + /* + * Unique id of resource. + */ + @JsonProperty(value = "id") + private String id; + + /* + * Name to identify resource. + */ + @JsonProperty(value = "name") + private String name; + + /* + * Textual description of resource. + */ + @JsonProperty(value = "description") + private String description; + + /* + * Date-time when resource was created, sample format: + * yyyy-MM-ddTHH:mm:ssZ. + */ + @JsonProperty(value = "createdDateTime") + private OffsetDateTime createdDateTime; + + /* + * A list of key value pairs that describe the resource. + * Only string and numeral values are supported. + */ + @JsonProperty(value = "properties") + private Map properties; + + /** + * Get the farmerId property: Id of the farmer it belongs to. + * + * @return the farmerId value. + */ + public String getFarmerId() { + return this.farmerId; + } + + /** + * Set the farmerId property: Id of the farmer it belongs to. + * + * @param farmerId the farmerId value to set. + * @return the AgriFoodFarmingSeasonalFieldChangedEventData object itself. + */ + public AgriFoodFarmingSeasonalFieldChangedEventData setFarmerId(String farmerId) { + this.farmerId = farmerId; + return this; + } + + /** + * Get the seasonId property: Id of the season it belongs to. + * + * @return the seasonId value. + */ + public String getSeasonId() { + return this.seasonId; + } + + /** + * Set the seasonId property: Id of the season it belongs to. + * + * @param seasonId the seasonId value to set. + * @return the AgriFoodFarmingSeasonalFieldChangedEventData object itself. + */ + public AgriFoodFarmingSeasonalFieldChangedEventData setSeasonId(String seasonId) { + this.seasonId = seasonId; + return this; + } + + /** + * Get the fieldId property: Id of the field it belongs to. + * + * @return the fieldId value. + */ + public String getFieldId() { + return this.fieldId; + } + + /** + * Set the fieldId property: Id of the field it belongs to. + * + * @param fieldId the fieldId value to set. + * @return the AgriFoodFarmingSeasonalFieldChangedEventData object itself. + */ + public AgriFoodFarmingSeasonalFieldChangedEventData setFieldId(String fieldId) { + this.fieldId = fieldId; + return this; + } + + /** + * Get the farmId property: Id of the associated Farm. + * + * @return the farmId value. + */ + public String getFarmId() { + return this.farmId; + } + + /** + * Set the farmId property: Id of the associated Farm. + * + * @param farmId the farmId value to set. + * @return the AgriFoodFarmingSeasonalFieldChangedEventData object itself. + */ + public AgriFoodFarmingSeasonalFieldChangedEventData setFarmId(String farmId) { + this.farmId = farmId; + return this; + } + + /** + * Get the actionType property: Action occurred on a resource. + * + * @return the actionType value. + */ + public AgriFoodFarmingResourceActionType getActionType() { + return this.actionType; + } + + /** + * Set the actionType property: Action occurred on a resource. + * + * @param actionType the actionType value to set. + * @return the AgriFoodFarmingSeasonalFieldChangedEventData object itself. + */ + public AgriFoodFarmingSeasonalFieldChangedEventData setActionType(AgriFoodFarmingResourceActionType actionType) { + this.actionType = actionType; + return this; + } + + /** + * Get the status property: Status of the resource. + * + * @return the status value. + */ + public String getStatus() { + return this.status; + } + + /** + * Set the status property: Status of the resource. + * + * @param status the status value to set. + * @return the AgriFoodFarmingSeasonalFieldChangedEventData object itself. + */ + public AgriFoodFarmingSeasonalFieldChangedEventData setStatus(String status) { + this.status = status; + return this; + } + + /** + * Get the modifiedDateTime property: Date-time when resource was last modified, sample format: + * yyyy-MM-ddTHH:mm:ssZ. + * + * @return the modifiedDateTime value. + */ + public OffsetDateTime getModifiedDateTime() { + return this.modifiedDateTime; + } + + /** + * Set the modifiedDateTime property: Date-time when resource was last modified, sample format: + * yyyy-MM-ddTHH:mm:ssZ. + * + * @param modifiedDateTime the modifiedDateTime value to set. + * @return the AgriFoodFarmingSeasonalFieldChangedEventData object itself. + */ + public AgriFoodFarmingSeasonalFieldChangedEventData setModifiedDateTime(OffsetDateTime modifiedDateTime) { + this.modifiedDateTime = modifiedDateTime; + return this; + } + + /** + * Get the eTag property: The ETag value to implement optimistic concurrency. + * + * @return the eTag value. + */ + public String getETag() { + return this.eTag; + } + + /** + * Set the eTag property: The ETag value to implement optimistic concurrency. + * + * @param eTag the eTag value to set. + * @return the AgriFoodFarmingSeasonalFieldChangedEventData object itself. + */ + public AgriFoodFarmingSeasonalFieldChangedEventData setETag(String eTag) { + this.eTag = eTag; + return this; + } + + /** + * Get the id property: Unique id of resource. + * + * @return the id value. + */ + public String getId() { + return this.id; + } + + /** + * Set the id property: Unique id of resource. + * + * @param id the id value to set. + * @return the AgriFoodFarmingSeasonalFieldChangedEventData object itself. + */ + public AgriFoodFarmingSeasonalFieldChangedEventData setId(String id) { + this.id = id; + return this; + } + + /** + * Get the name property: Name to identify resource. + * + * @return the name value. + */ + public String getName() { + return this.name; + } + + /** + * Set the name property: Name to identify resource. + * + * @param name the name value to set. + * @return the AgriFoodFarmingSeasonalFieldChangedEventData object itself. + */ + public AgriFoodFarmingSeasonalFieldChangedEventData setName(String name) { + this.name = name; + return this; + } + + /** + * Get the description property: Textual description of resource. + * + * @return the description value. + */ + public String getDescription() { + return this.description; + } + + /** + * Set the description property: Textual description of resource. + * + * @param description the description value to set. + * @return the AgriFoodFarmingSeasonalFieldChangedEventData object itself. + */ + public AgriFoodFarmingSeasonalFieldChangedEventData setDescription(String description) { + this.description = description; + return this; + } + + /** + * Get the createdDateTime property: Date-time when resource was created, sample format: yyyy-MM-ddTHH:mm:ssZ. + * + * @return the createdDateTime value. + */ + public OffsetDateTime getCreatedDateTime() { + return this.createdDateTime; + } + + /** + * Set the createdDateTime property: Date-time when resource was created, sample format: yyyy-MM-ddTHH:mm:ssZ. + * + * @param createdDateTime the createdDateTime value to set. + * @return the AgriFoodFarmingSeasonalFieldChangedEventData object itself. + */ + public AgriFoodFarmingSeasonalFieldChangedEventData setCreatedDateTime(OffsetDateTime createdDateTime) { + this.createdDateTime = createdDateTime; + return this; + } + + /** + * Get the properties property: A list of key value pairs that describe the resource. Only string and numeral values + * are supported. + * + * @return the properties value. + */ + public Map getProperties() { + return this.properties; + } + + /** + * Set the properties property: A list of key value pairs that describe the resource. Only string and numeral values + * are supported. + * + * @param properties the properties value to set. + * @return the AgriFoodFarmingSeasonalFieldChangedEventData object itself. + */ + public AgriFoodFarmingSeasonalFieldChangedEventData setProperties(Map properties) { + this.properties = properties; + return this; + } +} diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AgriFoodFarmingTillageDataChangedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AgriFoodFarmingTillageDataChangedEventData.java new file mode 100644 index 000000000000..f5c7fededa91 --- /dev/null +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AgriFoodFarmingTillageDataChangedEventData.java @@ -0,0 +1,307 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.messaging.eventgrid.systemevents; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; +import java.util.Map; + +/** Schema of the Data property of an EventGridEvent for a Microsoft.AgFoodPlatform.TillageDataChanged event. */ +@Fluent +public final class AgriFoodFarmingTillageDataChangedEventData { + /* + * Action occurred on a resource. + */ + @JsonProperty(value = "actionType") + private AgriFoodFarmingResourceActionType actionType; + + /* + * Id of the farmer it belongs to. + */ + @JsonProperty(value = "farmerId") + private String farmerId; + + /* + * Status of the resource. + */ + @JsonProperty(value = "status") + private String status; + + /* + * Source of the farm operation data. + */ + @JsonProperty(value = "source") + private String source; + + /* + * Date-time when resource was last modified, sample format: + * yyyy-MM-ddTHH:mm:ssZ. + */ + @JsonProperty(value = "modifiedDateTime") + private OffsetDateTime modifiedDateTime; + + /* + * The ETag value to implement optimistic concurrency. + */ + @JsonProperty(value = "eTag") + private String eTag; + + /* + * Unique id of resource. + */ + @JsonProperty(value = "id") + private String id; + + /* + * Name to identify resource. + */ + @JsonProperty(value = "name") + private String name; + + /* + * Textual description of resource. + */ + @JsonProperty(value = "description") + private String description; + + /* + * Date-time when resource was created, sample format: + * yyyy-MM-ddTHH:mm:ssZ. + */ + @JsonProperty(value = "createdDateTime") + private OffsetDateTime createdDateTime; + + /* + * A list of key value pairs that describe the resource. + * Only string and numeral values are supported. + */ + @JsonProperty(value = "properties") + private Map properties; + + /** + * Get the actionType property: Action occurred on a resource. + * + * @return the actionType value. + */ + public AgriFoodFarmingResourceActionType getActionType() { + return this.actionType; + } + + /** + * Set the actionType property: Action occurred on a resource. + * + * @param actionType the actionType value to set. + * @return the AgriFoodFarmingTillageDataChangedEventData object itself. + */ + public AgriFoodFarmingTillageDataChangedEventData setActionType(AgriFoodFarmingResourceActionType actionType) { + this.actionType = actionType; + return this; + } + + /** + * Get the farmerId property: Id of the farmer it belongs to. + * + * @return the farmerId value. + */ + public String getFarmerId() { + return this.farmerId; + } + + /** + * Set the farmerId property: Id of the farmer it belongs to. + * + * @param farmerId the farmerId value to set. + * @return the AgriFoodFarmingTillageDataChangedEventData object itself. + */ + public AgriFoodFarmingTillageDataChangedEventData setFarmerId(String farmerId) { + this.farmerId = farmerId; + return this; + } + + /** + * Get the status property: Status of the resource. + * + * @return the status value. + */ + public String getStatus() { + return this.status; + } + + /** + * Set the status property: Status of the resource. + * + * @param status the status value to set. + * @return the AgriFoodFarmingTillageDataChangedEventData object itself. + */ + public AgriFoodFarmingTillageDataChangedEventData setStatus(String status) { + this.status = status; + return this; + } + + /** + * Get the source property: Source of the farm operation data. + * + * @return the source value. + */ + public String getSource() { + return this.source; + } + + /** + * Set the source property: Source of the farm operation data. + * + * @param source the source value to set. + * @return the AgriFoodFarmingTillageDataChangedEventData object itself. + */ + public AgriFoodFarmingTillageDataChangedEventData setSource(String source) { + this.source = source; + return this; + } + + /** + * Get the modifiedDateTime property: Date-time when resource was last modified, sample format: + * yyyy-MM-ddTHH:mm:ssZ. + * + * @return the modifiedDateTime value. + */ + public OffsetDateTime getModifiedDateTime() { + return this.modifiedDateTime; + } + + /** + * Set the modifiedDateTime property: Date-time when resource was last modified, sample format: + * yyyy-MM-ddTHH:mm:ssZ. + * + * @param modifiedDateTime the modifiedDateTime value to set. + * @return the AgriFoodFarmingTillageDataChangedEventData object itself. + */ + public AgriFoodFarmingTillageDataChangedEventData setModifiedDateTime(OffsetDateTime modifiedDateTime) { + this.modifiedDateTime = modifiedDateTime; + return this; + } + + /** + * Get the eTag property: The ETag value to implement optimistic concurrency. + * + * @return the eTag value. + */ + public String getETag() { + return this.eTag; + } + + /** + * Set the eTag property: The ETag value to implement optimistic concurrency. + * + * @param eTag the eTag value to set. + * @return the AgriFoodFarmingTillageDataChangedEventData object itself. + */ + public AgriFoodFarmingTillageDataChangedEventData setETag(String eTag) { + this.eTag = eTag; + return this; + } + + /** + * Get the id property: Unique id of resource. + * + * @return the id value. + */ + public String getId() { + return this.id; + } + + /** + * Set the id property: Unique id of resource. + * + * @param id the id value to set. + * @return the AgriFoodFarmingTillageDataChangedEventData object itself. + */ + public AgriFoodFarmingTillageDataChangedEventData setId(String id) { + this.id = id; + return this; + } + + /** + * Get the name property: Name to identify resource. + * + * @return the name value. + */ + public String getName() { + return this.name; + } + + /** + * Set the name property: Name to identify resource. + * + * @param name the name value to set. + * @return the AgriFoodFarmingTillageDataChangedEventData object itself. + */ + public AgriFoodFarmingTillageDataChangedEventData setName(String name) { + this.name = name; + return this; + } + + /** + * Get the description property: Textual description of resource. + * + * @return the description value. + */ + public String getDescription() { + return this.description; + } + + /** + * Set the description property: Textual description of resource. + * + * @param description the description value to set. + * @return the AgriFoodFarmingTillageDataChangedEventData object itself. + */ + public AgriFoodFarmingTillageDataChangedEventData setDescription(String description) { + this.description = description; + return this; + } + + /** + * Get the createdDateTime property: Date-time when resource was created, sample format: yyyy-MM-ddTHH:mm:ssZ. + * + * @return the createdDateTime value. + */ + public OffsetDateTime getCreatedDateTime() { + return this.createdDateTime; + } + + /** + * Set the createdDateTime property: Date-time when resource was created, sample format: yyyy-MM-ddTHH:mm:ssZ. + * + * @param createdDateTime the createdDateTime value to set. + * @return the AgriFoodFarmingTillageDataChangedEventData object itself. + */ + public AgriFoodFarmingTillageDataChangedEventData setCreatedDateTime(OffsetDateTime createdDateTime) { + this.createdDateTime = createdDateTime; + return this; + } + + /** + * Get the properties property: A list of key value pairs that describe the resource. Only string and numeral values + * are supported. + * + * @return the properties value. + */ + public Map getProperties() { + return this.properties; + } + + /** + * Set the properties property: A list of key value pairs that describe the resource. Only string and numeral values + * are supported. + * + * @param properties the properties value to set. + * @return the AgriFoodFarmingTillageDataChangedEventData object itself. + */ + public AgriFoodFarmingTillageDataChangedEventData setProperties(Map properties) { + this.properties = properties; + return this; + } +} diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AgriFoodFarmingWeatherDataIngestionJobStatusChangedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AgriFoodFarmingWeatherDataIngestionJobStatusChangedEventData.java new file mode 100644 index 000000000000..a343a3189178 --- /dev/null +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AgriFoodFarmingWeatherDataIngestionJobStatusChangedEventData.java @@ -0,0 +1,287 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.messaging.eventgrid.systemevents; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; +import java.util.Map; + +/** + * Schema of the Data property of an EventGridEvent for a Microsoft.AgFoodPlatform.WeatherDataIngestionJobStatusChanged + * event. + */ +@Fluent +public final class AgriFoodFarmingWeatherDataIngestionJobStatusChangedEventData { + /* + * Farmer id for which job was created. + */ + @JsonProperty(value = "farmerId") + private String farmerId; + + /* + * Status message to capture more details of the job. + */ + @JsonProperty(value = "message") + private String message; + + /* + * Various states a job can be in. + */ + @JsonProperty(value = "status") + private AgriFoodFarmingJobStatus status; + + /* + * Date-time when last action was taken on job, sample format: + * yyyy-MM-ddTHH:mm:ssZ. + */ + @JsonProperty(value = "lastActionDateTime") + private OffsetDateTime lastActionDateTime; + + /* + * Flag that gets set when job cancellation is requested. + */ + @JsonProperty(value = "isCancellationRequested") + private Boolean isCancellationRequested; + + /* + * Unique id of resource. + */ + @JsonProperty(value = "id") + private String id; + + /* + * Name to identify resource. + */ + @JsonProperty(value = "name") + private String name; + + /* + * Textual description of resource. + */ + @JsonProperty(value = "description") + private String description; + + /* + * Date-time when resource was created, sample format: + * yyyy-MM-ddTHH:mm:ssZ. + */ + @JsonProperty(value = "createdDateTime") + private OffsetDateTime createdDateTime; + + /* + * A list of key value pairs that describe the resource. + * Only string and numeral values are supported. + */ + @JsonProperty(value = "properties") + private Map properties; + + /** + * Get the farmerId property: Farmer id for which job was created. + * + * @return the farmerId value. + */ + public String getFarmerId() { + return this.farmerId; + } + + /** + * Set the farmerId property: Farmer id for which job was created. + * + * @param farmerId the farmerId value to set. + * @return the AgriFoodFarmingWeatherDataIngestionJobStatusChangedEventData object itself. + */ + public AgriFoodFarmingWeatherDataIngestionJobStatusChangedEventData setFarmerId(String farmerId) { + this.farmerId = farmerId; + return this; + } + + /** + * Get the message property: Status message to capture more details of the job. + * + * @return the message value. + */ + public String getMessage() { + return this.message; + } + + /** + * Set the message property: Status message to capture more details of the job. + * + * @param message the message value to set. + * @return the AgriFoodFarmingWeatherDataIngestionJobStatusChangedEventData object itself. + */ + public AgriFoodFarmingWeatherDataIngestionJobStatusChangedEventData setMessage(String message) { + this.message = message; + return this; + } + + /** + * Get the status property: Various states a job can be in. + * + * @return the status value. + */ + public AgriFoodFarmingJobStatus getStatus() { + return this.status; + } + + /** + * Set the status property: Various states a job can be in. + * + * @param status the status value to set. + * @return the AgriFoodFarmingWeatherDataIngestionJobStatusChangedEventData object itself. + */ + public AgriFoodFarmingWeatherDataIngestionJobStatusChangedEventData setStatus(AgriFoodFarmingJobStatus status) { + this.status = status; + return this; + } + + /** + * Get the lastActionDateTime property: Date-time when last action was taken on job, sample format: + * yyyy-MM-ddTHH:mm:ssZ. + * + * @return the lastActionDateTime value. + */ + public OffsetDateTime getLastActionDateTime() { + return this.lastActionDateTime; + } + + /** + * Set the lastActionDateTime property: Date-time when last action was taken on job, sample format: + * yyyy-MM-ddTHH:mm:ssZ. + * + * @param lastActionDateTime the lastActionDateTime value to set. + * @return the AgriFoodFarmingWeatherDataIngestionJobStatusChangedEventData object itself. + */ + public AgriFoodFarmingWeatherDataIngestionJobStatusChangedEventData setLastActionDateTime( + OffsetDateTime lastActionDateTime) { + this.lastActionDateTime = lastActionDateTime; + return this; + } + + /** + * Get the isCancellationRequested property: Flag that gets set when job cancellation is requested. + * + * @return the isCancellationRequested value. + */ + public Boolean isCancellationRequested() { + return this.isCancellationRequested; + } + + /** + * Set the isCancellationRequested property: Flag that gets set when job cancellation is requested. + * + * @param isCancellationRequested the isCancellationRequested value to set. + * @return the AgriFoodFarmingWeatherDataIngestionJobStatusChangedEventData object itself. + */ + public AgriFoodFarmingWeatherDataIngestionJobStatusChangedEventData setIsCancellationRequested( + Boolean isCancellationRequested) { + this.isCancellationRequested = isCancellationRequested; + return this; + } + + /** + * Get the id property: Unique id of resource. + * + * @return the id value. + */ + public String getId() { + return this.id; + } + + /** + * Set the id property: Unique id of resource. + * + * @param id the id value to set. + * @return the AgriFoodFarmingWeatherDataIngestionJobStatusChangedEventData object itself. + */ + public AgriFoodFarmingWeatherDataIngestionJobStatusChangedEventData setId(String id) { + this.id = id; + return this; + } + + /** + * Get the name property: Name to identify resource. + * + * @return the name value. + */ + public String getName() { + return this.name; + } + + /** + * Set the name property: Name to identify resource. + * + * @param name the name value to set. + * @return the AgriFoodFarmingWeatherDataIngestionJobStatusChangedEventData object itself. + */ + public AgriFoodFarmingWeatherDataIngestionJobStatusChangedEventData setName(String name) { + this.name = name; + return this; + } + + /** + * Get the description property: Textual description of resource. + * + * @return the description value. + */ + public String getDescription() { + return this.description; + } + + /** + * Set the description property: Textual description of resource. + * + * @param description the description value to set. + * @return the AgriFoodFarmingWeatherDataIngestionJobStatusChangedEventData object itself. + */ + public AgriFoodFarmingWeatherDataIngestionJobStatusChangedEventData setDescription(String description) { + this.description = description; + return this; + } + + /** + * Get the createdDateTime property: Date-time when resource was created, sample format: yyyy-MM-ddTHH:mm:ssZ. + * + * @return the createdDateTime value. + */ + public OffsetDateTime getCreatedDateTime() { + return this.createdDateTime; + } + + /** + * Set the createdDateTime property: Date-time when resource was created, sample format: yyyy-MM-ddTHH:mm:ssZ. + * + * @param createdDateTime the createdDateTime value to set. + * @return the AgriFoodFarmingWeatherDataIngestionJobStatusChangedEventData object itself. + */ + public AgriFoodFarmingWeatherDataIngestionJobStatusChangedEventData setCreatedDateTime( + OffsetDateTime createdDateTime) { + this.createdDateTime = createdDateTime; + return this; + } + + /** + * Get the properties property: A list of key value pairs that describe the resource. Only string and numeral values + * are supported. + * + * @return the properties value. + */ + public Map getProperties() { + return this.properties; + } + + /** + * Set the properties property: A list of key value pairs that describe the resource. Only string and numeral values + * are supported. + * + * @param properties the properties value to set. + * @return the AgriFoodFarmingWeatherDataIngestionJobStatusChangedEventData object itself. + */ + public AgriFoodFarmingWeatherDataIngestionJobStatusChangedEventData setProperties(Map properties) { + this.properties = properties; + return this; + } +} diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/StorageBlobInventoryPolicyCompletedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/StorageBlobInventoryPolicyCompletedEventData.java new file mode 100644 index 000000000000..d9f795bbfb0e --- /dev/null +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/StorageBlobInventoryPolicyCompletedEventData.java @@ -0,0 +1,196 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.messaging.eventgrid.systemevents; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; + +/** Schema of the Data property of an EventGridEvent for an Microsoft.Storage.BlobInventoryPolicyCompleted event. */ +@Fluent +public final class StorageBlobInventoryPolicyCompletedEventData { + /* + * The time at which inventory policy was scheduled. + */ + @JsonProperty(value = "scheduleDateTime") + private OffsetDateTime scheduleDateTime; + + /* + * The account name for which inventory policy is registered. + */ + @JsonProperty(value = "accountName") + private String accountName; + + /* + * The rule name for inventory policy. + */ + @JsonProperty(value = "ruleName") + private String ruleName; + + /* + * The status of inventory run, it can be + * Succeeded/PartiallySucceeded/Failed. + */ + @JsonProperty(value = "policyRunStatus") + private String policyRunStatus; + + /* + * The status message for inventory run. + */ + @JsonProperty(value = "policyRunStatusMessage") + private String policyRunStatusMessage; + + /* + * The policy run id for inventory run. + */ + @JsonProperty(value = "policyRunId") + private String policyRunId; + + /* + * The blob URL for manifest file for inventory run. + */ + @JsonProperty(value = "manifestBlobUrl") + private String manifestBlobUrl; + + /** + * Get the scheduleDateTime property: The time at which inventory policy was scheduled. + * + * @return the scheduleDateTime value. + */ + public OffsetDateTime getScheduleDateTime() { + return this.scheduleDateTime; + } + + /** + * Set the scheduleDateTime property: The time at which inventory policy was scheduled. + * + * @param scheduleDateTime the scheduleDateTime value to set. + * @return the StorageBlobInventoryPolicyCompletedEventData object itself. + */ + public StorageBlobInventoryPolicyCompletedEventData setScheduleDateTime(OffsetDateTime scheduleDateTime) { + this.scheduleDateTime = scheduleDateTime; + return this; + } + + /** + * Get the accountName property: The account name for which inventory policy is registered. + * + * @return the accountName value. + */ + public String getAccountName() { + return this.accountName; + } + + /** + * Set the accountName property: The account name for which inventory policy is registered. + * + * @param accountName the accountName value to set. + * @return the StorageBlobInventoryPolicyCompletedEventData object itself. + */ + public StorageBlobInventoryPolicyCompletedEventData setAccountName(String accountName) { + this.accountName = accountName; + return this; + } + + /** + * Get the ruleName property: The rule name for inventory policy. + * + * @return the ruleName value. + */ + public String getRuleName() { + return this.ruleName; + } + + /** + * Set the ruleName property: The rule name for inventory policy. + * + * @param ruleName the ruleName value to set. + * @return the StorageBlobInventoryPolicyCompletedEventData object itself. + */ + public StorageBlobInventoryPolicyCompletedEventData setRuleName(String ruleName) { + this.ruleName = ruleName; + return this; + } + + /** + * Get the policyRunStatus property: The status of inventory run, it can be Succeeded/PartiallySucceeded/Failed. + * + * @return the policyRunStatus value. + */ + public String getPolicyRunStatus() { + return this.policyRunStatus; + } + + /** + * Set the policyRunStatus property: The status of inventory run, it can be Succeeded/PartiallySucceeded/Failed. + * + * @param policyRunStatus the policyRunStatus value to set. + * @return the StorageBlobInventoryPolicyCompletedEventData object itself. + */ + public StorageBlobInventoryPolicyCompletedEventData setPolicyRunStatus(String policyRunStatus) { + this.policyRunStatus = policyRunStatus; + return this; + } + + /** + * Get the policyRunStatusMessage property: The status message for inventory run. + * + * @return the policyRunStatusMessage value. + */ + public String getPolicyRunStatusMessage() { + return this.policyRunStatusMessage; + } + + /** + * Set the policyRunStatusMessage property: The status message for inventory run. + * + * @param policyRunStatusMessage the policyRunStatusMessage value to set. + * @return the StorageBlobInventoryPolicyCompletedEventData object itself. + */ + public StorageBlobInventoryPolicyCompletedEventData setPolicyRunStatusMessage(String policyRunStatusMessage) { + this.policyRunStatusMessage = policyRunStatusMessage; + return this; + } + + /** + * Get the policyRunId property: The policy run id for inventory run. + * + * @return the policyRunId value. + */ + public String getPolicyRunId() { + return this.policyRunId; + } + + /** + * Set the policyRunId property: The policy run id for inventory run. + * + * @param policyRunId the policyRunId value to set. + * @return the StorageBlobInventoryPolicyCompletedEventData object itself. + */ + public StorageBlobInventoryPolicyCompletedEventData setPolicyRunId(String policyRunId) { + this.policyRunId = policyRunId; + return this; + } + + /** + * Get the manifestBlobUrl property: The blob URL for manifest file for inventory run. + * + * @return the manifestBlobUrl value. + */ + public String getManifestBlobUrl() { + return this.manifestBlobUrl; + } + + /** + * Set the manifestBlobUrl property: The blob URL for manifest file for inventory run. + * + * @param manifestBlobUrl the manifestBlobUrl value to set. + * @return the StorageBlobInventoryPolicyCompletedEventData object itself. + */ + public StorageBlobInventoryPolicyCompletedEventData setManifestBlobUrl(String manifestBlobUrl) { + this.manifestBlobUrl = manifestBlobUrl; + return this; + } +} diff --git a/sdk/eventgrid/azure-messaging-eventgrid/swagger/README.md b/sdk/eventgrid/azure-messaging-eventgrid/swagger/README.md index c22ab03c5467..38600c35c771 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/swagger/README.md +++ b/sdk/eventgrid/azure-messaging-eventgrid/swagger/README.md @@ -14,16 +14,7 @@ Install Autorest beta with NPM: ## Using -Fork and clone the autorest.java repo (https://github.com/Azure/autorest.java) -and checkout the v4 branch. Then run `mvn clean package -Dlocal` to generate build files. - -Then fork and clone the Azure rest API specs from the repo -(https://github.com/Azure/azure-rest-api-specs) and run `autorest --java readme.md` -in this folder, with the following tags: - -`--use=` - -`--api-spec-location=` +run `autorest readme.md` If you are adding or updating swagger files, please make sure that they are included in the input file list. Also, if you are adding an additional service event, make sure that @@ -82,23 +73,24 @@ custom-types: CloudEvent,EventGridEvent model-override-setter-from-superclass: true input-file: -- $(api-spec-location)/specification/eventgrid/data-plane/Microsoft.Storage/stable/2018-01-01/Storage.json -- $(api-spec-location)/specification/eventgrid/data-plane/Microsoft.EventHub/stable/2018-01-01/EventHub.json -- $(api-spec-location)/specification/eventgrid/data-plane/Microsoft.Resources/stable/2018-01-01/Resources.json -- $(api-spec-location)/specification/eventgrid/data-plane/Microsoft.EventGrid/stable/2018-01-01/EventGrid.json -- $(api-spec-location)/specification/eventgrid/data-plane/Microsoft.Devices/stable/2018-01-01/IotHub.json -- $(api-spec-location)/specification/eventgrid/data-plane/Microsoft.ContainerRegistry/stable/2018-01-01/ContainerRegistry.json -- $(api-spec-location)/specification/eventgrid/data-plane/Microsoft.ServiceBus/stable/2018-01-01/ServiceBus.json -- $(api-spec-location)/specification/eventgrid/data-plane/Microsoft.Media/stable/2018-01-01/MediaServices.json -- $(api-spec-location)/specification/eventgrid/data-plane/Microsoft.Maps/stable/2018-01-01/Maps.json -- $(api-spec-location)/specification/eventgrid/data-plane/Microsoft.AppConfiguration/stable/2018-01-01/AppConfiguration.json -- $(api-spec-location)/specification/eventgrid/data-plane/Microsoft.SignalRService/stable/2018-01-01/SignalRService.json -- $(api-spec-location)/specification/eventgrid/data-plane/Microsoft.KeyVault/stable/2018-01-01/KeyVault.json -- $(api-spec-location)/specification/eventgrid/data-plane/Microsoft.MachineLearningServices/stable/2018-01-01/MachineLearningServices.json -- $(api-spec-location)/specification/eventgrid/data-plane/Microsoft.Cache/stable/2018-01-01/RedisCache.json -- $(api-spec-location)/specification/eventgrid/data-plane/Microsoft.Web/stable/2018-01-01/Web.json -- $(api-spec-location)/specification/eventgrid/data-plane/Microsoft.Communication/stable/2018-01-01/AzureCommunicationServices.json -- $(api-spec-location)/specification/eventgrid/data-plane/Microsoft.PolicyInsights/stable/2018-01-01/PolicyInsights.json +- https://raw.githubusercontent.com/Azure/azure-rest-api-specs/master/specification/eventgrid/data-plane/Microsoft.Storage/stable/2018-01-01/Storage.json +- https://raw.githubusercontent.com/Azure/azure-rest-api-specs/master/specification/eventgrid/data-plane/Microsoft.EventHub/stable/2018-01-01/EventHub.json +- https://raw.githubusercontent.com/Azure/azure-rest-api-specs/master/specification/eventgrid/data-plane/Microsoft.Resources/stable/2018-01-01/Resources.json +- https://raw.githubusercontent.com/Azure/azure-rest-api-specs/master/specification/eventgrid/data-plane/Microsoft.EventGrid/stable/2018-01-01/EventGrid.json +- https://raw.githubusercontent.com/Azure/azure-rest-api-specs/master/specification/eventgrid/data-plane/Microsoft.Devices/stable/2018-01-01/IotHub.json +- https://raw.githubusercontent.com/Azure/azure-rest-api-specs/master/specification/eventgrid/data-plane/Microsoft.ContainerRegistry/stable/2018-01-01/ContainerRegistry.json +- https://raw.githubusercontent.com/Azure/azure-rest-api-specs/master/specification/eventgrid/data-plane/Microsoft.ServiceBus/stable/2018-01-01/ServiceBus.json +- https://raw.githubusercontent.com/Azure/azure-rest-api-specs/master/specification/eventgrid/data-plane/Microsoft.Media/stable/2018-01-01/MediaServices.json +- https://raw.githubusercontent.com/Azure/azure-rest-api-specs/master/specification/eventgrid/data-plane/Microsoft.Maps/stable/2018-01-01/Maps.json +- https://raw.githubusercontent.com/Azure/azure-rest-api-specs/master/specification/eventgrid/data-plane/Microsoft.AppConfiguration/stable/2018-01-01/AppConfiguration.json +- https://raw.githubusercontent.com/Azure/azure-rest-api-specs/master/specification/eventgrid/data-plane/Microsoft.SignalRService/stable/2018-01-01/SignalRService.json +- https://raw.githubusercontent.com/Azure/azure-rest-api-specs/master/specification/eventgrid/data-plane/Microsoft.KeyVault/stable/2018-01-01/KeyVault.json +- https://raw.githubusercontent.com/Azure/azure-rest-api-specs/master/specification/eventgrid/data-plane/Microsoft.MachineLearningServices/stable/2018-01-01/MachineLearningServices.json +- https://raw.githubusercontent.com/Azure/azure-rest-api-specs/master/specification/eventgrid/data-plane/Microsoft.Cache/stable/2018-01-01/RedisCache.json +- https://raw.githubusercontent.com/Azure/azure-rest-api-specs/master/specification/eventgrid/data-plane/Microsoft.Web/stable/2018-01-01/Web.json +- https://raw.githubusercontent.com/Azure/azure-rest-api-specs/master/specification/eventgrid/data-plane/Microsoft.Communication/stable/2018-01-01/AzureCommunicationServices.json +- https://raw.githubusercontent.com/Azure/azure-rest-api-specs/master/specification/eventgrid/data-plane/Microsoft.PolicyInsights/stable/2018-01-01/PolicyInsights.json +- https://raw.githubusercontent.com/Azure/azure-rest-api-specs/master/specification/eventgrid/data-plane/Microsoft.AgFoodPlatform/stable/2018-01-01/AzureFarmBeats.json ``` ### Customization @@ -142,8 +134,7 @@ public class EventGridCustomization extends Customization { " return Collections.unmodifiableMap(SYSTEM_EVENT_MAPPINGS);\n" + " }\n" + "\n" + - " private SystemEventMappingNames() {\n" + - " // No instances allowed" + + " private SystemEventMappingNames() { \n" + " }"; @Override From 81e47a4c96d8c77d6c2e13def7556a87efd4fae3 Mon Sep 17 00:00:00 2001 From: Srikanta <51379715+srnagar@users.noreply.github.com> Date: Mon, 7 Jun 2021 22:22:38 -0700 Subject: [PATCH 10/21] Updates to monitor query based on API review feedback (#22114) * API consistency review feedback * Remove commented code * fix tests * Refactor building prefer header --- sdk/monitor/azure-monitor-query/README.md | 32 +-- ...cClient.java => LogsQueryAsyncClient.java} | 238 +++++++++--------- .../{LogsClient.java => LogsQueryClient.java} | 20 +- ...ilder.java => LogsQueryClientBuilder.java} | 64 ++--- ...sion.java => LogsQueryServiceVersion.java} | 6 +- ...ient.java => MetricsQueryAsyncClient.java} | 45 ++-- ...icsClient.java => MetricsQueryClient.java} | 24 +- ...er.java => MetricsQueryClientBuilder.java} | 48 ++-- ...n.java => MetricsQueryServiceVersion.java} | 6 +- .../query/log/implementation/QueriesImpl.java | 24 +- ...eryRequest.java => BatchQueryRequest.java} | 80 +++--- ...yResponse.java => BatchQueryResponse.java} | 33 ++- .../implementation/models/BatchRequest.java | 28 ++- .../implementation/models/BatchResponse.java | 8 +- .../log/implementation/models/Column.java | 8 +- .../implementation/models/LogQueryResult.java | 79 ------ .../models/MetadataColumnDataType.java | 9 + .../log/implementation/models/QueryBody.java | 78 ------ .../implementation/models/QueryResults.java | 33 ++- .../metrics/implementation/models/Metric.java | 8 +- .../implementation/MetricDefinitionsImpl.java | 14 +- .../models/MetricDefinitionCollection.java | 8 +- .../implementation/MetricNamespacesImpl.java | 14 +- .../models/MetricNamespaceCollection.java | 8 +- .../monitor/query/models/ColumnDataType.java | 48 ---- ...ogsQueryBatch.java => LogsBatchQuery.java} | 10 +- ...hResult.java => LogsBatchQueryResult.java} | 17 +- ...va => LogsBatchQueryResultCollection.java} | 10 +- .../monitor/query/models/LogsColumnType.java | 57 +++++ .../monitor/query/models/LogsQueryError.java | 108 ++------ .../query/models/LogsQueryErrorDetail.java | 116 +++++++++ .../query/models/LogsQueryErrorDetails.java | 54 ---- .../query/models/LogsQueryException.java | 8 +- .../monitor/query/models/LogsQueryResult.java | 24 +- .../query/models/LogsQueryStatistics.java | 30 +++ .../monitor/query/models/LogsTableCell.java | 6 +- .../monitor/query/models/LogsTableColumn.java | 6 +- .../monitor/query/models/LogsTableRow.java | 17 +- .../models/{Metrics.java => Metric.java} | 15 +- ...ilability.java => MetricAvailability.java} | 6 +- ...sDefinition.java => MetricDefinition.java} | 30 +-- ...icsNamespace.java => MetricNamespace.java} | 16 +- ...paceName.java => MetricNamespaceName.java} | 4 +- ...ment.java => MetricTimeSeriesElement.java} | 10 +- .../monitor/query/models/MetricUnit.java | 66 +++++ .../{MetricsValue.java => MetricValue.java} | 8 +- .../query/models/MetricsQueryOptions.java | 18 +- .../query/models/MetricsQueryResult.java | 6 +- .../monitor/query/models/MetricsUnit.java | 66 ----- .../src/main/java/module-info.java | 8 +- .../monitor/query/LogsQueryBatchSample.java | 25 +- .../azure/monitor/query/LogsQuerySample.java | 4 +- .../monitor/query/LogsQueryWithModels.java | 4 +- .../monitor/query/MetricsQuerySample.java | 11 +- .../monitor/query/MultiWorkspaceSample.java | 64 +++++ .../azure/monitor/query/ReadmeSamples.java | 48 ++-- .../monitor/query/ServerTimeoutSample.java | 4 +- .../azure/monitor/query/LogsClientTest.java | 88 ------- .../monitor/query/LogsQueryClientTest.java | 176 +++++++++++++ ...tTest.java => MetricsQueryClientTest.java} | 82 +++--- .../LogsClientTest.testLogsQuery.json | 27 -- .../LogsClientTest.testLogsQueryBatch.json | 27 -- ...ientTest.testBatchQueryPartialSuccess.json | 27 ++ ...gsQueryClientTest.testBatchStatistics.json | 27 ++ .../LogsQueryClientTest.testLogsQuery.json | 28 +++ ...ogsQueryClientTest.testLogsQueryBatch.json | 27 ++ ...ueryClientTest.testMultipleWorkspaces.json | 28 +++ .../LogsQueryClientTest.testStatistics.json | 28 +++ .../MetricsClientTest.testMetricsQuery.json | 32 --- ...QueryClientTest.testMetricsDefinition.json | 32 +++ ...QueryClientTest.testMetricsNamespaces.json | 31 +++ ...tricsQueryClientTest.testMetricsQuery.json | 32 +++ .../azure-monitor-query/swagger/README.md | 2 +- 73 files changed, 1398 insertions(+), 1135 deletions(-) rename sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/{LogsAsyncClient.java => LogsQueryAsyncClient.java} (58%) rename sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/{LogsClient.java => LogsQueryClient.java} (81%) rename sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/{LogsClientBuilder.java => LogsQueryClientBuilder.java} (60%) rename sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/{LogsServiceVersion.java => LogsQueryServiceVersion.java} (80%) rename sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/{MetricsAsyncClient.java => MetricsQueryAsyncClient.java} (76%) rename sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/{MetricsClient.java => MetricsQueryClient.java} (83%) rename sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/{MetricsClientBuilder.java => MetricsQueryClientBuilder.java} (75%) rename sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/{MetricsServiceVersion.java => MetricsQueryServiceVersion.java} (80%) rename sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/log/implementation/models/{LogQueryRequest.java => BatchQueryRequest.java} (70%) rename sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/log/implementation/models/{LogQueryResponse.java => BatchQueryResponse.java} (73%) delete mode 100644 sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/log/implementation/models/LogQueryResult.java delete mode 100644 sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/models/ColumnDataType.java rename sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/models/{LogsQueryBatch.java => LogsBatchQuery.java} (81%) rename sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/models/{LogsQueryBatchResult.java => LogsBatchQueryResult.java} (67%) rename sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/models/{LogsQueryBatchResultCollection.java => LogsBatchQueryResultCollection.java} (69%) create mode 100644 sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/models/LogsColumnType.java create mode 100644 sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/models/LogsQueryErrorDetail.java delete mode 100644 sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/models/LogsQueryErrorDetails.java create mode 100644 sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/models/LogsQueryStatistics.java rename sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/models/{Metrics.java => Metric.java} (81%) rename sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/models/{MetricsAvailability.java => MetricAvailability.java} (92%) rename sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/models/{MetricsDefinition.java => MetricDefinition.java} (88%) rename sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/models/{MetricsNamespace.java => MetricNamespace.java} (88%) rename sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/models/{MetricsNamespaceName.java => MetricNamespaceName.java} (89%) rename sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/models/{MetricsTimeSeriesElement.java => MetricTimeSeriesElement.java} (62%) create mode 100644 sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/models/MetricUnit.java rename sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/models/{MetricsValue.java => MetricValue.java} (90%) delete mode 100644 sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/models/MetricsUnit.java create mode 100644 sdk/monitor/azure-monitor-query/src/samples/java/com/azure/monitor/query/MultiWorkspaceSample.java delete mode 100644 sdk/monitor/azure-monitor-query/src/test/java/com/azure/monitor/query/LogsClientTest.java create mode 100644 sdk/monitor/azure-monitor-query/src/test/java/com/azure/monitor/query/LogsQueryClientTest.java rename sdk/monitor/azure-monitor-query/src/test/java/com/azure/monitor/query/{MetricsClientTest.java => MetricsQueryClientTest.java} (54%) delete mode 100644 sdk/monitor/azure-monitor-query/src/test/resources/session-records/LogsClientTest.testLogsQuery.json delete mode 100644 sdk/monitor/azure-monitor-query/src/test/resources/session-records/LogsClientTest.testLogsQueryBatch.json create mode 100644 sdk/monitor/azure-monitor-query/src/test/resources/session-records/LogsQueryClientTest.testBatchQueryPartialSuccess.json create mode 100644 sdk/monitor/azure-monitor-query/src/test/resources/session-records/LogsQueryClientTest.testBatchStatistics.json create mode 100644 sdk/monitor/azure-monitor-query/src/test/resources/session-records/LogsQueryClientTest.testLogsQuery.json create mode 100644 sdk/monitor/azure-monitor-query/src/test/resources/session-records/LogsQueryClientTest.testLogsQueryBatch.json create mode 100644 sdk/monitor/azure-monitor-query/src/test/resources/session-records/LogsQueryClientTest.testMultipleWorkspaces.json create mode 100644 sdk/monitor/azure-monitor-query/src/test/resources/session-records/LogsQueryClientTest.testStatistics.json delete mode 100644 sdk/monitor/azure-monitor-query/src/test/resources/session-records/MetricsClientTest.testMetricsQuery.json create mode 100644 sdk/monitor/azure-monitor-query/src/test/resources/session-records/MetricsQueryClientTest.testMetricsDefinition.json create mode 100644 sdk/monitor/azure-monitor-query/src/test/resources/session-records/MetricsQueryClientTest.testMetricsNamespaces.json create mode 100644 sdk/monitor/azure-monitor-query/src/test/resources/session-records/MetricsQueryClientTest.testMetricsQuery.json diff --git a/sdk/monitor/azure-monitor-query/README.md b/sdk/monitor/azure-monitor-query/README.md index 42edb93e036a..281a0d9f93bf 100644 --- a/sdk/monitor/azure-monitor-query/README.md +++ b/sdk/monitor/azure-monitor-query/README.md @@ -39,7 +39,7 @@ This client library provides access to query metrics and logs collected by Azure ```java -LogsClient logsClient = new LogsClientBuilder() +LogsQueryClient logsQueryClient = new LogsQueryClientBuilder() .credential(tokenCredential) .buildClient(); ``` @@ -49,7 +49,7 @@ LogsClient logsClient = new LogsClientBuilder() ```java -LogsAsyncClient logsAsyncClient = new LogsClientBuilder() +LogsQueryAsyncClient logsQueryAsyncClient = new LogsQueryClientBuilder() .credential(tokenCredential) .buildAsyncClient(); ``` @@ -58,7 +58,7 @@ LogsAsyncClient logsAsyncClient = new LogsClientBuilder() ```java - LogsQueryResult queryResults = logsClient.queryLogs("{workspace-id}", "{kusto-query}", + LogsQueryResult queryResults = logsQueryClient.queryLogs("{workspace-id}", "{kusto-query}", new QueryTimeSpan(Duration.ofDays(2))); System.out.println("Number of tables = " + queryResults.getLogsTables().size()); @@ -90,13 +90,13 @@ LogsAsyncClient logsAsyncClient = new LogsClientBuilder() + "; value = " + logsTableCell.getValueAsString())); } } - +} ``` ### Get logs for a query and read the response as a model type ```java - LogsQueryResult queryResults = logsClient + LogsQueryResult queryResults = logsQueryClient .queryLogs("d2d0e126-fa1e-4b0a-b647-250cdd471e68", "AppRequests", null); // Sample to use a model type to read the results @@ -217,16 +217,16 @@ LogsAsyncClient logsAsyncClient = new LogsClientBuilder() ```java -LogsQueryBatch logsQueryBatch = new LogsQueryBatch() +LogsBatchQuery logsBatchQuery = new LogsBatchQuery() .addQuery("{workspace-id}", "{query-1}", new QueryTimeSpan(Duration.ofDays(2))) .addQuery("{workspace-id}", "{query-2}", new QueryTimeSpan(Duration.ofDays(30))); -LogsQueryBatchResultCollection batchResultCollection = logsClient - .queryLogsBatchWithResponse(logsQueryBatch, Context.NONE).getValue(); +LogsBatchQueryResultCollection batchResultCollection = logsQueryClient + .queryLogsBatchWithResponse(logsBatchQuery, Context.NONE).getValue(); -List responses = batchResultCollection.getBatchResults(); +List responses = batchResultCollection.getBatchResults(); -for (LogsQueryBatchResult response : responses) { +for (LogsBatchQueryResult response : responses) { LogsQueryResult queryResult = response.getQueryResult(); // Sample to iterate by row @@ -250,7 +250,7 @@ LogsQueryOptions options = new LogsQueryOptions("{workspace-id}", .setServerTimeout(Duration.ofMinutes(10)); // make service call with these request options set as filter header -Response response = logsClient.queryLogsWithResponse(options, Context.NONE); +Response response = logsQueryClient.queryLogsWithResponse(options, Context.NONE); LogsQueryResult logsQueryResult = response.getValue(); // Sample to iterate by row @@ -267,7 +267,7 @@ for (LogsTable table : logsQueryResult.getLogsTables()) { ```java -MetricsClient metricsClient = new MetricsClientBuilder() +MetricsQueryClient metricsQueryClient = new MetricsQueryClientBuilder() .credential(tokenCredential) .buildClient(); ``` @@ -276,7 +276,7 @@ MetricsClient metricsClient = new MetricsClientBuilder() ```java -MetricsAsyncClient metricsAsyncClient = new MetricsClientBuilder() +MetricsQueryAsyncClient metricsQueryAsyncClient = new MetricsQueryClientBuilder() .credential(tokenCredential) .buildAsyncClient(); ``` @@ -285,20 +285,20 @@ MetricsAsyncClient metricsAsyncClient = new MetricsClientBuilder() ```java -Response metricsResponse = metricsClient +Response metricsResponse = metricsQueryClient .queryMetricsWithResponse( "{resource-id}", Arrays.asList("SuccessfulCalls"), new MetricsQueryOptions() .setMetricsNamespace("Microsoft.CognitiveServices/accounts") - .setTimespan(Duration.ofDays(30).toString()) + .setTimeSpan(new QueryTimeSpan(Duration.ofDays(30))) .setInterval(Duration.ofHours(1)) .setTop(100) .setAggregation(Arrays.asList(AggregationType.AVERAGE, AggregationType.COUNT)), Context.NONE); MetricsQueryResult metricsQueryResult = metricsResponse.getValue(); -List metrics = metricsQueryResult.getMetrics(); +List metrics = metricsQueryResult.getMetrics(); metrics.stream() .forEach(metric -> { System.out.println(metric.getMetricsName()); diff --git a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/LogsAsyncClient.java b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/LogsQueryAsyncClient.java similarity index 58% rename from sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/LogsAsyncClient.java rename to sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/LogsQueryAsyncClient.java index a845e17a7e19..ca38775fc3b4 100644 --- a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/LogsAsyncClient.java +++ b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/LogsQueryAsyncClient.java @@ -9,25 +9,26 @@ import com.azure.core.http.rest.Response; import com.azure.core.http.rest.SimpleResponse; import com.azure.core.util.Context; +import com.azure.core.util.CoreUtils; import com.azure.monitor.query.log.implementation.AzureLogAnalyticsImpl; +import com.azure.monitor.query.log.implementation.models.BatchQueryRequest; +import com.azure.monitor.query.log.implementation.models.BatchQueryResponse; import com.azure.monitor.query.log.implementation.models.BatchRequest; import com.azure.monitor.query.log.implementation.models.BatchResponse; import com.azure.monitor.query.log.implementation.models.ErrorInfo; import com.azure.monitor.query.log.implementation.models.ErrorResponseException; -import com.azure.monitor.query.log.implementation.models.LogQueryRequest; -import com.azure.monitor.query.log.implementation.models.LogQueryResponse; -import com.azure.monitor.query.log.implementation.models.LogQueryResult; import com.azure.monitor.query.log.implementation.models.QueryBody; import com.azure.monitor.query.log.implementation.models.QueryResults; import com.azure.monitor.query.log.implementation.models.Table; -import com.azure.monitor.query.models.LogsQueryBatch; -import com.azure.monitor.query.models.LogsQueryBatchResult; -import com.azure.monitor.query.models.LogsQueryBatchResultCollection; +import com.azure.monitor.query.models.LogsBatchQuery; +import com.azure.monitor.query.models.LogsBatchQueryResult; +import com.azure.monitor.query.models.LogsBatchQueryResultCollection; +import com.azure.monitor.query.models.LogsQueryErrorDetail; import com.azure.monitor.query.models.LogsQueryError; -import com.azure.monitor.query.models.LogsQueryErrorDetails; import com.azure.monitor.query.models.LogsQueryException; import com.azure.monitor.query.models.LogsQueryOptions; import com.azure.monitor.query.models.LogsQueryResult; +import com.azure.monitor.query.models.LogsQueryStatistics; import com.azure.monitor.query.models.LogsTable; import com.azure.monitor.query.models.LogsTableCell; import com.azure.monitor.query.models.LogsTableColumn; @@ -38,7 +39,9 @@ import java.util.ArrayList; import java.util.Collections; import java.util.Comparator; +import java.util.HashMap; import java.util.List; +import java.util.Map; import java.util.concurrent.atomic.AtomicInteger; import java.util.stream.Collectors; @@ -47,8 +50,8 @@ /** * The asynchronous client for querying Azure Monitor logs. */ -@ServiceClient(builder = LogsClientBuilder.class, isAsync = true) -public final class LogsAsyncClient { +@ServiceClient(builder = LogsQueryClientBuilder.class, isAsync = true) +public final class LogsQueryAsyncClient { private final AzureLogAnalyticsImpl innerClient; @@ -56,7 +59,7 @@ public final class LogsAsyncClient { * Constructor that has the inner generated client to make the service call. * @param innerClient The inner generated client. */ - LogsAsyncClient(AzureLogAnalyticsImpl innerClient) { + LogsQueryAsyncClient(AzureLogAnalyticsImpl innerClient) { this.innerClient = innerClient; } @@ -91,45 +94,45 @@ public Mono> queryLogsWithResponse(LogsQueryOptions op * @return A collection of query results corresponding to the input batch of queries. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono queryLogsBatch(String workspaceId, List queries, + public Mono queryLogsBatch(String workspaceId, List queries, QueryTimeSpan timeSpan) { - LogsQueryBatch logsQueryBatch = new LogsQueryBatch(); - queries.forEach(query -> logsQueryBatch.addQuery(workspaceId, query, timeSpan)); - return queryLogsBatchWithResponse(logsQueryBatch).map(Response::getValue); + LogsBatchQuery logsBatchQuery = new LogsBatchQuery(); + queries.forEach(query -> logsBatchQuery.addQuery(workspaceId, query, timeSpan)); + return queryLogsBatchWithResponse(logsBatchQuery).map(Response::getValue); } /** * Returns all the Azure Monitor logs matching the given batch of queries. - * @param logsQueryBatch {@link LogsQueryBatch} containing a batch of queries. + * @param logsBatchQuery {@link LogsBatchQuery} containing a batch of queries. * @return A collection of query results corresponding to the input batch of queries.@return */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> queryLogsBatchWithResponse(LogsQueryBatch logsQueryBatch) { - return queryLogsBatchWithResponse(logsQueryBatch, Context.NONE); + public Mono> queryLogsBatchWithResponse(LogsBatchQuery logsBatchQuery) { + return queryLogsBatchWithResponse(logsBatchQuery, Context.NONE); } - Mono> queryLogsBatchWithResponse(LogsQueryBatch logsQueryBatch, Context context) { - BatchRequest batchRequest = new BatchRequest(); + Mono> queryLogsBatchWithResponse(LogsBatchQuery logsBatchQuery, Context context) { AtomicInteger id = new AtomicInteger(); - List requests = logsQueryBatch.getQueries() + List requests = logsBatchQuery.getQueries() .stream() .map(query -> { QueryBody body = new QueryBody(query.getQuery()) - .setWorkspaces(query.getWorkspaceNames()) - .setAzureResourceIds(query.getAzureResourceIds()) - .setQualifiedNames(query.getQualifiedWorkspaceNames()) - .setWorkspaceIds(query.getWorkspaceIds()); - - return new LogQueryRequest() - .setId(String.valueOf(id.incrementAndGet())) - .setBody(body) - .setWorkspace(query.getWorkspaceId()) + .setWorkspaces(getAllWorkspaces(query)); + + String preferHeader = buildPreferHeaderString(query); + + Map headers = new HashMap<>(); + if (!CoreUtils.isNullOrEmpty(preferHeader)) { + headers.put("Prefer", preferHeader); + } + return new BatchQueryRequest(String.valueOf(id.incrementAndGet()), body, query.getWorkspaceId()) + .setHeaders(headers) .setPath("/query") .setMethod("POST"); }) .collect(Collectors.toList()); - batchRequest.setRequests(requests); + BatchRequest batchRequest = new BatchRequest(requests); return innerClient.getQueries().batchWithResponseAsync(batchRequest, context) .onErrorMap(ex -> { @@ -143,28 +146,53 @@ Mono> queryLogsBatchWithResponse(LogsQu .map(this::convertToLogQueryBatchResult); } - private Response convertToLogQueryBatchResult(Response response) { - List batchResults = new ArrayList<>(); - LogsQueryBatchResultCollection logsQueryBatchResultCollection = new LogsQueryBatchResultCollection(batchResults); + private String buildPreferHeaderString(LogsQueryOptions query) { + StringBuilder sb = new StringBuilder(); + if (query.isIncludeRendering()) { + sb.append("include-render=true"); + } + + if (query.isIncludeStatistics()) { + if (sb.length() > 0) { + sb.append(","); + } + sb.append("include-statistics=true"); + } + + if (query.getServerTimeout() != null) { + if (sb.length() > 0) { + sb.append(","); + } + sb.append("wait="); + sb.append(query.getServerTimeout().getSeconds()); + } + + return sb.toString().isEmpty() ? null : sb.toString(); + } + + private Response convertToLogQueryBatchResult(Response response) { + List batchResults = new ArrayList<>(); + LogsBatchQueryResultCollection logsBatchQueryResultCollection = new LogsBatchQueryResultCollection(batchResults); BatchResponse batchResponse = response.getValue(); - for (LogQueryResponse singleQueryResponse : batchResponse.getResponses()) { - LogsQueryBatchResult logsQueryBatchResult = new LogsQueryBatchResult(singleQueryResponse.getId(), - singleQueryResponse.getStatus(), getLogsQueryResult(singleQueryResponse.getBody()), - mapLogsQueryError(singleQueryResponse.getBody().getError())); - batchResults.add(logsQueryBatchResult); + + for (BatchQueryResponse singleQueryResponse : batchResponse.getResponses()) { + + LogsBatchQueryResult logsBatchQueryResult = new LogsBatchQueryResult(singleQueryResponse.getId(), + singleQueryResponse.getStatus(), getLogsQueryResult(singleQueryResponse.getBody())); + batchResults.add(logsBatchQueryResult); } batchResults.sort(Comparator.comparingInt(o -> Integer.parseInt(o.getId()))); - return new SimpleResponse<>(response.getRequest(), response.getStatusCode(), response.getHeaders(), logsQueryBatchResultCollection); + return new SimpleResponse<>(response.getRequest(), response.getStatusCode(), response.getHeaders(), logsBatchQueryResultCollection); } - private LogsQueryErrorDetails mapLogsQueryError(ErrorInfo errors) { + private LogsQueryError mapLogsQueryError(ErrorInfo errors) { if (errors != null) { - List errorDetails = Collections.emptyList(); + List errorDetails = Collections.emptyList(); if (errors.getDetails() != null) { errorDetails = errors.getDetails() .stream() - .map(errorDetail -> new LogsQueryError(errorDetail.getCode(), + .map(errorDetail -> new LogsQueryErrorDetail(errorDetail.getCode(), errorDetail.getMessage(), errorDetail.getTarget(), errorDetail.getValue(), @@ -176,44 +204,25 @@ private LogsQueryErrorDetails mapLogsQueryError(ErrorInfo errors) { ErrorInfo innerError = errors.getInnererror(); ErrorInfo currentError = errors.getInnererror(); while (currentError != null) { - innerError = errors.getInnererror(); - currentError = errors.getInnererror(); + innerError = currentError.getInnererror(); + currentError = currentError.getInnererror(); } String code = errors.getCode(); - if (!errors.getCode().equals(innerError.getCode())) { + if (errors.getCode() != null && innerError != null && errors.getCode().equals(innerError.getCode())) { code = innerError.getCode(); } - return new LogsQueryErrorDetails(errors.getMessage(), code, errorDetails); + return new LogsQueryError(errors.getMessage(), code, errorDetails); } return null; } Mono> queryLogsWithResponse(LogsQueryOptions options, Context context) { - StringBuilder sb = new StringBuilder(); - if (options.isIncludeRendering()) { - sb.append("include-render=true"); - } - - if (options.isIncludeStatistics()) { - if (sb.length() > 0) { - sb.append(";"); - } - sb.append("include-statistics=true"); - } - - if (options.getServerTimeout() != null) { - if (sb.length() > 0) { - sb.append(";"); - } - sb.append("wait="); - sb.append(options.getServerTimeout().getSeconds()); - } - - String preferHeader = sb.toString().isEmpty() ? null : sb.toString(); + String preferHeader = buildPreferHeaderString(options); QueryBody queryBody = new QueryBody(options.getQuery()); if (options.getTimeSpan() != null) { queryBody.setTimespan(options.getTimeSpan().toString()); } + queryBody.setWorkspaces(getAllWorkspaces(options)); return innerClient .getQueries() .executeWithResponseAsync(options.getWorkspaceId(), @@ -239,64 +248,57 @@ private Response convertToLogQueryResult(Response } private LogsQueryResult getLogsQueryResult(QueryResults queryResults) { - List tables = new ArrayList<>(); - LogsQueryResult logsQueryResult = new LogsQueryResult(tables); - - if (queryResults.getTables() == null) { - return null; - } - - for (Table table : queryResults.getTables()) { - List tableCells = new ArrayList<>(); - List tableRows = new ArrayList<>(); - List tableColumns = new ArrayList<>(); - LogsTable logsTable = new LogsTable(tableCells, tableRows, tableColumns); - tables.add(logsTable); - List> rows = table.getRows(); - - for (int i = 0; i < rows.size(); i++) { - List row = rows.get(i); - LogsTableRow tableRow = new LogsTableRow(i, new ArrayList<>()); - tableRows.add(tableRow); - for (int j = 0; j < row.size(); j++) { - LogsTableCell cell = new LogsTableCell(table.getColumns().get(j).getName(), - table.getColumns().get(j).getType(), j, i, row.get(j)); - tableCells.add(cell); - tableRow.getTableRow().add(cell); + List tables = null; + + if (queryResults.getTables() != null) { + tables = new ArrayList<>(); + for (Table table : queryResults.getTables()) { + List tableCells = new ArrayList<>(); + List tableRows = new ArrayList<>(); + List tableColumns = new ArrayList<>(); + LogsTable logsTable = new LogsTable(tableCells, tableRows, tableColumns); + tables.add(logsTable); + List> rows = table.getRows(); + + for (int i = 0; i < rows.size(); i++) { + List row = rows.get(i); + LogsTableRow tableRow = new LogsTableRow(i, new ArrayList<>()); + tableRows.add(tableRow); + for (int j = 0; j < row.size(); j++) { + LogsTableCell cell = new LogsTableCell(table.getColumns().get(j).getName(), + table.getColumns().get(j).getType(), j, i, row.get(j)); + tableCells.add(cell); + tableRow.getTableRow().add(cell); + } } } } - return logsQueryResult; - } - private LogsQueryResult getLogsQueryResult(LogQueryResult queryResults) { - List tables = new ArrayList<>(); - LogsQueryResult logsQueryResult = new LogsQueryResult(tables); + LogsQueryStatistics statistics = null; - if (queryResults.getTables() == null) { - return null; + if (queryResults.getStatistics() != null) { + statistics = new LogsQueryStatistics(queryResults.getStatistics()); } - for (Table table : queryResults.getTables()) { - List tableCells = new ArrayList<>(); - List tableRows = new ArrayList<>(); - List tableColumns = new ArrayList<>(); - LogsTable logsTable = new LogsTable(tableCells, tableRows, tableColumns); - tables.add(logsTable); - List> rows = table.getRows(); - - for (int i = 0; i < rows.size(); i++) { - List row = rows.get(i); - LogsTableRow tableRow = new LogsTableRow(i, new ArrayList<>()); - tableRows.add(tableRow); - for (int j = 0; j < row.size(); j++) { - LogsTableCell cell = new LogsTableCell(table.getColumns().get(j).getName(), - table.getColumns().get(j).getType(), j, i, row.get(j)); - tableCells.add(cell); - tableRow.getTableRow().add(cell); - } - } - } + LogsQueryResult logsQueryResult = new LogsQueryResult(tables, statistics, + mapLogsQueryError(queryResults.getError())); return logsQueryResult; } + + private List getAllWorkspaces(LogsQueryOptions body) { + List allWorkspaces = new ArrayList<>(); + if (!CoreUtils.isNullOrEmpty(body.getWorkspaceNames())) { + allWorkspaces.addAll(body.getWorkspaceNames()); + } + if (!CoreUtils.isNullOrEmpty(body.getAzureResourceIds())) { + allWorkspaces.addAll(body.getAzureResourceIds()); + } + if (!CoreUtils.isNullOrEmpty(body.getQualifiedWorkspaceNames())) { + allWorkspaces.addAll(body.getQualifiedWorkspaceNames()); + } + if (!CoreUtils.isNullOrEmpty(body.getWorkspaceIds())) { + allWorkspaces.addAll(body.getWorkspaceIds()); + } + return allWorkspaces; + } } diff --git a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/LogsClient.java b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/LogsQueryClient.java similarity index 81% rename from sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/LogsClient.java rename to sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/LogsQueryClient.java index 353203954b2f..b5dc88ef33b1 100644 --- a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/LogsClient.java +++ b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/LogsQueryClient.java @@ -8,8 +8,8 @@ import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.Response; import com.azure.core.util.Context; -import com.azure.monitor.query.models.LogsQueryBatch; -import com.azure.monitor.query.models.LogsQueryBatchResultCollection; +import com.azure.monitor.query.models.LogsBatchQuery; +import com.azure.monitor.query.models.LogsBatchQueryResultCollection; import com.azure.monitor.query.models.LogsQueryOptions; import com.azure.monitor.query.models.LogsQueryResult; import com.azure.monitor.query.models.QueryTimeSpan; @@ -19,16 +19,16 @@ /** * The synchronous client for querying Azure Monitor logs. */ -@ServiceClient(builder = LogsClientBuilder.class) -public final class LogsClient { +@ServiceClient(builder = LogsQueryClientBuilder.class) +public final class LogsQueryClient { - private final LogsAsyncClient asyncClient; + private final LogsQueryAsyncClient asyncClient; /** * Constructor that has the async client to make sync over async service calls. * @param asyncClient The asynchronous client. */ - LogsClient(LogsAsyncClient asyncClient) { + LogsQueryClient(LogsQueryAsyncClient asyncClient) { this.asyncClient = asyncClient; } @@ -63,19 +63,19 @@ public Response queryLogsWithResponse(LogsQueryOptions options, * @return A collection of query results corresponding to the input batch of queries. */ @ServiceMethod(returns = ReturnType.SINGLE) - public LogsQueryBatchResultCollection queryLogsBatch(String workspaceId, List queries, QueryTimeSpan timeSpan) { + public LogsBatchQueryResultCollection queryLogsBatch(String workspaceId, List queries, QueryTimeSpan timeSpan) { return asyncClient.queryLogsBatch(workspaceId, queries, timeSpan).block(); } /** * Returns all the Azure Monitor logs matching the given batch of queries. - * @param logsQueryBatch {@link LogsQueryBatch} containing a batch of queries. + * @param logsBatchQuery {@link LogsBatchQuery} containing a batch of queries. * @param context Additional context that is passed through the Http pipeline during the service call. * @return A collection of query results corresponding to the input batch of queries.@return */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response queryLogsBatchWithResponse(LogsQueryBatch logsQueryBatch, Context context) { - return asyncClient.queryLogsBatchWithResponse(logsQueryBatch, context).block(); + public Response queryLogsBatchWithResponse(LogsBatchQuery logsBatchQuery, Context context) { + return asyncClient.queryLogsBatchWithResponse(logsBatchQuery, context).block(); } } diff --git a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/LogsClientBuilder.java b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/LogsQueryClientBuilder.java similarity index 60% rename from sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/LogsClientBuilder.java rename to sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/LogsQueryClientBuilder.java index 31f07ccf5554..1aac0843d661 100644 --- a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/LogsClientBuilder.java +++ b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/LogsQueryClientBuilder.java @@ -16,21 +16,21 @@ import com.azure.monitor.query.log.implementation.AzureLogAnalyticsImplBuilder; /** - * Fluent builder for creating instances of {@link LogsClient} and {@link LogsAsyncClient}. + * Fluent builder for creating instances of {@link LogsQueryClient} and {@link LogsQueryAsyncClient}. */ -@ServiceClientBuilder(serviceClients = {LogsClient.class, LogsAsyncClient.class}) -public final class LogsClientBuilder { - private final ClientLogger logger = new ClientLogger(LogsClientBuilder.class); +@ServiceClientBuilder(serviceClients = {LogsQueryClient.class, LogsQueryAsyncClient.class}) +public final class LogsQueryClientBuilder { + private final ClientLogger logger = new ClientLogger(LogsQueryClientBuilder.class); private final AzureLogAnalyticsImplBuilder innerLogBuilder = new AzureLogAnalyticsImplBuilder(); private ClientOptions clientOptions; - private LogsServiceVersion serviceVersion; + private LogsQueryServiceVersion serviceVersion; /** * Sets the log query endpoint. * @param endpoint the host value. - * @return the {@link LogsClientBuilder}. + * @return the {@link LogsQueryClientBuilder}. */ - public LogsClientBuilder endpoint(String endpoint) { + public LogsQueryClientBuilder endpoint(String endpoint) { innerLogBuilder.host(endpoint); return this; } @@ -38,9 +38,9 @@ public LogsClientBuilder endpoint(String endpoint) { /** * Sets The HTTP pipeline to send requests through. * @param pipeline the pipeline value. - * @return the {@link LogsClientBuilder}. + * @return the {@link LogsQueryClientBuilder}. */ - public LogsClientBuilder pipeline(HttpPipeline pipeline) { + public LogsQueryClientBuilder pipeline(HttpPipeline pipeline) { innerLogBuilder.pipeline(pipeline); return this; } @@ -48,9 +48,9 @@ public LogsClientBuilder pipeline(HttpPipeline pipeline) { /** * Sets The HTTP client used to send the request. * @param httpClient the httpClient value. - * @return the {@link LogsClientBuilder}. + * @return the {@link LogsQueryClientBuilder}. */ - public LogsClientBuilder httpClient(HttpClient httpClient) { + public LogsQueryClientBuilder httpClient(HttpClient httpClient) { innerLogBuilder.httpClient(httpClient); return this; } @@ -58,9 +58,9 @@ public LogsClientBuilder httpClient(HttpClient httpClient) { /** * Sets The configuration store that is used during construction of the service client. * @param configuration the configuration value. - * @return the {@link LogsClientBuilder}. + * @return the {@link LogsQueryClientBuilder}. */ - public LogsClientBuilder configuration(Configuration configuration) { + public LogsQueryClientBuilder configuration(Configuration configuration) { innerLogBuilder.configuration(configuration); return this; } @@ -68,9 +68,9 @@ public LogsClientBuilder configuration(Configuration configuration) { /** * Sets The logging configuration for HTTP requests and responses. * @param httpLogOptions the httpLogOptions value. - * @return the {@link LogsClientBuilder}. + * @return the {@link LogsQueryClientBuilder}. */ - public LogsClientBuilder httpLogOptions(HttpLogOptions httpLogOptions) { + public LogsQueryClientBuilder httpLogOptions(HttpLogOptions httpLogOptions) { innerLogBuilder.httpLogOptions(httpLogOptions); return this; } @@ -78,9 +78,9 @@ public LogsClientBuilder httpLogOptions(HttpLogOptions httpLogOptions) { /** * Sets The retry policy that will attempt to retry failed requests, if applicable. * @param retryPolicy the retryPolicy value. - * @return the {@link LogsClientBuilder}. + * @return the {@link LogsQueryClientBuilder}. */ - public LogsClientBuilder retryPolicy(RetryPolicy retryPolicy) { + public LogsQueryClientBuilder retryPolicy(RetryPolicy retryPolicy) { innerLogBuilder.retryPolicy(retryPolicy); return this; } @@ -88,9 +88,9 @@ public LogsClientBuilder retryPolicy(RetryPolicy retryPolicy) { /** * Adds a custom Http pipeline policy. * @param customPolicy The custom Http pipeline policy to add. - * @return the {@link LogsClientBuilder}. + * @return the {@link LogsQueryClientBuilder}. */ - public LogsClientBuilder addPolicy(HttpPipelinePolicy customPolicy) { + public LogsQueryClientBuilder addPolicy(HttpPipelinePolicy customPolicy) { innerLogBuilder.addPolicy(customPolicy); return this; } @@ -98,9 +98,9 @@ public LogsClientBuilder addPolicy(HttpPipelinePolicy customPolicy) { /** * Sets The TokenCredential used for authentication. * @param tokenCredential the tokenCredential value. - * @return the {@link LogsClientBuilder}. + * @return the {@link LogsQueryClientBuilder}. */ - public LogsClientBuilder credential(TokenCredential tokenCredential) { + public LogsQueryClientBuilder credential(TokenCredential tokenCredential) { innerLogBuilder.credential(tokenCredential); return this; } @@ -108,37 +108,37 @@ public LogsClientBuilder credential(TokenCredential tokenCredential) { /** * Set the {@link ClientOptions} used for creating the client. * @param clientOptions The {@link ClientOptions}. - * @return the {@link LogsClientBuilder} + * @return the {@link LogsQueryClientBuilder} */ - public LogsClientBuilder clientOptions(ClientOptions clientOptions) { + public LogsQueryClientBuilder clientOptions(ClientOptions clientOptions) { this.clientOptions = clientOptions; return this; } /** * The service version to use when creating the client. - * @param serviceVersion The {@link LogsServiceVersion}. - * @return the {@link LogsClientBuilder} + * @param serviceVersion The {@link LogsQueryServiceVersion}. + * @return the {@link LogsQueryClientBuilder} */ - public LogsClientBuilder serviceVersion(LogsServiceVersion serviceVersion) { + public LogsQueryClientBuilder serviceVersion(LogsQueryServiceVersion serviceVersion) { this.serviceVersion = serviceVersion; return this; } /** * Creates a synchronous client with the configured options in this builder. - * @return A synchronous {@link LogsClient}. + * @return A synchronous {@link LogsQueryClient}. */ - public LogsClient buildClient() { - return new LogsClient(buildAsyncClient()); + public LogsQueryClient buildClient() { + return new LogsQueryClient(buildAsyncClient()); } /** * Creates an asynchronous client with the configured options in this builder. - * @return An asynchronous {@link LogsAsyncClient}. + * @return An asynchronous {@link LogsQueryAsyncClient}. */ - public LogsAsyncClient buildAsyncClient() { + public LogsQueryAsyncClient buildAsyncClient() { logger.info("Using service version " + this.serviceVersion); - return new LogsAsyncClient(innerLogBuilder.buildClient()); + return new LogsQueryAsyncClient(innerLogBuilder.buildClient()); } } diff --git a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/LogsServiceVersion.java b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/LogsQueryServiceVersion.java similarity index 80% rename from sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/LogsServiceVersion.java rename to sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/LogsQueryServiceVersion.java index 486c0400cb8d..27a2f0657ea8 100644 --- a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/LogsServiceVersion.java +++ b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/LogsQueryServiceVersion.java @@ -8,7 +8,7 @@ /** * The service version of the Logs service that can be queried to retrieved Azure Monitor logs. */ -public enum LogsServiceVersion implements ServiceVersion { +public enum LogsQueryServiceVersion implements ServiceVersion { V_1("v1"); String version; @@ -17,7 +17,7 @@ public enum LogsServiceVersion implements ServiceVersion { * The service version. * @param version The service version. */ - LogsServiceVersion(String version) { + LogsQueryServiceVersion(String version) { this.version = version; } @@ -25,7 +25,7 @@ public enum LogsServiceVersion implements ServiceVersion { * Returns the latest supported service version by this library. * @return The latest supported service version by this library. */ - public static LogsServiceVersion getLatest() { + public static LogsQueryServiceVersion getLatest() { return V_1; } diff --git a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/MetricsAsyncClient.java b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/MetricsQueryAsyncClient.java similarity index 76% rename from sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/MetricsAsyncClient.java rename to sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/MetricsQueryAsyncClient.java index fd932e6c1238..67ea597e42f5 100644 --- a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/MetricsAsyncClient.java +++ b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/MetricsQueryAsyncClient.java @@ -12,20 +12,18 @@ import com.azure.core.util.Context; import com.azure.core.util.CoreUtils; import com.azure.monitor.query.metrics.implementation.MonitorManagementClientImpl; -import com.azure.monitor.query.metrics.implementation.models.Metric; -import com.azure.monitor.query.metrics.implementation.models.MetricValue; import com.azure.monitor.query.metrics.implementation.models.MetricsResponse; import com.azure.monitor.query.metrics.implementation.models.ResultType; import com.azure.monitor.query.metrics.implementation.models.TimeSeriesElement; import com.azure.monitor.query.metricsdefinitions.implementation.MetricsDefinitionsClientImpl; import com.azure.monitor.query.metricsnamespaces.implementation.MetricsNamespacesClientImpl; -import com.azure.monitor.query.models.MetricsDefinition; -import com.azure.monitor.query.models.MetricsNamespace; -import com.azure.monitor.query.models.Metrics; +import com.azure.monitor.query.models.MetricDefinition; +import com.azure.monitor.query.models.MetricNamespace; +import com.azure.monitor.query.models.Metric; import com.azure.monitor.query.models.MetricsQueryOptions; import com.azure.monitor.query.models.MetricsQueryResult; -import com.azure.monitor.query.models.MetricsTimeSeriesElement; -import com.azure.monitor.query.models.MetricsValue; +import com.azure.monitor.query.models.MetricTimeSeriesElement; +import com.azure.monitor.query.models.MetricValue; import reactor.core.publisher.Mono; import java.time.OffsetDateTime; @@ -37,15 +35,15 @@ /** * The asynchronous client for querying Azure Monitor metrics. */ -@ServiceClient(builder = MetricsClientBuilder.class, isAsync = true) -public final class MetricsAsyncClient { +@ServiceClient(builder = MetricsQueryClientBuilder.class, isAsync = true) +public final class MetricsQueryAsyncClient { private final MonitorManagementClientImpl metricsClient; private final MetricsNamespacesClientImpl metricsNamespaceClient; private final MetricsDefinitionsClientImpl metricsDefinitionsClient; - MetricsAsyncClient(MonitorManagementClientImpl metricsClient, - MetricsNamespacesClientImpl metricsNamespaceClient, - MetricsDefinitionsClientImpl metricsDefinitionsClients) { + MetricsQueryAsyncClient(MonitorManagementClientImpl metricsClient, + MetricsNamespacesClientImpl metricsNamespaceClient, + MetricsDefinitionsClientImpl metricsDefinitionsClients) { this.metricsClient = metricsClient; this.metricsNamespaceClient = metricsNamespaceClient; this.metricsDefinitionsClient = metricsDefinitionsClients; @@ -82,7 +80,7 @@ public Mono> queryMetricsWithResponse(String resour * @return List of metrics namespaces. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listMetricsNamespace(String resourceUri, OffsetDateTime startTime) { + public PagedFlux listMetricsNamespace(String resourceUri, OffsetDateTime startTime) { return metricsNamespaceClient .getMetricNamespaces() .listAsync(resourceUri, startTime.toString()); @@ -95,19 +93,19 @@ public PagedFlux listMetricsNamespace(String resourceUri, Offs * @return List of metrics definitions. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listMetricsDefinition(String resourceUri, String metricsNamespace) { + public PagedFlux listMetricsDefinition(String resourceUri, String metricsNamespace) { return metricsDefinitionsClient .getMetricDefinitions() .listAsync(resourceUri, metricsNamespace); } - PagedFlux listMetricsNamespace(String resourceUri, OffsetDateTime startTime, Context context) { + PagedFlux listMetricsNamespace(String resourceUri, OffsetDateTime startTime, Context context) { return metricsNamespaceClient .getMetricNamespaces() .listAsync(resourceUri, startTime.toString(), context); } - PagedFlux listMetricsDefinition(String resourceUri, String metricsNamespace, Context context) { + PagedFlux listMetricsDefinition(String resourceUri, String metricsNamespace, Context context) { return metricsDefinitionsClient.getMetricDefinitions() .listAsync(resourceUri, metricsNamespace, context); } @@ -121,9 +119,10 @@ Mono> queryMetricsWithResponse(String resourceUri, .map(type -> String.valueOf(type.ordinal())) .collect(Collectors.joining(",")); } + String timespan = options.getTimeSpan() == null ? null : options.getTimeSpan().toString(); return metricsClient .getMetrics() - .listWithResponseAsync(resourceUri, options.getTimespan(), options.getInterval(), + .listWithResponseAsync(resourceUri, timespan, options.getInterval(), String.join(",", metricsNames), aggregation, options.getTop(), options.getOrderby(), options.getFilter(), ResultType.DATA, options.getMetricsNamespace(), context) .map(response -> convertToMetricsQueryResult(response)); @@ -138,22 +137,22 @@ private Response convertToMetricsQueryResult(Response(response.getRequest(), response.getStatusCode(), response.getHeaders(), metricsQueryResult); } - private List mapMetrics(List value) { + private List mapMetrics(List value) { return value.stream() - .map(metric -> new Metrics(metric.getId(), metric.getType(), metric.getUnit(), metric.getName().getValue(), + .map(metric -> new Metric(metric.getId(), metric.getType(), metric.getUnit(), metric.getName().getValue(), mapTimeSeries(metric.getTimeseries()))) .collect(Collectors.toList()); } - private List mapTimeSeries(List timeseries) { + private List mapTimeSeries(List timeseries) { return timeseries.stream() - .map(timeSeriesElement -> new MetricsTimeSeriesElement(mapMetricsData(timeSeriesElement.getData()))) + .map(timeSeriesElement -> new MetricTimeSeriesElement(mapMetricsData(timeSeriesElement.getData()))) .collect(Collectors.toList()); } - private List mapMetricsData(List data) { + private List mapMetricsData(List data) { return data.stream() - .map(metricValue -> new MetricsValue(metricValue.getTimeStamp(), + .map(metricValue -> new MetricValue(metricValue.getTimeStamp(), metricValue.getAverage(), metricValue.getMinimum(), metricValue.getMaximum(), metricValue.getTotal(), metricValue.getCount())) .collect(Collectors.toList()); diff --git a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/MetricsClient.java b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/MetricsQueryClient.java similarity index 83% rename from sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/MetricsClient.java rename to sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/MetricsQueryClient.java index 02f52090f85b..78425efa0d3f 100644 --- a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/MetricsClient.java +++ b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/MetricsQueryClient.java @@ -9,8 +9,8 @@ import com.azure.core.http.rest.PagedIterable; import com.azure.core.http.rest.Response; import com.azure.core.util.Context; -import com.azure.monitor.query.models.MetricsDefinition; -import com.azure.monitor.query.models.MetricsNamespace; +import com.azure.monitor.query.models.MetricDefinition; +import com.azure.monitor.query.models.MetricNamespace; import com.azure.monitor.query.models.MetricsQueryOptions; import com.azure.monitor.query.models.MetricsQueryResult; @@ -20,11 +20,11 @@ /** * The synchronous client for querying Azure Monitor metrics. */ -@ServiceClient(builder = MetricsClientBuilder.class) -public final class MetricsClient { - private final MetricsAsyncClient asyncClient; +@ServiceClient(builder = MetricsQueryClientBuilder.class) +public final class MetricsQueryClient { + private final MetricsQueryAsyncClient asyncClient; - MetricsClient(MetricsAsyncClient asyncClient) { + MetricsQueryClient(MetricsQueryAsyncClient asyncClient) { this.asyncClient = asyncClient; } @@ -62,7 +62,7 @@ public Response queryMetricsWithResponse(String resourceUri, * @return List of metrics namespaces. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listMetricsNamespace(String resourceUri, OffsetDateTime startTime) { + public PagedIterable listMetricsNamespace(String resourceUri, OffsetDateTime startTime) { return listMetricsNamespace(resourceUri, startTime, Context.NONE); } @@ -74,8 +74,8 @@ public PagedIterable listMetricsNamespace(String resourceUri, * @return List of metrics namespaces. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listMetricsNamespace(String resourceUri, OffsetDateTime startTime, - Context context) { + public PagedIterable listMetricsNamespace(String resourceUri, OffsetDateTime startTime, + Context context) { return new PagedIterable<>(asyncClient.listMetricsNamespace(resourceUri, startTime, context)); } @@ -86,7 +86,7 @@ public PagedIterable listMetricsNamespace(String resourceUri, * @return List of metrics definitions. */ @ServiceMethod(returns = ReturnType.SINGLE) - public PagedIterable listMetricsDefinition(String resourceUri, String metricsNamespace) { + public PagedIterable listMetricsDefinition(String resourceUri, String metricsNamespace) { return listMetricsDefinition(resourceUri, metricsNamespace, Context.NONE); } @@ -98,8 +98,8 @@ public PagedIterable listMetricsDefinition(String resourceUri * @return List of metrics definitions. */ @ServiceMethod(returns = ReturnType.SINGLE) - public PagedIterable listMetricsDefinition(String resourceUri, String metricsNamespace, - Context context) { + public PagedIterable listMetricsDefinition(String resourceUri, String metricsNamespace, + Context context) { return new PagedIterable<>(asyncClient.listMetricsDefinition(resourceUri, metricsNamespace, context)); } } diff --git a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/MetricsClientBuilder.java b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/MetricsQueryClientBuilder.java similarity index 75% rename from sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/MetricsClientBuilder.java rename to sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/MetricsQueryClientBuilder.java index 6cb0ddaea9f8..5167367d600c 100644 --- a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/MetricsClientBuilder.java +++ b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/MetricsQueryClientBuilder.java @@ -18,19 +18,19 @@ import com.azure.monitor.query.metricsnamespaces.implementation.MetricsNamespacesClientImplBuilder; /** - * Fluent builder for creating instances of {@link MetricsClient} and {@link MetricsAsyncClient}. + * Fluent builder for creating instances of {@link MetricsQueryClient} and {@link MetricsQueryAsyncClient}. */ -@ServiceClientBuilder(serviceClients = {MetricsClient.class, MetricsAsyncClient.class}) -public final class MetricsClientBuilder { +@ServiceClientBuilder(serviceClients = {MetricsQueryClient.class, MetricsQueryAsyncClient.class}) +public final class MetricsQueryClientBuilder { private final MonitorManagementClientImplBuilder innerMetricsBuilder = new MonitorManagementClientImplBuilder(); private final MetricsDefinitionsClientImplBuilder innerMetricsDefinitionsBuilder = new MetricsDefinitionsClientImplBuilder(); private final MetricsNamespacesClientImplBuilder innerMetricsNamespaceBuilder = new MetricsNamespacesClientImplBuilder(); - private final ClientLogger logger = new ClientLogger(MetricsClientBuilder.class); + private final ClientLogger logger = new ClientLogger(MetricsQueryClientBuilder.class); private ClientOptions clientOptions; - private MetricsServiceVersion serviceVersion; + private MetricsQueryServiceVersion serviceVersion; /** @@ -38,7 +38,7 @@ public final class MetricsClientBuilder { * @param endpoint the host value. * @return the MetricsClientBuilder. */ - public MetricsClientBuilder endpoint(String endpoint) { + public MetricsQueryClientBuilder endpoint(String endpoint) { innerMetricsBuilder.host(endpoint); innerMetricsDefinitionsBuilder.host(endpoint); innerMetricsNamespaceBuilder.host(endpoint); @@ -50,7 +50,7 @@ public MetricsClientBuilder endpoint(String endpoint) { * @param pipeline the pipeline value. * @return the MetricsClientBuilder. */ - public MetricsClientBuilder pipeline(HttpPipeline pipeline) { + public MetricsQueryClientBuilder pipeline(HttpPipeline pipeline) { innerMetricsBuilder.pipeline(pipeline); innerMetricsDefinitionsBuilder.pipeline(pipeline); innerMetricsNamespaceBuilder.pipeline(pipeline); @@ -62,7 +62,7 @@ public MetricsClientBuilder pipeline(HttpPipeline pipeline) { * @param httpClient the httpClient value. * @return the MetricsClientBuilder. */ - public MetricsClientBuilder httpClient(HttpClient httpClient) { + public MetricsQueryClientBuilder httpClient(HttpClient httpClient) { innerMetricsBuilder.httpClient(httpClient); innerMetricsDefinitionsBuilder.httpClient(httpClient); innerMetricsNamespaceBuilder.httpClient(httpClient); @@ -74,7 +74,7 @@ public MetricsClientBuilder httpClient(HttpClient httpClient) { * @param configuration the configuration value. * @return the MetricsClientBuilder. */ - public MetricsClientBuilder configuration(Configuration configuration) { + public MetricsQueryClientBuilder configuration(Configuration configuration) { innerMetricsBuilder.configuration(configuration); innerMetricsDefinitionsBuilder.configuration(configuration); innerMetricsNamespaceBuilder.configuration(configuration); @@ -86,7 +86,7 @@ public MetricsClientBuilder configuration(Configuration configuration) { * @param httpLogOptions the httpLogOptions value. * @return the MetricsClientBuilder. */ - public MetricsClientBuilder httpLogOptions(HttpLogOptions httpLogOptions) { + public MetricsQueryClientBuilder httpLogOptions(HttpLogOptions httpLogOptions) { innerMetricsBuilder.httpLogOptions(httpLogOptions); innerMetricsDefinitionsBuilder.httpLogOptions(httpLogOptions); innerMetricsNamespaceBuilder.httpLogOptions(httpLogOptions); @@ -98,7 +98,7 @@ public MetricsClientBuilder httpLogOptions(HttpLogOptions httpLogOptions) { * @param retryPolicy the retryPolicy value. * @return the MetricsClientBuilder. */ - public MetricsClientBuilder retryPolicy(RetryPolicy retryPolicy) { + public MetricsQueryClientBuilder retryPolicy(RetryPolicy retryPolicy) { innerMetricsBuilder.retryPolicy(retryPolicy); innerMetricsDefinitionsBuilder.retryPolicy(retryPolicy); innerMetricsNamespaceBuilder.retryPolicy(retryPolicy); @@ -110,7 +110,7 @@ public MetricsClientBuilder retryPolicy(RetryPolicy retryPolicy) { * @param customPolicy The custom Http pipeline policy to add. * @return the MetricsClientBuilder. */ - public MetricsClientBuilder addPolicy(HttpPipelinePolicy customPolicy) { + public MetricsQueryClientBuilder addPolicy(HttpPipelinePolicy customPolicy) { innerMetricsBuilder.addPolicy(customPolicy); innerMetricsDefinitionsBuilder.addPolicy(customPolicy); innerMetricsNamespaceBuilder.addPolicy(customPolicy); @@ -122,7 +122,7 @@ public MetricsClientBuilder addPolicy(HttpPipelinePolicy customPolicy) { * @param tokenCredential the tokenCredential value. * @return the MetricsClientBuilder. */ - public MetricsClientBuilder credential(TokenCredential tokenCredential) { + public MetricsQueryClientBuilder credential(TokenCredential tokenCredential) { innerMetricsBuilder.credential(tokenCredential); innerMetricsDefinitionsBuilder.credential(tokenCredential); innerMetricsNamespaceBuilder.credential(tokenCredential); @@ -132,38 +132,38 @@ public MetricsClientBuilder credential(TokenCredential tokenCredential) { /** * Set the {@link ClientOptions} used for creating the client. * @param clientOptions The {@link ClientOptions}. - * @return the {@link MetricsClientBuilder} + * @return the {@link MetricsQueryClientBuilder} */ - public MetricsClientBuilder clientOptions(ClientOptions clientOptions) { + public MetricsQueryClientBuilder clientOptions(ClientOptions clientOptions) { this.clientOptions = clientOptions; return this; } /** * The service version to use when creating the client. - * @param serviceVersion The {@link MetricsServiceVersion}. - * @return the {@link MetricsClientBuilder} + * @param serviceVersion The {@link MetricsQueryServiceVersion}. + * @return the {@link MetricsQueryClientBuilder} */ - public MetricsClientBuilder serviceVersion(MetricsServiceVersion serviceVersion) { + public MetricsQueryClientBuilder serviceVersion(MetricsQueryServiceVersion serviceVersion) { this.serviceVersion = serviceVersion; return this; } /** * Creates a synchronous client with the configured options in this builder. - * @return A synchronous {@link MetricsClient}. + * @return A synchronous {@link MetricsQueryClient}. */ - public MetricsClient buildClient() { - return new MetricsClient(buildAsyncClient()); + public MetricsQueryClient buildClient() { + return new MetricsQueryClient(buildAsyncClient()); } /** * Creates an asynchronous client with the configured options in this builder. - * @return An asynchronous {@link MetricsAsyncClient}. + * @return An asynchronous {@link MetricsQueryAsyncClient}. */ - public MetricsAsyncClient buildAsyncClient() { + public MetricsQueryAsyncClient buildAsyncClient() { logger.info("Using service version " + this.serviceVersion); - return new MetricsAsyncClient(innerMetricsBuilder.buildClient(), + return new MetricsQueryAsyncClient(innerMetricsBuilder.buildClient(), innerMetricsNamespaceBuilder.buildClient(), innerMetricsDefinitionsBuilder.buildClient()); } diff --git a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/MetricsServiceVersion.java b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/MetricsQueryServiceVersion.java similarity index 80% rename from sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/MetricsServiceVersion.java rename to sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/MetricsQueryServiceVersion.java index 70258c260a8f..c06d87579cd3 100644 --- a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/MetricsServiceVersion.java +++ b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/MetricsQueryServiceVersion.java @@ -8,7 +8,7 @@ /** * The service version of the Metrics service that can be queried to retrieved Azure Monitor metrics. */ -public enum MetricsServiceVersion implements ServiceVersion { +public enum MetricsQueryServiceVersion implements ServiceVersion { V_1("v1"); String version; @@ -17,7 +17,7 @@ public enum MetricsServiceVersion implements ServiceVersion { * The service version. * @param version The service version. */ - MetricsServiceVersion(String version) { + MetricsQueryServiceVersion(String version) { this.version = version; } @@ -25,7 +25,7 @@ public enum MetricsServiceVersion implements ServiceVersion { * Returns the latest supported service version by this library. * @return The latest supported service version by this library. */ - public static MetricsServiceVersion getLatest() { + public static MetricsQueryServiceVersion getLatest() { return V_1; } diff --git a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/log/implementation/QueriesImpl.java b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/log/implementation/QueriesImpl.java index ad8f18a58e0f..6e5d14ca7167 100644 --- a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/log/implementation/QueriesImpl.java +++ b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/log/implementation/QueriesImpl.java @@ -245,7 +245,7 @@ public Response getWithResponse( * @param workspaceId ID of the workspace. This is Workspace ID from the Properties blade in the Azure portal. * @param body The Analytics query. Learn more about the [Analytics query * syntax](https://azure.microsoft.com/documentation/articles/app-insights-analytics-reference/). - * @param prefer Optional. The prefer header to set server timeout,. + * @param prefer Optional. The prefer header to set server timeout, query statistics and visualization information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ErrorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -277,7 +277,7 @@ public Mono> executeWithResponseAsync(String workspaceId, * @param workspaceId ID of the workspace. This is Workspace ID from the Properties blade in the Azure portal. * @param body The Analytics query. Learn more about the [Analytics query * syntax](https://azure.microsoft.com/documentation/articles/app-insights-analytics-reference/). - * @param prefer Optional. The prefer header to set server timeout,. + * @param prefer Optional. The prefer header to set server timeout, query statistics and visualization information. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ErrorResponseException thrown if the request is rejected by server. @@ -310,7 +310,7 @@ public Mono> executeWithResponseAsync( * @param workspaceId ID of the workspace. This is Workspace ID from the Properties blade in the Azure portal. * @param body The Analytics query. Learn more about the [Analytics query * syntax](https://azure.microsoft.com/documentation/articles/app-insights-analytics-reference/). - * @param prefer Optional. The prefer header to set server timeout,. + * @param prefer Optional. The prefer header to set server timeout, query statistics and visualization information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ErrorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -336,7 +336,7 @@ public Mono executeAsync(String workspaceId, QueryBody body, Strin * @param workspaceId ID of the workspace. This is Workspace ID from the Properties blade in the Azure portal. * @param body The Analytics query. Learn more about the [Analytics query * syntax](https://azure.microsoft.com/documentation/articles/app-insights-analytics-reference/). - * @param prefer Optional. The prefer header to set server timeout,. + * @param prefer Optional. The prefer header to set server timeout, query statistics and visualization information. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ErrorResponseException thrown if the request is rejected by server. @@ -363,7 +363,7 @@ public Mono executeAsync(String workspaceId, QueryBody body, Strin * @param workspaceId ID of the workspace. This is Workspace ID from the Properties blade in the Azure portal. * @param body The Analytics query. Learn more about the [Analytics query * syntax](https://azure.microsoft.com/documentation/articles/app-insights-analytics-reference/). - * @param prefer Optional. The prefer header to set server timeout,. + * @param prefer Optional. The prefer header to set server timeout, query statistics and visualization information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ErrorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -381,7 +381,7 @@ public QueryResults execute(String workspaceId, QueryBody body, String prefer) { * @param workspaceId ID of the workspace. This is Workspace ID from the Properties blade in the Azure portal. * @param body The Analytics query. Learn more about the [Analytics query * syntax](https://azure.microsoft.com/documentation/articles/app-insights-analytics-reference/). - * @param prefer Optional. The prefer header to set server timeout,. + * @param prefer Optional. The prefer header to set server timeout, query statistics and visualization information. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ErrorResponseException thrown if the request is rejected by server. @@ -402,7 +402,7 @@ public Response executeWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ErrorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response to a batch. + * @return response to a batch query. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono> batchWithResponseAsync(BatchRequest body) { @@ -428,7 +428,7 @@ public Mono> batchWithResponseAsync(BatchRequest body) { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ErrorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response to a batch. + * @return response to a batch query. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono> batchWithResponseAsync(BatchRequest body, Context context) { @@ -453,7 +453,7 @@ public Mono> batchWithResponseAsync(BatchRequest body, C * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ErrorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response to a batch. + * @return response to a batch query. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono batchAsync(BatchRequest body) { @@ -477,7 +477,7 @@ public Mono batchAsync(BatchRequest body) { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ErrorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response to a batch. + * @return response to a batch query. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono batchAsync(BatchRequest body, Context context) { @@ -500,7 +500,7 @@ public Mono batchAsync(BatchRequest body, Context context) { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ErrorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response to a batch. + * @return response to a batch query. */ @ServiceMethod(returns = ReturnType.SINGLE) public BatchResponse batch(BatchRequest body) { @@ -516,7 +516,7 @@ public BatchResponse batch(BatchRequest body) { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ErrorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response to a batch. + * @return response to a batch query. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response batchWithResponse(BatchRequest body, Context context) { diff --git a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/log/implementation/models/LogQueryRequest.java b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/log/implementation/models/BatchQueryRequest.java similarity index 70% rename from sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/log/implementation/models/LogQueryRequest.java rename to sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/log/implementation/models/BatchQueryRequest.java index 4ec37a1b7d26..5efb84caa3c8 100644 --- a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/log/implementation/models/LogQueryRequest.java +++ b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/log/implementation/models/BatchQueryRequest.java @@ -5,16 +5,17 @@ package com.azure.monitor.query.log.implementation.models; import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.Map; /** An single request in a batch. */ @Fluent -public final class LogQueryRequest { +public final class BatchQueryRequest { /* * The error details. */ - @JsonProperty(value = "id") + @JsonProperty(value = "id", required = true) private String id; /* @@ -27,7 +28,7 @@ public final class LogQueryRequest { * The Analytics query. Learn more about the [Analytics query * syntax](https://azure.microsoft.com/documentation/articles/app-insights-analytics-reference/) */ - @JsonProperty(value = "body") + @JsonProperty(value = "body", required = true) private QueryBody body; /* @@ -45,27 +46,33 @@ public final class LogQueryRequest { /* * Workspace Id to be included in the query */ - @JsonProperty(value = "workspace") + @JsonProperty(value = "workspace", required = true) private String workspace; /** - * Get the id property: The error details. + * Creates an instance of BatchQueryRequest class. * - * @return the id value. + * @param id the id value to set. + * @param body the body value to set. + * @param workspace the workspace value to set. */ - public String getId() { - return this.id; + @JsonCreator + public BatchQueryRequest( + @JsonProperty(value = "id", required = true) String id, + @JsonProperty(value = "body", required = true) QueryBody body, + @JsonProperty(value = "workspace", required = true) String workspace) { + this.id = id; + this.body = body; + this.workspace = workspace; } /** - * Set the id property: The error details. + * Get the id property: The error details. * - * @param id the id value to set. - * @return the LogQueryRequest object itself. + * @return the id value. */ - public LogQueryRequest setId(String id) { - this.id = id; - return this; + public String getId() { + return this.id; } /** @@ -81,9 +88,9 @@ public Map getHeaders() { * Set the headers property: Dictionary of <string>. * * @param headers the headers value to set. - * @return the LogQueryRequest object itself. + * @return the BatchQueryRequest object itself. */ - public LogQueryRequest setHeaders(Map headers) { + public BatchQueryRequest setHeaders(Map headers) { this.headers = headers; return this; } @@ -98,18 +105,6 @@ public QueryBody getBody() { return this.body; } - /** - * Set the body property: The Analytics query. Learn more about the [Analytics query - * syntax](https://azure.microsoft.com/documentation/articles/app-insights-analytics-reference/). - * - * @param body the body value to set. - * @return the LogQueryRequest object itself. - */ - public LogQueryRequest setBody(QueryBody body) { - this.body = body; - return this; - } - /** * Get the path property: The path property. * @@ -123,9 +118,9 @@ public String getPath() { * Set the path property: The path property. * * @param path the path value to set. - * @return the LogQueryRequest object itself. + * @return the BatchQueryRequest object itself. */ - public LogQueryRequest setPath(String path) { + public BatchQueryRequest setPath(String path) { this.path = path; return this; } @@ -143,9 +138,9 @@ public String getMethod() { * Set the method property: The method property. * * @param method the method value to set. - * @return the LogQueryRequest object itself. + * @return the BatchQueryRequest object itself. */ - public LogQueryRequest setMethod(String method) { + public BatchQueryRequest setMethod(String method) { this.method = method; return this; } @@ -159,25 +154,22 @@ public String getWorkspace() { return this.workspace; } - /** - * Set the workspace property: Workspace Id to be included in the query. - * - * @param workspace the workspace value to set. - * @return the LogQueryRequest object itself. - */ - public LogQueryRequest setWorkspace(String workspace) { - this.workspace = workspace; - return this; - } - /** * Validates the instance. * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (getBody() != null) { + if (getId() == null) { + throw new IllegalArgumentException("Missing required property id in model BatchQueryRequest"); + } + if (getBody() == null) { + throw new IllegalArgumentException("Missing required property body in model BatchQueryRequest"); + } else { getBody().validate(); } + if (getWorkspace() == null) { + throw new IllegalArgumentException("Missing required property workspace in model BatchQueryRequest"); + } } } diff --git a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/log/implementation/models/LogQueryResponse.java b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/log/implementation/models/BatchQueryResponse.java similarity index 73% rename from sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/log/implementation/models/LogQueryResponse.java rename to sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/log/implementation/models/BatchQueryResponse.java index e85f70123985..2808ee98a785 100644 --- a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/log/implementation/models/LogQueryResponse.java +++ b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/log/implementation/models/BatchQueryResponse.java @@ -8,9 +8,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.Map; -/** The LogQueryResponse model. */ +/** The BatchQueryResponse model. */ @Fluent -public final class LogQueryResponse { +public final class BatchQueryResponse { /* * The id property. */ @@ -24,11 +24,10 @@ public final class LogQueryResponse { private Integer status; /* - * Contains the tables, columns & rows resulting from the query or the - * error details if the query failed. + * Contains the tables, columns & rows resulting from a query. */ @JsonProperty(value = "body") - private LogQueryResult body; + private QueryResults body; /* * Dictionary of @@ -49,9 +48,9 @@ public String getId() { * Set the id property: The id property. * * @param id the id value to set. - * @return the LogQueryResponse object itself. + * @return the BatchQueryResponse object itself. */ - public LogQueryResponse setId(String id) { + public BatchQueryResponse setId(String id) { this.id = id; return this; } @@ -69,31 +68,29 @@ public Integer getStatus() { * Set the status property: The status property. * * @param status the status value to set. - * @return the LogQueryResponse object itself. + * @return the BatchQueryResponse object itself. */ - public LogQueryResponse setStatus(Integer status) { + public BatchQueryResponse setStatus(Integer status) { this.status = status; return this; } /** - * Get the body property: Contains the tables, columns & rows resulting from the query or the error details if - * the query failed. + * Get the body property: Contains the tables, columns & rows resulting from a query. * * @return the body value. */ - public LogQueryResult getBody() { + public QueryResults getBody() { return this.body; } /** - * Set the body property: Contains the tables, columns & rows resulting from the query or the error details if - * the query failed. + * Set the body property: Contains the tables, columns & rows resulting from a query. * * @param body the body value to set. - * @return the LogQueryResponse object itself. + * @return the BatchQueryResponse object itself. */ - public LogQueryResponse setBody(LogQueryResult body) { + public BatchQueryResponse setBody(QueryResults body) { this.body = body; return this; } @@ -111,9 +108,9 @@ public Map getHeaders() { * Set the headers property: Dictionary of <string>. * * @param headers the headers value to set. - * @return the LogQueryResponse object itself. + * @return the BatchQueryResponse object itself. */ - public LogQueryResponse setHeaders(Map headers) { + public BatchQueryResponse setHeaders(Map headers) { this.headers = headers; return this; } diff --git a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/log/implementation/models/BatchRequest.java b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/log/implementation/models/BatchRequest.java index d87c285cb6ae..9c3fa4535b87 100644 --- a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/log/implementation/models/BatchRequest.java +++ b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/log/implementation/models/BatchRequest.java @@ -5,6 +5,7 @@ package com.azure.monitor.query.log.implementation.models; import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; @@ -14,27 +15,26 @@ public final class BatchRequest { /* * An single request in a batch. */ - @JsonProperty(value = "requests") - private List requests; + @JsonProperty(value = "requests", required = true) + private List requests; /** - * Get the requests property: An single request in a batch. + * Creates an instance of BatchRequest class. * - * @return the requests value. + * @param requests the requests value to set. */ - public List getRequests() { - return this.requests; + @JsonCreator + public BatchRequest(@JsonProperty(value = "requests", required = true) List requests) { + this.requests = requests; } /** - * Set the requests property: An single request in a batch. + * Get the requests property: An single request in a batch. * - * @param requests the requests value to set. - * @return the BatchRequest object itself. + * @return the requests value. */ - public BatchRequest setRequests(List requests) { - this.requests = requests; - return this; + public List getRequests() { + return this.requests; } /** @@ -43,7 +43,9 @@ public BatchRequest setRequests(List requests) { * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (getRequests() != null) { + if (getRequests() == null) { + throw new IllegalArgumentException("Missing required property requests in model BatchRequest"); + } else { getRequests().forEach(e -> e.validate()); } } diff --git a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/log/implementation/models/BatchResponse.java b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/log/implementation/models/BatchResponse.java index d717938fb917..1fef944fb8aa 100644 --- a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/log/implementation/models/BatchResponse.java +++ b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/log/implementation/models/BatchResponse.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** Response to a batch. */ +/** Response to a batch query. */ @Fluent public final class BatchResponse { /* @@ -16,14 +16,14 @@ public final class BatchResponse { * batch. */ @JsonProperty(value = "responses") - private List responses; + private List responses; /** * Get the responses property: An array of responses corresponding to each individual request in a batch. * * @return the responses value. */ - public List getResponses() { + public List getResponses() { return this.responses; } @@ -33,7 +33,7 @@ public List getResponses() { * @param responses the responses value to set. * @return the BatchResponse object itself. */ - public BatchResponse setResponses(List responses) { + public BatchResponse setResponses(List responses) { this.responses = responses; return this; } diff --git a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/log/implementation/models/Column.java b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/log/implementation/models/Column.java index 78d3a0403617..dfb3306168ec 100644 --- a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/log/implementation/models/Column.java +++ b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/log/implementation/models/Column.java @@ -5,7 +5,7 @@ package com.azure.monitor.query.log.implementation.models; import com.azure.core.annotation.Fluent; -import com.azure.monitor.query.models.ColumnDataType; +import com.azure.monitor.query.models.LogsColumnType; import com.fasterxml.jackson.annotation.JsonProperty; /** A column in a table. */ @@ -21,7 +21,7 @@ public final class Column { * The data type of this column. */ @JsonProperty(value = "type") - private ColumnDataType type; + private LogsColumnType type; /** * Get the name property: The name of this column. @@ -48,7 +48,7 @@ public Column setName(String name) { * * @return the type value. */ - public ColumnDataType getType() { + public LogsColumnType getType() { return this.type; } @@ -58,7 +58,7 @@ public ColumnDataType getType() { * @param type the type value to set. * @return the Column object itself. */ - public Column setType(ColumnDataType type) { + public Column setType(LogsColumnType type) { this.type = type; return this; } diff --git a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/log/implementation/models/LogQueryResult.java b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/log/implementation/models/LogQueryResult.java deleted file mode 100644 index 0fa6775fba39..000000000000 --- a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/log/implementation/models/LogQueryResult.java +++ /dev/null @@ -1,79 +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.monitor.query.log.implementation.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** Contains the tables, columns & rows resulting from the query or the error details if the query failed. */ -@Fluent -public final class LogQueryResult { - /* - * The list of tables, columns and rows. - */ - @JsonProperty(value = "tables") - private List tables; - - /* - * The code and message for an error. - */ - @JsonProperty(value = "error") - private ErrorInfo error; - - /** - * Get the tables property: The list of tables, columns and rows. - * - * @return the tables value. - */ - public List
getTables() { - return this.tables; - } - - /** - * Set the tables property: The list of tables, columns and rows. - * - * @param tables the tables value to set. - * @return the LogQueryResult object itself. - */ - public LogQueryResult setTables(List
tables) { - this.tables = tables; - return this; - } - - /** - * Get the error property: The code and message for an error. - * - * @return the error value. - */ - public ErrorInfo getError() { - return this.error; - } - - /** - * Set the error property: The code and message for an error. - * - * @param error the error value to set. - * @return the LogQueryResult object itself. - */ - public LogQueryResult setError(ErrorInfo error) { - this.error = error; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (getTables() != null) { - getTables().forEach(e -> e.validate()); - } - if (getError() != null) { - getError().validate(); - } - } -} diff --git a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/log/implementation/models/MetadataColumnDataType.java b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/log/implementation/models/MetadataColumnDataType.java index cd5fe6ddb831..4b5c126e587c 100644 --- a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/log/implementation/models/MetadataColumnDataType.java +++ b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/log/implementation/models/MetadataColumnDataType.java @@ -31,6 +31,15 @@ public final class MetadataColumnDataType extends ExpandableStringEnum workspaces; - /* - * A list of qualified workspace names that are included in the query. - */ - @JsonProperty(value = "qualifiedNames") - private List qualifiedNames; - - /* - * A list of workspace IDs that are included in the query. - */ - @JsonProperty(value = "workspaceIds") - private List workspaceIds; - - /* - * A list of Azure resource IDs that are included in the query. - */ - @JsonProperty(value = "azureResourceIds") - private List azureResourceIds; - /** * Creates an instance of QueryBody class. * @@ -114,66 +96,6 @@ public QueryBody setWorkspaces(List workspaces) { return this; } - /** - * Get the qualifiedNames property: A list of qualified workspace names that are included in the query. - * - * @return the qualifiedNames value. - */ - public List getQualifiedNames() { - return this.qualifiedNames; - } - - /** - * Set the qualifiedNames property: A list of qualified workspace names that are included in the query. - * - * @param qualifiedNames the qualifiedNames value to set. - * @return the QueryBody object itself. - */ - public QueryBody setQualifiedNames(List qualifiedNames) { - this.qualifiedNames = qualifiedNames; - return this; - } - - /** - * Get the workspaceIds property: A list of workspace IDs that are included in the query. - * - * @return the workspaceIds value. - */ - public List getWorkspaceIds() { - return this.workspaceIds; - } - - /** - * Set the workspaceIds property: A list of workspace IDs that are included in the query. - * - * @param workspaceIds the workspaceIds value to set. - * @return the QueryBody object itself. - */ - public QueryBody setWorkspaceIds(List workspaceIds) { - this.workspaceIds = workspaceIds; - return this; - } - - /** - * Get the azureResourceIds property: A list of Azure resource IDs that are included in the query. - * - * @return the azureResourceIds value. - */ - public List getAzureResourceIds() { - return this.azureResourceIds; - } - - /** - * Set the azureResourceIds property: A list of Azure resource IDs that are included in the query. - * - * @param azureResourceIds the azureResourceIds value to set. - * @return the QueryBody object itself. - */ - public QueryBody setAzureResourceIds(List azureResourceIds) { - this.azureResourceIds = azureResourceIds; - return this; - } - /** * Validates the instance. * diff --git a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/log/implementation/models/QueryResults.java b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/log/implementation/models/QueryResults.java index 17111b0fddf2..bdf22cebd1b1 100644 --- a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/log/implementation/models/QueryResults.java +++ b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/log/implementation/models/QueryResults.java @@ -15,7 +15,7 @@ public final class QueryResults { /* * The list of tables, columns and rows. */ - @JsonProperty(value = "tables", required = true) + @JsonProperty(value = "tables") private List
tables; /* @@ -24,13 +24,19 @@ public final class QueryResults { @JsonProperty(value = "statistics") private Object statistics; + /* + * The code and message for an error. + */ + @JsonProperty(value = "error") + private ErrorInfo error; + /** * Creates an instance of QueryResults class. * * @param tables the tables value to set. */ @JsonCreator - public QueryResults(@JsonProperty(value = "tables", required = true) List
tables) { + public QueryResults(@JsonProperty(value = "tables") List
tables) { this.tables = tables; } @@ -63,6 +69,26 @@ public QueryResults setStatistics(Object statistics) { return this; } + /** + * Get the error property: The code and message for an error. + * + * @return the error value. + */ + public ErrorInfo getError() { + return this.error; + } + + /** + * Set the error property: The code and message for an error. + * + * @param error the error value to set. + * @return the QueryResults object itself. + */ + public QueryResults setError(ErrorInfo error) { + this.error = error; + return this; + } + /** * Validates the instance. * @@ -74,5 +100,8 @@ public void validate() { } else { getTables().forEach(e -> e.validate()); } + if (getError() != null) { + getError().validate(); + } } } diff --git a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/metrics/implementation/models/Metric.java b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/metrics/implementation/models/Metric.java index ecdafe8d53dd..ac4f76ac3d65 100644 --- a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/metrics/implementation/models/Metric.java +++ b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/metrics/implementation/models/Metric.java @@ -5,7 +5,7 @@ package com.azure.monitor.query.metrics.implementation.models; import com.azure.core.annotation.Fluent; -import com.azure.monitor.query.models.MetricsUnit; +import com.azure.monitor.query.models.MetricUnit; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; @@ -48,7 +48,7 @@ public final class Metric { * the unit of the metric. */ @JsonProperty(value = "unit", required = true) - private MetricsUnit unit; + private MetricUnit unit; /* * the time series returned when a data query is performed. @@ -72,7 +72,7 @@ public Metric( @JsonProperty(value = "type", required = true) String type, @JsonProperty(value = "name", required = true) LocalizableString name, @JsonProperty(value = "displayDescription", required = true) String displayDescription, - @JsonProperty(value = "unit", required = true) MetricsUnit unit, + @JsonProperty(value = "unit", required = true) MetricUnit unit, @JsonProperty(value = "timeseries", required = true) List timeseries) { this.id = id; this.type = type; @@ -143,7 +143,7 @@ public Metric setErrorCode(String errorCode) { * * @return the unit value. */ - public MetricsUnit getUnit() { + public MetricUnit getUnit() { return this.unit; } diff --git a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/metricsdefinitions/implementation/MetricDefinitionsImpl.java b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/metricsdefinitions/implementation/MetricDefinitionsImpl.java index e0dc9141c6f5..eb62da3d9243 100644 --- a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/metricsdefinitions/implementation/MetricDefinitionsImpl.java +++ b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/metricsdefinitions/implementation/MetricDefinitionsImpl.java @@ -25,7 +25,7 @@ import com.azure.core.util.FluxUtil; import com.azure.monitor.query.metricsdefinitions.implementation.models.ErrorResponseException; import com.azure.monitor.query.metricsdefinitions.implementation.models.MetricDefinitionCollection; -import com.azure.monitor.query.models.MetricsDefinition; +import com.azure.monitor.query.models.MetricDefinition; import reactor.core.publisher.Mono; /** An instance of this class provides access to all the operations defined in MetricDefinitions. */ @@ -78,7 +78,7 @@ Mono> list( * @return represents collection of metric definitions. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> listSinglePageAsync(String resourceUri, String metricnamespace) { + public Mono> listSinglePageAsync(String resourceUri, String metricnamespace) { if (this.client.getHost() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getHost() is required and cannot be null.")); @@ -119,7 +119,7 @@ public Mono> listSinglePageAsync(String resourc * @return represents collection of metric definitions. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> listSinglePageAsync( + public Mono> listSinglePageAsync( String resourceUri, String metricnamespace, Context context) { if (this.client.getHost() == null) { return Mono.error( @@ -158,7 +158,7 @@ public Mono> listSinglePageAsync( * @return represents collection of metric definitions. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listAsync(String resourceUri, String metricnamespace) { + public PagedFlux listAsync(String resourceUri, String metricnamespace) { return new PagedFlux<>(() -> listSinglePageAsync(resourceUri, metricnamespace)); } @@ -174,7 +174,7 @@ public PagedFlux listAsync(String resourceUri, String metricn * @return represents collection of metric definitions. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listAsync(String resourceUri, String metricnamespace, Context context) { + public PagedFlux listAsync(String resourceUri, String metricnamespace, Context context) { return new PagedFlux<>(() -> listSinglePageAsync(resourceUri, metricnamespace, context)); } @@ -189,7 +189,7 @@ public PagedFlux listAsync(String resourceUri, String metricn * @return represents collection of metric definitions. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceUri, String metricnamespace) { + public PagedIterable list(String resourceUri, String metricnamespace) { return new PagedIterable<>(listAsync(resourceUri, metricnamespace)); } @@ -205,7 +205,7 @@ public PagedIterable list(String resourceUri, String metricna * @return represents collection of metric definitions. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceUri, String metricnamespace, Context context) { + public PagedIterable list(String resourceUri, String metricnamespace, Context context) { return new PagedIterable<>(listAsync(resourceUri, metricnamespace, context)); } } diff --git a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/metricsdefinitions/implementation/models/MetricDefinitionCollection.java b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/metricsdefinitions/implementation/models/MetricDefinitionCollection.java index 42162aa1b038..a7bf960396cb 100644 --- a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/metricsdefinitions/implementation/models/MetricDefinitionCollection.java +++ b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/metricsdefinitions/implementation/models/MetricDefinitionCollection.java @@ -5,7 +5,7 @@ package com.azure.monitor.query.metricsdefinitions.implementation.models; import com.azure.core.annotation.Fluent; -import com.azure.monitor.query.models.MetricsDefinition; +import com.azure.monitor.query.models.MetricDefinition; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; @@ -17,7 +17,7 @@ public final class MetricDefinitionCollection { * the values for the metric definitions. */ @JsonProperty(value = "value", required = true) - private List value; + private List value; /** * Creates an instance of MetricDefinitionCollection class. @@ -25,7 +25,7 @@ public final class MetricDefinitionCollection { * @param value the value value to set. */ @JsonCreator - public MetricDefinitionCollection(@JsonProperty(value = "value", required = true) List value) { + public MetricDefinitionCollection(@JsonProperty(value = "value", required = true) List value) { this.value = value; } @@ -34,7 +34,7 @@ public MetricDefinitionCollection(@JsonProperty(value = "value", required = true * * @return the value value. */ - public List getValue() { + public List getValue() { return this.value; } diff --git a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/metricsnamespaces/implementation/MetricNamespacesImpl.java b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/metricsnamespaces/implementation/MetricNamespacesImpl.java index 4cd7e9b1b109..81ad0dc4839a 100644 --- a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/metricsnamespaces/implementation/MetricNamespacesImpl.java +++ b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/metricsnamespaces/implementation/MetricNamespacesImpl.java @@ -24,7 +24,7 @@ import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.monitor.query.metricsnamespaces.implementation.models.ErrorResponseException; -import com.azure.monitor.query.models.MetricsNamespace; +import com.azure.monitor.query.models.MetricNamespace; import com.azure.monitor.query.metricsnamespaces.implementation.models.MetricNamespaceCollection; import reactor.core.publisher.Mono; @@ -78,7 +78,7 @@ Mono> list( * @return represents collection of metric namespaces. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> listSinglePageAsync(String resourceUri, String startTime) { + public Mono> listSinglePageAsync(String resourceUri, String startTime) { if (this.client.getHost() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getHost() is required and cannot be null.")); @@ -119,7 +119,7 @@ public Mono> listSinglePageAsync(String resource * @return represents collection of metric namespaces. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> listSinglePageAsync( + public Mono> listSinglePageAsync( String resourceUri, String startTime, Context context) { if (this.client.getHost() == null) { return Mono.error( @@ -152,7 +152,7 @@ public Mono> listSinglePageAsync( * @return represents collection of metric namespaces. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listAsync(String resourceUri, String startTime) { + public PagedFlux listAsync(String resourceUri, String startTime) { return new PagedFlux<>(() -> listSinglePageAsync(resourceUri, startTime)); } @@ -168,7 +168,7 @@ public PagedFlux listAsync(String resourceUri, String startTim * @return represents collection of metric namespaces. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listAsync(String resourceUri, String startTime, Context context) { + public PagedFlux listAsync(String resourceUri, String startTime, Context context) { return new PagedFlux<>(() -> listSinglePageAsync(resourceUri, startTime, context)); } @@ -183,7 +183,7 @@ public PagedFlux listAsync(String resourceUri, String startTim * @return represents collection of metric namespaces. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceUri, String startTime) { + public PagedIterable list(String resourceUri, String startTime) { return new PagedIterable<>(listAsync(resourceUri, startTime)); } @@ -199,7 +199,7 @@ public PagedIterable list(String resourceUri, String startTime * @return represents collection of metric namespaces. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceUri, String startTime, Context context) { + public PagedIterable list(String resourceUri, String startTime, Context context) { return new PagedIterable<>(listAsync(resourceUri, startTime, context)); } } diff --git a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/metricsnamespaces/implementation/models/MetricNamespaceCollection.java b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/metricsnamespaces/implementation/models/MetricNamespaceCollection.java index 755de060a23e..bb56e3f5e6a8 100644 --- a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/metricsnamespaces/implementation/models/MetricNamespaceCollection.java +++ b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/metricsnamespaces/implementation/models/MetricNamespaceCollection.java @@ -5,7 +5,7 @@ package com.azure.monitor.query.metricsnamespaces.implementation.models; import com.azure.core.annotation.Fluent; -import com.azure.monitor.query.models.MetricsNamespace; +import com.azure.monitor.query.models.MetricNamespace; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; @@ -17,7 +17,7 @@ public final class MetricNamespaceCollection { * The values for the metric namespaces. */ @JsonProperty(value = "value", required = true) - private List value; + private List value; /** * Creates an instance of MetricNamespaceCollection class. @@ -25,7 +25,7 @@ public final class MetricNamespaceCollection { * @param value the value value to set. */ @JsonCreator - public MetricNamespaceCollection(@JsonProperty(value = "value", required = true) List value) { + public MetricNamespaceCollection(@JsonProperty(value = "value", required = true) List value) { this.value = value; } @@ -34,7 +34,7 @@ public MetricNamespaceCollection(@JsonProperty(value = "value", required = true) * * @return the value value. */ - public List getValue() { + public List getValue() { return this.value; } diff --git a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/models/ColumnDataType.java b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/models/ColumnDataType.java deleted file mode 100644 index 4afbb7360cbc..000000000000 --- a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/models/ColumnDataType.java +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -package com.azure.monitor.query.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for ColumnDataType. */ -public final class ColumnDataType extends ExpandableStringEnum { - /** Static value bool for ColumnDataType. */ - public static final ColumnDataType BOOL = fromString("bool"); - - /** Static value datetime for ColumnDataType. */ - public static final ColumnDataType DATETIME = fromString("datetime"); - - /** Static value dynamic for ColumnDataType. */ - public static final ColumnDataType DYNAMIC = fromString("dynamic"); - - /** Static value int for ColumnDataType. */ - public static final ColumnDataType INT = fromString("int"); - - /** Static value long for ColumnDataType. */ - public static final ColumnDataType LONG = fromString("long"); - - /** Static value real for ColumnDataType. */ - public static final ColumnDataType REAL = fromString("real"); - - /** Static value string for ColumnDataType. */ - public static final ColumnDataType STRING = fromString("string"); - - /** - * Creates or finds a ColumnDataType from its string representation. - * - * @param name a name to look for. - * @return the corresponding ColumnDataType. - */ - @JsonCreator - public static ColumnDataType fromString(String name) { - return fromString(name, ColumnDataType.class); - } - - /** @return known ColumnDataType values. */ - public static Collection values() { - return values(ColumnDataType.class); - } -} diff --git a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/models/LogsQueryBatch.java b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/models/LogsBatchQuery.java similarity index 81% rename from sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/models/LogsQueryBatch.java rename to sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/models/LogsBatchQuery.java index 2788fa274d3a..e2a6ce151c2e 100644 --- a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/models/LogsQueryBatch.java +++ b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/models/LogsBatchQuery.java @@ -12,7 +12,7 @@ * A fluent class to create a batch of logs queries. */ @Fluent -public final class LogsQueryBatch { +public final class LogsBatchQuery { private final List queries = new ArrayList<>(); @@ -21,9 +21,9 @@ public final class LogsQueryBatch { * @param workspaceId The workspaceId on which the query is executed. * @param query The Kusto query. * @param timeSpan The time period for which the logs should be queried. - * @return The updated {@link LogsQueryBatch}. + * @return The updated {@link LogsBatchQuery}. */ - public LogsQueryBatch addQuery(String workspaceId, String query, QueryTimeSpan timeSpan) { + public LogsBatchQuery addQuery(String workspaceId, String query, QueryTimeSpan timeSpan) { queries.add(new LogsQueryOptions(workspaceId, query, timeSpan)); return this; } @@ -31,9 +31,9 @@ public LogsQueryBatch addQuery(String workspaceId, String query, QueryTimeSpan t /** * Adds a new logs query to the batch. * @param logsQueryOptions The logs query options - * @return The updated {@link LogsQueryBatch} + * @return The updated {@link LogsBatchQuery} */ - public LogsQueryBatch addQuery(LogsQueryOptions logsQueryOptions) { + public LogsBatchQuery addQuery(LogsQueryOptions logsQueryOptions) { queries.add(logsQueryOptions); return this; } diff --git a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/models/LogsQueryBatchResult.java b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/models/LogsBatchQueryResult.java similarity index 67% rename from sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/models/LogsQueryBatchResult.java rename to sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/models/LogsBatchQueryResult.java index 833ee330b5a6..a73ed5cb1555 100644 --- a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/models/LogsQueryBatchResult.java +++ b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/models/LogsBatchQueryResult.java @@ -9,24 +9,21 @@ * Class containing the result of a single logs query in a batch. */ @Immutable -public final class LogsQueryBatchResult { +public final class LogsBatchQueryResult { private final String id; private final int status; private final LogsQueryResult queryResult; - private final LogsQueryErrorDetails error; /** - * Creates an instance of {@link LogsQueryBatchResult} containing the result of a single logs query in a batch. + * Creates an instance of {@link LogsBatchQueryResult} containing the result of a single logs query in a batch. * @param id The query id. * @param status The response status of the query. * @param queryResult The result of the query. - * @param error The error details if the query failed to execute. */ - public LogsQueryBatchResult(String id, int status, LogsQueryResult queryResult, LogsQueryErrorDetails error) { + public LogsBatchQueryResult(String id, int status, LogsQueryResult queryResult) { this.id = id; this.status = status; this.queryResult = queryResult; - this.error = error; } /** @@ -52,13 +49,5 @@ public int getStatus() { public LogsQueryResult getQueryResult() { return queryResult; } - - /** - * Returns the error details if the query failed to execute. - * @return The error details. - */ - public LogsQueryErrorDetails getError() { - return error; - } } diff --git a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/models/LogsQueryBatchResultCollection.java b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/models/LogsBatchQueryResultCollection.java similarity index 69% rename from sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/models/LogsQueryBatchResultCollection.java rename to sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/models/LogsBatchQueryResultCollection.java index 9f0810eb66a4..c9cc1e853b0f 100644 --- a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/models/LogsQueryBatchResultCollection.java +++ b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/models/LogsBatchQueryResultCollection.java @@ -11,14 +11,14 @@ * The collection wrapper to hold all results of a batch of logs queries. */ @Immutable -public final class LogsQueryBatchResultCollection { - private final List batchResults; +public final class LogsBatchQueryResultCollection { + private final List batchResults; /** - * Creates an instance of {@link LogsQueryBatchResultCollection} to hold all results of a batch of logs queries. + * Creates an instance of {@link LogsBatchQueryResultCollection} to hold all results of a batch of logs queries. * @param batchResults The results of a batch of logs queries. */ - public LogsQueryBatchResultCollection(List batchResults) { + public LogsBatchQueryResultCollection(List batchResults) { this.batchResults = batchResults; } @@ -26,7 +26,7 @@ public LogsQueryBatchResultCollection(List batchResults) { * Returns the results of a batch of logs queries. * @return The results of a batch of logs queries. */ - public List getBatchResults() { + public List getBatchResults() { return batchResults; } } diff --git a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/models/LogsColumnType.java b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/models/LogsColumnType.java new file mode 100644 index 000000000000..f4c1609aac60 --- /dev/null +++ b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/models/LogsColumnType.java @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.monitor.query.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Defines values for LogsColumnType. */ +public final class LogsColumnType extends ExpandableStringEnum { + /** Static value bool for LogsColumnType. */ + public static final LogsColumnType BOOL = fromString("bool"); + + /** Static value datetime for LogsColumnType. */ + public static final LogsColumnType DATETIME = fromString("datetime"); + + /** Static value dynamic for LogsColumnType. */ + public static final LogsColumnType DYNAMIC = fromString("dynamic"); + + /** Static value int for LogsColumnType. */ + public static final LogsColumnType INT = fromString("int"); + + /** Static value long for LogsColumnType. */ + public static final LogsColumnType LONG = fromString("long"); + + /** Static value real for LogsColumnType. */ + public static final LogsColumnType REAL = fromString("real"); + + /** Static value string for LogsColumnType. */ + public static final LogsColumnType STRING = fromString("string"); + + /** Static value guid for LogsColumnType. */ + public static final LogsColumnType GUID = fromString("guid"); + + /** Static value decimal for LogsColumnType. */ + public static final LogsColumnType DECIMAL = fromString("decimal"); + + /** Static value timespan for LogsColumnType. */ + public static final LogsColumnType TIMESPAN = fromString("timespan"); + + /** + * Creates or finds a LogsColumnType from its string representation. + * + * @param name a name to look for. + * @return the corresponding LogsColumnType. + */ + @JsonCreator + public static LogsColumnType fromString(String name) { + return fromString(name, LogsColumnType.class); + } + + /** @return known LogsColumnType values. */ + public static Collection values() { + return values(LogsColumnType.class); + } +} diff --git a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/models/LogsQueryError.java b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/models/LogsQueryError.java index 61d65c40006f..7b144d6f69df 100644 --- a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/models/LogsQueryError.java +++ b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/models/LogsQueryError.java @@ -3,112 +3,52 @@ package com.azure.monitor.query.models; +import com.azure.core.annotation.Immutable; + import java.util.List; /** - * Error details of a failed log query. + * The error details of a failed log query. */ - +@Immutable public final class LogsQueryError { - /* - * The error's code. - */ - private final String code; - - /* - * A human readable error message. - */ private final String message; - - /* - * Indicates which property in the request is responsible for the error. - */ - private final String target; - - /* - * Indicates which value in 'target' is responsible for the error. - */ - private final String value; - - /* - * Indicates resources which were responsible for the error. - */ - private final List resources; - - /* - * Additional properties that can be provided on the error details object - */ - private final Object additionalProperties; + private final String code; + private final List errors; /** - * Creates an instance of ErrorDetail class. - * @param code the code value to set. - * @param message the message value to set. - * @param target indicates which property in the request is responsible for the error. - * @param value indicates which value in 'target' is responsible for the error. - * @param resources indicates resources which were responsible for the error. - * @param additionalProperties additional properties that can be provided on the error details object + * Creates an instance of {@link LogsQueryError} with the failure code and target. + * @param message The error message. + * @param code The error code indicating the reason for the error. + * @param errors The list of additional error details. */ - public LogsQueryError( - String code, - String message, - String target, - String value, - List resources, - Object additionalProperties) { - this.code = code; + public LogsQueryError(String message, String code, List errors) { this.message = message; - this.target = target; - this.value = value; - this.resources = resources; - this.additionalProperties = additionalProperties; - } - - /** - * Get the code property: The error's code. - * @return the code value. - */ - public String getCode() { - return this.code; + this.code = code; + this.errors = errors; } /** - * Get the message property: A human readable error message. - * @return the message value. + * Returns the error message. + * @return The error message. */ public String getMessage() { - return this.message; + return message; } /** - * Get the target property: Indicates which property in the request is responsible for the error. - * @return the target value. + * Returns the error code indicating the reason for the error + * @return The error code indicating the reason for the error */ - public String getTarget() { - return this.target; - } - - /** - * Get the value property: Indicates which value in 'target' is responsible for the error. - * @return the value value. - */ - public String getValue() { - return this.value; - } - - /** - * Get the resources property: Indicates resources which were responsible for the error. - * @return the resources value. - */ - public List getResources() { - return this.resources; + public String getCode() { + return code; } /** - * Get the additionalProperties property: Additional properties that can be provided on the error details object. - * @return the additionalProperties value. + * Returns the list of additional error details. + * @return the list of additional error details. */ - public Object getAdditionalProperties() { - return this.additionalProperties; + public List getErrors() { + return errors; } } diff --git a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/models/LogsQueryErrorDetail.java b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/models/LogsQueryErrorDetail.java new file mode 100644 index 000000000000..dcde69e3efb0 --- /dev/null +++ b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/models/LogsQueryErrorDetail.java @@ -0,0 +1,116 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.monitor.query.models; + +import com.azure.core.annotation.Immutable; + +import java.util.List; + +/** + * Error details of a failed log query. + */ +@Immutable +public final class LogsQueryErrorDetail { + /* + * The error's code. + */ + private final String code; + + /* + * A human readable error message. + */ + private final String message; + + /* + * Indicates which property in the request is responsible for the error. + */ + private final String target; + + /* + * Indicates which value in 'target' is responsible for the error. + */ + private final String value; + + /* + * Indicates resources which were responsible for the error. + */ + private final List resources; + + /* + * Additional properties that can be provided on the error details object + */ + private final Object additionalProperties; + + /** + * Creates an instance of ErrorDetail class. + * @param code the code value to set. + * @param message the message value to set. + * @param target indicates which property in the request is responsible for the error. + * @param value indicates which value in 'target' is responsible for the error. + * @param resources indicates resources which were responsible for the error. + * @param additionalProperties additional properties that can be provided on the error details object + */ + public LogsQueryErrorDetail( + String code, + String message, + String target, + String value, + List resources, + Object additionalProperties) { + this.code = code; + this.message = message; + this.target = target; + this.value = value; + this.resources = resources; + this.additionalProperties = additionalProperties; + } + + /** + * Get the code property: The error's code. + * @return the code value. + */ + public String getCode() { + return this.code; + } + + /** + * Get the message property: A human readable error message. + * @return the message value. + */ + public String getMessage() { + return this.message; + } + + /** + * Get the target property: Indicates which property in the request is responsible for the error. + * @return the target value. + */ + public String getTarget() { + return this.target; + } + + /** + * Get the value property: Indicates which value in 'target' is responsible for the error. + * @return the value value. + */ + public String getValue() { + return this.value; + } + + /** + * Get the resources property: Indicates resources which were responsible for the error. + * @return the resources value. + */ + public List getResources() { + return this.resources; + } + + /** + * Get the additionalProperties property: Additional properties that can be provided on the error details object. + * @return the additionalProperties value. + */ + public Object getAdditionalProperties() { + return this.additionalProperties; + } +} diff --git a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/models/LogsQueryErrorDetails.java b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/models/LogsQueryErrorDetails.java deleted file mode 100644 index 86da66d53490..000000000000 --- a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/models/LogsQueryErrorDetails.java +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -package com.azure.monitor.query.models; - -import com.azure.core.annotation.Immutable; - -import java.util.List; - -/** - * The error details of a failed log query. - */ -@Immutable -public final class LogsQueryErrorDetails { - private final String message; - private final String code; - private final List errors; - - /** - * Creates an instance of {@link LogsQueryErrorDetails} with the failure code and target. - * @param message The error message. - * @param code The error code indicating the reason for the error. - * @param errors The list of additional error details. - */ - public LogsQueryErrorDetails(String message, String code, List errors) { - this.message = message; - this.code = code; - this.errors = errors; - } - - /** - * Returns the error message. - * @return The error message. - */ - public String getMessage() { - return message; - } - - /** - * Returns the error code indicating the reason for the error - * @return The error code indicating the reason for the error - */ - public String getCode() { - return code; - } - - /** - * Returns the list of additional error details. - * @return the list of additional error details. - */ - public List getErrors() { - return errors; - } -} diff --git a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/models/LogsQueryException.java b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/models/LogsQueryException.java index 9916ba59af88..37a8ff362b65 100644 --- a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/models/LogsQueryException.java +++ b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/models/LogsQueryException.java @@ -10,21 +10,21 @@ * Exception thrown when a query to retrieve logs fails. */ public final class LogsQueryException extends HttpResponseException { - private final transient LogsQueryErrorDetails error; + private final transient LogsQueryError error; /** - * Creates a new instance of this exception with the {@link HttpResponse} and {@link LogsQueryError error} + * Creates a new instance of this exception with the {@link HttpResponse} and {@link LogsQueryErrorDetail error} * information. * @param response The {@link HttpResponse}. * @param error The {@link LogsQueryError error} details. */ - public LogsQueryException(HttpResponse response, LogsQueryErrorDetails error) { + public LogsQueryException(HttpResponse response, LogsQueryError error) { super("Failed to executed logs query", response, error); this.error = error; } @Override - public LogsQueryErrorDetails getValue() { + public LogsQueryError getValue() { return this.error; } } diff --git a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/models/LogsQueryResult.java b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/models/LogsQueryResult.java index 4ca2daf8b8f2..f2d51d3efbba 100644 --- a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/models/LogsQueryResult.java +++ b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/models/LogsQueryResult.java @@ -13,13 +13,19 @@ @Immutable public final class LogsQueryResult { private final List logsTables; + private final LogsQueryStatistics statistics; + private final LogsQueryError error; /** * Creates an instance {@link LogsQueryResult} with a list of {@link LogsTable}. * @param logsTables The list of {@link LogsTable} returned as query result. + * @param statistics The query execution statistics. + * @param error The error details if there was an error executing the query. */ - public LogsQueryResult(List logsTables) { + public LogsQueryResult(List logsTables, LogsQueryStatistics statistics, LogsQueryError error) { this.logsTables = logsTables; + this.statistics = statistics; + this.error = error; } /** @@ -29,4 +35,20 @@ public LogsQueryResult(List logsTables) { public List getLogsTables() { return logsTables; } + + /** + * Returns the query statistics. + * @return the query statistics. + */ + public LogsQueryStatistics getStatistics() { + return statistics; + } + + /** + * Returns the error details if there was an error executing the query. + * @return the error details if there was an error executing the query. + */ + public LogsQueryError getError() { + return error; + } } diff --git a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/models/LogsQueryStatistics.java b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/models/LogsQueryStatistics.java new file mode 100644 index 000000000000..f817ef38c127 --- /dev/null +++ b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/models/LogsQueryStatistics.java @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.monitor.query.models; + +import com.azure.core.annotation.Immutable; + +/** + * The statistics information related to query execution. + */ +@Immutable +public final class LogsQueryStatistics { + private final Object rawStatistics; + + /** + * Creates an instance with the statistics information related to query execution. + * @param rawStatistics the statistics information related to query execution. + */ + public LogsQueryStatistics(Object rawStatistics) { + this.rawStatistics = rawStatistics; + } + + /** + * Returns the raw statistics information related to query execution as JSON object. + * @return the raw statistics information related to query execution as JSON object. + */ + public Object getRawStatistics() { + return rawStatistics; + } +} diff --git a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/models/LogsTableCell.java b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/models/LogsTableCell.java index 0dc670b14ee8..5a864a86ca34 100644 --- a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/models/LogsTableCell.java +++ b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/models/LogsTableCell.java @@ -14,7 +14,7 @@ @Immutable public final class LogsTableCell { private final String columnName; - private final ColumnDataType columnType; + private final LogsColumnType columnType; private final int columnIndex; private final int rowIndex; private final String rowValue; @@ -27,7 +27,7 @@ public final class LogsTableCell { * @param rowIndex The row index of the row this cell is associated with. * @param rowValue The value of the cell. */ - public LogsTableCell(String columnName, ColumnDataType columnType, int columnIndex, int rowIndex, String rowValue) { + public LogsTableCell(String columnName, LogsColumnType columnType, int columnIndex, int rowIndex, String rowValue) { this.columnName = columnName; this.columnType = columnType; this.columnIndex = columnIndex; @@ -39,7 +39,7 @@ public LogsTableCell(String columnName, ColumnDataType columnType, int columnInd * Returns the data type of the value this cell contains. * @return the data type of the value this cell contains. */ - public ColumnDataType getColumnType() { + public LogsColumnType getColumnType() { return columnType; } diff --git a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/models/LogsTableColumn.java b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/models/LogsTableColumn.java index 24c44c204514..7171f19e61c8 100644 --- a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/models/LogsTableColumn.java +++ b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/models/LogsTableColumn.java @@ -8,14 +8,14 @@ */ public final class LogsTableColumn { private final String columnName; - private final ColumnDataType columnType; + private final LogsColumnType columnType; /** * Creates a column in {@link LogsTable}. * @param columnName The name of the column. * @param columnType The data type of the value in this column. */ - public LogsTableColumn(String columnName, ColumnDataType columnType) { + public LogsTableColumn(String columnName, LogsColumnType columnType) { this.columnName = columnName; this.columnType = columnType; } @@ -32,7 +32,7 @@ public String getColumnName() { * Returns the data type of the value in this column. * @return the data type of the value in this column. */ - public ColumnDataType getColumnType() { + public LogsColumnType getColumnType() { return columnType; } } diff --git a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/models/LogsTableRow.java b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/models/LogsTableRow.java index f34b6ed09686..005fe21a202d 100644 --- a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/models/LogsTableRow.java +++ b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/models/LogsTableRow.java @@ -88,23 +88,26 @@ public T getRowAsObject(Class type) { return; } field.setAccessible(true); - if (tableCell.getColumnType() == ColumnDataType.BOOL) { + if (tableCell.getColumnType() == LogsColumnType.BOOL) { field.set(t, tableCell.getValueAsBoolean()); - } else if (tableCell.getColumnType() == ColumnDataType.DATETIME) { + } else if (tableCell.getColumnType() == LogsColumnType.DATETIME) { field.set(t, tableCell.getValueAsDateTime()); - } else if (tableCell.getColumnType() == ColumnDataType.DYNAMIC) { + } else if (tableCell.getColumnType() == LogsColumnType.DYNAMIC) { if (tableCell.getValueAsDynamic() != null) { field.set(t, tableCell.getValueAsDynamic() .toObject(TypeReference.createInstance(field.getType()))); } - } else if (tableCell.getColumnType() == ColumnDataType.INT) { + } else if (tableCell.getColumnType() == LogsColumnType.INT) { field.set(t, tableCell.getValueAsInteger()); - } else if (tableCell.getColumnType() == ColumnDataType.LONG) { + } else if (tableCell.getColumnType() == LogsColumnType.LONG) { field.set(t, tableCell.getValueAsLong()); - } else if (tableCell.getColumnType() == ColumnDataType.REAL) { + } else if (tableCell.getColumnType() == LogsColumnType.REAL + || tableCell.getColumnType() == LogsColumnType.DECIMAL) { field.set(t, tableCell.getValueAsDouble()); - } else if (tableCell.getColumnType() == ColumnDataType.STRING) { + } else if (tableCell.getColumnType() == LogsColumnType.STRING + || tableCell.getColumnType() == LogsColumnType.GUID + || tableCell.getColumnType() == LogsColumnType.TIMESPAN) { field.set(t, tableCell.getValueAsString()); } field.setAccessible(false); diff --git a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/models/Metrics.java b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/models/Metric.java similarity index 81% rename from sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/models/Metrics.java rename to sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/models/Metric.java index c08e1897125b..b024a5add767 100644 --- a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/models/Metrics.java +++ b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/models/Metric.java @@ -11,12 +11,12 @@ * The metrics result of a query. */ @Immutable -public final class Metrics { +public final class Metric { private final String id; private final String type; - private final MetricsUnit unit; + private final MetricUnit unit; private final String metricsName; - private final List timeSeries; + private final List timeSeries; /** * Creates an instance of the result data of a query. @@ -26,8 +26,8 @@ public final class Metrics { * @param metricsName The name of the metrics. * @param timeseries The time series returned when the query is performed. */ - public Metrics(String id, String type, MetricsUnit unit, - String metricsName, List timeseries) { + public Metric(String id, String type, MetricUnit unit, + String metricsName, List timeseries) { this.id = id; this.type = type; this.unit = unit; @@ -35,7 +35,6 @@ public Metrics(String id, String type, MetricsUnit unit, this.timeSeries = timeseries; } - /** * Returns the name of the metrics. * @return the name of the metrics. @@ -64,7 +63,7 @@ public String getType() { * Returns the metrics unit of the metrics. * @return the unit of the metrics. */ - public MetricsUnit getUnit() { + public MetricUnit getUnit() { return unit; } @@ -72,7 +71,7 @@ public MetricsUnit getUnit() { * Returns the time series returned when a data query is performed. * @return the time series returned when a data query is performed. */ - public List getTimeSeries() { + public List getTimeSeries() { return timeSeries; } } diff --git a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/models/MetricsAvailability.java b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/models/MetricAvailability.java similarity index 92% rename from sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/models/MetricsAvailability.java rename to sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/models/MetricAvailability.java index 79fc9d24ee7d..955a73622917 100644 --- a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/models/MetricsAvailability.java +++ b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/models/MetricAvailability.java @@ -12,7 +12,7 @@ * time grain. */ @Fluent -public final class MetricsAvailability { +public final class MetricAvailability { /* * the time grain specifies the aggregation interval for the metric. * Expressed as a duration 'PT1M', 'P1D', etc. @@ -44,7 +44,7 @@ public Duration getTimeGrain() { * @param timeGrain the timeGrain value to set. * @return the MetricAvailability object itself. */ - public MetricsAvailability setTimeGrain(Duration timeGrain) { + public MetricAvailability setTimeGrain(Duration timeGrain) { this.timeGrain = timeGrain; return this; } @@ -66,7 +66,7 @@ public Duration getRetention() { * @param retention the retention value to set. * @return the MetricAvailability object itself. */ - public MetricsAvailability setRetention(Duration retention) { + public MetricAvailability setRetention(Duration retention) { this.retention = retention; return this; } diff --git a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/models/MetricsDefinition.java b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/models/MetricDefinition.java similarity index 88% rename from sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/models/MetricsDefinition.java rename to sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/models/MetricDefinition.java index 7c1abe8e766a..b9dfa7e0eb9e 100644 --- a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/models/MetricsDefinition.java +++ b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/models/MetricDefinition.java @@ -9,7 +9,7 @@ /** Metric definition class specifies the metadata for a metric. */ @Fluent -public final class MetricsDefinition { +public final class MetricDefinition { /* * Flag to indicate whether the dimension is required. */ @@ -45,7 +45,7 @@ public final class MetricsDefinition { * the unit of the metric. */ @JsonProperty(value = "unit") - private MetricsUnit unit; + private MetricUnit unit; /* * the primary aggregation type value defining how to use the values for @@ -59,7 +59,7 @@ public final class MetricsDefinition { * queried. */ @JsonProperty(value = "metricAvailabilities") - private List metricAvailabilities; + private List metricAvailabilities; /* * the resource identifier of the metric definition. @@ -89,7 +89,7 @@ public Boolean isDimensionRequired() { * @param isDimensionRequired the isDimensionRequired value to set. * @return the MetricDefinition object itself. */ - public MetricsDefinition setIsDimensionRequired(Boolean isDimensionRequired) { + public MetricDefinition setIsDimensionRequired(Boolean isDimensionRequired) { this.isDimensionRequired = isDimensionRequired; return this; } @@ -109,7 +109,7 @@ public String getResourceId() { * @param resourceId the resourceId value to set. * @return the MetricDefinition object itself. */ - public MetricsDefinition setResourceId(String resourceId) { + public MetricDefinition setResourceId(String resourceId) { this.resourceId = resourceId; return this; } @@ -129,7 +129,7 @@ public LocalizableString getName() { * @param name the name value to set. * @return the MetricDefinition object itself. */ - public MetricsDefinition setName(LocalizableString name) { + public MetricDefinition setName(LocalizableString name) { this.name = name; return this; } @@ -149,7 +149,7 @@ public String getDisplayDescription() { * @param displayDescription the displayDescription value to set. * @return the MetricDefinition object itself. */ - public MetricsDefinition setDisplayDescription(String displayDescription) { + public MetricDefinition setDisplayDescription(String displayDescription) { this.displayDescription = displayDescription; return this; } @@ -169,7 +169,7 @@ public String getCategory() { * @param category the category value to set. * @return the MetricDefinition object itself. */ - public MetricsDefinition setCategory(String category) { + public MetricDefinition setCategory(String category) { this.category = category; return this; } @@ -179,7 +179,7 @@ public MetricsDefinition setCategory(String category) { * * @return the unit value. */ - public MetricsUnit getUnit() { + public MetricUnit getUnit() { return this.unit; } @@ -189,7 +189,7 @@ public MetricsUnit getUnit() { * @param unit the unit value to set. * @return the MetricDefinition object itself. */ - public MetricsDefinition setUnit(MetricsUnit unit) { + public MetricDefinition setUnit(MetricUnit unit) { this.unit = unit; return this; } @@ -211,7 +211,7 @@ public AggregationType getPrimaryAggregationType() { * @param primaryAggregationType the primaryAggregationType value to set. * @return the MetricDefinition object itself. */ - public MetricsDefinition setPrimaryAggregationType(AggregationType primaryAggregationType) { + public MetricDefinition setPrimaryAggregationType(AggregationType primaryAggregationType) { this.primaryAggregationType = primaryAggregationType; return this; } @@ -221,7 +221,7 @@ public MetricsDefinition setPrimaryAggregationType(AggregationType primaryAggreg * * @return the metricAvailabilities value. */ - public List getMetricAvailabilities() { + public List getMetricAvailabilities() { return this.metricAvailabilities; } @@ -231,7 +231,7 @@ public List getMetricAvailabilities() { * @param metricAvailabilities the metricAvailabilities value to set. * @return the MetricDefinition object itself. */ - public MetricsDefinition setMetricAvailabilities(List metricAvailabilities) { + public MetricDefinition setMetricAvailabilities(List metricAvailabilities) { this.metricAvailabilities = metricAvailabilities; return this; } @@ -251,7 +251,7 @@ public String getId() { * @param id the id value to set. * @return the MetricDefinition object itself. */ - public MetricsDefinition setId(String id) { + public MetricDefinition setId(String id) { this.id = id; return this; } @@ -271,7 +271,7 @@ public List getDimensions() { * @param dimensions the dimensions value to set. * @return the MetricDefinition object itself. */ - public MetricsDefinition setDimensions(List dimensions) { + public MetricDefinition setDimensions(List dimensions) { this.dimensions = dimensions; return this; } diff --git a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/models/MetricsNamespace.java b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/models/MetricNamespace.java similarity index 88% rename from sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/models/MetricsNamespace.java rename to sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/models/MetricNamespace.java index 10a959055d6f..fdaeba4288fc 100644 --- a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/models/MetricsNamespace.java +++ b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/models/MetricNamespace.java @@ -8,7 +8,7 @@ /** Metric namespace class specifies the metadata for a metric namespace. */ @Fluent -public final class MetricsNamespace { +public final class MetricNamespace { /* * The ID of the metric namespace. */ @@ -37,7 +37,7 @@ public final class MetricsNamespace { * Properties which include the fully qualified namespace name. */ @JsonProperty(value = "properties") - private MetricsNamespaceName properties; + private MetricNamespaceName properties; /** * Get the id property: The ID of the metric namespace. @@ -54,7 +54,7 @@ public String getId() { * @param id the id value to set. * @return the MetricNamespace object itself. */ - public MetricsNamespace setId(String id) { + public MetricNamespace setId(String id) { this.id = id; return this; } @@ -74,7 +74,7 @@ public String getType() { * @param type the type value to set. * @return the MetricNamespace object itself. */ - public MetricsNamespace setType(String type) { + public MetricNamespace setType(String type) { this.type = type; return this; } @@ -94,7 +94,7 @@ public String getName() { * @param name the name value to set. * @return the MetricNamespace object itself. */ - public MetricsNamespace setName(String name) { + public MetricNamespace setName(String name) { this.name = name; return this; } @@ -114,7 +114,7 @@ public NamespaceClassification getClassification() { * @param classification the classification value to set. * @return the MetricNamespace object itself. */ - public MetricsNamespace setClassification(NamespaceClassification classification) { + public MetricNamespace setClassification(NamespaceClassification classification) { this.classification = classification; return this; } @@ -124,7 +124,7 @@ public MetricsNamespace setClassification(NamespaceClassification classification * * @return the properties value. */ - public MetricsNamespaceName getProperties() { + public MetricNamespaceName getProperties() { return this.properties; } @@ -134,7 +134,7 @@ public MetricsNamespaceName getProperties() { * @param properties the properties value to set. * @return the MetricNamespace object itself. */ - public MetricsNamespace setProperties(MetricsNamespaceName properties) { + public MetricNamespace setProperties(MetricNamespaceName properties) { this.properties = properties; return this; } diff --git a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/models/MetricsNamespaceName.java b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/models/MetricNamespaceName.java similarity index 89% rename from sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/models/MetricsNamespaceName.java rename to sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/models/MetricNamespaceName.java index b0448b134921..01d976070d6c 100644 --- a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/models/MetricsNamespaceName.java +++ b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/models/MetricNamespaceName.java @@ -8,7 +8,7 @@ /** The fully qualified metric namespace name. */ @Fluent -public final class MetricsNamespaceName { +public final class MetricNamespaceName { /* * The metric namespace name. */ @@ -30,7 +30,7 @@ public String getMetricNamespaceName() { * @param metricNamespaceName the metricNamespaceName value to set. * @return the MetricNamespaceName object itself. */ - public MetricsNamespaceName setMetricNamespaceName(String metricNamespaceName) { + public MetricNamespaceName setMetricNamespaceName(String metricNamespaceName) { this.metricNamespaceName = metricNamespaceName; return this; } diff --git a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/models/MetricsTimeSeriesElement.java b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/models/MetricTimeSeriesElement.java similarity index 62% rename from sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/models/MetricsTimeSeriesElement.java rename to sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/models/MetricTimeSeriesElement.java index dc9d11489916..104f84e3dca5 100644 --- a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/models/MetricsTimeSeriesElement.java +++ b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/models/MetricTimeSeriesElement.java @@ -8,15 +8,15 @@ /** * A time series result type. */ -public final class MetricsTimeSeriesElement { - private final List data; +public final class MetricTimeSeriesElement { + private final List data; /** - * Creates an instance of {@link MetricsTimeSeriesElement} with a list of data points representing the metric + * Creates an instance of {@link MetricTimeSeriesElement} with a list of data points representing the metric * values. * @param data a list of data points representing the metric values. */ - public MetricsTimeSeriesElement(List data) { + public MetricTimeSeriesElement(List data) { this.data = data; } @@ -24,7 +24,7 @@ public MetricsTimeSeriesElement(List data) { * Returns a list of data points representing the metric values. * @return a list of data points representing the metric */ - public List getData() { + public List getData() { return data; } } diff --git a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/models/MetricUnit.java b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/models/MetricUnit.java new file mode 100644 index 000000000000..699088b6dc8a --- /dev/null +++ b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/models/MetricUnit.java @@ -0,0 +1,66 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.monitor.query.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Defines values for MetricUnit. */ +public final class MetricUnit extends ExpandableStringEnum { + /** Static value Count for MetricUnit. */ + public static final MetricUnit COUNT = fromString("Count"); + + /** Static value Bytes for MetricUnit. */ + public static final MetricUnit BYTES = fromString("Bytes"); + + /** Static value Seconds for MetricUnit. */ + public static final MetricUnit SECONDS = fromString("Seconds"); + + /** Static value CountPerSecond for MetricUnit. */ + public static final MetricUnit COUNT_PER_SECOND = fromString("CountPerSecond"); + + /** Static value BytesPerSecond for MetricUnit. */ + public static final MetricUnit BYTES_PER_SECOND = fromString("BytesPerSecond"); + + /** Static value Percent for MetricUnit. */ + public static final MetricUnit PERCENT = fromString("Percent"); + + /** Static value MilliSeconds for MetricUnit. */ + public static final MetricUnit MILLI_SECONDS = fromString("MilliSeconds"); + + /** Static value ByteSeconds for MetricUnit. */ + public static final MetricUnit BYTE_SECONDS = fromString("ByteSeconds"); + + /** Static value Unspecified for MetricUnit. */ + public static final MetricUnit UNSPECIFIED = fromString("Unspecified"); + + /** Static value Cores for MetricUnit. */ + public static final MetricUnit CORES = fromString("Cores"); + + /** Static value MilliCores for MetricUnit. */ + public static final MetricUnit MILLI_CORES = fromString("MilliCores"); + + /** Static value NanoCores for MetricUnit. */ + public static final MetricUnit NANO_CORES = fromString("NanoCores"); + + /** Static value BitsPerSecond for MetricUnit. */ + public static final MetricUnit BITS_PER_SECOND = fromString("BitsPerSecond"); + + /** + * Creates or finds a MetricUnit from its string representation. + * + * @param name a name to look for. + * @return the corresponding MetricUnit. + */ + @JsonCreator + public static MetricUnit fromString(String name) { + return fromString(name, MetricUnit.class); + } + + /** @return known MetricUnit values. */ + public static Collection values() { + return values(MetricUnit.class); + } +} diff --git a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/models/MetricsValue.java b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/models/MetricValue.java similarity index 90% rename from sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/models/MetricsValue.java rename to sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/models/MetricValue.java index 407ab31e8bf0..e334086752b8 100644 --- a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/models/MetricsValue.java +++ b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/models/MetricValue.java @@ -11,7 +11,7 @@ * Represents a metric value. */ @Immutable -public final class MetricsValue { +public final class MetricValue { private final OffsetDateTime timeStamp; private final Double average; private final Double minimum; @@ -20,7 +20,7 @@ public final class MetricsValue { private final Long count; /** - * Creates an instance of {@link MetricsValue}. + * Creates an instance of {@link MetricValue}. * @param timeStamp the timestamp for the metric value in ISO 8601 format. * @param average the average value in the time range. * @param minimum the least value in the time range. @@ -28,8 +28,8 @@ public final class MetricsValue { * @param total the sum of all of the values in the time range. * @param count the number of samples in the time range. */ - public MetricsValue(OffsetDateTime timeStamp, Double average, Double minimum, Double maximum, Double total, - Long count) { + public MetricValue(OffsetDateTime timeStamp, Double average, Double minimum, Double maximum, Double total, + Long count) { this.timeStamp = timeStamp; this.average = average; this.minimum = minimum; diff --git a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/models/MetricsQueryOptions.java b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/models/MetricsQueryOptions.java index 83fbe9ebab29..f99de0bd392b 100644 --- a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/models/MetricsQueryOptions.java +++ b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/models/MetricsQueryOptions.java @@ -13,7 +13,7 @@ */ @Fluent public final class MetricsQueryOptions { - private String timespan; + private QueryTimeSpan timeSpan; private Duration interval; private List aggregation; private Integer top; @@ -22,21 +22,21 @@ public final class MetricsQueryOptions { private String metricsNamespace; /** - * Returns the timespan for which the metrics data is queried. - * @return the timespan for which the metrics data is queried. + * Returns the timeSpan for which the metrics data is queried. + * @return the timeSpan for which the metrics data is queried. */ - public String getTimespan() { - return timespan; + public QueryTimeSpan getTimeSpan() { + return timeSpan; } /** - * Sets the timespan for which the metrics data is queried. - * @param timespan the timespan for which the metrics data is queried. + * Sets the timeSpan for which the metrics data is queried. + * @param timeSpan the timeSpan for which the metrics data is queried. * * @return The updated options instance */ - public MetricsQueryOptions setTimespan(String timespan) { - this.timespan = timespan; + public MetricsQueryOptions setTimeSpan(QueryTimeSpan timeSpan) { + this.timeSpan = timeSpan; return this; } diff --git a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/models/MetricsQueryResult.java b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/models/MetricsQueryResult.java index 9a22c636a19e..7e4d24f323e7 100644 --- a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/models/MetricsQueryResult.java +++ b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/models/MetricsQueryResult.java @@ -19,7 +19,7 @@ public final class MetricsQueryResult { private final Duration interval; private final String namespace; private final String resourceRegion; - private final List metrics; + private final List metrics; /** * Creates an instance of the response to a metrics query. @@ -31,7 +31,7 @@ public final class MetricsQueryResult { * @param resourceRegion the region of the resource been queried for metrics. * @param metrics the value of the collection. */ - public MetricsQueryResult(Integer cost, String timeSpan, Duration interval, String namespace, String resourceRegion, List metrics) { + public MetricsQueryResult(Integer cost, String timeSpan, Duration interval, String namespace, String resourceRegion, List metrics) { this.cost = cost; this.timeSpan = timeSpan; this.interval = interval; @@ -86,7 +86,7 @@ public String getResourceRegion() { * Returns the value of the collection. * @return the value of the collection. */ - public List getMetrics() { + public List getMetrics() { return metrics; } } diff --git a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/models/MetricsUnit.java b/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/models/MetricsUnit.java deleted file mode 100644 index ddb431d6052a..000000000000 --- a/sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/models/MetricsUnit.java +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -package com.azure.monitor.query.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for MetricUnit. */ -public final class MetricsUnit extends ExpandableStringEnum { - /** Static value Count for MetricUnit. */ - public static final MetricsUnit COUNT = fromString("Count"); - - /** Static value Bytes for MetricUnit. */ - public static final MetricsUnit BYTES = fromString("Bytes"); - - /** Static value Seconds for MetricUnit. */ - public static final MetricsUnit SECONDS = fromString("Seconds"); - - /** Static value CountPerSecond for MetricUnit. */ - public static final MetricsUnit COUNT_PER_SECOND = fromString("CountPerSecond"); - - /** Static value BytesPerSecond for MetricUnit. */ - public static final MetricsUnit BYTES_PER_SECOND = fromString("BytesPerSecond"); - - /** Static value Percent for MetricUnit. */ - public static final MetricsUnit PERCENT = fromString("Percent"); - - /** Static value MilliSeconds for MetricUnit. */ - public static final MetricsUnit MILLI_SECONDS = fromString("MilliSeconds"); - - /** Static value ByteSeconds for MetricUnit. */ - public static final MetricsUnit BYTE_SECONDS = fromString("ByteSeconds"); - - /** Static value Unspecified for MetricUnit. */ - public static final MetricsUnit UNSPECIFIED = fromString("Unspecified"); - - /** Static value Cores for MetricUnit. */ - public static final MetricsUnit CORES = fromString("Cores"); - - /** Static value MilliCores for MetricUnit. */ - public static final MetricsUnit MILLI_CORES = fromString("MilliCores"); - - /** Static value NanoCores for MetricUnit. */ - public static final MetricsUnit NANO_CORES = fromString("NanoCores"); - - /** Static value BitsPerSecond for MetricUnit. */ - public static final MetricsUnit BITS_PER_SECOND = fromString("BitsPerSecond"); - - /** - * Creates or finds a MetricUnit from its string representation. - * - * @param name a name to look for. - * @return the corresponding MetricUnit. - */ - @JsonCreator - public static MetricsUnit fromString(String name) { - return fromString(name, MetricsUnit.class); - } - - /** @return known MetricUnit values. */ - public static Collection values() { - return values(MetricsUnit.class); - } -} diff --git a/sdk/monitor/azure-monitor-query/src/main/java/module-info.java b/sdk/monitor/azure-monitor-query/src/main/java/module-info.java index 572591c53583..0b6d3960e405 100644 --- a/sdk/monitor/azure-monitor-query/src/main/java/module-info.java +++ b/sdk/monitor/azure-monitor-query/src/main/java/module-info.java @@ -9,7 +9,9 @@ requires transitive com.azure.core.experimental; exports com.azure.monitor.query; exports com.azure.monitor.query.models; - opens com.azure.monitor.query.metrics.implementation.models to com.fasterxml.jackson.databind; - opens com.azure.monitor.query.log.implementation.models to com.fasterxml.jackson.databind; - opens com.azure.monitor.query.models to com.fasterxml.jackson.databind; + opens com.azure.monitor.query.log.implementation.models to com.fasterxml.jackson.databind, com.azure.core; + opens com.azure.monitor.query.metrics.implementation.models to com.fasterxml.jackson.databind, com.azure.core; + opens com.azure.monitor.query.metricsdefinitions.implementation.models to com.fasterxml.jackson.databind, com.azure.core; + opens com.azure.monitor.query.metricsnamespaces.implementation.models to com.fasterxml.jackson.databind, com.azure.core; + opens com.azure.monitor.query.models to com.fasterxml.jackson.databind, com.azure.core; } diff --git a/sdk/monitor/azure-monitor-query/src/samples/java/com/azure/monitor/query/LogsQueryBatchSample.java b/sdk/monitor/azure-monitor-query/src/samples/java/com/azure/monitor/query/LogsQueryBatchSample.java index a99caeb53f44..57bc46d816c6 100644 --- a/sdk/monitor/azure-monitor-query/src/samples/java/com/azure/monitor/query/LogsQueryBatchSample.java +++ b/sdk/monitor/azure-monitor-query/src/samples/java/com/azure/monitor/query/LogsQueryBatchSample.java @@ -3,13 +3,16 @@ package com.azure.monitor.query; +import com.azure.core.http.policy.HttpLogDetailLevel; +import com.azure.core.http.policy.HttpLogOptions; import com.azure.core.util.Configuration; import com.azure.core.util.Context; import com.azure.identity.ClientSecretCredential; import com.azure.identity.ClientSecretCredentialBuilder; -import com.azure.monitor.query.models.LogsQueryBatch; -import com.azure.monitor.query.models.LogsQueryBatchResult; -import com.azure.monitor.query.models.LogsQueryBatchResultCollection; +import com.azure.monitor.query.models.LogsBatchQuery; +import com.azure.monitor.query.models.LogsBatchQueryResult; +import com.azure.monitor.query.models.LogsBatchQueryResultCollection; +import com.azure.monitor.query.models.LogsQueryOptions; import com.azure.monitor.query.models.LogsQueryResult; import com.azure.monitor.query.models.LogsTable; import com.azure.monitor.query.models.LogsTableRow; @@ -31,20 +34,22 @@ public static void main(String[] args) { .tenantId(Configuration.getGlobalConfiguration().get("AZURE_TENANT_ID")) .build(); - LogsClient logsClient = new LogsClientBuilder() + LogsQueryClient logsQueryClient = new LogsQueryClientBuilder() .credential(tokenCredential) + .httpLogOptions(new HttpLogOptions().setLogLevel(HttpLogDetailLevel.BODY_AND_HEADERS)) .buildClient(); - LogsQueryBatch logsQueryBatch = new LogsQueryBatch() + LogsBatchQuery logsBatchQuery = new LogsBatchQuery() .addQuery("d2d0e126-fa1e-4b0a-b647-250cdd471e68", "AppRequests | take 2", null) - .addQuery("d2d0e126-fa1e-4b0a-b647-250cdd471e68", "AppRequests | take 3", null); + .addQuery("d2d0e126-fa1e-4b0a-b647-250cdd471e68", "AppRequests | take 3", null) + .addQuery(new LogsQueryOptions("d2d0e126-fa1e-4b0a-b647-250cdd471e68", "AppRequests | take 4", null).setIncludeStatistics(true)); - LogsQueryBatchResultCollection batchResultCollection = logsClient - .queryLogsBatchWithResponse(logsQueryBatch, Context.NONE).getValue(); + LogsBatchQueryResultCollection batchResultCollection = logsQueryClient + .queryLogsBatchWithResponse(logsBatchQuery, Context.NONE).getValue(); - List responses = batchResultCollection.getBatchResults(); + List responses = batchResultCollection.getBatchResults(); - for (LogsQueryBatchResult response : responses) { + for (LogsBatchQueryResult response : responses) { LogsQueryResult queryResult = response.getQueryResult(); // Sample to iterate by row diff --git a/sdk/monitor/azure-monitor-query/src/samples/java/com/azure/monitor/query/LogsQuerySample.java b/sdk/monitor/azure-monitor-query/src/samples/java/com/azure/monitor/query/LogsQuerySample.java index fc463c20c5c9..db6fb9105412 100644 --- a/sdk/monitor/azure-monitor-query/src/samples/java/com/azure/monitor/query/LogsQuerySample.java +++ b/sdk/monitor/azure-monitor-query/src/samples/java/com/azure/monitor/query/LogsQuerySample.java @@ -29,11 +29,11 @@ public static void main(String[] args) { .tenantId(Configuration.getGlobalConfiguration().get("AZURE_TENANT_ID")) .build(); - LogsClient logsClient = new LogsClientBuilder() + LogsQueryClient logsQueryClient = new LogsQueryClientBuilder() .credential(tokenCredential) .buildClient(); - LogsQueryResult queryResults = logsClient.queryLogs("d2d0e126-fa1e-4b0a-b647-250cdd471e68", "AppRequests", + LogsQueryResult queryResults = logsQueryClient.queryLogs("d2d0e126-fa1e-4b0a-b647-250cdd471e68", "AppRequests", null); System.out.println("Number of tables = " + queryResults.getLogsTables().size()); diff --git a/sdk/monitor/azure-monitor-query/src/samples/java/com/azure/monitor/query/LogsQueryWithModels.java b/sdk/monitor/azure-monitor-query/src/samples/java/com/azure/monitor/query/LogsQueryWithModels.java index 9757dc91d2ac..3d73e935ad13 100644 --- a/sdk/monitor/azure-monitor-query/src/samples/java/com/azure/monitor/query/LogsQueryWithModels.java +++ b/sdk/monitor/azure-monitor-query/src/samples/java/com/azure/monitor/query/LogsQueryWithModels.java @@ -28,11 +28,11 @@ public static void main(String[] args) { .tenantId(Configuration.getGlobalConfiguration().get("AZURE_TENANT_ID")) .build(); - LogsClient logsClient = new LogsClientBuilder() + LogsQueryClient logsQueryClient = new LogsQueryClientBuilder() .credential(tokenCredential) .buildClient(); - LogsQueryResult queryResults = logsClient + LogsQueryResult queryResults = logsQueryClient .queryLogs("{workspace-id}", "AppRequests", null); // Sample to use a model type to read the results diff --git a/sdk/monitor/azure-monitor-query/src/samples/java/com/azure/monitor/query/MetricsQuerySample.java b/sdk/monitor/azure-monitor-query/src/samples/java/com/azure/monitor/query/MetricsQuerySample.java index 0332039b6687..bc0bfdc32103 100644 --- a/sdk/monitor/azure-monitor-query/src/samples/java/com/azure/monitor/query/MetricsQuerySample.java +++ b/sdk/monitor/azure-monitor-query/src/samples/java/com/azure/monitor/query/MetricsQuerySample.java @@ -9,9 +9,10 @@ import com.azure.identity.ClientSecretCredential; import com.azure.identity.ClientSecretCredentialBuilder; import com.azure.monitor.query.models.AggregationType; -import com.azure.monitor.query.models.Metrics; +import com.azure.monitor.query.models.Metric; import com.azure.monitor.query.models.MetricsQueryOptions; import com.azure.monitor.query.models.MetricsQueryResult; +import com.azure.monitor.query.models.QueryTimeSpan; import java.time.Duration; import java.util.Arrays; @@ -33,25 +34,25 @@ public static void main(String[] args) { .tenantId(Configuration.getGlobalConfiguration().get("AZURE_TENANT_ID")) .build(); - MetricsClient metricsClient = new MetricsClientBuilder() + MetricsQueryClient metricsQueryClient = new MetricsQueryClientBuilder() .credential(tokenCredential) .buildClient(); - Response metricsResponse = metricsClient + Response metricsResponse = metricsQueryClient .queryMetricsWithResponse( "/subscriptions/faa080af-c1d8-40ad-9cce-e1a450ca5b57/resourceGroups/srnagar-azuresdkgroup/providers/" + "Microsoft.CognitiveServices/accounts/srnagara-textanalytics", Arrays.asList("SuccessfulCalls"), new MetricsQueryOptions() .setMetricsNamespace("Microsoft.CognitiveServices/accounts") - .setTimespan(Duration.ofDays(30).toString()) + .setTimeSpan(new QueryTimeSpan(Duration.ofDays(30))) .setInterval(Duration.ofHours(1)) .setTop(100) .setAggregation(Arrays.asList(AggregationType.AVERAGE, AggregationType.COUNT)), Context.NONE); MetricsQueryResult metricsQueryResult = metricsResponse.getValue(); - List metrics = metricsQueryResult.getMetrics(); + List metrics = metricsQueryResult.getMetrics(); metrics.stream() .forEach(metric -> { System.out.println(metric.getMetricsName()); diff --git a/sdk/monitor/azure-monitor-query/src/samples/java/com/azure/monitor/query/MultiWorkspaceSample.java b/sdk/monitor/azure-monitor-query/src/samples/java/com/azure/monitor/query/MultiWorkspaceSample.java new file mode 100644 index 000000000000..e6281cef8ffc --- /dev/null +++ b/sdk/monitor/azure-monitor-query/src/samples/java/com/azure/monitor/query/MultiWorkspaceSample.java @@ -0,0 +1,64 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.monitor.query; + +import com.azure.core.http.policy.HttpLogDetailLevel; +import com.azure.core.http.policy.HttpLogOptions; +import com.azure.core.util.Configuration; +import com.azure.core.util.Context; +import com.azure.identity.ClientSecretCredential; +import com.azure.identity.ClientSecretCredentialBuilder; +import com.azure.monitor.query.models.LogsQueryOptions; +import com.azure.monitor.query.models.LogsQueryResult; +import com.azure.monitor.query.models.LogsTable; +import com.azure.monitor.query.models.LogsTableRow; + +import java.util.Arrays; +import java.util.HashSet; +import java.util.Set; +import java.util.stream.Collectors; + +/** + * A sample to demonstrate querying for logs from multiple workspaces. + */ +public class MultiWorkspaceSample { + + /** + * The main method to execute the sample. + * @param args ignored args. + */ + public static void main(String[] args) { + ClientSecretCredential tokenCredential = new ClientSecretCredentialBuilder() + .clientId(Configuration.getGlobalConfiguration().get("AZURE_MONITOR_CLIENT_ID")) + .clientSecret(Configuration.getGlobalConfiguration().get("AZURE_MONITOR_CLIENT_SECRET")) + .tenantId(Configuration.getGlobalConfiguration().get("AZURE_TENANT_ID")) + .build(); + + LogsQueryClient logsQueryClient = new LogsQueryClientBuilder() + .credential(tokenCredential) + .httpLogOptions(new HttpLogOptions().setLogLevel(HttpLogDetailLevel.BODY_AND_HEADERS)) + .buildClient(); + LogsQueryResult queryResults = logsQueryClient.queryLogsWithResponse( + new LogsQueryOptions("d2d0e126-fa1e-4b0a-b647-250cdd471e68", + "union * | where TimeGenerated > ago(10d) | project TenantId", null) + .setWorkspaceNames(Arrays.asList("srnagar-log-analytics-ws-2", "srnagar-log-analytics-ws")), + Context.NONE).getValue(); + + System.out.println("Number of tables = " + queryResults.getLogsTables().size()); + + // Sample to iterate by row + Set results = new HashSet<>(); + for (LogsTable table : queryResults.getLogsTables()) { + for (LogsTableRow row : table.getTableRows()) { + Set collect = + row.getTableRow().stream().map(cell -> cell.getValueAsString()) + .collect(Collectors.toSet()); + + row.getTableRow().forEach(cell -> System.out.println(cell.getValueAsString())); + results.addAll(collect); + } + } + System.out.println("Collected tenants " + results); + } +} diff --git a/sdk/monitor/azure-monitor-query/src/samples/java/com/azure/monitor/query/ReadmeSamples.java b/sdk/monitor/azure-monitor-query/src/samples/java/com/azure/monitor/query/ReadmeSamples.java index e4e8a34d3c63..95e80f21dd7b 100644 --- a/sdk/monitor/azure-monitor-query/src/samples/java/com/azure/monitor/query/ReadmeSamples.java +++ b/sdk/monitor/azure-monitor-query/src/samples/java/com/azure/monitor/query/ReadmeSamples.java @@ -7,15 +7,15 @@ import com.azure.core.http.rest.Response; import com.azure.core.util.Context; import com.azure.monitor.query.models.AggregationType; -import com.azure.monitor.query.models.LogsQueryBatch; -import com.azure.monitor.query.models.LogsQueryBatchResult; -import com.azure.monitor.query.models.LogsQueryBatchResultCollection; +import com.azure.monitor.query.models.LogsBatchQuery; +import com.azure.monitor.query.models.LogsBatchQueryResult; +import com.azure.monitor.query.models.LogsBatchQueryResultCollection; import com.azure.monitor.query.models.LogsQueryOptions; import com.azure.monitor.query.models.LogsQueryResult; import com.azure.monitor.query.models.LogsTable; import com.azure.monitor.query.models.LogsTableCell; import com.azure.monitor.query.models.LogsTableRow; -import com.azure.monitor.query.models.Metrics; +import com.azure.monitor.query.models.Metric; import com.azure.monitor.query.models.MetricsQueryOptions; import com.azure.monitor.query.models.MetricsQueryResult; import com.azure.monitor.query.models.QueryTimeSpan; @@ -38,11 +38,11 @@ public class ReadmeSamples { public void createLogsClients() { TokenCredential tokenCredential = null; - LogsClient logsClient = new LogsClientBuilder() + LogsQueryClient logsQueryClient = new LogsQueryClientBuilder() .credential(tokenCredential) .buildClient(); - LogsAsyncClient logsAsyncClient = new LogsClientBuilder() + LogsQueryAsyncClient logsQueryAsyncClient = new LogsQueryClientBuilder() .credential(tokenCredential) .buildAsyncClient(); } @@ -53,11 +53,11 @@ public void createLogsClients() { public void createMetricsClients() { TokenCredential tokenCredential = null; - MetricsClient metricsClient = new MetricsClientBuilder() + MetricsQueryClient metricsQueryClient = new MetricsQueryClientBuilder() .credential(tokenCredential) .buildClient(); - MetricsAsyncClient metricsAsyncClient = new MetricsClientBuilder() + MetricsQueryAsyncClient metricsQueryAsyncClient = new MetricsQueryClientBuilder() .credential(tokenCredential) .buildAsyncClient(); } @@ -68,11 +68,11 @@ public void createMetricsClients() { public void getLogsQuery() { TokenCredential tokenCredential = null; - LogsClient logsClient = new LogsClientBuilder() + LogsQueryClient logsQueryClient = new LogsQueryClientBuilder() .credential(tokenCredential) .buildClient(); - LogsQueryResult queryResults = logsClient.queryLogs("{workspace-id}", "{kusto-query}", + LogsQueryResult queryResults = logsQueryClient.queryLogs("{workspace-id}", "{kusto-query}", new QueryTimeSpan(Duration.ofDays(2))); System.out.println("Number of tables = " + queryResults.getLogsTables().size()); @@ -90,20 +90,20 @@ public void getLogsQuery() { public void getLogsQueryBatch() { TokenCredential tokenCredential = null; - LogsClient logsClient = new LogsClientBuilder() + LogsQueryClient logsQueryClient = new LogsQueryClientBuilder() .credential(tokenCredential) .buildClient(); - LogsQueryBatch logsQueryBatch = new LogsQueryBatch() + LogsBatchQuery logsBatchQuery = new LogsBatchQuery() .addQuery("{workspace-id}", "{query-1}", new QueryTimeSpan(Duration.ofDays(2))) .addQuery("{workspace-id}", "{query-2}", new QueryTimeSpan(Duration.ofDays(30))); - LogsQueryBatchResultCollection batchResultCollection = logsClient - .queryLogsBatchWithResponse(logsQueryBatch, Context.NONE).getValue(); + LogsBatchQueryResultCollection batchResultCollection = logsQueryClient + .queryLogsBatchWithResponse(logsBatchQuery, Context.NONE).getValue(); - List responses = batchResultCollection.getBatchResults(); + List responses = batchResultCollection.getBatchResults(); - for (LogsQueryBatchResult response : responses) { + for (LogsBatchQueryResult response : responses) { LogsQueryResult queryResult = response.getQueryResult(); // Sample to iterate by row @@ -125,7 +125,7 @@ public void getLogsQueryBatch() { public void getLogsWithServerTimeout() { TokenCredential tokenCredential = null; - LogsClient logsClient = new LogsClientBuilder() + LogsQueryClient logsQueryClient = new LogsQueryClientBuilder() .credential(tokenCredential) .buildClient(); @@ -135,7 +135,7 @@ public void getLogsWithServerTimeout() { .setServerTimeout(Duration.ofMinutes(10)); // make service call with these request options set as filter header - Response response = logsClient.queryLogsWithResponse(options, Context.NONE); + Response response = logsQueryClient.queryLogsWithResponse(options, Context.NONE); LogsQueryResult logsQueryResult = response.getValue(); // Sample to iterate by row @@ -154,24 +154,24 @@ public void getLogsWithServerTimeout() { public void getMetrics() { TokenCredential tokenCredential = null; - MetricsClient metricsClient = new MetricsClientBuilder() + MetricsQueryClient metricsQueryClient = new MetricsQueryClientBuilder() .credential(tokenCredential) .buildClient(); - Response metricsResponse = metricsClient + Response metricsResponse = metricsQueryClient .queryMetricsWithResponse( "{resource-id}", Arrays.asList("SuccessfulCalls"), new MetricsQueryOptions() .setMetricsNamespace("Microsoft.CognitiveServices/accounts") - .setTimespan(Duration.ofDays(30).toString()) + .setTimeSpan(new QueryTimeSpan(Duration.ofDays(30))) .setInterval(Duration.ofHours(1)) .setTop(100) .setAggregation(Arrays.asList(AggregationType.AVERAGE, AggregationType.COUNT)), Context.NONE); MetricsQueryResult metricsQueryResult = metricsResponse.getValue(); - List metrics = metricsQueryResult.getMetrics(); + List metrics = metricsQueryResult.getMetrics(); metrics.stream() .forEach(metric -> { System.out.println(metric.getMetricsName()); @@ -194,11 +194,11 @@ public void getMetrics() { public void getLogsQueryWithColumnNameAccess() { TokenCredential tokenCredential = null; - LogsClient logsClient = new LogsClientBuilder() + LogsQueryClient logsQueryClient = new LogsQueryClientBuilder() .credential(tokenCredential) .buildClient(); - LogsQueryResult queryResults = logsClient.queryLogs("{workspace-id}", "{kusto-query}", + LogsQueryResult queryResults = logsQueryClient.queryLogs("{workspace-id}", "{kusto-query}", new QueryTimeSpan(Duration.ofDays(2))); System.out.println("Number of tables = " + queryResults.getLogsTables().size()); diff --git a/sdk/monitor/azure-monitor-query/src/samples/java/com/azure/monitor/query/ServerTimeoutSample.java b/sdk/monitor/azure-monitor-query/src/samples/java/com/azure/monitor/query/ServerTimeoutSample.java index 10293731efc9..cbfa6582dd5a 100644 --- a/sdk/monitor/azure-monitor-query/src/samples/java/com/azure/monitor/query/ServerTimeoutSample.java +++ b/sdk/monitor/azure-monitor-query/src/samples/java/com/azure/monitor/query/ServerTimeoutSample.java @@ -35,7 +35,7 @@ public static void main(String[] args) { .build(); // create client - LogsClient logsClient = new LogsClientBuilder() + LogsQueryClient logsQueryClient = new LogsQueryClientBuilder() .credential(tokenCredential) .buildClient(); @@ -47,7 +47,7 @@ public static void main(String[] args) { .setIncludeStatistics(true); // make service call with these request options set as filter header - Response response = logsClient + Response response = logsQueryClient .queryLogsWithResponse(options, Context.NONE); LogsQueryResult logsQueryResult = response.getValue(); diff --git a/sdk/monitor/azure-monitor-query/src/test/java/com/azure/monitor/query/LogsClientTest.java b/sdk/monitor/azure-monitor-query/src/test/java/com/azure/monitor/query/LogsClientTest.java deleted file mode 100644 index e771026f9d92..000000000000 --- a/sdk/monitor/azure-monitor-query/src/test/java/com/azure/monitor/query/LogsClientTest.java +++ /dev/null @@ -1,88 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -package com.azure.monitor.query; - -import com.azure.core.credential.AccessToken; -import com.azure.core.credential.TokenCredential; -import com.azure.core.test.TestBase; -import com.azure.core.test.TestMode; -import com.azure.core.util.Configuration; -import com.azure.core.util.Context; -import com.azure.identity.ClientSecretCredentialBuilder; -import com.azure.identity.DefaultAzureCredentialBuilder; -import com.azure.monitor.query.models.LogsQueryBatch; -import com.azure.monitor.query.models.LogsQueryBatchResult; -import com.azure.monitor.query.models.LogsQueryBatchResultCollection; -import com.azure.monitor.query.models.LogsQueryResult; -import org.junit.jupiter.api.BeforeEach; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -import java.time.OffsetDateTime; -import java.util.List; - -import static org.junit.jupiter.api.Assertions.assertEquals; - -/** - * Unit tests for {@link LogsClient} - */ -public class LogsClientTest extends TestBase { - - private LogsClient client; - - @BeforeEach - public void setup() { - LogsClientBuilder clientBuilder = new LogsClientBuilder(); - if (getTestMode() == TestMode.PLAYBACK) { - clientBuilder - .credential(request -> Mono.just(new AccessToken("fakeToken", OffsetDateTime.now().plusDays(1)))) - .httpClient(interceptorManager.getPlaybackClient()); - } else if (getTestMode() == TestMode.RECORD) { - clientBuilder - .addPolicy(interceptorManager.getRecordPolicy()) - .credential(getCredential()); - } else if (getTestMode() == TestMode.LIVE) { - clientBuilder.credential(new DefaultAzureCredentialBuilder().build()); - } - this.client = clientBuilder.buildClient(); - } - - private TokenCredential getCredential() { - return new ClientSecretCredentialBuilder() - .clientId(Configuration.getGlobalConfiguration().get("AZURE_MONITOR_CLIENT_ID")) - .clientSecret(Configuration.getGlobalConfiguration().get("AZURE_MONITOR_CLIENT_SECRET")) - .tenantId(Configuration.getGlobalConfiguration().get("AZURE_TENANT_ID")) - .build(); - } - - @Test - public void testLogsQuery() { - LogsQueryResult queryResults = client.queryLogs("d2d0e126-fa1e-4b0a-b647-250cdd471e68", "AppRequests", null); - assertEquals(1, queryResults.getLogsTables().size()); - assertEquals(1148, queryResults.getLogsTables().get(0).getAllTableCells().size()); - assertEquals(28, queryResults.getLogsTables().get(0).getTableRows().size()); - } - - @Test - public void testLogsQueryBatch() { - LogsQueryBatch logsQueryBatch = new LogsQueryBatch() - .addQuery("d2d0e126-fa1e-4b0a-b647-250cdd471e68", "AppRequests | take 2", null) - .addQuery("d2d0e126-fa1e-4b0a-b647-250cdd471e68", "AppRequests | take 3", null); - - LogsQueryBatchResultCollection batchResultCollection = client - .queryLogsBatchWithResponse(logsQueryBatch, Context.NONE).getValue(); - - List responses = batchResultCollection.getBatchResults(); - - assertEquals(2, responses.size()); - - assertEquals(1, responses.get(0).getQueryResult().getLogsTables().size()); - assertEquals(82, responses.get(0).getQueryResult().getLogsTables().get(0).getAllTableCells().size()); - assertEquals(2, responses.get(0).getQueryResult().getLogsTables().get(0).getTableRows().size()); - - assertEquals(1, responses.get(1).getQueryResult().getLogsTables().size()); - assertEquals(123, responses.get(1).getQueryResult().getLogsTables().get(0).getAllTableCells().size()); - assertEquals(3, responses.get(1).getQueryResult().getLogsTables().get(0).getTableRows().size()); - } -} diff --git a/sdk/monitor/azure-monitor-query/src/test/java/com/azure/monitor/query/LogsQueryClientTest.java b/sdk/monitor/azure-monitor-query/src/test/java/com/azure/monitor/query/LogsQueryClientTest.java new file mode 100644 index 000000000000..3ad0a6da6964 --- /dev/null +++ b/sdk/monitor/azure-monitor-query/src/test/java/com/azure/monitor/query/LogsQueryClientTest.java @@ -0,0 +1,176 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.monitor.query; + +import com.azure.core.credential.AccessToken; +import com.azure.core.credential.TokenCredential; +import com.azure.core.http.policy.HttpLogDetailLevel; +import com.azure.core.http.policy.HttpLogOptions; +import com.azure.core.test.TestBase; +import com.azure.core.test.TestMode; +import com.azure.core.util.Configuration; +import com.azure.core.util.Context; +import com.azure.identity.ClientSecretCredentialBuilder; +import com.azure.identity.DefaultAzureCredentialBuilder; +import com.azure.monitor.query.models.LogsBatchQuery; +import com.azure.monitor.query.models.LogsBatchQueryResult; +import com.azure.monitor.query.models.LogsBatchQueryResultCollection; +import com.azure.monitor.query.models.LogsQueryOptions; +import com.azure.monitor.query.models.LogsQueryResult; +import com.azure.monitor.query.models.QueryTimeSpan; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; + +import java.time.LocalDateTime; +import java.time.OffsetDateTime; +import java.time.ZoneOffset; +import java.util.Arrays; +import java.util.List; + +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertNull; + +/** + * Unit tests for {@link LogsQueryClient} + */ +public class LogsQueryClientTest extends TestBase { + + public static final String WORKSPACE_ID = Configuration.getGlobalConfiguration() + .get("AZURE_MONITOR_LOGS_WORKSPACE_ID", "d2d0e126-fa1e-4b0a-b647-250cdd471e68"); + private LogsQueryClient client; + + @BeforeEach + public void setup() { + LogsQueryClientBuilder clientBuilder = new LogsQueryClientBuilder(); + if (getTestMode() == TestMode.PLAYBACK) { + clientBuilder + .credential(request -> Mono.just(new AccessToken("fakeToken", OffsetDateTime.now().plusDays(1)))) + .httpClient(interceptorManager.getPlaybackClient()); + } else if (getTestMode() == TestMode.RECORD) { + clientBuilder + .addPolicy(interceptorManager.getRecordPolicy()) + .credential(getCredential()); + } else if (getTestMode() == TestMode.LIVE) { + clientBuilder.credential(new DefaultAzureCredentialBuilder().build()); + } + this.client = clientBuilder + .httpLogOptions(new HttpLogOptions().setLogLevel(HttpLogDetailLevel.BODY_AND_HEADERS)) + .buildClient(); + } + + private TokenCredential getCredential() { + return new ClientSecretCredentialBuilder() + .clientId(Configuration.getGlobalConfiguration().get("AZURE_MONITOR_CLIENT_ID")) + .clientSecret(Configuration.getGlobalConfiguration().get("AZURE_MONITOR_CLIENT_SECRET")) + .tenantId(Configuration.getGlobalConfiguration().get("AZURE_TENANT_ID")) + .build(); + } + + @Test + public void testLogsQuery() { + LogsQueryResult queryResults = client.queryLogs(WORKSPACE_ID, "AppRequests", + new QueryTimeSpan(OffsetDateTime.of(LocalDateTime.of(2021, 01, 01, 0, 0), ZoneOffset.UTC), + OffsetDateTime.of(LocalDateTime.of(2021, 06, 10, 0, 0), ZoneOffset.UTC))); + assertEquals(1, queryResults.getLogsTables().size()); + assertEquals(902, queryResults.getLogsTables().get(0).getAllTableCells().size()); + assertEquals(22, queryResults.getLogsTables().get(0).getTableRows().size()); + } + + @Test + public void testLogsQueryBatch() { + LogsBatchQuery logsBatchQuery = new LogsBatchQuery() + .addQuery(WORKSPACE_ID, "AppRequests | take 2", null) + .addQuery(WORKSPACE_ID, "AppRequests | take 3", null); + + LogsBatchQueryResultCollection batchResultCollection = client + .queryLogsBatchWithResponse(logsBatchQuery, Context.NONE).getValue(); + + List responses = batchResultCollection.getBatchResults(); + + assertEquals(2, responses.size()); + + assertEquals(1, responses.get(0).getQueryResult().getLogsTables().size()); + assertEquals(82, responses.get(0).getQueryResult().getLogsTables().get(0).getAllTableCells().size()); + assertEquals(2, responses.get(0).getQueryResult().getLogsTables().get(0).getTableRows().size()); + + assertEquals(1, responses.get(1).getQueryResult().getLogsTables().size()); + assertEquals(123, responses.get(1).getQueryResult().getLogsTables().get(0).getAllTableCells().size()); + assertEquals(3, responses.get(1).getQueryResult().getLogsTables().get(0).getTableRows().size()); + } + + @Test + public void testMultipleWorkspaces() { + LogsQueryResult queryResults = client.queryLogsWithResponse( + new LogsQueryOptions(WORKSPACE_ID, + "union * | where TimeGenerated > ago(100d) | project TenantId | summarize count() by TenantId", + null) + .setWorkspaceIds(Arrays.asList("9dad0092-fd13-403a-b367-a189a090a541")), Context.NONE) + .getValue(); + assertEquals(1, queryResults.getLogsTables().size()); + assertEquals(2, queryResults + .getLogsTables() + .get(0) + .getTableRows() + .stream() + .map(row -> { + System.out.println(row.getColumnValue("TenantId").get().getValueAsString()); + return row.getColumnValue("TenantId").get(); + }) + .distinct() + .count()); + } + + @Test + public void testBatchQueryPartialSuccess() { + LogsBatchQuery logsBatchQuery = new LogsBatchQuery() + .addQuery(WORKSPACE_ID, "AppRequests | take 2", null) + .addQuery(WORKSPACE_ID, "AppRequests | take", null); + + LogsBatchQueryResultCollection batchResultCollection = client + .queryLogsBatchWithResponse(logsBatchQuery, Context.NONE).getValue(); + + List responses = batchResultCollection.getBatchResults(); + + assertEquals(2, responses.size()); + assertEquals(200, responses.get(0).getStatus()); + assertNotNull(responses.get(0).getQueryResult()); + assertNull(responses.get(0).getQueryResult().getError()); + assertEquals(400, responses.get(1).getStatus()); + assertNotNull(responses.get(1).getQueryResult().getError()); + assertEquals("BadArgumentError", responses.get(1).getQueryResult().getError().getCode()); + } + + @Test + public void testStatistics() { + LogsQueryResult queryResults = client.queryLogsWithResponse(new LogsQueryOptions(WORKSPACE_ID, + "AppRequests", null).setIncludeStatistics(true), Context.NONE).getValue(); + + assertEquals(1, queryResults.getLogsTables().size()); + assertNotNull(queryResults.getStatistics()); + } + + @Test + public void testBatchStatistics() { + LogsBatchQuery logsBatchQuery = new LogsBatchQuery() + .addQuery(WORKSPACE_ID, "AppRequests | take 2", null) + .addQuery(new LogsQueryOptions(WORKSPACE_ID, "AppRequests | take 2", null).setIncludeStatistics(true)); + + LogsBatchQueryResultCollection batchResultCollection = client + .queryLogsBatchWithResponse(logsBatchQuery, Context.NONE).getValue(); + + List responses = batchResultCollection.getBatchResults(); + + assertEquals(2, responses.size()); + assertEquals(200, responses.get(0).getStatus()); + assertNotNull(responses.get(0).getQueryResult()); + assertNull(responses.get(0).getQueryResult().getError()); + assertNull(responses.get(0).getQueryResult().getStatistics()); + assertEquals(200, responses.get(1).getStatus()); + assertNotNull(responses.get(1).getQueryResult()); + assertNull(responses.get(1).getQueryResult().getError()); + assertNotNull(responses.get(1).getQueryResult().getStatistics()); + } +} diff --git a/sdk/monitor/azure-monitor-query/src/test/java/com/azure/monitor/query/MetricsClientTest.java b/sdk/monitor/azure-monitor-query/src/test/java/com/azure/monitor/query/MetricsQueryClientTest.java similarity index 54% rename from sdk/monitor/azure-monitor-query/src/test/java/com/azure/monitor/query/MetricsClientTest.java rename to sdk/monitor/azure-monitor-query/src/test/java/com/azure/monitor/query/MetricsQueryClientTest.java index 0e4c66f61b3d..c8bd41176d73 100644 --- a/sdk/monitor/azure-monitor-query/src/test/java/com/azure/monitor/query/MetricsClientTest.java +++ b/sdk/monitor/azure-monitor-query/src/test/java/com/azure/monitor/query/MetricsQueryClientTest.java @@ -5,6 +5,9 @@ import com.azure.core.credential.AccessToken; import com.azure.core.credential.TokenCredential; +import com.azure.core.http.policy.HttpLogDetailLevel; +import com.azure.core.http.policy.HttpLogOptions; +import com.azure.core.http.rest.PagedIterable; import com.azure.core.http.rest.Response; import com.azure.core.test.TestBase; import com.azure.core.test.TestMode; @@ -13,31 +16,38 @@ import com.azure.identity.ClientSecretCredentialBuilder; import com.azure.identity.DefaultAzureCredentialBuilder; import com.azure.monitor.query.models.AggregationType; -import com.azure.monitor.query.models.Metrics; +import com.azure.monitor.query.models.Metric; +import com.azure.monitor.query.models.MetricDefinition; +import com.azure.monitor.query.models.MetricNamespace; import com.azure.monitor.query.models.MetricsQueryOptions; import com.azure.monitor.query.models.MetricsQueryResult; +import com.azure.monitor.query.models.QueryTimeSpan; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import reactor.core.publisher.Mono; import java.time.Duration; +import java.time.LocalDateTime; import java.time.OffsetDateTime; +import java.time.ZoneOffset; import java.util.Arrays; import java.util.List; import static org.junit.jupiter.api.Assertions.assertEquals; /** - * Unit tests for {@link MetricsClient}. + * Unit tests for {@link MetricsQueryClient}. */ -public class MetricsClientTest extends TestBase { - - private MetricsClient client; +public class MetricsQueryClientTest extends TestBase { + public static final String RESOURCE_URI = Configuration.getGlobalConfiguration() + .get("AZURE_MONITOR_METRICS_RESOURCE_URI", + "/subscriptions/faa080af-c1d8-40ad-9cce-e1a450ca5b57/resourceGroups/srnagar-azuresdkgroup/providers/Microsoft.CognitiveServices/accounts/srnagara-textanalytics"); + private MetricsQueryClient client; @BeforeEach public void setup() { - MetricsClientBuilder clientBuilder = new MetricsClientBuilder(); + MetricsQueryClientBuilder clientBuilder = new MetricsQueryClientBuilder(); if (getTestMode() == TestMode.PLAYBACK) { clientBuilder .credential(request -> Mono.just(new AccessToken("fakeToken", OffsetDateTime.now().plusDays(1)))) @@ -49,7 +59,9 @@ public void setup() { } else if (getTestMode() == TestMode.LIVE) { clientBuilder.credential(new DefaultAzureCredentialBuilder().build()); } - this.client = clientBuilder.buildClient(); + this.client = clientBuilder + .httpLogOptions(new HttpLogOptions().setLogLevel(HttpLogDetailLevel.BODY_AND_HEADERS)) + .buildClient(); } private TokenCredential getCredential() { @@ -63,52 +75,42 @@ private TokenCredential getCredential() { @Test public void testMetricsQuery() { Response metricsResponse = client - .queryMetricsWithResponse( - "/subscriptions/faa080af-c1d8-40ad-9cce-e1a450ca5b57/resourceGroups/srnagar-azuresdkgroup/providers/" - + "Microsoft.CognitiveServices/accounts/srnagara-textanalytics", - Arrays.asList("SuccessfulCalls"), + .queryMetricsWithResponse(RESOURCE_URI, Arrays.asList("SuccessfulCalls"), new MetricsQueryOptions() .setMetricsNamespace("Microsoft.CognitiveServices/accounts") - .setTimespan(Duration.ofDays(30).toString()) + .setTimeSpan(new QueryTimeSpan(Duration.ofDays(10))) .setInterval(Duration.ofHours(1)) .setTop(100) - .setAggregation(Arrays.asList(AggregationType.AVERAGE, AggregationType.COUNT, - AggregationType.MINIMUM, AggregationType.MAXIMUM, AggregationType.TOTAL)), + .setAggregation(Arrays.asList(AggregationType.COUNT, AggregationType.TOTAL, + AggregationType.MAXIMUM, AggregationType.MINIMUM, AggregationType.AVERAGE)), Context.NONE); MetricsQueryResult metricsQueryResult = metricsResponse.getValue(); - List metrics = metricsQueryResult.getMetrics(); + List metrics = metricsQueryResult.getMetrics(); assertEquals(1, metrics.size()); - Metrics successfulCallsMetrics = metrics.get(0); - assertEquals("SuccessfulCalls", successfulCallsMetrics.getMetricsName()); - assertEquals("Microsoft.Insights/metrics", successfulCallsMetrics.getType()); - assertEquals(1, successfulCallsMetrics.getTimeSeries().size()); - assertEquals(720, successfulCallsMetrics.getTimeSeries().get(0).getData().size()); - - Assertions.assertTrue(successfulCallsMetrics.getTimeSeries() - .stream() - .flatMap(timeSeriesElement -> timeSeriesElement.getData().stream()) - .anyMatch(metricsValue -> Double.compare(0.0, metricsValue.getAverage().doubleValue()) != 0)); + Metric successfulCallsMetric = metrics.get(0); + assertEquals("SuccessfulCalls", successfulCallsMetric.getMetricsName()); + assertEquals("Microsoft.Insights/metrics", successfulCallsMetric.getType()); + assertEquals(1, successfulCallsMetric.getTimeSeries().size()); - Assertions.assertTrue(successfulCallsMetrics.getTimeSeries() + Assertions.assertTrue(successfulCallsMetric.getTimeSeries() .stream() .flatMap(timeSeriesElement -> timeSeriesElement.getData().stream()) - .anyMatch(metricsValue -> Double.compare(0.0, metricsValue.getMaximum().doubleValue()) == 0)); - - Assertions.assertTrue(successfulCallsMetrics.getTimeSeries() - .stream() - .flatMap(timeSeriesElement -> timeSeriesElement.getData().stream()) - .anyMatch(metricsValue -> Double.compare(0.0, metricsValue.getMinimum().doubleValue()) == 0)); + .anyMatch(metricsValue -> Double.compare(0.0, metricsValue.getCount()) == 0)); + } - Assertions.assertTrue(successfulCallsMetrics.getTimeSeries() - .stream() - .flatMap(timeSeriesElement -> timeSeriesElement.getData().stream()) - .anyMatch(metricsValue -> Double.compare(0.0, metricsValue.getCount().doubleValue()) == 0)); + @Test + public void testMetricsDefinition() { + PagedIterable metricsDefinitions = client + .listMetricsDefinition(RESOURCE_URI, "Microsoft.CognitiveServices/accounts"); + assertEquals(11, metricsDefinitions.stream().count()); + } - Assertions.assertTrue(successfulCallsMetrics.getTimeSeries() - .stream() - .flatMap(timeSeriesElement -> timeSeriesElement.getData().stream()) - .anyMatch(metricsValue -> Double.compare(0.0, metricsValue.getTotal().doubleValue()) == 0)); + @Test + public void testMetricsNamespaces() { + PagedIterable metricsNamespaces = client.listMetricsNamespace(RESOURCE_URI, + OffsetDateTime.of(LocalDateTime.of(2021, 06, 01, 0, 0), ZoneOffset.UTC)); + assertEquals(2, metricsNamespaces.stream().count()); } } diff --git a/sdk/monitor/azure-monitor-query/src/test/resources/session-records/LogsClientTest.testLogsQuery.json b/sdk/monitor/azure-monitor-query/src/test/resources/session-records/LogsClientTest.testLogsQuery.json deleted file mode 100644 index fbdfd0763745..000000000000 --- a/sdk/monitor/azure-monitor-query/src/test/resources/session-records/LogsClientTest.testLogsQuery.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "POST", - "Uri" : "https://REDACTED.loganalytics.io/v1/workspaces/d2d0e126-fa1e-4b0a-b647-250cdd471e68/query", - "Headers" : { - "User-Agent" : "azsdk-java-UnknownName/UnknownVersion (14.0.2; Windows 10; 10.0)", - "Content-Type" : "application/json" - }, - "Response" : { - "Access-Control-Allow-Origin" : "*", - "X-Content-Type-Options" : "nosniff", - "Connection" : "keep-alive", - "retry-after" : "0", - "StatusCode" : "200", - "Date" : "Thu, 06 May 2021 09:01:54 GMT", - "via" : "1.1 draft-oms-6b5d48d5bb-wknnl", - "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", - "Access-Control-Expose-Headers" : "Retry-After,Age,WWW-Authenticate,x-resource-identities,x-ms-status-location", - "Vary" : "Accept-Encoding,Accept-Encoding", - "Content-Length" : "19142", - "Body" : "{\"tables\":[{\"name\":\"PrimaryResult\",\"columns\":[{\"name\":\"TenantId\",\"type\":\"string\"},{\"name\":\"TimeGenerated\",\"type\":\"datetime\"},{\"name\":\"Id\",\"type\":\"string\"},{\"name\":\"Source\",\"type\":\"string\"},{\"name\":\"Name\",\"type\":\"string\"},{\"name\":\"Url\",\"type\":\"string\"},{\"name\":\"Success\",\"type\":\"bool\"},{\"name\":\"ResultCode\",\"type\":\"string\"},{\"name\":\"DurationMs\",\"type\":\"real\"},{\"name\":\"PerformanceBucket\",\"type\":\"string\"},{\"name\":\"Properties\",\"type\":\"dynamic\"},{\"name\":\"Measurements\",\"type\":\"dynamic\"},{\"name\":\"OperationName\",\"type\":\"string\"},{\"name\":\"OperationId\",\"type\":\"string\"},{\"name\":\"OperationLinks\",\"type\":\"dynamic\"},{\"name\":\"ParentId\",\"type\":\"string\"},{\"name\":\"SyntheticSource\",\"type\":\"string\"},{\"name\":\"SessionId\",\"type\":\"string\"},{\"name\":\"UserId\",\"type\":\"string\"},{\"name\":\"UserAuthenticatedId\",\"type\":\"string\"},{\"name\":\"UserAccountId\",\"type\":\"string\"},{\"name\":\"AppVersion\",\"type\":\"string\"},{\"name\":\"AppRoleName\",\"type\":\"string\"},{\"name\":\"AppRoleInstance\",\"type\":\"string\"},{\"name\":\"ClientType\",\"type\":\"string\"},{\"name\":\"ClientModel\",\"type\":\"string\"},{\"name\":\"ClientOS\",\"type\":\"string\"},{\"name\":\"ClientIP\",\"type\":\"string\"},{\"name\":\"ClientCity\",\"type\":\"string\"},{\"name\":\"ClientStateOrProvince\",\"type\":\"string\"},{\"name\":\"ClientCountryOrRegion\",\"type\":\"string\"},{\"name\":\"ClientBrowser\",\"type\":\"string\"},{\"name\":\"ResourceGUID\",\"type\":\"string\"},{\"name\":\"IKey\",\"type\":\"string\"},{\"name\":\"SDKVersion\",\"type\":\"string\"},{\"name\":\"ItemCount\",\"type\":\"int\"},{\"name\":\"ReferencedItemId\",\"type\":\"string\"},{\"name\":\"ReferencedType\",\"type\":\"string\"},{\"name\":\"SourceSystem\",\"type\":\"string\"},{\"name\":\"Type\",\"type\":\"string\"},{\"name\":\"_ResourceId\",\"type\":\"string\"}],\"rows\":[[\"d2d0e126-fa1e-4b0a-b647-250cdd471e68\",\"2021-03-08T07:20:29.193Z\",\"c45e1db44627fa35\",\"\",\"event-hubs-producer-testing\",\"\",true,\"200\",1197.2,\"1sec-3sec\",\"{\\\"statusDescription\\\":\\\"\\\"}\",null,\"event-hubs-producer-testing\",\"55bb62aedf1d6a88c76bb58cffc3caeb\",null,\"55bb62aedf1d6a88c76bb58cffc3caeb\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"PC\",\"Other\",\"Windows\",\"0.0.0.0\",\"Edmonds\",\"Washington\",\"United States\",\"Other\",\"fc5f5a5d-d6d1-47f9-be1b-aa57185ec6be\",\"b4f83947-968d-4e2f-82ad-804be07697ae\",\"\",1,\"\",\"\",\"Azure\",\"AppRequests\",\"/subscriptions/faa080af-c1d8-40ad-9cce-e1a450ca5b57/resourcegroups/srnagar-azuresdkgroup/providers/microsoft.insights/components/srnagarappinsights\"],[\"d2d0e126-fa1e-4b0a-b647-250cdd471e68\",\"2021-03-08T07:20:31.308Z\",\"ca92a2fcc8531046\",\"\",\"event-hubs-consumer-testing\",\"\",true,\"200\",33338.25,\"30sec-1min\",\"{\\\"statusDescription\\\":\\\"\\\"}\",null,\"event-hubs-consumer-testing\",\"d03afd37cc270eca8b77145bdfe67ce4\",null,\"d03afd37cc270eca8b77145bdfe67ce4\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"PC\",\"Other\",\"Windows\",\"0.0.0.0\",\"Edmonds\",\"Washington\",\"United States\",\"Other\",\"fc5f5a5d-d6d1-47f9-be1b-aa57185ec6be\",\"b4f83947-968d-4e2f-82ad-804be07697ae\",\"\",1,\"\",\"\",\"Azure\",\"AppRequests\",\"/subscriptions/faa080af-c1d8-40ad-9cce-e1a450ca5b57/resourcegroups/srnagar-azuresdkgroup/providers/microsoft.insights/components/srnagarappinsights\"],[\"d2d0e126-fa1e-4b0a-b647-250cdd471e68\",\"2021-03-02T20:45:35.663Z\",\"e89fb5a69550ec52\",\"\",\"event-hubs-producer-testing\",\"\",true,\"200\",1170.1,\"1sec-3sec\",null,null,\"event-hubs-producer-testing\",\"92980ccf4d31d9ccb4f6fc7812c5df48\",null,\"92980ccf4d31d9ccb4f6fc7812c5df48\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"PC\",\"Other\",\"Windows\",\"0.0.0.0\",\"Edmonds\",\"Washington\",\"United States\",\"Other\",\"fc5f5a5d-d6d1-47f9-be1b-aa57185ec6be\",\"b4f83947-968d-4e2f-82ad-804be07697ae\",\"\",1,\"\",\"\",\"Azure\",\"AppRequests\",\"/subscriptions/faa080af-c1d8-40ad-9cce-e1a450ca5b57/resourcegroups/srnagar-azuresdkgroup/providers/microsoft.insights/components/srnagarappinsights\"],[\"d2d0e126-fa1e-4b0a-b647-250cdd471e68\",\"2021-03-02T21:00:12.001Z\",\"e636699b01a29a50\",\"\",\"event-hubs-producer-testing\",\"\",true,\"200\",1157,\"1sec-3sec\",null,null,\"event-hubs-producer-testing\",\"ee88624708c42f86159883532b8b7017\",null,\"ee88624708c42f86159883532b8b7017\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"PC\",\"Other\",\"Windows\",\"0.0.0.0\",\"Edmonds\",\"Washington\",\"United States\",\"Other\",\"fc5f5a5d-d6d1-47f9-be1b-aa57185ec6be\",\"b4f83947-968d-4e2f-82ad-804be07697ae\",\"\",1,\"\",\"\",\"Azure\",\"AppRequests\",\"/subscriptions/faa080af-c1d8-40ad-9cce-e1a450ca5b57/resourcegroups/srnagar-azuresdkgroup/providers/microsoft.insights/components/srnagarappinsights\"],[\"d2d0e126-fa1e-4b0a-b647-250cdd471e68\",\"2021-03-02T21:00:48.907Z\",\"a3a1ab98d31e3658\",\"\",\"event-hubs-producer-testing\",\"\",true,\"200\",1161.8,\"1sec-3sec\",null,null,\"event-hubs-producer-testing\",\"d8676e82476ef096a87c71ab3aba5f8c\",null,\"d8676e82476ef096a87c71ab3aba5f8c\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"PC\",\"Other\",\"Windows\",\"0.0.0.0\",\"Edmonds\",\"Washington\",\"United States\",\"Other\",\"fc5f5a5d-d6d1-47f9-be1b-aa57185ec6be\",\"b4f83947-968d-4e2f-82ad-804be07697ae\",\"\",1,\"\",\"\",\"Azure\",\"AppRequests\",\"/subscriptions/faa080af-c1d8-40ad-9cce-e1a450ca5b57/resourcegroups/srnagar-azuresdkgroup/providers/microsoft.insights/components/srnagarappinsights\"],[\"d2d0e126-fa1e-4b0a-b647-250cdd471e68\",\"2021-03-02T21:01:05.315Z\",\"3ef77ca39bbe2e53\",\"\",\"event-hubs-producer-testing\",\"\",true,\"200\",1177,\"1sec-3sec\",null,null,\"event-hubs-producer-testing\",\"17c29d6413acc10b5f4c00a894ccea11\",null,\"17c29d6413acc10b5f4c00a894ccea11\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"PC\",\"Other\",\"Windows\",\"0.0.0.0\",\"Edmonds\",\"Washington\",\"United States\",\"Other\",\"fc5f5a5d-d6d1-47f9-be1b-aa57185ec6be\",\"b4f83947-968d-4e2f-82ad-804be07697ae\",\"\",1,\"\",\"\",\"Azure\",\"AppRequests\",\"/subscriptions/faa080af-c1d8-40ad-9cce-e1a450ca5b57/resourcegroups/srnagar-azuresdkgroup/providers/microsoft.insights/components/srnagarappinsights\"],[\"d2d0e126-fa1e-4b0a-b647-250cdd471e68\",\"2021-03-02T21:03:15.375Z\",\"680c87a1690e2be2\",\"\",\"event-hubs-producer-testing\",\"\",true,\"200\",1160.3,\"1sec-3sec\",null,null,\"event-hubs-producer-testing\",\"7f4eedd90ec9db1672b5d5ec8072b555\",null,\"7f4eedd90ec9db1672b5d5ec8072b555\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"PC\",\"Other\",\"Windows\",\"0.0.0.0\",\"Edmonds\",\"Washington\",\"United States\",\"Other\",\"fc5f5a5d-d6d1-47f9-be1b-aa57185ec6be\",\"b4f83947-968d-4e2f-82ad-804be07697ae\",\"\",1,\"\",\"\",\"Azure\",\"AppRequests\",\"/subscriptions/faa080af-c1d8-40ad-9cce-e1a450ca5b57/resourcegroups/srnagar-azuresdkgroup/providers/microsoft.insights/components/srnagarappinsights\"],[\"d2d0e126-fa1e-4b0a-b647-250cdd471e68\",\"2021-03-02T21:03:17.123Z\",\"13f03d97f74c821d\",\"\",\"event-hubs-consumer-testing\",\"\",true,\"200\",2227.9,\"1sec-3sec\",null,null,\"event-hubs-consumer-testing\",\"98e2c459bde20cb27c8c01fa7f6fa51c\",null,\"98e2c459bde20cb27c8c01fa7f6fa51c\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"PC\",\"Other\",\"Windows\",\"0.0.0.0\",\"Edmonds\",\"Washington\",\"United States\",\"Other\",\"fc5f5a5d-d6d1-47f9-be1b-aa57185ec6be\",\"b4f83947-968d-4e2f-82ad-804be07697ae\",\"\",1,\"\",\"\",\"Azure\",\"AppRequests\",\"/subscriptions/faa080af-c1d8-40ad-9cce-e1a450ca5b57/resourcegroups/srnagar-azuresdkgroup/providers/microsoft.insights/components/srnagarappinsights\"],[\"d2d0e126-fa1e-4b0a-b647-250cdd471e68\",\"2021-03-02T21:05:41.055Z\",\"9cd2ce83a5d18387\",\"\",\"event-hubs-producer-testing\",\"\",true,\"200\",2203.1,\"1sec-3sec\",null,null,\"event-hubs-producer-testing\",\"e19f84ab20337435920ecfc4c8dd5b46\",null,\"e19f84ab20337435920ecfc4c8dd5b46\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"PC\",\"Other\",\"Windows\",\"0.0.0.0\",\"Edmonds\",\"Washington\",\"United States\",\"Other\",\"fc5f5a5d-d6d1-47f9-be1b-aa57185ec6be\",\"b4f83947-968d-4e2f-82ad-804be07697ae\",\"\",1,\"\",\"\",\"Azure\",\"AppRequests\",\"/subscriptions/faa080af-c1d8-40ad-9cce-e1a450ca5b57/resourcegroups/srnagar-azuresdkgroup/providers/microsoft.insights/components/srnagarappinsights\"],[\"d2d0e126-fa1e-4b0a-b647-250cdd471e68\",\"2021-03-02T21:05:46.685Z\",\"65b0aac3958aacf8\",\"\",\"event-hubs-consumer-testing\",\"\",true,\"200\",30308.93,\"30sec-1min\",null,null,\"event-hubs-consumer-testing\",\"da857b9e431132513ba7ee1830cbf751\",null,\"da857b9e431132513ba7ee1830cbf751\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"PC\",\"Other\",\"Windows\",\"0.0.0.0\",\"Edmonds\",\"Washington\",\"United States\",\"Other\",\"fc5f5a5d-d6d1-47f9-be1b-aa57185ec6be\",\"b4f83947-968d-4e2f-82ad-804be07697ae\",\"\",1,\"\",\"\",\"Azure\",\"AppRequests\",\"/subscriptions/faa080af-c1d8-40ad-9cce-e1a450ca5b57/resourcegroups/srnagar-azuresdkgroup/providers/microsoft.insights/components/srnagarappinsights\"],[\"d2d0e126-fa1e-4b0a-b647-250cdd471e68\",\"2021-03-02T21:16:14.51Z\",\"e638f36c762f8c39\",\"\",\"cosmos-parent-span\",\"\",true,\"200\",518,\"500ms-1sec\",null,null,\"cosmos-parent-span\",\"d050997562b85c1b88f404cb9aa03458\",null,\"d050997562b85c1b88f404cb9aa03458\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"PC\",\"Other\",\"Windows\",\"0.0.0.0\",\"Edmonds\",\"Washington\",\"United States\",\"Other\",\"fc5f5a5d-d6d1-47f9-be1b-aa57185ec6be\",\"b4f83947-968d-4e2f-82ad-804be07697ae\",\"\",1,\"\",\"\",\"Azure\",\"AppRequests\",\"/subscriptions/faa080af-c1d8-40ad-9cce-e1a450ca5b57/resourcegroups/srnagar-azuresdkgroup/providers/microsoft.insights/components/srnagarappinsights\"],[\"d2d0e126-fa1e-4b0a-b647-250cdd471e68\",\"2021-03-02T21:21:00.857Z\",\"de330c74ab259245\",\"\",\"cosmos-parent-span\",\"\",true,\"200\",375,\"250ms-500ms\",null,null,\"cosmos-parent-span\",\"5b117b2ab05b1cd9daf2ea059cb25407\",null,\"5b117b2ab05b1cd9daf2ea059cb25407\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"PC\",\"Other\",\"Windows\",\"0.0.0.0\",\"Edmonds\",\"Washington\",\"United States\",\"Other\",\"fc5f5a5d-d6d1-47f9-be1b-aa57185ec6be\",\"b4f83947-968d-4e2f-82ad-804be07697ae\",\"\",1,\"\",\"\",\"Azure\",\"AppRequests\",\"/subscriptions/faa080af-c1d8-40ad-9cce-e1a450ca5b57/resourcegroups/srnagar-azuresdkgroup/providers/microsoft.insights/components/srnagarappinsights\"],[\"d2d0e126-fa1e-4b0a-b647-250cdd471e68\",\"2021-03-02T21:21:26.584Z\",\"6e5cfc8072642e02\",\"\",\"cosmos-parent-span\",\"\",true,\"200\",4478.9,\"3sec-7sec\",null,null,\"cosmos-parent-span\",\"724991cba142cd7ee0034a25a235fd08\",null,\"724991cba142cd7ee0034a25a235fd08\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"PC\",\"Other\",\"Windows\",\"0.0.0.0\",\"Edmonds\",\"Washington\",\"United States\",\"Other\",\"fc5f5a5d-d6d1-47f9-be1b-aa57185ec6be\",\"b4f83947-968d-4e2f-82ad-804be07697ae\",\"\",1,\"\",\"\",\"Azure\",\"AppRequests\",\"/subscriptions/faa080af-c1d8-40ad-9cce-e1a450ca5b57/resourcegroups/srnagar-azuresdkgroup/providers/microsoft.insights/components/srnagarappinsights\"],[\"d2d0e126-fa1e-4b0a-b647-250cdd471e68\",\"2021-03-02T21:22:03.921Z\",\"0b7528c0dcdfc0df\",\"\",\"cosmos-parent-span\",\"\",true,\"200\",645,\"500ms-1sec\",null,null,\"cosmos-parent-span\",\"f8948a1f36968a2a39c6c87a3fb2f2a1\",null,\"f8948a1f36968a2a39c6c87a3fb2f2a1\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"PC\",\"Other\",\"Windows\",\"0.0.0.0\",\"Edmonds\",\"Washington\",\"United States\",\"Other\",\"fc5f5a5d-d6d1-47f9-be1b-aa57185ec6be\",\"b4f83947-968d-4e2f-82ad-804be07697ae\",\"\",1,\"\",\"\",\"Azure\",\"AppRequests\",\"/subscriptions/faa080af-c1d8-40ad-9cce-e1a450ca5b57/resourcegroups/srnagar-azuresdkgroup/providers/microsoft.insights/components/srnagarappinsights\"],[\"d2d0e126-fa1e-4b0a-b647-250cdd471e68\",\"2021-03-02T21:22:52.413Z\",\"c0ce9a0ad6748325\",\"\",\"cosmos-parent-span\",\"\",true,\"200\",525,\"500ms-1sec\",null,null,\"cosmos-parent-span\",\"cb07d460cd62d6996e0dab4e23d35502\",null,\"cb07d460cd62d6996e0dab4e23d35502\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"PC\",\"Other\",\"Windows\",\"0.0.0.0\",\"Edmonds\",\"Washington\",\"United States\",\"Other\",\"fc5f5a5d-d6d1-47f9-be1b-aa57185ec6be\",\"b4f83947-968d-4e2f-82ad-804be07697ae\",\"\",1,\"\",\"\",\"Azure\",\"AppRequests\",\"/subscriptions/faa080af-c1d8-40ad-9cce-e1a450ca5b57/resourcegroups/srnagar-azuresdkgroup/providers/microsoft.insights/components/srnagarappinsights\"],[\"d2d0e126-fa1e-4b0a-b647-250cdd471e68\",\"2021-03-02T21:34:54.297Z\",\"e07a8b247983fc9e\",\"\",\"servicebus-parent-span\",\"\",true,\"200\",5577.8,\"3sec-7sec\",null,null,\"servicebus-parent-span\",\"60bc2afa0643da4e306f488176dc73b8\",null,\"60bc2afa0643da4e306f488176dc73b8\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"PC\",\"Other\",\"Windows\",\"0.0.0.0\",\"Edmonds\",\"Washington\",\"United States\",\"Other\",\"fc5f5a5d-d6d1-47f9-be1b-aa57185ec6be\",\"b4f83947-968d-4e2f-82ad-804be07697ae\",\"\",1,\"\",\"\",\"Azure\",\"AppRequests\",\"/subscriptions/faa080af-c1d8-40ad-9cce-e1a450ca5b57/resourcegroups/srnagar-azuresdkgroup/providers/microsoft.insights/components/srnagarappinsights\"],[\"d2d0e126-fa1e-4b0a-b647-250cdd471e68\",\"2021-03-02T21:36:08.627Z\",\"982ca7a09015a06a\",\"\",\"servicebus-parent-span\",\"\",true,\"200\",2252.4,\"1sec-3sec\",null,null,\"servicebus-parent-span\",\"71c2729b10d1e202baa602a2efc79986\",null,\"71c2729b10d1e202baa602a2efc79986\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"PC\",\"Other\",\"Windows\",\"0.0.0.0\",\"Edmonds\",\"Washington\",\"United States\",\"Other\",\"fc5f5a5d-d6d1-47f9-be1b-aa57185ec6be\",\"b4f83947-968d-4e2f-82ad-804be07697ae\",\"\",1,\"\",\"\",\"Azure\",\"AppRequests\",\"/subscriptions/faa080af-c1d8-40ad-9cce-e1a450ca5b57/resourcegroups/srnagar-azuresdkgroup/providers/microsoft.insights/components/srnagarappinsights\"],[\"d2d0e126-fa1e-4b0a-b647-250cdd471e68\",\"2021-03-02T21:37:49.573Z\",\"c7dd969269c267a4\",\"\",\"servicebus-parent-span-2\",\"\",true,\"200\",2244.7,\"1sec-3sec\",null,null,\"servicebus-parent-span-2\",\"1f06368939cbc96f01154af7c91fc0ea\",null,\"1f06368939cbc96f01154af7c91fc0ea\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"PC\",\"Other\",\"Windows\",\"0.0.0.0\",\"Edmonds\",\"Washington\",\"United States\",\"Other\",\"fc5f5a5d-d6d1-47f9-be1b-aa57185ec6be\",\"b4f83947-968d-4e2f-82ad-804be07697ae\",\"\",1,\"\",\"\",\"Azure\",\"AppRequests\",\"/subscriptions/faa080af-c1d8-40ad-9cce-e1a450ca5b57/resourcegroups/srnagar-azuresdkgroup/providers/microsoft.insights/components/srnagarappinsights\"],[\"d2d0e126-fa1e-4b0a-b647-250cdd471e68\",\"2021-03-03T01:32:03.702Z\",\"9a5412383eb25984\",\"\",\"user-parent-span\",\"\",true,\"200\",1184.2,\"1sec-3sec\",null,null,\"user-parent-span\",\"31f7fbdd30abda24cfb6870a74a40966\",null,\"31f7fbdd30abda24cfb6870a74a40966\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"PC\",\"Other\",\"Windows\",\"0.0.0.0\",\"Edmonds\",\"Washington\",\"United States\",\"Other\",\"fc5f5a5d-d6d1-47f9-be1b-aa57185ec6be\",\"b4f83947-968d-4e2f-82ad-804be07697ae\",\"\",1,\"\",\"\",\"Azure\",\"AppRequests\",\"/subscriptions/faa080af-c1d8-40ad-9cce-e1a450ca5b57/resourcegroups/srnagar-azuresdkgroup/providers/microsoft.insights/components/srnagarappinsights\"],[\"d2d0e126-fa1e-4b0a-b647-250cdd471e68\",\"2021-03-03T01:32:24.765Z\",\"a833b80bae2dfea5\",\"\",\"user-parent-span\",\"\",true,\"200\",1165.5,\"1sec-3sec\",null,null,\"user-parent-span\",\"2a0a3703a70469a4aac3ec159f4bb9a4\",null,\"2a0a3703a70469a4aac3ec159f4bb9a4\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"PC\",\"Other\",\"Windows\",\"0.0.0.0\",\"Edmonds\",\"Washington\",\"United States\",\"Other\",\"fc5f5a5d-d6d1-47f9-be1b-aa57185ec6be\",\"b4f83947-968d-4e2f-82ad-804be07697ae\",\"\",1,\"\",\"\",\"Azure\",\"AppRequests\",\"/subscriptions/faa080af-c1d8-40ad-9cce-e1a450ca5b57/resourcegroups/srnagar-azuresdkgroup/providers/microsoft.insights/components/srnagarappinsights\"],[\"d2d0e126-fa1e-4b0a-b647-250cdd471e68\",\"2021-03-03T09:30:13.053Z\",\"17a49d0e293fd74a\",\"\",\"user-parent-span\",\"\",true,\"200\",870,\"500ms-1sec\",null,null,\"user-parent-span\",\"1658ac9178d7fdf3f51b41d86616e892\",null,\"1658ac9178d7fdf3f51b41d86616e892\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"PC\",\"Other\",\"Windows\",\"0.0.0.0\",\"Edmonds\",\"Washington\",\"United States\",\"Other\",\"fc5f5a5d-d6d1-47f9-be1b-aa57185ec6be\",\"b4f83947-968d-4e2f-82ad-804be07697ae\",\"\",1,\"\",\"\",\"Azure\",\"AppRequests\",\"/subscriptions/faa080af-c1d8-40ad-9cce-e1a450ca5b57/resourcegroups/srnagar-azuresdkgroup/providers/microsoft.insights/components/srnagarappinsights\"],[\"d2d0e126-fa1e-4b0a-b647-250cdd471e68\",\"2021-03-03T09:30:39.786Z\",\"ef2fe5cc18dbd2fa\",\"\",\"event-hubs-producer-testing\",\"\",true,\"200\",1168.9,\"1sec-3sec\",null,null,\"event-hubs-producer-testing\",\"c59cc1278266974b0888dbd837bb3c93\",null,\"c59cc1278266974b0888dbd837bb3c93\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"PC\",\"Other\",\"Windows\",\"0.0.0.0\",\"Edmonds\",\"Washington\",\"United States\",\"Other\",\"fc5f5a5d-d6d1-47f9-be1b-aa57185ec6be\",\"b4f83947-968d-4e2f-82ad-804be07697ae\",\"\",1,\"\",\"\",\"Azure\",\"AppRequests\",\"/subscriptions/faa080af-c1d8-40ad-9cce-e1a450ca5b57/resourcegroups/srnagar-azuresdkgroup/providers/microsoft.insights/components/srnagarappinsights\"],[\"d2d0e126-fa1e-4b0a-b647-250cdd471e68\",\"2021-03-03T09:30:41.612Z\",\"a9888514d7cf3e44\",\"\",\"event-hubs-consumer-testing\",\"\",true,\"200\",2230.8,\"1sec-3sec\",null,null,\"event-hubs-consumer-testing\",\"68c72cf1817f810ebc4ca028bebbf907\",null,\"68c72cf1817f810ebc4ca028bebbf907\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"PC\",\"Other\",\"Windows\",\"0.0.0.0\",\"Edmonds\",\"Washington\",\"United States\",\"Other\",\"fc5f5a5d-d6d1-47f9-be1b-aa57185ec6be\",\"b4f83947-968d-4e2f-82ad-804be07697ae\",\"\",1,\"\",\"\",\"Azure\",\"AppRequests\",\"/subscriptions/faa080af-c1d8-40ad-9cce-e1a450ca5b57/resourcegroups/srnagar-azuresdkgroup/providers/microsoft.insights/components/srnagarappinsights\"],[\"d2d0e126-fa1e-4b0a-b647-250cdd471e68\",\"2021-03-02T19:22:52.417Z\",\"ac0ebec9854b7717\",\"\",\"user-parent-span\",\"\",true,\"200\",4464.1,\"3sec-7sec\",null,null,\"user-parent-span\",\"7b01f4610a67d14a68f9cf1b1f688eda\",null,\"7b01f4610a67d14a68f9cf1b1f688eda\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"PC\",\"Other\",\"Windows\",\"0.0.0.0\",\"Edmonds\",\"Washington\",\"United States\",\"Other\",\"fc5f5a5d-d6d1-47f9-be1b-aa57185ec6be\",\"b4f83947-968d-4e2f-82ad-804be07697ae\",\"\",1,\"\",\"\",\"Azure\",\"AppRequests\",\"/subscriptions/faa080af-c1d8-40ad-9cce-e1a450ca5b57/resourcegroups/srnagar-azuresdkgroup/providers/microsoft.insights/components/srnagarappinsights\"],[\"d2d0e126-fa1e-4b0a-b647-250cdd471e68\",\"2021-03-02T19:23:29.149Z\",\"e84c4e8e1774ddfa\",\"\",\"user-parent-span\",\"\",true,\"200\",2263.1,\"1sec-3sec\",null,null,\"user-parent-span\",\"bada7f485589b0e5a7f454a98aa0b358\",null,\"bada7f485589b0e5a7f454a98aa0b358\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"PC\",\"Other\",\"Windows\",\"0.0.0.0\",\"Edmonds\",\"Washington\",\"United States\",\"Other\",\"fc5f5a5d-d6d1-47f9-be1b-aa57185ec6be\",\"b4f83947-968d-4e2f-82ad-804be07697ae\",\"\",1,\"\",\"\",\"Azure\",\"AppRequests\",\"/subscriptions/faa080af-c1d8-40ad-9cce-e1a450ca5b57/resourcegroups/srnagar-azuresdkgroup/providers/microsoft.insights/components/srnagarappinsights\"],[\"d2d0e126-fa1e-4b0a-b647-250cdd471e68\",\"2021-03-02T19:36:52.135Z\",\"21f76cc93f302979\",\"\",\"user-parent-span\",\"\",true,\"200\",5565.3,\"3sec-7sec\",null,null,\"user-parent-span\",\"e49d2b1acdc27fe12b133ed6a2593c22\",null,\"e49d2b1acdc27fe12b133ed6a2593c22\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"PC\",\"Other\",\"Windows\",\"0.0.0.0\",\"Edmonds\",\"Washington\",\"United States\",\"Other\",\"fc5f5a5d-d6d1-47f9-be1b-aa57185ec6be\",\"b4f83947-968d-4e2f-82ad-804be07697ae\",\"\",1,\"\",\"\",\"Azure\",\"AppRequests\",\"/subscriptions/faa080af-c1d8-40ad-9cce-e1a450ca5b57/resourcegroups/srnagar-azuresdkgroup/providers/microsoft.insights/components/srnagarappinsights\"],[\"d2d0e126-fa1e-4b0a-b647-250cdd471e68\",\"2021-03-02T20:09:19.888Z\",\"d08de5279e5edf8a\",\"\",\"user-parent-span\",\"\",true,\"200\",3304.4,\"3sec-7sec\",null,null,\"user-parent-span\",\"c0b03764a58a93890821f58484e77068\",null,\"c0b03764a58a93890821f58484e77068\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"PC\",\"Other\",\"Windows\",\"0.0.0.0\",\"Edmonds\",\"Washington\",\"United States\",\"Other\",\"fc5f5a5d-d6d1-47f9-be1b-aa57185ec6be\",\"b4f83947-968d-4e2f-82ad-804be07697ae\",\"\",1,\"\",\"\",\"Azure\",\"AppRequests\",\"/subscriptions/faa080af-c1d8-40ad-9cce-e1a450ca5b57/resourcegroups/srnagar-azuresdkgroup/providers/microsoft.insights/components/srnagarappinsights\"],[\"d2d0e126-fa1e-4b0a-b647-250cdd471e68\",\"2021-03-02T20:49:14.091Z\",\"c8cb2a7c0a580425\",\"\",\"event-hubs-producer-testing\",\"\",true,\"200\",1165.7,\"1sec-3sec\",null,null,\"event-hubs-producer-testing\",\"71eeaa071b1f1c24be2d97c46042bc23\",null,\"71eeaa071b1f1c24be2d97c46042bc23\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"PC\",\"Other\",\"Windows\",\"0.0.0.0\",\"Edmonds\",\"Washington\",\"United States\",\"Other\",\"fc5f5a5d-d6d1-47f9-be1b-aa57185ec6be\",\"b4f83947-968d-4e2f-82ad-804be07697ae\",\"\",1,\"\",\"\",\"Azure\",\"AppRequests\",\"/subscriptions/faa080af-c1d8-40ad-9cce-e1a450ca5b57/resourcegroups/srnagar-azuresdkgroup/providers/microsoft.insights/components/srnagarappinsights\"]]}]}", - "Content-Type" : "application/json; charset=utf-8" - }, - "Exception" : null - } ], - "variables" : [ ] -} \ No newline at end of file diff --git a/sdk/monitor/azure-monitor-query/src/test/resources/session-records/LogsClientTest.testLogsQueryBatch.json b/sdk/monitor/azure-monitor-query/src/test/resources/session-records/LogsClientTest.testLogsQueryBatch.json deleted file mode 100644 index 442575e527ea..000000000000 --- a/sdk/monitor/azure-monitor-query/src/test/resources/session-records/LogsClientTest.testLogsQueryBatch.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "POST", - "Uri" : "https://REDACTED.loganalytics.io/v1/$batch", - "Headers" : { - "User-Agent" : "azsdk-java-UnknownName/UnknownVersion (14.0.2; Windows 10; 10.0)", - "Content-Type" : "application/json" - }, - "Response" : { - "Transfer-Encoding" : "chunked", - "Access-Control-Allow-Origin" : "*", - "X-Content-Type-Options" : "nosniff", - "Connection" : "keep-alive", - "retry-after" : "0", - "StatusCode" : "200", - "Date" : "Thu, 06 May 2021 09:01:55 GMT", - "via" : "1.1 draft-oms-6b5d48d5bb-cc4v2", - "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", - "Access-Control-Expose-Headers" : "Retry-After,Age,WWW-Authenticate,x-resource-identities,x-ms-status-location", - "Vary" : "Accept-Encoding,Accept-Encoding", - "Body" : "{\"responses\":[{\"id\":\"1\",\"status\":200,\"body\":{\"tables\":[{\"name\":\"PrimaryResult\",\"columns\":[{\"name\":\"TenantId\",\"type\":\"string\"},{\"name\":\"TimeGenerated\",\"type\":\"datetime\"},{\"name\":\"Id\",\"type\":\"string\"},{\"name\":\"Source\",\"type\":\"string\"},{\"name\":\"Name\",\"type\":\"string\"},{\"name\":\"Url\",\"type\":\"string\"},{\"name\":\"Success\",\"type\":\"bool\"},{\"name\":\"ResultCode\",\"type\":\"string\"},{\"name\":\"DurationMs\",\"type\":\"real\"},{\"name\":\"PerformanceBucket\",\"type\":\"string\"},{\"name\":\"Properties\",\"type\":\"dynamic\"},{\"name\":\"Measurements\",\"type\":\"dynamic\"},{\"name\":\"OperationName\",\"type\":\"string\"},{\"name\":\"OperationId\",\"type\":\"string\"},{\"name\":\"OperationLinks\",\"type\":\"dynamic\"},{\"name\":\"ParentId\",\"type\":\"string\"},{\"name\":\"SyntheticSource\",\"type\":\"string\"},{\"name\":\"SessionId\",\"type\":\"string\"},{\"name\":\"UserId\",\"type\":\"string\"},{\"name\":\"UserAuthenticatedId\",\"type\":\"string\"},{\"name\":\"UserAccountId\",\"type\":\"string\"},{\"name\":\"AppVersion\",\"type\":\"string\"},{\"name\":\"AppRoleName\",\"type\":\"string\"},{\"name\":\"AppRoleInstance\",\"type\":\"string\"},{\"name\":\"ClientType\",\"type\":\"string\"},{\"name\":\"ClientModel\",\"type\":\"string\"},{\"name\":\"ClientOS\",\"type\":\"string\"},{\"name\":\"ClientIP\",\"type\":\"string\"},{\"name\":\"ClientCity\",\"type\":\"string\"},{\"name\":\"ClientStateOrProvince\",\"type\":\"string\"},{\"name\":\"ClientCountryOrRegion\",\"type\":\"string\"},{\"name\":\"ClientBrowser\",\"type\":\"string\"},{\"name\":\"ResourceGUID\",\"type\":\"string\"},{\"name\":\"IKey\",\"type\":\"string\"},{\"name\":\"SDKVersion\",\"type\":\"string\"},{\"name\":\"ItemCount\",\"type\":\"int\"},{\"name\":\"ReferencedItemId\",\"type\":\"string\"},{\"name\":\"ReferencedType\",\"type\":\"string\"},{\"name\":\"SourceSystem\",\"type\":\"string\"},{\"name\":\"Type\",\"type\":\"string\"},{\"name\":\"_ResourceId\",\"type\":\"string\"}],\"rows\":[[\"d2d0e126-fa1e-4b0a-b647-250cdd471e68\",\"2021-03-08T07:20:29.193Z\",\"c45e1db44627fa35\",\"\",\"event-hubs-producer-testing\",\"\",true,\"200\",1197.2,\"1sec-3sec\",\"{\\\"statusDescription\\\":\\\"\\\"}\",null,\"event-hubs-producer-testing\",\"55bb62aedf1d6a88c76bb58cffc3caeb\",null,\"55bb62aedf1d6a88c76bb58cffc3caeb\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"PC\",\"Other\",\"Windows\",\"0.0.0.0\",\"Edmonds\",\"Washington\",\"United States\",\"Other\",\"fc5f5a5d-d6d1-47f9-be1b-aa57185ec6be\",\"b4f83947-968d-4e2f-82ad-804be07697ae\",\"\",1,\"\",\"\",\"Azure\",\"AppRequests\",\"/subscriptions/faa080af-c1d8-40ad-9cce-e1a450ca5b57/resourcegroups/srnagar-azuresdkgroup/providers/microsoft.insights/components/srnagarappinsights\"],[\"d2d0e126-fa1e-4b0a-b647-250cdd471e68\",\"2021-03-08T07:20:31.308Z\",\"ca92a2fcc8531046\",\"\",\"event-hubs-consumer-testing\",\"\",true,\"200\",33338.25,\"30sec-1min\",\"{\\\"statusDescription\\\":\\\"\\\"}\",null,\"event-hubs-consumer-testing\",\"d03afd37cc270eca8b77145bdfe67ce4\",null,\"d03afd37cc270eca8b77145bdfe67ce4\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"PC\",\"Other\",\"Windows\",\"0.0.0.0\",\"Edmonds\",\"Washington\",\"United States\",\"Other\",\"fc5f5a5d-d6d1-47f9-be1b-aa57185ec6be\",\"b4f83947-968d-4e2f-82ad-804be07697ae\",\"\",1,\"\",\"\",\"Azure\",\"AppRequests\",\"/subscriptions/faa080af-c1d8-40ad-9cce-e1a450ca5b57/resourcegroups/srnagar-azuresdkgroup/providers/microsoft.insights/components/srnagarappinsights\"]]}]}},{\"id\":\"2\",\"status\":200,\"body\":{\"tables\":[{\"name\":\"PrimaryResult\",\"columns\":[{\"name\":\"TenantId\",\"type\":\"string\"},{\"name\":\"TimeGenerated\",\"type\":\"datetime\"},{\"name\":\"Id\",\"type\":\"string\"},{\"name\":\"Source\",\"type\":\"string\"},{\"name\":\"Name\",\"type\":\"string\"},{\"name\":\"Url\",\"type\":\"string\"},{\"name\":\"Success\",\"type\":\"bool\"},{\"name\":\"ResultCode\",\"type\":\"string\"},{\"name\":\"DurationMs\",\"type\":\"real\"},{\"name\":\"PerformanceBucket\",\"type\":\"string\"},{\"name\":\"Properties\",\"type\":\"dynamic\"},{\"name\":\"Measurements\",\"type\":\"dynamic\"},{\"name\":\"OperationName\",\"type\":\"string\"},{\"name\":\"OperationId\",\"type\":\"string\"},{\"name\":\"OperationLinks\",\"type\":\"dynamic\"},{\"name\":\"ParentId\",\"type\":\"string\"},{\"name\":\"SyntheticSource\",\"type\":\"string\"},{\"name\":\"SessionId\",\"type\":\"string\"},{\"name\":\"UserId\",\"type\":\"string\"},{\"name\":\"UserAuthenticatedId\",\"type\":\"string\"},{\"name\":\"UserAccountId\",\"type\":\"string\"},{\"name\":\"AppVersion\",\"type\":\"string\"},{\"name\":\"AppRoleName\",\"type\":\"string\"},{\"name\":\"AppRoleInstance\",\"type\":\"string\"},{\"name\":\"ClientType\",\"type\":\"string\"},{\"name\":\"ClientModel\",\"type\":\"string\"},{\"name\":\"ClientOS\",\"type\":\"string\"},{\"name\":\"ClientIP\",\"type\":\"string\"},{\"name\":\"ClientCity\",\"type\":\"string\"},{\"name\":\"ClientStateOrProvince\",\"type\":\"string\"},{\"name\":\"ClientCountryOrRegion\",\"type\":\"string\"},{\"name\":\"ClientBrowser\",\"type\":\"string\"},{\"name\":\"ResourceGUID\",\"type\":\"string\"},{\"name\":\"IKey\",\"type\":\"string\"},{\"name\":\"SDKVersion\",\"type\":\"string\"},{\"name\":\"ItemCount\",\"type\":\"int\"},{\"name\":\"ReferencedItemId\",\"type\":\"string\"},{\"name\":\"ReferencedType\",\"type\":\"string\"},{\"name\":\"SourceSystem\",\"type\":\"string\"},{\"name\":\"Type\",\"type\":\"string\"},{\"name\":\"_ResourceId\",\"type\":\"string\"}],\"rows\":[[\"d2d0e126-fa1e-4b0a-b647-250cdd471e68\",\"2021-03-08T07:20:29.193Z\",\"c45e1db44627fa35\",\"\",\"event-hubs-producer-testing\",\"\",true,\"200\",1197.2,\"1sec-3sec\",\"{\\\"statusDescription\\\":\\\"\\\"}\",null,\"event-hubs-producer-testing\",\"55bb62aedf1d6a88c76bb58cffc3caeb\",null,\"55bb62aedf1d6a88c76bb58cffc3caeb\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"PC\",\"Other\",\"Windows\",\"0.0.0.0\",\"Edmonds\",\"Washington\",\"United States\",\"Other\",\"fc5f5a5d-d6d1-47f9-be1b-aa57185ec6be\",\"b4f83947-968d-4e2f-82ad-804be07697ae\",\"\",1,\"\",\"\",\"Azure\",\"AppRequests\",\"/subscriptions/faa080af-c1d8-40ad-9cce-e1a450ca5b57/resourcegroups/srnagar-azuresdkgroup/providers/microsoft.insights/components/srnagarappinsights\"],[\"d2d0e126-fa1e-4b0a-b647-250cdd471e68\",\"2021-03-08T07:20:31.308Z\",\"ca92a2fcc8531046\",\"\",\"event-hubs-consumer-testing\",\"\",true,\"200\",33338.25,\"30sec-1min\",\"{\\\"statusDescription\\\":\\\"\\\"}\",null,\"event-hubs-consumer-testing\",\"d03afd37cc270eca8b77145bdfe67ce4\",null,\"d03afd37cc270eca8b77145bdfe67ce4\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"PC\",\"Other\",\"Windows\",\"0.0.0.0\",\"Edmonds\",\"Washington\",\"United States\",\"Other\",\"fc5f5a5d-d6d1-47f9-be1b-aa57185ec6be\",\"b4f83947-968d-4e2f-82ad-804be07697ae\",\"\",1,\"\",\"\",\"Azure\",\"AppRequests\",\"/subscriptions/faa080af-c1d8-40ad-9cce-e1a450ca5b57/resourcegroups/srnagar-azuresdkgroup/providers/microsoft.insights/components/srnagarappinsights\"],[\"d2d0e126-fa1e-4b0a-b647-250cdd471e68\",\"2021-03-02T19:22:52.417Z\",\"ac0ebec9854b7717\",\"\",\"user-parent-span\",\"\",true,\"200\",4464.1,\"3sec-7sec\",null,null,\"user-parent-span\",\"7b01f4610a67d14a68f9cf1b1f688eda\",null,\"7b01f4610a67d14a68f9cf1b1f688eda\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"PC\",\"Other\",\"Windows\",\"0.0.0.0\",\"Edmonds\",\"Washington\",\"United States\",\"Other\",\"fc5f5a5d-d6d1-47f9-be1b-aa57185ec6be\",\"b4f83947-968d-4e2f-82ad-804be07697ae\",\"\",1,\"\",\"\",\"Azure\",\"AppRequests\",\"/subscriptions/faa080af-c1d8-40ad-9cce-e1a450ca5b57/resourcegroups/srnagar-azuresdkgroup/providers/microsoft.insights/components/srnagarappinsights\"]]}]}}]}", - "Content-Type" : "application/json; charset=utf-8" - }, - "Exception" : null - } ], - "variables" : [ ] -} \ No newline at end of file diff --git a/sdk/monitor/azure-monitor-query/src/test/resources/session-records/LogsQueryClientTest.testBatchQueryPartialSuccess.json b/sdk/monitor/azure-monitor-query/src/test/resources/session-records/LogsQueryClientTest.testBatchQueryPartialSuccess.json new file mode 100644 index 000000000000..bcdb6350a13b --- /dev/null +++ b/sdk/monitor/azure-monitor-query/src/test/resources/session-records/LogsQueryClientTest.testBatchQueryPartialSuccess.json @@ -0,0 +1,27 @@ +{ + "networkCallRecords" : [ { + "Method" : "POST", + "Uri" : "https://REDACTED.loganalytics.io/v1/$batch", + "Headers" : { + "User-Agent" : "azsdk-java-UnknownName/UnknownVersion (11.0.8; Windows 10; 10.0)", + "Content-Type" : "application/json" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "Access-Control-Allow-Origin" : "*", + "X-Content-Type-Options" : "nosniff", + "Connection" : "keep-alive", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Mon, 07 Jun 2021 04:58:05 GMT", + "via" : "1.1 draft-oms-bf5f655b7-4xq86", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "Retry-After,Age,WWW-Authenticate,x-resource-identities,x-ms-status-location", + "Vary" : "Accept-Encoding,Accept-Encoding", + "Body" : "{\"responses\":[{\"id\":\"1\",\"status\":200,\"headers\":{\"Age\":\"60\",\"request-context\":\"appId=cid-v1:70941e4f-7e8f-40b7-b730-183893db0297\"},\"body\":{\"tables\":[{\"name\":\"PrimaryResult\",\"columns\":[{\"name\":\"TenantId\",\"type\":\"string\"},{\"name\":\"TimeGenerated\",\"type\":\"datetime\"},{\"name\":\"Id\",\"type\":\"string\"},{\"name\":\"Source\",\"type\":\"string\"},{\"name\":\"Name\",\"type\":\"string\"},{\"name\":\"Url\",\"type\":\"string\"},{\"name\":\"Success\",\"type\":\"bool\"},{\"name\":\"ResultCode\",\"type\":\"string\"},{\"name\":\"DurationMs\",\"type\":\"real\"},{\"name\":\"PerformanceBucket\",\"type\":\"string\"},{\"name\":\"Properties\",\"type\":\"dynamic\"},{\"name\":\"Measurements\",\"type\":\"dynamic\"},{\"name\":\"OperationName\",\"type\":\"string\"},{\"name\":\"OperationId\",\"type\":\"string\"},{\"name\":\"OperationLinks\",\"type\":\"dynamic\"},{\"name\":\"ParentId\",\"type\":\"string\"},{\"name\":\"SyntheticSource\",\"type\":\"string\"},{\"name\":\"SessionId\",\"type\":\"string\"},{\"name\":\"UserId\",\"type\":\"string\"},{\"name\":\"UserAuthenticatedId\",\"type\":\"string\"},{\"name\":\"UserAccountId\",\"type\":\"string\"},{\"name\":\"AppVersion\",\"type\":\"string\"},{\"name\":\"AppRoleName\",\"type\":\"string\"},{\"name\":\"AppRoleInstance\",\"type\":\"string\"},{\"name\":\"ClientType\",\"type\":\"string\"},{\"name\":\"ClientModel\",\"type\":\"string\"},{\"name\":\"ClientOS\",\"type\":\"string\"},{\"name\":\"ClientIP\",\"type\":\"string\"},{\"name\":\"ClientCity\",\"type\":\"string\"},{\"name\":\"ClientStateOrProvince\",\"type\":\"string\"},{\"name\":\"ClientCountryOrRegion\",\"type\":\"string\"},{\"name\":\"ClientBrowser\",\"type\":\"string\"},{\"name\":\"ResourceGUID\",\"type\":\"string\"},{\"name\":\"IKey\",\"type\":\"string\"},{\"name\":\"SDKVersion\",\"type\":\"string\"},{\"name\":\"ItemCount\",\"type\":\"int\"},{\"name\":\"ReferencedItemId\",\"type\":\"string\"},{\"name\":\"ReferencedType\",\"type\":\"string\"},{\"name\":\"SourceSystem\",\"type\":\"string\"},{\"name\":\"Type\",\"type\":\"string\"},{\"name\":\"_ResourceId\",\"type\":\"string\"}],\"rows\":[[\"d2d0e126-fa1e-4b0a-b647-250cdd471e68\",\"2021-06-02T19:16:56.678Z\",\"c167a30f0c66f8c5\",\"\",\"ServiceBus.process\",\"\",true,\"200\",0,\"<250ms\",\"{\\\"x-opt-enqueued-time\\\":\\\"1622661414\\\"}\",null,\"ServiceBus.process\",\"daf56801f50acf85dbc1f73748a103ca\",null,\"46c008b73159ff7a\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"srikanta\",\"PC\",\"\",\"\",\"0.0.0.0\",\"Edmonds\",\"Washington\",\"United States\",\"\",\"fc5f5a5d-d6d1-47f9-be1b-aa57185ec6be\",\"b4f83947-968d-4e2f-82ad-804be07697ae\",\"java:3.1.1-BETA.2\",1,\"\",\"\",\"Azure\",\"AppRequests\",\"/subscriptions/faa080af-c1d8-40ad-9cce-e1a450ca5b57/resourcegroups/srnagar-azuresdkgroup/providers/microsoft.insights/components/srnagarappinsights\"],[\"d2d0e126-fa1e-4b0a-b647-250cdd471e68\",\"2021-06-02T19:17:56.783Z\",\"db7ccfd35796b843\",\"\",\"ServiceBus.process\",\"\",true,\"200\",0,\"<250ms\",\"{\\\"x-opt-enqueued-time\\\":\\\"1622661414\\\"}\",null,\"ServiceBus.process\",\"7bf75778f3cdff72f1cbb2db49b0cc30\",null,\"e3c482e945343324\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"srikanta\",\"PC\",\"\",\"\",\"0.0.0.0\",\"Edmonds\",\"Washington\",\"United States\",\"\",\"fc5f5a5d-d6d1-47f9-be1b-aa57185ec6be\",\"b4f83947-968d-4e2f-82ad-804be07697ae\",\"java:3.1.1-BETA.2\",1,\"\",\"\",\"Azure\",\"AppRequests\",\"/subscriptions/faa080af-c1d8-40ad-9cce-e1a450ca5b57/resourcegroups/srnagar-azuresdkgroup/providers/microsoft.insights/components/srnagarappinsights\"]]}]}},{\"id\":\"2\",\"status\":400,\"body\":{\"error\":{\"message\":\"The request had some invalid properties\",\"code\":\"BadArgumentError\",\"correlationId\":\"fc1582fb-e52f-4973-9e07-4e1bfb836493\",\"innererror\":{\"code\":\"SyntaxError\",\"message\":\"A recognition error occurred in the query.\",\"innererror\":{\"code\":\"SYN0002\",\"message\":\"Query could not be parsed at '' on line [1,18]\",\"line\":1,\"pos\":18,\"token\":\"\"}}}}}]}", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + } ], + "variables" : [ ] +} \ No newline at end of file diff --git a/sdk/monitor/azure-monitor-query/src/test/resources/session-records/LogsQueryClientTest.testBatchStatistics.json b/sdk/monitor/azure-monitor-query/src/test/resources/session-records/LogsQueryClientTest.testBatchStatistics.json new file mode 100644 index 000000000000..c5e9e2e12b50 --- /dev/null +++ b/sdk/monitor/azure-monitor-query/src/test/resources/session-records/LogsQueryClientTest.testBatchStatistics.json @@ -0,0 +1,27 @@ +{ + "networkCallRecords" : [ { + "Method" : "POST", + "Uri" : "https://REDACTED.loganalytics.io/v1/$batch", + "Headers" : { + "User-Agent" : "azsdk-java-UnknownName/UnknownVersion (11.0.8; Windows 10; 10.0)", + "Content-Type" : "application/json" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "Access-Control-Allow-Origin" : "*", + "X-Content-Type-Options" : "nosniff", + "Connection" : "keep-alive", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Mon, 07 Jun 2021 04:58:04 GMT", + "via" : "1.1 draft-oms-bf5f655b7-x7z75", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "Retry-After,Age,WWW-Authenticate,x-resource-identities,x-ms-status-location", + "Vary" : "Accept-Encoding,Accept-Encoding", + "Body" : "{\"responses\":[{\"id\":\"1\",\"status\":200,\"headers\":{\"Age\":\"60\",\"request-context\":\"appId=cid-v1:70941e4f-7e8f-40b7-b730-183893db0297\"},\"body\":{\"tables\":[{\"name\":\"PrimaryResult\",\"columns\":[{\"name\":\"TenantId\",\"type\":\"string\"},{\"name\":\"TimeGenerated\",\"type\":\"datetime\"},{\"name\":\"Id\",\"type\":\"string\"},{\"name\":\"Source\",\"type\":\"string\"},{\"name\":\"Name\",\"type\":\"string\"},{\"name\":\"Url\",\"type\":\"string\"},{\"name\":\"Success\",\"type\":\"bool\"},{\"name\":\"ResultCode\",\"type\":\"string\"},{\"name\":\"DurationMs\",\"type\":\"real\"},{\"name\":\"PerformanceBucket\",\"type\":\"string\"},{\"name\":\"Properties\",\"type\":\"dynamic\"},{\"name\":\"Measurements\",\"type\":\"dynamic\"},{\"name\":\"OperationName\",\"type\":\"string\"},{\"name\":\"OperationId\",\"type\":\"string\"},{\"name\":\"OperationLinks\",\"type\":\"dynamic\"},{\"name\":\"ParentId\",\"type\":\"string\"},{\"name\":\"SyntheticSource\",\"type\":\"string\"},{\"name\":\"SessionId\",\"type\":\"string\"},{\"name\":\"UserId\",\"type\":\"string\"},{\"name\":\"UserAuthenticatedId\",\"type\":\"string\"},{\"name\":\"UserAccountId\",\"type\":\"string\"},{\"name\":\"AppVersion\",\"type\":\"string\"},{\"name\":\"AppRoleName\",\"type\":\"string\"},{\"name\":\"AppRoleInstance\",\"type\":\"string\"},{\"name\":\"ClientType\",\"type\":\"string\"},{\"name\":\"ClientModel\",\"type\":\"string\"},{\"name\":\"ClientOS\",\"type\":\"string\"},{\"name\":\"ClientIP\",\"type\":\"string\"},{\"name\":\"ClientCity\",\"type\":\"string\"},{\"name\":\"ClientStateOrProvince\",\"type\":\"string\"},{\"name\":\"ClientCountryOrRegion\",\"type\":\"string\"},{\"name\":\"ClientBrowser\",\"type\":\"string\"},{\"name\":\"ResourceGUID\",\"type\":\"string\"},{\"name\":\"IKey\",\"type\":\"string\"},{\"name\":\"SDKVersion\",\"type\":\"string\"},{\"name\":\"ItemCount\",\"type\":\"int\"},{\"name\":\"ReferencedItemId\",\"type\":\"string\"},{\"name\":\"ReferencedType\",\"type\":\"string\"},{\"name\":\"SourceSystem\",\"type\":\"string\"},{\"name\":\"Type\",\"type\":\"string\"},{\"name\":\"_ResourceId\",\"type\":\"string\"}],\"rows\":[[\"d2d0e126-fa1e-4b0a-b647-250cdd471e68\",\"2021-06-02T19:16:56.678Z\",\"c167a30f0c66f8c5\",\"\",\"ServiceBus.process\",\"\",true,\"200\",0,\"<250ms\",\"{\\\"x-opt-enqueued-time\\\":\\\"1622661414\\\"}\",null,\"ServiceBus.process\",\"daf56801f50acf85dbc1f73748a103ca\",null,\"46c008b73159ff7a\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"srikanta\",\"PC\",\"\",\"\",\"0.0.0.0\",\"Edmonds\",\"Washington\",\"United States\",\"\",\"fc5f5a5d-d6d1-47f9-be1b-aa57185ec6be\",\"b4f83947-968d-4e2f-82ad-804be07697ae\",\"java:3.1.1-BETA.2\",1,\"\",\"\",\"Azure\",\"AppRequests\",\"/subscriptions/faa080af-c1d8-40ad-9cce-e1a450ca5b57/resourcegroups/srnagar-azuresdkgroup/providers/microsoft.insights/components/srnagarappinsights\"],[\"d2d0e126-fa1e-4b0a-b647-250cdd471e68\",\"2021-06-02T19:17:56.783Z\",\"db7ccfd35796b843\",\"\",\"ServiceBus.process\",\"\",true,\"200\",0,\"<250ms\",\"{\\\"x-opt-enqueued-time\\\":\\\"1622661414\\\"}\",null,\"ServiceBus.process\",\"7bf75778f3cdff72f1cbb2db49b0cc30\",null,\"e3c482e945343324\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"srikanta\",\"PC\",\"\",\"\",\"0.0.0.0\",\"Edmonds\",\"Washington\",\"United States\",\"\",\"fc5f5a5d-d6d1-47f9-be1b-aa57185ec6be\",\"b4f83947-968d-4e2f-82ad-804be07697ae\",\"java:3.1.1-BETA.2\",1,\"\",\"\",\"Azure\",\"AppRequests\",\"/subscriptions/faa080af-c1d8-40ad-9cce-e1a450ca5b57/resourcegroups/srnagar-azuresdkgroup/providers/microsoft.insights/components/srnagarappinsights\"]]}]}},{\"id\":\"2\",\"status\":200,\"headers\":{\"Age\":\"58\",\"request-context\":\"appId=cid-v1:70941e4f-7e8f-40b7-b730-183893db0297\"},\"body\":{\"tables\":[{\"name\":\"PrimaryResult\",\"columns\":[{\"name\":\"TenantId\",\"type\":\"string\"},{\"name\":\"TimeGenerated\",\"type\":\"datetime\"},{\"name\":\"Id\",\"type\":\"string\"},{\"name\":\"Source\",\"type\":\"string\"},{\"name\":\"Name\",\"type\":\"string\"},{\"name\":\"Url\",\"type\":\"string\"},{\"name\":\"Success\",\"type\":\"bool\"},{\"name\":\"ResultCode\",\"type\":\"string\"},{\"name\":\"DurationMs\",\"type\":\"real\"},{\"name\":\"PerformanceBucket\",\"type\":\"string\"},{\"name\":\"Properties\",\"type\":\"dynamic\"},{\"name\":\"Measurements\",\"type\":\"dynamic\"},{\"name\":\"OperationName\",\"type\":\"string\"},{\"name\":\"OperationId\",\"type\":\"string\"},{\"name\":\"OperationLinks\",\"type\":\"dynamic\"},{\"name\":\"ParentId\",\"type\":\"string\"},{\"name\":\"SyntheticSource\",\"type\":\"string\"},{\"name\":\"SessionId\",\"type\":\"string\"},{\"name\":\"UserId\",\"type\":\"string\"},{\"name\":\"UserAuthenticatedId\",\"type\":\"string\"},{\"name\":\"UserAccountId\",\"type\":\"string\"},{\"name\":\"AppVersion\",\"type\":\"string\"},{\"name\":\"AppRoleName\",\"type\":\"string\"},{\"name\":\"AppRoleInstance\",\"type\":\"string\"},{\"name\":\"ClientType\",\"type\":\"string\"},{\"name\":\"ClientModel\",\"type\":\"string\"},{\"name\":\"ClientOS\",\"type\":\"string\"},{\"name\":\"ClientIP\",\"type\":\"string\"},{\"name\":\"ClientCity\",\"type\":\"string\"},{\"name\":\"ClientStateOrProvince\",\"type\":\"string\"},{\"name\":\"ClientCountryOrRegion\",\"type\":\"string\"},{\"name\":\"ClientBrowser\",\"type\":\"string\"},{\"name\":\"ResourceGUID\",\"type\":\"string\"},{\"name\":\"IKey\",\"type\":\"string\"},{\"name\":\"SDKVersion\",\"type\":\"string\"},{\"name\":\"ItemCount\",\"type\":\"int\"},{\"name\":\"ReferencedItemId\",\"type\":\"string\"},{\"name\":\"ReferencedType\",\"type\":\"string\"},{\"name\":\"SourceSystem\",\"type\":\"string\"},{\"name\":\"Type\",\"type\":\"string\"},{\"name\":\"_ResourceId\",\"type\":\"string\"}],\"rows\":[[\"d2d0e126-fa1e-4b0a-b647-250cdd471e68\",\"2021-06-02T19:16:56.678Z\",\"c167a30f0c66f8c5\",\"\",\"ServiceBus.process\",\"\",true,\"200\",0,\"<250ms\",\"{\\\"x-opt-enqueued-time\\\":\\\"1622661414\\\"}\",null,\"ServiceBus.process\",\"daf56801f50acf85dbc1f73748a103ca\",null,\"46c008b73159ff7a\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"srikanta\",\"PC\",\"\",\"\",\"0.0.0.0\",\"Edmonds\",\"Washington\",\"United States\",\"\",\"fc5f5a5d-d6d1-47f9-be1b-aa57185ec6be\",\"b4f83947-968d-4e2f-82ad-804be07697ae\",\"java:3.1.1-BETA.2\",1,\"\",\"\",\"Azure\",\"AppRequests\",\"/subscriptions/faa080af-c1d8-40ad-9cce-e1a450ca5b57/resourcegroups/srnagar-azuresdkgroup/providers/microsoft.insights/components/srnagarappinsights\"],[\"d2d0e126-fa1e-4b0a-b647-250cdd471e68\",\"2021-06-02T19:17:56.783Z\",\"db7ccfd35796b843\",\"\",\"ServiceBus.process\",\"\",true,\"200\",0,\"<250ms\",\"{\\\"x-opt-enqueued-time\\\":\\\"1622661414\\\"}\",null,\"ServiceBus.process\",\"7bf75778f3cdff72f1cbb2db49b0cc30\",null,\"e3c482e945343324\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"srikanta\",\"PC\",\"\",\"\",\"0.0.0.0\",\"Edmonds\",\"Washington\",\"United States\",\"\",\"fc5f5a5d-d6d1-47f9-be1b-aa57185ec6be\",\"b4f83947-968d-4e2f-82ad-804be07697ae\",\"java:3.1.1-BETA.2\",1,\"\",\"\",\"Azure\",\"AppRequests\",\"/subscriptions/faa080af-c1d8-40ad-9cce-e1a450ca5b57/resourcegroups/srnagar-azuresdkgroup/providers/microsoft.insights/components/srnagarappinsights\"]]}],\"statistics\":{\"query\":{\"executionTime\":0.0312712,\"resourceUsage\":{\"cache\":{\"memory\":{\"hits\":117,\"misses\":0,\"total\":117},\"disk\":{\"hits\":0,\"misses\":0,\"total\":0},\"shards\":{\"hot\":{\"hitbytes\":0,\"missbytes\":0,\"retrievebytes\":0},\"cold\":{\"hitbytes\":0,\"missbytes\":0,\"retrievebytes\":0},\"bypassbytes\":0}},\"cpu\":{\"user\":\"00:00:00\",\"kernel\":\"00:00:00\",\"totalCpu\":\"00:00:00\"},\"memory\":{\"peakPerNode\":36459696}},\"inputDatasetStatistics\":{\"extents\":{\"total\":160,\"scanned\":7,\"scannedMinDatetime\":\"2021-04-23T23:54:25.4931197Z\",\"scannedMaxDatetime\":\"2021-06-03T08:34:29.9559097Z\"},\"rows\":{\"total\":139071230,\"scanned\":6968413},\"rowstores\":{\"scannedRows\":1234,\"scannedValuesSize\":429127},\"shards\":{\"queriesGeneric\":0,\"queriesSpecialized\":0}},\"datasetStatistics\":[{\"tableRowCount\":2,\"tableSize\":1044}]}}}}]}", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + } ], + "variables" : [ ] +} \ No newline at end of file diff --git a/sdk/monitor/azure-monitor-query/src/test/resources/session-records/LogsQueryClientTest.testLogsQuery.json b/sdk/monitor/azure-monitor-query/src/test/resources/session-records/LogsQueryClientTest.testLogsQuery.json new file mode 100644 index 000000000000..1891722b1f14 --- /dev/null +++ b/sdk/monitor/azure-monitor-query/src/test/resources/session-records/LogsQueryClientTest.testLogsQuery.json @@ -0,0 +1,28 @@ +{ + "networkCallRecords" : [ { + "Method" : "POST", + "Uri" : "https://REDACTED.loganalytics.io/v1/workspaces/d2d0e126-fa1e-4b0a-b647-250cdd471e68/query", + "Headers" : { + "User-Agent" : "azsdk-java-UnknownName/UnknownVersion (11.0.8; Windows 10; 10.0)", + "Content-Type" : "application/json" + }, + "Response" : { + "content-length" : "15641", + "Access-Control-Allow-Origin" : "*", + "X-Content-Type-Options" : "nosniff", + "Connection" : "keep-alive", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Mon, 07 Jun 2021 04:58:04 GMT", + "via" : "1.1 draft-oms-bf5f655b7-sqjz9", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "Retry-After,Age,WWW-Authenticate,x-resource-identities,x-ms-status-location", + "Vary" : "Accept-Encoding,Accept-Encoding", + "Body" : "{\"tables\":[{\"name\":\"PrimaryResult\",\"columns\":[{\"name\":\"TenantId\",\"type\":\"string\"},{\"name\":\"TimeGenerated\",\"type\":\"datetime\"},{\"name\":\"Id\",\"type\":\"string\"},{\"name\":\"Source\",\"type\":\"string\"},{\"name\":\"Name\",\"type\":\"string\"},{\"name\":\"Url\",\"type\":\"string\"},{\"name\":\"Success\",\"type\":\"bool\"},{\"name\":\"ResultCode\",\"type\":\"string\"},{\"name\":\"DurationMs\",\"type\":\"real\"},{\"name\":\"PerformanceBucket\",\"type\":\"string\"},{\"name\":\"Properties\",\"type\":\"dynamic\"},{\"name\":\"Measurements\",\"type\":\"dynamic\"},{\"name\":\"OperationName\",\"type\":\"string\"},{\"name\":\"OperationId\",\"type\":\"string\"},{\"name\":\"OperationLinks\",\"type\":\"dynamic\"},{\"name\":\"ParentId\",\"type\":\"string\"},{\"name\":\"SyntheticSource\",\"type\":\"string\"},{\"name\":\"SessionId\",\"type\":\"string\"},{\"name\":\"UserId\",\"type\":\"string\"},{\"name\":\"UserAuthenticatedId\",\"type\":\"string\"},{\"name\":\"UserAccountId\",\"type\":\"string\"},{\"name\":\"AppVersion\",\"type\":\"string\"},{\"name\":\"AppRoleName\",\"type\":\"string\"},{\"name\":\"AppRoleInstance\",\"type\":\"string\"},{\"name\":\"ClientType\",\"type\":\"string\"},{\"name\":\"ClientModel\",\"type\":\"string\"},{\"name\":\"ClientOS\",\"type\":\"string\"},{\"name\":\"ClientIP\",\"type\":\"string\"},{\"name\":\"ClientCity\",\"type\":\"string\"},{\"name\":\"ClientStateOrProvince\",\"type\":\"string\"},{\"name\":\"ClientCountryOrRegion\",\"type\":\"string\"},{\"name\":\"ClientBrowser\",\"type\":\"string\"},{\"name\":\"ResourceGUID\",\"type\":\"string\"},{\"name\":\"IKey\",\"type\":\"string\"},{\"name\":\"SDKVersion\",\"type\":\"string\"},{\"name\":\"ItemCount\",\"type\":\"int\"},{\"name\":\"ReferencedItemId\",\"type\":\"string\"},{\"name\":\"ReferencedType\",\"type\":\"string\"},{\"name\":\"SourceSystem\",\"type\":\"string\"},{\"name\":\"Type\",\"type\":\"string\"},{\"name\":\"_ResourceId\",\"type\":\"string\"}],\"rows\":[[\"d2d0e126-fa1e-4b0a-b647-250cdd471e68\",\"2021-05-18T20:49:32.782Z\",\"c4a9e6c93e796329\",\"\",\"app-config-set\",\"\",true,\"200\",4493,\"3sec-7sec\",null,null,\"app-config-set\",\"8db26b94806f3e2c33ca1da4a3132f60\",null,\"8db26b94806f3e2c33ca1da4a3132f60\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"srikanta\",\"PC\",\"\",\"\",\"0.0.0.0\",\"Edmonds\",\"Washington\",\"United States\",\"\",\"fc5f5a5d-d6d1-47f9-be1b-aa57185ec6be\",\"b4f83947-968d-4e2f-82ad-804be07697ae\",\"java:3.1.1-BETA-SNAPSHOT\",1,\"\",\"\",\"Azure\",\"AppRequests\",\"/subscriptions/faa080af-c1d8-40ad-9cce-e1a450ca5b57/resourcegroups/srnagar-azuresdkgroup/providers/microsoft.insights/components/srnagarappinsights\"],[\"d2d0e126-fa1e-4b0a-b647-250cdd471e68\",\"2021-06-02T16:31:25.383Z\",\"08bf242cdc68504c\",\"\",\"ServiceBus.process\",\"\",true,\"200\",0,\"<250ms\",\"{\\\"x-opt-enqueued-time\\\":\\\"1622651483\\\"}\",null,\"ServiceBus.process\",\"65d9eb1ccf85b1b7ed1e2ea6bb72f563\",null,\"146140ce8493a6ed\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"srikanta\",\"PC\",\"\",\"\",\"0.0.0.0\",\"Edmonds\",\"Washington\",\"United States\",\"\",\"fc5f5a5d-d6d1-47f9-be1b-aa57185ec6be\",\"b4f83947-968d-4e2f-82ad-804be07697ae\",\"java:3.1.1-BETA.2\",1,\"\",\"\",\"Azure\",\"AppRequests\",\"/subscriptions/faa080af-c1d8-40ad-9cce-e1a450ca5b57/resourcegroups/srnagar-azuresdkgroup/providers/microsoft.insights/components/srnagarappinsights\"],[\"d2d0e126-fa1e-4b0a-b647-250cdd471e68\",\"2021-06-02T16:32:25.492Z\",\"9f4cd78c10d57b4f\",\"\",\"ServiceBus.process\",\"\",true,\"200\",0,\"<250ms\",\"{\\\"x-opt-enqueued-time\\\":\\\"1622651483\\\"}\",null,\"ServiceBus.process\",\"ae054fe7b7ac3adf8b841ebbe1ecb912\",null,\"14eab103a1969665\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"srikanta\",\"PC\",\"\",\"\",\"0.0.0.0\",\"Edmonds\",\"Washington\",\"United States\",\"\",\"fc5f5a5d-d6d1-47f9-be1b-aa57185ec6be\",\"b4f83947-968d-4e2f-82ad-804be07697ae\",\"java:3.1.1-BETA.2\",1,\"\",\"\",\"Azure\",\"AppRequests\",\"/subscriptions/faa080af-c1d8-40ad-9cce-e1a450ca5b57/resourcegroups/srnagar-azuresdkgroup/providers/microsoft.insights/components/srnagarappinsights\"],[\"d2d0e126-fa1e-4b0a-b647-250cdd471e68\",\"2021-06-02T16:33:25.585Z\",\"ea7e09d4baa4e4ce\",\"\",\"ServiceBus.process\",\"\",true,\"200\",0,\"<250ms\",\"{\\\"x-opt-enqueued-time\\\":\\\"1622651483\\\"}\",null,\"ServiceBus.process\",\"ba6162e3ccd803086944750b82600a3a\",null,\"b60455183860caaf\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"srikanta\",\"PC\",\"\",\"\",\"0.0.0.0\",\"Edmonds\",\"Washington\",\"United States\",\"\",\"fc5f5a5d-d6d1-47f9-be1b-aa57185ec6be\",\"b4f83947-968d-4e2f-82ad-804be07697ae\",\"java:3.1.1-BETA.2\",1,\"\",\"\",\"Azure\",\"AppRequests\",\"/subscriptions/faa080af-c1d8-40ad-9cce-e1a450ca5b57/resourcegroups/srnagar-azuresdkgroup/providers/microsoft.insights/components/srnagarappinsights\"],[\"d2d0e126-fa1e-4b0a-b647-250cdd471e68\",\"2021-06-02T16:34:25.701Z\",\"32e32dcb151ffbeb\",\"\",\"ServiceBus.process\",\"\",true,\"200\",0,\"<250ms\",\"{\\\"x-opt-enqueued-time\\\":\\\"1622651483\\\"}\",null,\"ServiceBus.process\",\"2cb866b43835756389e417a9d4d9364c\",null,\"ad13495fdb43373f\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"srikanta\",\"PC\",\"\",\"\",\"0.0.0.0\",\"Edmonds\",\"Washington\",\"United States\",\"\",\"fc5f5a5d-d6d1-47f9-be1b-aa57185ec6be\",\"b4f83947-968d-4e2f-82ad-804be07697ae\",\"java:3.1.1-BETA.2\",1,\"\",\"\",\"Azure\",\"AppRequests\",\"/subscriptions/faa080af-c1d8-40ad-9cce-e1a450ca5b57/resourcegroups/srnagar-azuresdkgroup/providers/microsoft.insights/components/srnagarappinsights\"],[\"d2d0e126-fa1e-4b0a-b647-250cdd471e68\",\"2021-06-02T19:16:56.678Z\",\"c167a30f0c66f8c5\",\"\",\"ServiceBus.process\",\"\",true,\"200\",0,\"<250ms\",\"{\\\"x-opt-enqueued-time\\\":\\\"1622661414\\\"}\",null,\"ServiceBus.process\",\"daf56801f50acf85dbc1f73748a103ca\",null,\"46c008b73159ff7a\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"srikanta\",\"PC\",\"\",\"\",\"0.0.0.0\",\"Edmonds\",\"Washington\",\"United States\",\"\",\"fc5f5a5d-d6d1-47f9-be1b-aa57185ec6be\",\"b4f83947-968d-4e2f-82ad-804be07697ae\",\"java:3.1.1-BETA.2\",1,\"\",\"\",\"Azure\",\"AppRequests\",\"/subscriptions/faa080af-c1d8-40ad-9cce-e1a450ca5b57/resourcegroups/srnagar-azuresdkgroup/providers/microsoft.insights/components/srnagarappinsights\"],[\"d2d0e126-fa1e-4b0a-b647-250cdd471e68\",\"2021-06-02T19:17:56.783Z\",\"db7ccfd35796b843\",\"\",\"ServiceBus.process\",\"\",true,\"200\",0,\"<250ms\",\"{\\\"x-opt-enqueued-time\\\":\\\"1622661414\\\"}\",null,\"ServiceBus.process\",\"7bf75778f3cdff72f1cbb2db49b0cc30\",null,\"e3c482e945343324\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"srikanta\",\"PC\",\"\",\"\",\"0.0.0.0\",\"Edmonds\",\"Washington\",\"United States\",\"\",\"fc5f5a5d-d6d1-47f9-be1b-aa57185ec6be\",\"b4f83947-968d-4e2f-82ad-804be07697ae\",\"java:3.1.1-BETA.2\",1,\"\",\"\",\"Azure\",\"AppRequests\",\"/subscriptions/faa080af-c1d8-40ad-9cce-e1a450ca5b57/resourcegroups/srnagar-azuresdkgroup/providers/microsoft.insights/components/srnagarappinsights\"],[\"d2d0e126-fa1e-4b0a-b647-250cdd471e68\",\"2021-06-02T19:55:09.745Z\",\"25325c69dc60b851\",\"\",\"ServiceBus.process\",\"\",true,\"200\",0,\"<250ms\",\"{\\\"x-opt-enqueued-time\\\":\\\"1622661414\\\"}\",null,\"ServiceBus.process\",\"f55c1b2f15b5cb90df6ae1594a3a47d0\",null,\"5fd866cda2ff6f97\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"srikanta\",\"PC\",\"\",\"\",\"0.0.0.0\",\"Edmonds\",\"Washington\",\"United States\",\"\",\"fc5f5a5d-d6d1-47f9-be1b-aa57185ec6be\",\"b4f83947-968d-4e2f-82ad-804be07697ae\",\"java:3.1.1-BETA.2\",1,\"\",\"\",\"Azure\",\"AppRequests\",\"/subscriptions/faa080af-c1d8-40ad-9cce-e1a450ca5b57/resourcegroups/srnagar-azuresdkgroup/providers/microsoft.insights/components/srnagarappinsights\"],[\"d2d0e126-fa1e-4b0a-b647-250cdd471e68\",\"2021-06-02T19:55:09.856Z\",\"06525b21b5e10606\",\"\",\"ServiceBus.process\",\"\",true,\"200\",0,\"<250ms\",\"{\\\"x-opt-enqueued-time\\\":\\\"1622663707\\\"}\",null,\"ServiceBus.process\",\"aab6d4a1af65138937231c0910301d23\",null,\"b5b7be2d6c558581\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"srikanta\",\"PC\",\"\",\"\",\"0.0.0.0\",\"Edmonds\",\"Washington\",\"United States\",\"\",\"fc5f5a5d-d6d1-47f9-be1b-aa57185ec6be\",\"b4f83947-968d-4e2f-82ad-804be07697ae\",\"java:3.1.1-BETA.2\",1,\"\",\"\",\"Azure\",\"AppRequests\",\"/subscriptions/faa080af-c1d8-40ad-9cce-e1a450ca5b57/resourcegroups/srnagar-azuresdkgroup/providers/microsoft.insights/components/srnagarappinsights\"],[\"d2d0e126-fa1e-4b0a-b647-250cdd471e68\",\"2021-06-02T19:56:10.867Z\",\"854f3af64c9ea966\",\"\",\"ServiceBus.process\",\"\",true,\"200\",4,\"<250ms\",\"{\\\"x-opt-enqueued-time\\\":\\\"1622661414\\\"}\",null,\"ServiceBus.process\",\"7c3a5c68a23cc2f9366d4e45178a4827\",null,\"711d76e16c8f8985\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"srikanta\",\"PC\",\"\",\"\",\"0.0.0.0\",\"Edmonds\",\"Washington\",\"United States\",\"\",\"fc5f5a5d-d6d1-47f9-be1b-aa57185ec6be\",\"b4f83947-968d-4e2f-82ad-804be07697ae\",\"java:3.1.1-BETA.2\",1,\"\",\"\",\"Azure\",\"AppRequests\",\"/subscriptions/faa080af-c1d8-40ad-9cce-e1a450ca5b57/resourcegroups/srnagar-azuresdkgroup/providers/microsoft.insights/components/srnagarappinsights\"],[\"d2d0e126-fa1e-4b0a-b647-250cdd471e68\",\"2021-06-02T19:56:11.087Z\",\"83a1a249ad1f1654\",\"\",\"ServiceBus.process\",\"\",true,\"200\",1,\"<250ms\",\"{\\\"x-opt-enqueued-time\\\":\\\"1622663707\\\"}\",null,\"ServiceBus.process\",\"b7204711693dcd589c48291ab9bce504\",null,\"79b3fc43b0fe4bd6\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"srikanta\",\"PC\",\"\",\"\",\"0.0.0.0\",\"Edmonds\",\"Washington\",\"United States\",\"\",\"fc5f5a5d-d6d1-47f9-be1b-aa57185ec6be\",\"b4f83947-968d-4e2f-82ad-804be07697ae\",\"java:3.1.1-BETA.2\",1,\"\",\"\",\"Azure\",\"AppRequests\",\"/subscriptions/faa080af-c1d8-40ad-9cce-e1a450ca5b57/resourcegroups/srnagar-azuresdkgroup/providers/microsoft.insights/components/srnagarappinsights\"],[\"d2d0e126-fa1e-4b0a-b647-250cdd471e68\",\"2021-06-02T00:18:13.317Z\",\"a3273b160f86b5c4\",\"\",\"ServiceBus.process\",\"\",true,\"200\",0,\"<250ms\",\"{\\\"x-opt-enqueued-time\\\":\\\"1622593091\\\"}\",null,\"ServiceBus.process\",\"e5d21caf619d4ef564a4b5920cadce47\",null,\"c6864f9d3649f302\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"srikanta\",\"PC\",\"\",\"\",\"0.0.0.0\",\"Edmonds\",\"Washington\",\"United States\",\"\",\"fc5f5a5d-d6d1-47f9-be1b-aa57185ec6be\",\"b4f83947-968d-4e2f-82ad-804be07697ae\",\"java:3.1.1-BETA.2\",1,\"\",\"\",\"Azure\",\"AppRequests\",\"/subscriptions/faa080af-c1d8-40ad-9cce-e1a450ca5b57/resourcegroups/srnagar-azuresdkgroup/providers/microsoft.insights/components/srnagarappinsights\"],[\"d2d0e126-fa1e-4b0a-b647-250cdd471e68\",\"2021-06-02T00:19:13.44Z\",\"bebb49e7a1344c07\",\"\",\"ServiceBus.process\",\"\",true,\"200\",0,\"<250ms\",\"{\\\"x-opt-enqueued-time\\\":\\\"1622593091\\\"}\",null,\"ServiceBus.process\",\"d76c6dec50d2c12267d7d3a246a0c237\",null,\"b68fff4775c77214\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"srikanta\",\"PC\",\"\",\"\",\"0.0.0.0\",\"Edmonds\",\"Washington\",\"United States\",\"\",\"fc5f5a5d-d6d1-47f9-be1b-aa57185ec6be\",\"b4f83947-968d-4e2f-82ad-804be07697ae\",\"java:3.1.1-BETA.2\",1,\"\",\"\",\"Azure\",\"AppRequests\",\"/subscriptions/faa080af-c1d8-40ad-9cce-e1a450ca5b57/resourcegroups/srnagar-azuresdkgroup/providers/microsoft.insights/components/srnagarappinsights\"],[\"d2d0e126-fa1e-4b0a-b647-250cdd471e68\",\"2021-06-02T00:20:13.618Z\",\"a8b2fcfbb6e40b94\",\"\",\"ServiceBus.process\",\"\",true,\"200\",0,\"<250ms\",\"{\\\"x-opt-enqueued-time\\\":\\\"1622593091\\\"}\",null,\"ServiceBus.process\",\"e75b1e2074df3f0bb495bc366cc3ec30\",null,\"044e9f392d849561\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"srikanta\",\"PC\",\"\",\"\",\"0.0.0.0\",\"Edmonds\",\"Washington\",\"United States\",\"\",\"fc5f5a5d-d6d1-47f9-be1b-aa57185ec6be\",\"b4f83947-968d-4e2f-82ad-804be07697ae\",\"java:3.1.1-BETA.2\",1,\"\",\"\",\"Azure\",\"AppRequests\",\"/subscriptions/faa080af-c1d8-40ad-9cce-e1a450ca5b57/resourcegroups/srnagar-azuresdkgroup/providers/microsoft.insights/components/srnagarappinsights\"],[\"d2d0e126-fa1e-4b0a-b647-250cdd471e68\",\"2021-06-02T00:21:13.726Z\",\"a8bbff35cb742d79\",\"\",\"ServiceBus.process\",\"\",true,\"200\",0,\"<250ms\",\"{\\\"x-opt-enqueued-time\\\":\\\"1622593091\\\"}\",null,\"ServiceBus.process\",\"ac03b3d08e2dd176e2b07d7b0fce6dd9\",null,\"f9f7ba49b8a739f5\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"srikanta\",\"PC\",\"\",\"\",\"0.0.0.0\",\"Edmonds\",\"Washington\",\"United States\",\"\",\"fc5f5a5d-d6d1-47f9-be1b-aa57185ec6be\",\"b4f83947-968d-4e2f-82ad-804be07697ae\",\"java:3.1.1-BETA.2\",1,\"\",\"\",\"Azure\",\"AppRequests\",\"/subscriptions/faa080af-c1d8-40ad-9cce-e1a450ca5b57/resourcegroups/srnagar-azuresdkgroup/providers/microsoft.insights/components/srnagarappinsights\"],[\"d2d0e126-fa1e-4b0a-b647-250cdd471e68\",\"2021-06-02T00:24:20.801Z\",\"e2b2bde8f9f57b0d\",\"\",\"EventHubs.process\",\"\",true,\"200\",201,\"<250ms\",\"{\\\"x-opt-enqueued-time\\\":\\\"1622593439\\\"}\",null,\"EventHubs.process\",\"24b7d74ea394257cf9b930f6df8e2e1c\",null,\"dc603380e1ae04cc\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"srikanta\",\"PC\",\"\",\"\",\"0.0.0.0\",\"Edmonds\",\"Washington\",\"United States\",\"\",\"fc5f5a5d-d6d1-47f9-be1b-aa57185ec6be\",\"b4f83947-968d-4e2f-82ad-804be07697ae\",\"java:3.1.1-BETA.2\",1,\"\",\"\",\"Azure\",\"AppRequests\",\"/subscriptions/faa080af-c1d8-40ad-9cce-e1a450ca5b57/resourcegroups/srnagar-azuresdkgroup/providers/microsoft.insights/components/srnagarappinsights\"],[\"d2d0e126-fa1e-4b0a-b647-250cdd471e68\",\"2021-06-02T00:37:46.924Z\",\"b822536af6e68cae\",\"\",\"ServiceBus.process\",\"\",true,\"200\",1,\"<250ms\",\"{\\\"x-opt-enqueued-time\\\":\\\"1622594264\\\"}\",null,\"ServiceBus.process\",\"1a8d8232788a954cc5562c0239919e1c\",null,\"ed65ee44a4ce2dbf\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"srikanta\",\"PC\",\"\",\"\",\"0.0.0.0\",\"Edmonds\",\"Washington\",\"United States\",\"\",\"fc5f5a5d-d6d1-47f9-be1b-aa57185ec6be\",\"b4f83947-968d-4e2f-82ad-804be07697ae\",\"java:3.1.1-BETA.2\",1,\"\",\"\",\"Azure\",\"AppRequests\",\"/subscriptions/faa080af-c1d8-40ad-9cce-e1a450ca5b57/resourcegroups/srnagar-azuresdkgroup/providers/microsoft.insights/components/srnagarappinsights\"],[\"d2d0e126-fa1e-4b0a-b647-250cdd471e68\",\"2021-06-02T00:38:47.664Z\",\"d61caeedfc2bee49\",\"\",\"ServiceBus.process\",\"\",true,\"200\",10,\"<250ms\",\"{\\\"x-opt-enqueued-time\\\":\\\"1622594264\\\"}\",null,\"ServiceBus.process\",\"87e95ce5700e979c21c4a8db3e20f869\",null,\"f6ae1920f6926c63\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"srikanta\",\"PC\",\"\",\"\",\"0.0.0.0\",\"Edmonds\",\"Washington\",\"United States\",\"\",\"fc5f5a5d-d6d1-47f9-be1b-aa57185ec6be\",\"b4f83947-968d-4e2f-82ad-804be07697ae\",\"java:3.1.1-BETA.2\",1,\"\",\"\",\"Azure\",\"AppRequests\",\"/subscriptions/faa080af-c1d8-40ad-9cce-e1a450ca5b57/resourcegroups/srnagar-azuresdkgroup/providers/microsoft.insights/components/srnagarappinsights\"],[\"d2d0e126-fa1e-4b0a-b647-250cdd471e68\",\"2021-06-02T00:41:07.524Z\",\"7057d46110796372\",\"\",\"ServiceBus.process\",\"\",true,\"200\",0,\"<250ms\",\"{\\\"x-opt-enqueued-time\\\":\\\"1622594264\\\"}\",null,\"ServiceBus.process\",\"d2f709aea549e1d29557afe83774ccba\",null,\"16e61ba243071eb2\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"srikanta\",\"PC\",\"\",\"\",\"0.0.0.0\",\"Edmonds\",\"Washington\",\"United States\",\"\",\"fc5f5a5d-d6d1-47f9-be1b-aa57185ec6be\",\"b4f83947-968d-4e2f-82ad-804be07697ae\",\"java:3.1.1-BETA.2\",1,\"\",\"\",\"Azure\",\"AppRequests\",\"/subscriptions/faa080af-c1d8-40ad-9cce-e1a450ca5b57/resourcegroups/srnagar-azuresdkgroup/providers/microsoft.insights/components/srnagarappinsights\"],[\"d2d0e126-fa1e-4b0a-b647-250cdd471e68\",\"2021-06-02T00:41:07.773Z\",\"509862826a37e987\",\"\",\"ServiceBus.process\",\"\",true,\"200\",0,\"<250ms\",\"{\\\"x-opt-enqueued-time\\\":\\\"1622594464\\\"}\",null,\"ServiceBus.process\",\"20f998077e810966de03ead8f8f15b52\",null,\"02da63c818f0a112\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"srikanta\",\"PC\",\"\",\"\",\"0.0.0.0\",\"Edmonds\",\"Washington\",\"United States\",\"\",\"fc5f5a5d-d6d1-47f9-be1b-aa57185ec6be\",\"b4f83947-968d-4e2f-82ad-804be07697ae\",\"java:3.1.1-BETA.2\",1,\"\",\"\",\"Azure\",\"AppRequests\",\"/subscriptions/faa080af-c1d8-40ad-9cce-e1a450ca5b57/resourcegroups/srnagar-azuresdkgroup/providers/microsoft.insights/components/srnagarappinsights\"],[\"d2d0e126-fa1e-4b0a-b647-250cdd471e68\",\"2021-06-02T00:42:07.667Z\",\"2e21640cf8dee0ad\",\"\",\"ServiceBus.process\",\"\",true,\"200\",0,\"<250ms\",\"{\\\"x-opt-enqueued-time\\\":\\\"1622594264\\\"}\",null,\"ServiceBus.process\",\"c1eaf76bf076813c11b07cdf3a885a36\",null,\"41b4330f40552539\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"srikanta\",\"PC\",\"\",\"\",\"0.0.0.0\",\"Edmonds\",\"Washington\",\"United States\",\"\",\"fc5f5a5d-d6d1-47f9-be1b-aa57185ec6be\",\"b4f83947-968d-4e2f-82ad-804be07697ae\",\"java:3.1.1-BETA.2\",1,\"\",\"\",\"Azure\",\"AppRequests\",\"/subscriptions/faa080af-c1d8-40ad-9cce-e1a450ca5b57/resourcegroups/srnagar-azuresdkgroup/providers/microsoft.insights/components/srnagarappinsights\"],[\"d2d0e126-fa1e-4b0a-b647-250cdd471e68\",\"2021-06-02T00:42:07.786Z\",\"577d95aa25c705fb\",\"\",\"ServiceBus.process\",\"\",true,\"200\",0,\"<250ms\",\"{\\\"x-opt-enqueued-time\\\":\\\"1622594464\\\"}\",null,\"ServiceBus.process\",\"3b5ddcbb2447d658f251d6d4861f5065\",null,\"1b93994b565f88ff\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"srikanta\",\"PC\",\"\",\"\",\"0.0.0.0\",\"Edmonds\",\"Washington\",\"United States\",\"\",\"fc5f5a5d-d6d1-47f9-be1b-aa57185ec6be\",\"b4f83947-968d-4e2f-82ad-804be07697ae\",\"java:3.1.1-BETA.2\",1,\"\",\"\",\"Azure\",\"AppRequests\",\"/subscriptions/faa080af-c1d8-40ad-9cce-e1a450ca5b57/resourcegroups/srnagar-azuresdkgroup/providers/microsoft.insights/components/srnagarappinsights\"]]}]}", + "Age" : "59", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + } ], + "variables" : [ ] +} \ No newline at end of file diff --git a/sdk/monitor/azure-monitor-query/src/test/resources/session-records/LogsQueryClientTest.testLogsQueryBatch.json b/sdk/monitor/azure-monitor-query/src/test/resources/session-records/LogsQueryClientTest.testLogsQueryBatch.json new file mode 100644 index 000000000000..7025a531aeda --- /dev/null +++ b/sdk/monitor/azure-monitor-query/src/test/resources/session-records/LogsQueryClientTest.testLogsQueryBatch.json @@ -0,0 +1,27 @@ +{ + "networkCallRecords" : [ { + "Method" : "POST", + "Uri" : "https://REDACTED.loganalytics.io/v1/$batch", + "Headers" : { + "User-Agent" : "azsdk-java-UnknownName/UnknownVersion (11.0.8; Windows 10; 10.0)", + "Content-Type" : "application/json" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "Access-Control-Allow-Origin" : "*", + "X-Content-Type-Options" : "nosniff", + "Connection" : "keep-alive", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Mon, 07 Jun 2021 04:58:04 GMT", + "via" : "1.1 draft-oms-bf5f655b7-bgmg8", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "Retry-After,Age,WWW-Authenticate,x-resource-identities,x-ms-status-location", + "Vary" : "Accept-Encoding,Accept-Encoding", + "Body" : "{\"responses\":[{\"id\":\"1\",\"status\":200,\"headers\":{\"Age\":\"59\",\"request-context\":\"appId=cid-v1:70941e4f-7e8f-40b7-b730-183893db0297\"},\"body\":{\"tables\":[{\"name\":\"PrimaryResult\",\"columns\":[{\"name\":\"TenantId\",\"type\":\"string\"},{\"name\":\"TimeGenerated\",\"type\":\"datetime\"},{\"name\":\"Id\",\"type\":\"string\"},{\"name\":\"Source\",\"type\":\"string\"},{\"name\":\"Name\",\"type\":\"string\"},{\"name\":\"Url\",\"type\":\"string\"},{\"name\":\"Success\",\"type\":\"bool\"},{\"name\":\"ResultCode\",\"type\":\"string\"},{\"name\":\"DurationMs\",\"type\":\"real\"},{\"name\":\"PerformanceBucket\",\"type\":\"string\"},{\"name\":\"Properties\",\"type\":\"dynamic\"},{\"name\":\"Measurements\",\"type\":\"dynamic\"},{\"name\":\"OperationName\",\"type\":\"string\"},{\"name\":\"OperationId\",\"type\":\"string\"},{\"name\":\"OperationLinks\",\"type\":\"dynamic\"},{\"name\":\"ParentId\",\"type\":\"string\"},{\"name\":\"SyntheticSource\",\"type\":\"string\"},{\"name\":\"SessionId\",\"type\":\"string\"},{\"name\":\"UserId\",\"type\":\"string\"},{\"name\":\"UserAuthenticatedId\",\"type\":\"string\"},{\"name\":\"UserAccountId\",\"type\":\"string\"},{\"name\":\"AppVersion\",\"type\":\"string\"},{\"name\":\"AppRoleName\",\"type\":\"string\"},{\"name\":\"AppRoleInstance\",\"type\":\"string\"},{\"name\":\"ClientType\",\"type\":\"string\"},{\"name\":\"ClientModel\",\"type\":\"string\"},{\"name\":\"ClientOS\",\"type\":\"string\"},{\"name\":\"ClientIP\",\"type\":\"string\"},{\"name\":\"ClientCity\",\"type\":\"string\"},{\"name\":\"ClientStateOrProvince\",\"type\":\"string\"},{\"name\":\"ClientCountryOrRegion\",\"type\":\"string\"},{\"name\":\"ClientBrowser\",\"type\":\"string\"},{\"name\":\"ResourceGUID\",\"type\":\"string\"},{\"name\":\"IKey\",\"type\":\"string\"},{\"name\":\"SDKVersion\",\"type\":\"string\"},{\"name\":\"ItemCount\",\"type\":\"int\"},{\"name\":\"ReferencedItemId\",\"type\":\"string\"},{\"name\":\"ReferencedType\",\"type\":\"string\"},{\"name\":\"SourceSystem\",\"type\":\"string\"},{\"name\":\"Type\",\"type\":\"string\"},{\"name\":\"_ResourceId\",\"type\":\"string\"}],\"rows\":[[\"d2d0e126-fa1e-4b0a-b647-250cdd471e68\",\"2021-06-02T19:16:56.678Z\",\"c167a30f0c66f8c5\",\"\",\"ServiceBus.process\",\"\",true,\"200\",0,\"<250ms\",\"{\\\"x-opt-enqueued-time\\\":\\\"1622661414\\\"}\",null,\"ServiceBus.process\",\"daf56801f50acf85dbc1f73748a103ca\",null,\"46c008b73159ff7a\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"srikanta\",\"PC\",\"\",\"\",\"0.0.0.0\",\"Edmonds\",\"Washington\",\"United States\",\"\",\"fc5f5a5d-d6d1-47f9-be1b-aa57185ec6be\",\"b4f83947-968d-4e2f-82ad-804be07697ae\",\"java:3.1.1-BETA.2\",1,\"\",\"\",\"Azure\",\"AppRequests\",\"/subscriptions/faa080af-c1d8-40ad-9cce-e1a450ca5b57/resourcegroups/srnagar-azuresdkgroup/providers/microsoft.insights/components/srnagarappinsights\"],[\"d2d0e126-fa1e-4b0a-b647-250cdd471e68\",\"2021-06-02T19:17:56.783Z\",\"db7ccfd35796b843\",\"\",\"ServiceBus.process\",\"\",true,\"200\",0,\"<250ms\",\"{\\\"x-opt-enqueued-time\\\":\\\"1622661414\\\"}\",null,\"ServiceBus.process\",\"7bf75778f3cdff72f1cbb2db49b0cc30\",null,\"e3c482e945343324\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"srikanta\",\"PC\",\"\",\"\",\"0.0.0.0\",\"Edmonds\",\"Washington\",\"United States\",\"\",\"fc5f5a5d-d6d1-47f9-be1b-aa57185ec6be\",\"b4f83947-968d-4e2f-82ad-804be07697ae\",\"java:3.1.1-BETA.2\",1,\"\",\"\",\"Azure\",\"AppRequests\",\"/subscriptions/faa080af-c1d8-40ad-9cce-e1a450ca5b57/resourcegroups/srnagar-azuresdkgroup/providers/microsoft.insights/components/srnagarappinsights\"]]}]}},{\"id\":\"2\",\"status\":200,\"headers\":{\"Age\":\"60\",\"request-context\":\"appId=cid-v1:70941e4f-7e8f-40b7-b730-183893db0297\"},\"body\":{\"tables\":[{\"name\":\"PrimaryResult\",\"columns\":[{\"name\":\"TenantId\",\"type\":\"string\"},{\"name\":\"TimeGenerated\",\"type\":\"datetime\"},{\"name\":\"Id\",\"type\":\"string\"},{\"name\":\"Source\",\"type\":\"string\"},{\"name\":\"Name\",\"type\":\"string\"},{\"name\":\"Url\",\"type\":\"string\"},{\"name\":\"Success\",\"type\":\"bool\"},{\"name\":\"ResultCode\",\"type\":\"string\"},{\"name\":\"DurationMs\",\"type\":\"real\"},{\"name\":\"PerformanceBucket\",\"type\":\"string\"},{\"name\":\"Properties\",\"type\":\"dynamic\"},{\"name\":\"Measurements\",\"type\":\"dynamic\"},{\"name\":\"OperationName\",\"type\":\"string\"},{\"name\":\"OperationId\",\"type\":\"string\"},{\"name\":\"OperationLinks\",\"type\":\"dynamic\"},{\"name\":\"ParentId\",\"type\":\"string\"},{\"name\":\"SyntheticSource\",\"type\":\"string\"},{\"name\":\"SessionId\",\"type\":\"string\"},{\"name\":\"UserId\",\"type\":\"string\"},{\"name\":\"UserAuthenticatedId\",\"type\":\"string\"},{\"name\":\"UserAccountId\",\"type\":\"string\"},{\"name\":\"AppVersion\",\"type\":\"string\"},{\"name\":\"AppRoleName\",\"type\":\"string\"},{\"name\":\"AppRoleInstance\",\"type\":\"string\"},{\"name\":\"ClientType\",\"type\":\"string\"},{\"name\":\"ClientModel\",\"type\":\"string\"},{\"name\":\"ClientOS\",\"type\":\"string\"},{\"name\":\"ClientIP\",\"type\":\"string\"},{\"name\":\"ClientCity\",\"type\":\"string\"},{\"name\":\"ClientStateOrProvince\",\"type\":\"string\"},{\"name\":\"ClientCountryOrRegion\",\"type\":\"string\"},{\"name\":\"ClientBrowser\",\"type\":\"string\"},{\"name\":\"ResourceGUID\",\"type\":\"string\"},{\"name\":\"IKey\",\"type\":\"string\"},{\"name\":\"SDKVersion\",\"type\":\"string\"},{\"name\":\"ItemCount\",\"type\":\"int\"},{\"name\":\"ReferencedItemId\",\"type\":\"string\"},{\"name\":\"ReferencedType\",\"type\":\"string\"},{\"name\":\"SourceSystem\",\"type\":\"string\"},{\"name\":\"Type\",\"type\":\"string\"},{\"name\":\"_ResourceId\",\"type\":\"string\"}],\"rows\":[[\"d2d0e126-fa1e-4b0a-b647-250cdd471e68\",\"2021-06-02T16:31:25.383Z\",\"08bf242cdc68504c\",\"\",\"ServiceBus.process\",\"\",true,\"200\",0,\"<250ms\",\"{\\\"x-opt-enqueued-time\\\":\\\"1622651483\\\"}\",null,\"ServiceBus.process\",\"65d9eb1ccf85b1b7ed1e2ea6bb72f563\",null,\"146140ce8493a6ed\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"srikanta\",\"PC\",\"\",\"\",\"0.0.0.0\",\"Edmonds\",\"Washington\",\"United States\",\"\",\"fc5f5a5d-d6d1-47f9-be1b-aa57185ec6be\",\"b4f83947-968d-4e2f-82ad-804be07697ae\",\"java:3.1.1-BETA.2\",1,\"\",\"\",\"Azure\",\"AppRequests\",\"/subscriptions/faa080af-c1d8-40ad-9cce-e1a450ca5b57/resourcegroups/srnagar-azuresdkgroup/providers/microsoft.insights/components/srnagarappinsights\"],[\"d2d0e126-fa1e-4b0a-b647-250cdd471e68\",\"2021-06-02T16:32:25.492Z\",\"9f4cd78c10d57b4f\",\"\",\"ServiceBus.process\",\"\",true,\"200\",0,\"<250ms\",\"{\\\"x-opt-enqueued-time\\\":\\\"1622651483\\\"}\",null,\"ServiceBus.process\",\"ae054fe7b7ac3adf8b841ebbe1ecb912\",null,\"14eab103a1969665\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"srikanta\",\"PC\",\"\",\"\",\"0.0.0.0\",\"Edmonds\",\"Washington\",\"United States\",\"\",\"fc5f5a5d-d6d1-47f9-be1b-aa57185ec6be\",\"b4f83947-968d-4e2f-82ad-804be07697ae\",\"java:3.1.1-BETA.2\",1,\"\",\"\",\"Azure\",\"AppRequests\",\"/subscriptions/faa080af-c1d8-40ad-9cce-e1a450ca5b57/resourcegroups/srnagar-azuresdkgroup/providers/microsoft.insights/components/srnagarappinsights\"],[\"d2d0e126-fa1e-4b0a-b647-250cdd471e68\",\"2021-06-02T16:33:25.585Z\",\"ea7e09d4baa4e4ce\",\"\",\"ServiceBus.process\",\"\",true,\"200\",0,\"<250ms\",\"{\\\"x-opt-enqueued-time\\\":\\\"1622651483\\\"}\",null,\"ServiceBus.process\",\"ba6162e3ccd803086944750b82600a3a\",null,\"b60455183860caaf\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"srikanta\",\"PC\",\"\",\"\",\"0.0.0.0\",\"Edmonds\",\"Washington\",\"United States\",\"\",\"fc5f5a5d-d6d1-47f9-be1b-aa57185ec6be\",\"b4f83947-968d-4e2f-82ad-804be07697ae\",\"java:3.1.1-BETA.2\",1,\"\",\"\",\"Azure\",\"AppRequests\",\"/subscriptions/faa080af-c1d8-40ad-9cce-e1a450ca5b57/resourcegroups/srnagar-azuresdkgroup/providers/microsoft.insights/components/srnagarappinsights\"]]}]}}]}", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + } ], + "variables" : [ ] +} \ No newline at end of file diff --git a/sdk/monitor/azure-monitor-query/src/test/resources/session-records/LogsQueryClientTest.testMultipleWorkspaces.json b/sdk/monitor/azure-monitor-query/src/test/resources/session-records/LogsQueryClientTest.testMultipleWorkspaces.json new file mode 100644 index 000000000000..f22507c94f2d --- /dev/null +++ b/sdk/monitor/azure-monitor-query/src/test/resources/session-records/LogsQueryClientTest.testMultipleWorkspaces.json @@ -0,0 +1,28 @@ +{ + "networkCallRecords" : [ { + "Method" : "POST", + "Uri" : "https://REDACTED.loganalytics.io/v1/workspaces/d2d0e126-fa1e-4b0a-b647-250cdd471e68/query", + "Headers" : { + "User-Agent" : "azsdk-java-UnknownName/UnknownVersion (11.0.8; Windows 10; 10.0)", + "Content-Type" : "application/json" + }, + "Response" : { + "content-length" : "221", + "Access-Control-Allow-Origin" : "*", + "X-Content-Type-Options" : "nosniff", + "Connection" : "keep-alive", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Mon, 07 Jun 2021 04:58:05 GMT", + "via" : "1.1 draft-oms-bf5f655b7-nsm7k", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "Retry-After,Age,WWW-Authenticate,x-resource-identities,x-ms-status-location", + "Vary" : "Accept-Encoding", + "Body" : "{\"tables\":[{\"name\":\"PrimaryResult\",\"columns\":[{\"name\":\"TenantId\",\"type\":\"string\"},{\"name\":\"count_\",\"type\":\"long\"}],\"rows\":[[\"d2d0e126-fa1e-4b0a-b647-250cdd471e68\",12795606],[\"9dad0092-fd13-403a-b367-a189a090a541\",449]]}]}", + "Age" : "55", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + } ], + "variables" : [ ] +} \ No newline at end of file diff --git a/sdk/monitor/azure-monitor-query/src/test/resources/session-records/LogsQueryClientTest.testStatistics.json b/sdk/monitor/azure-monitor-query/src/test/resources/session-records/LogsQueryClientTest.testStatistics.json new file mode 100644 index 000000000000..31c7d53f6a7d --- /dev/null +++ b/sdk/monitor/azure-monitor-query/src/test/resources/session-records/LogsQueryClientTest.testStatistics.json @@ -0,0 +1,28 @@ +{ + "networkCallRecords" : [ { + "Method" : "POST", + "Uri" : "https://REDACTED.loganalytics.io/v1/workspaces/d2d0e126-fa1e-4b0a-b647-250cdd471e68/query", + "Headers" : { + "User-Agent" : "azsdk-java-UnknownName/UnknownVersion (11.0.8; Windows 10; 10.0)", + "Content-Type" : "application/json" + }, + "Response" : { + "content-length" : "16451", + "Access-Control-Allow-Origin" : "*", + "X-Content-Type-Options" : "nosniff", + "Connection" : "keep-alive", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Mon, 07 Jun 2021 04:58:04 GMT", + "via" : "1.1 draft-oms-bf5f655b7-q6j6r", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Access-Control-Expose-Headers" : "Retry-After,Age,WWW-Authenticate,x-resource-identities,x-ms-status-location", + "Vary" : "Accept-Encoding,Accept-Encoding", + "Body" : "{\"tables\":[{\"name\":\"PrimaryResult\",\"columns\":[{\"name\":\"TenantId\",\"type\":\"string\"},{\"name\":\"TimeGenerated\",\"type\":\"datetime\"},{\"name\":\"Id\",\"type\":\"string\"},{\"name\":\"Source\",\"type\":\"string\"},{\"name\":\"Name\",\"type\":\"string\"},{\"name\":\"Url\",\"type\":\"string\"},{\"name\":\"Success\",\"type\":\"bool\"},{\"name\":\"ResultCode\",\"type\":\"string\"},{\"name\":\"DurationMs\",\"type\":\"real\"},{\"name\":\"PerformanceBucket\",\"type\":\"string\"},{\"name\":\"Properties\",\"type\":\"dynamic\"},{\"name\":\"Measurements\",\"type\":\"dynamic\"},{\"name\":\"OperationName\",\"type\":\"string\"},{\"name\":\"OperationId\",\"type\":\"string\"},{\"name\":\"OperationLinks\",\"type\":\"dynamic\"},{\"name\":\"ParentId\",\"type\":\"string\"},{\"name\":\"SyntheticSource\",\"type\":\"string\"},{\"name\":\"SessionId\",\"type\":\"string\"},{\"name\":\"UserId\",\"type\":\"string\"},{\"name\":\"UserAuthenticatedId\",\"type\":\"string\"},{\"name\":\"UserAccountId\",\"type\":\"string\"},{\"name\":\"AppVersion\",\"type\":\"string\"},{\"name\":\"AppRoleName\",\"type\":\"string\"},{\"name\":\"AppRoleInstance\",\"type\":\"string\"},{\"name\":\"ClientType\",\"type\":\"string\"},{\"name\":\"ClientModel\",\"type\":\"string\"},{\"name\":\"ClientOS\",\"type\":\"string\"},{\"name\":\"ClientIP\",\"type\":\"string\"},{\"name\":\"ClientCity\",\"type\":\"string\"},{\"name\":\"ClientStateOrProvince\",\"type\":\"string\"},{\"name\":\"ClientCountryOrRegion\",\"type\":\"string\"},{\"name\":\"ClientBrowser\",\"type\":\"string\"},{\"name\":\"ResourceGUID\",\"type\":\"string\"},{\"name\":\"IKey\",\"type\":\"string\"},{\"name\":\"SDKVersion\",\"type\":\"string\"},{\"name\":\"ItemCount\",\"type\":\"int\"},{\"name\":\"ReferencedItemId\",\"type\":\"string\"},{\"name\":\"ReferencedType\",\"type\":\"string\"},{\"name\":\"SourceSystem\",\"type\":\"string\"},{\"name\":\"Type\",\"type\":\"string\"},{\"name\":\"_ResourceId\",\"type\":\"string\"}],\"rows\":[[\"d2d0e126-fa1e-4b0a-b647-250cdd471e68\",\"2021-06-02T16:31:25.383Z\",\"08bf242cdc68504c\",\"\",\"ServiceBus.process\",\"\",true,\"200\",0,\"<250ms\",\"{\\\"x-opt-enqueued-time\\\":\\\"1622651483\\\"}\",null,\"ServiceBus.process\",\"65d9eb1ccf85b1b7ed1e2ea6bb72f563\",null,\"146140ce8493a6ed\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"srikanta\",\"PC\",\"\",\"\",\"0.0.0.0\",\"Edmonds\",\"Washington\",\"United States\",\"\",\"fc5f5a5d-d6d1-47f9-be1b-aa57185ec6be\",\"b4f83947-968d-4e2f-82ad-804be07697ae\",\"java:3.1.1-BETA.2\",1,\"\",\"\",\"Azure\",\"AppRequests\",\"/subscriptions/faa080af-c1d8-40ad-9cce-e1a450ca5b57/resourcegroups/srnagar-azuresdkgroup/providers/microsoft.insights/components/srnagarappinsights\"],[\"d2d0e126-fa1e-4b0a-b647-250cdd471e68\",\"2021-06-02T16:32:25.492Z\",\"9f4cd78c10d57b4f\",\"\",\"ServiceBus.process\",\"\",true,\"200\",0,\"<250ms\",\"{\\\"x-opt-enqueued-time\\\":\\\"1622651483\\\"}\",null,\"ServiceBus.process\",\"ae054fe7b7ac3adf8b841ebbe1ecb912\",null,\"14eab103a1969665\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"srikanta\",\"PC\",\"\",\"\",\"0.0.0.0\",\"Edmonds\",\"Washington\",\"United States\",\"\",\"fc5f5a5d-d6d1-47f9-be1b-aa57185ec6be\",\"b4f83947-968d-4e2f-82ad-804be07697ae\",\"java:3.1.1-BETA.2\",1,\"\",\"\",\"Azure\",\"AppRequests\",\"/subscriptions/faa080af-c1d8-40ad-9cce-e1a450ca5b57/resourcegroups/srnagar-azuresdkgroup/providers/microsoft.insights/components/srnagarappinsights\"],[\"d2d0e126-fa1e-4b0a-b647-250cdd471e68\",\"2021-06-02T16:33:25.585Z\",\"ea7e09d4baa4e4ce\",\"\",\"ServiceBus.process\",\"\",true,\"200\",0,\"<250ms\",\"{\\\"x-opt-enqueued-time\\\":\\\"1622651483\\\"}\",null,\"ServiceBus.process\",\"ba6162e3ccd803086944750b82600a3a\",null,\"b60455183860caaf\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"srikanta\",\"PC\",\"\",\"\",\"0.0.0.0\",\"Edmonds\",\"Washington\",\"United States\",\"\",\"fc5f5a5d-d6d1-47f9-be1b-aa57185ec6be\",\"b4f83947-968d-4e2f-82ad-804be07697ae\",\"java:3.1.1-BETA.2\",1,\"\",\"\",\"Azure\",\"AppRequests\",\"/subscriptions/faa080af-c1d8-40ad-9cce-e1a450ca5b57/resourcegroups/srnagar-azuresdkgroup/providers/microsoft.insights/components/srnagarappinsights\"],[\"d2d0e126-fa1e-4b0a-b647-250cdd471e68\",\"2021-06-02T16:34:25.701Z\",\"32e32dcb151ffbeb\",\"\",\"ServiceBus.process\",\"\",true,\"200\",0,\"<250ms\",\"{\\\"x-opt-enqueued-time\\\":\\\"1622651483\\\"}\",null,\"ServiceBus.process\",\"2cb866b43835756389e417a9d4d9364c\",null,\"ad13495fdb43373f\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"srikanta\",\"PC\",\"\",\"\",\"0.0.0.0\",\"Edmonds\",\"Washington\",\"United States\",\"\",\"fc5f5a5d-d6d1-47f9-be1b-aa57185ec6be\",\"b4f83947-968d-4e2f-82ad-804be07697ae\",\"java:3.1.1-BETA.2\",1,\"\",\"\",\"Azure\",\"AppRequests\",\"/subscriptions/faa080af-c1d8-40ad-9cce-e1a450ca5b57/resourcegroups/srnagar-azuresdkgroup/providers/microsoft.insights/components/srnagarappinsights\"],[\"d2d0e126-fa1e-4b0a-b647-250cdd471e68\",\"2021-05-18T20:49:32.782Z\",\"c4a9e6c93e796329\",\"\",\"app-config-set\",\"\",true,\"200\",4493,\"3sec-7sec\",null,null,\"app-config-set\",\"8db26b94806f3e2c33ca1da4a3132f60\",null,\"8db26b94806f3e2c33ca1da4a3132f60\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"srikanta\",\"PC\",\"\",\"\",\"0.0.0.0\",\"Edmonds\",\"Washington\",\"United States\",\"\",\"fc5f5a5d-d6d1-47f9-be1b-aa57185ec6be\",\"b4f83947-968d-4e2f-82ad-804be07697ae\",\"java:3.1.1-BETA-SNAPSHOT\",1,\"\",\"\",\"Azure\",\"AppRequests\",\"/subscriptions/faa080af-c1d8-40ad-9cce-e1a450ca5b57/resourcegroups/srnagar-azuresdkgroup/providers/microsoft.insights/components/srnagarappinsights\"],[\"d2d0e126-fa1e-4b0a-b647-250cdd471e68\",\"2021-06-02T00:18:13.317Z\",\"a3273b160f86b5c4\",\"\",\"ServiceBus.process\",\"\",true,\"200\",0,\"<250ms\",\"{\\\"x-opt-enqueued-time\\\":\\\"1622593091\\\"}\",null,\"ServiceBus.process\",\"e5d21caf619d4ef564a4b5920cadce47\",null,\"c6864f9d3649f302\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"srikanta\",\"PC\",\"\",\"\",\"0.0.0.0\",\"Edmonds\",\"Washington\",\"United States\",\"\",\"fc5f5a5d-d6d1-47f9-be1b-aa57185ec6be\",\"b4f83947-968d-4e2f-82ad-804be07697ae\",\"java:3.1.1-BETA.2\",1,\"\",\"\",\"Azure\",\"AppRequests\",\"/subscriptions/faa080af-c1d8-40ad-9cce-e1a450ca5b57/resourcegroups/srnagar-azuresdkgroup/providers/microsoft.insights/components/srnagarappinsights\"],[\"d2d0e126-fa1e-4b0a-b647-250cdd471e68\",\"2021-06-02T00:19:13.44Z\",\"bebb49e7a1344c07\",\"\",\"ServiceBus.process\",\"\",true,\"200\",0,\"<250ms\",\"{\\\"x-opt-enqueued-time\\\":\\\"1622593091\\\"}\",null,\"ServiceBus.process\",\"d76c6dec50d2c12267d7d3a246a0c237\",null,\"b68fff4775c77214\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"srikanta\",\"PC\",\"\",\"\",\"0.0.0.0\",\"Edmonds\",\"Washington\",\"United States\",\"\",\"fc5f5a5d-d6d1-47f9-be1b-aa57185ec6be\",\"b4f83947-968d-4e2f-82ad-804be07697ae\",\"java:3.1.1-BETA.2\",1,\"\",\"\",\"Azure\",\"AppRequests\",\"/subscriptions/faa080af-c1d8-40ad-9cce-e1a450ca5b57/resourcegroups/srnagar-azuresdkgroup/providers/microsoft.insights/components/srnagarappinsights\"],[\"d2d0e126-fa1e-4b0a-b647-250cdd471e68\",\"2021-06-02T00:20:13.618Z\",\"a8b2fcfbb6e40b94\",\"\",\"ServiceBus.process\",\"\",true,\"200\",0,\"<250ms\",\"{\\\"x-opt-enqueued-time\\\":\\\"1622593091\\\"}\",null,\"ServiceBus.process\",\"e75b1e2074df3f0bb495bc366cc3ec30\",null,\"044e9f392d849561\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"srikanta\",\"PC\",\"\",\"\",\"0.0.0.0\",\"Edmonds\",\"Washington\",\"United States\",\"\",\"fc5f5a5d-d6d1-47f9-be1b-aa57185ec6be\",\"b4f83947-968d-4e2f-82ad-804be07697ae\",\"java:3.1.1-BETA.2\",1,\"\",\"\",\"Azure\",\"AppRequests\",\"/subscriptions/faa080af-c1d8-40ad-9cce-e1a450ca5b57/resourcegroups/srnagar-azuresdkgroup/providers/microsoft.insights/components/srnagarappinsights\"],[\"d2d0e126-fa1e-4b0a-b647-250cdd471e68\",\"2021-06-02T00:21:13.726Z\",\"a8bbff35cb742d79\",\"\",\"ServiceBus.process\",\"\",true,\"200\",0,\"<250ms\",\"{\\\"x-opt-enqueued-time\\\":\\\"1622593091\\\"}\",null,\"ServiceBus.process\",\"ac03b3d08e2dd176e2b07d7b0fce6dd9\",null,\"f9f7ba49b8a739f5\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"srikanta\",\"PC\",\"\",\"\",\"0.0.0.0\",\"Edmonds\",\"Washington\",\"United States\",\"\",\"fc5f5a5d-d6d1-47f9-be1b-aa57185ec6be\",\"b4f83947-968d-4e2f-82ad-804be07697ae\",\"java:3.1.1-BETA.2\",1,\"\",\"\",\"Azure\",\"AppRequests\",\"/subscriptions/faa080af-c1d8-40ad-9cce-e1a450ca5b57/resourcegroups/srnagar-azuresdkgroup/providers/microsoft.insights/components/srnagarappinsights\"],[\"d2d0e126-fa1e-4b0a-b647-250cdd471e68\",\"2021-06-02T00:24:20.801Z\",\"e2b2bde8f9f57b0d\",\"\",\"EventHubs.process\",\"\",true,\"200\",201,\"<250ms\",\"{\\\"x-opt-enqueued-time\\\":\\\"1622593439\\\"}\",null,\"EventHubs.process\",\"24b7d74ea394257cf9b930f6df8e2e1c\",null,\"dc603380e1ae04cc\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"srikanta\",\"PC\",\"\",\"\",\"0.0.0.0\",\"Edmonds\",\"Washington\",\"United States\",\"\",\"fc5f5a5d-d6d1-47f9-be1b-aa57185ec6be\",\"b4f83947-968d-4e2f-82ad-804be07697ae\",\"java:3.1.1-BETA.2\",1,\"\",\"\",\"Azure\",\"AppRequests\",\"/subscriptions/faa080af-c1d8-40ad-9cce-e1a450ca5b57/resourcegroups/srnagar-azuresdkgroup/providers/microsoft.insights/components/srnagarappinsights\"],[\"d2d0e126-fa1e-4b0a-b647-250cdd471e68\",\"2021-06-02T00:37:46.924Z\",\"b822536af6e68cae\",\"\",\"ServiceBus.process\",\"\",true,\"200\",1,\"<250ms\",\"{\\\"x-opt-enqueued-time\\\":\\\"1622594264\\\"}\",null,\"ServiceBus.process\",\"1a8d8232788a954cc5562c0239919e1c\",null,\"ed65ee44a4ce2dbf\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"srikanta\",\"PC\",\"\",\"\",\"0.0.0.0\",\"Edmonds\",\"Washington\",\"United States\",\"\",\"fc5f5a5d-d6d1-47f9-be1b-aa57185ec6be\",\"b4f83947-968d-4e2f-82ad-804be07697ae\",\"java:3.1.1-BETA.2\",1,\"\",\"\",\"Azure\",\"AppRequests\",\"/subscriptions/faa080af-c1d8-40ad-9cce-e1a450ca5b57/resourcegroups/srnagar-azuresdkgroup/providers/microsoft.insights/components/srnagarappinsights\"],[\"d2d0e126-fa1e-4b0a-b647-250cdd471e68\",\"2021-06-02T00:38:47.664Z\",\"d61caeedfc2bee49\",\"\",\"ServiceBus.process\",\"\",true,\"200\",10,\"<250ms\",\"{\\\"x-opt-enqueued-time\\\":\\\"1622594264\\\"}\",null,\"ServiceBus.process\",\"87e95ce5700e979c21c4a8db3e20f869\",null,\"f6ae1920f6926c63\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"srikanta\",\"PC\",\"\",\"\",\"0.0.0.0\",\"Edmonds\",\"Washington\",\"United States\",\"\",\"fc5f5a5d-d6d1-47f9-be1b-aa57185ec6be\",\"b4f83947-968d-4e2f-82ad-804be07697ae\",\"java:3.1.1-BETA.2\",1,\"\",\"\",\"Azure\",\"AppRequests\",\"/subscriptions/faa080af-c1d8-40ad-9cce-e1a450ca5b57/resourcegroups/srnagar-azuresdkgroup/providers/microsoft.insights/components/srnagarappinsights\"],[\"d2d0e126-fa1e-4b0a-b647-250cdd471e68\",\"2021-06-02T00:41:07.524Z\",\"7057d46110796372\",\"\",\"ServiceBus.process\",\"\",true,\"200\",0,\"<250ms\",\"{\\\"x-opt-enqueued-time\\\":\\\"1622594264\\\"}\",null,\"ServiceBus.process\",\"d2f709aea549e1d29557afe83774ccba\",null,\"16e61ba243071eb2\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"srikanta\",\"PC\",\"\",\"\",\"0.0.0.0\",\"Edmonds\",\"Washington\",\"United States\",\"\",\"fc5f5a5d-d6d1-47f9-be1b-aa57185ec6be\",\"b4f83947-968d-4e2f-82ad-804be07697ae\",\"java:3.1.1-BETA.2\",1,\"\",\"\",\"Azure\",\"AppRequests\",\"/subscriptions/faa080af-c1d8-40ad-9cce-e1a450ca5b57/resourcegroups/srnagar-azuresdkgroup/providers/microsoft.insights/components/srnagarappinsights\"],[\"d2d0e126-fa1e-4b0a-b647-250cdd471e68\",\"2021-06-02T00:41:07.773Z\",\"509862826a37e987\",\"\",\"ServiceBus.process\",\"\",true,\"200\",0,\"<250ms\",\"{\\\"x-opt-enqueued-time\\\":\\\"1622594464\\\"}\",null,\"ServiceBus.process\",\"20f998077e810966de03ead8f8f15b52\",null,\"02da63c818f0a112\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"srikanta\",\"PC\",\"\",\"\",\"0.0.0.0\",\"Edmonds\",\"Washington\",\"United States\",\"\",\"fc5f5a5d-d6d1-47f9-be1b-aa57185ec6be\",\"b4f83947-968d-4e2f-82ad-804be07697ae\",\"java:3.1.1-BETA.2\",1,\"\",\"\",\"Azure\",\"AppRequests\",\"/subscriptions/faa080af-c1d8-40ad-9cce-e1a450ca5b57/resourcegroups/srnagar-azuresdkgroup/providers/microsoft.insights/components/srnagarappinsights\"],[\"d2d0e126-fa1e-4b0a-b647-250cdd471e68\",\"2021-06-02T00:42:07.667Z\",\"2e21640cf8dee0ad\",\"\",\"ServiceBus.process\",\"\",true,\"200\",0,\"<250ms\",\"{\\\"x-opt-enqueued-time\\\":\\\"1622594264\\\"}\",null,\"ServiceBus.process\",\"c1eaf76bf076813c11b07cdf3a885a36\",null,\"41b4330f40552539\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"srikanta\",\"PC\",\"\",\"\",\"0.0.0.0\",\"Edmonds\",\"Washington\",\"United States\",\"\",\"fc5f5a5d-d6d1-47f9-be1b-aa57185ec6be\",\"b4f83947-968d-4e2f-82ad-804be07697ae\",\"java:3.1.1-BETA.2\",1,\"\",\"\",\"Azure\",\"AppRequests\",\"/subscriptions/faa080af-c1d8-40ad-9cce-e1a450ca5b57/resourcegroups/srnagar-azuresdkgroup/providers/microsoft.insights/components/srnagarappinsights\"],[\"d2d0e126-fa1e-4b0a-b647-250cdd471e68\",\"2021-06-02T00:42:07.786Z\",\"577d95aa25c705fb\",\"\",\"ServiceBus.process\",\"\",true,\"200\",0,\"<250ms\",\"{\\\"x-opt-enqueued-time\\\":\\\"1622594464\\\"}\",null,\"ServiceBus.process\",\"3b5ddcbb2447d658f251d6d4861f5065\",null,\"1b93994b565f88ff\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"srikanta\",\"PC\",\"\",\"\",\"0.0.0.0\",\"Edmonds\",\"Washington\",\"United States\",\"\",\"fc5f5a5d-d6d1-47f9-be1b-aa57185ec6be\",\"b4f83947-968d-4e2f-82ad-804be07697ae\",\"java:3.1.1-BETA.2\",1,\"\",\"\",\"Azure\",\"AppRequests\",\"/subscriptions/faa080af-c1d8-40ad-9cce-e1a450ca5b57/resourcegroups/srnagar-azuresdkgroup/providers/microsoft.insights/components/srnagarappinsights\"],[\"d2d0e126-fa1e-4b0a-b647-250cdd471e68\",\"2021-06-02T19:16:56.678Z\",\"c167a30f0c66f8c5\",\"\",\"ServiceBus.process\",\"\",true,\"200\",0,\"<250ms\",\"{\\\"x-opt-enqueued-time\\\":\\\"1622661414\\\"}\",null,\"ServiceBus.process\",\"daf56801f50acf85dbc1f73748a103ca\",null,\"46c008b73159ff7a\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"srikanta\",\"PC\",\"\",\"\",\"0.0.0.0\",\"Edmonds\",\"Washington\",\"United States\",\"\",\"fc5f5a5d-d6d1-47f9-be1b-aa57185ec6be\",\"b4f83947-968d-4e2f-82ad-804be07697ae\",\"java:3.1.1-BETA.2\",1,\"\",\"\",\"Azure\",\"AppRequests\",\"/subscriptions/faa080af-c1d8-40ad-9cce-e1a450ca5b57/resourcegroups/srnagar-azuresdkgroup/providers/microsoft.insights/components/srnagarappinsights\"],[\"d2d0e126-fa1e-4b0a-b647-250cdd471e68\",\"2021-06-02T19:17:56.783Z\",\"db7ccfd35796b843\",\"\",\"ServiceBus.process\",\"\",true,\"200\",0,\"<250ms\",\"{\\\"x-opt-enqueued-time\\\":\\\"1622661414\\\"}\",null,\"ServiceBus.process\",\"7bf75778f3cdff72f1cbb2db49b0cc30\",null,\"e3c482e945343324\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"srikanta\",\"PC\",\"\",\"\",\"0.0.0.0\",\"Edmonds\",\"Washington\",\"United States\",\"\",\"fc5f5a5d-d6d1-47f9-be1b-aa57185ec6be\",\"b4f83947-968d-4e2f-82ad-804be07697ae\",\"java:3.1.1-BETA.2\",1,\"\",\"\",\"Azure\",\"AppRequests\",\"/subscriptions/faa080af-c1d8-40ad-9cce-e1a450ca5b57/resourcegroups/srnagar-azuresdkgroup/providers/microsoft.insights/components/srnagarappinsights\"],[\"d2d0e126-fa1e-4b0a-b647-250cdd471e68\",\"2021-06-02T19:55:09.745Z\",\"25325c69dc60b851\",\"\",\"ServiceBus.process\",\"\",true,\"200\",0,\"<250ms\",\"{\\\"x-opt-enqueued-time\\\":\\\"1622661414\\\"}\",null,\"ServiceBus.process\",\"f55c1b2f15b5cb90df6ae1594a3a47d0\",null,\"5fd866cda2ff6f97\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"srikanta\",\"PC\",\"\",\"\",\"0.0.0.0\",\"Edmonds\",\"Washington\",\"United States\",\"\",\"fc5f5a5d-d6d1-47f9-be1b-aa57185ec6be\",\"b4f83947-968d-4e2f-82ad-804be07697ae\",\"java:3.1.1-BETA.2\",1,\"\",\"\",\"Azure\",\"AppRequests\",\"/subscriptions/faa080af-c1d8-40ad-9cce-e1a450ca5b57/resourcegroups/srnagar-azuresdkgroup/providers/microsoft.insights/components/srnagarappinsights\"],[\"d2d0e126-fa1e-4b0a-b647-250cdd471e68\",\"2021-06-02T19:55:09.856Z\",\"06525b21b5e10606\",\"\",\"ServiceBus.process\",\"\",true,\"200\",0,\"<250ms\",\"{\\\"x-opt-enqueued-time\\\":\\\"1622663707\\\"}\",null,\"ServiceBus.process\",\"aab6d4a1af65138937231c0910301d23\",null,\"b5b7be2d6c558581\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"srikanta\",\"PC\",\"\",\"\",\"0.0.0.0\",\"Edmonds\",\"Washington\",\"United States\",\"\",\"fc5f5a5d-d6d1-47f9-be1b-aa57185ec6be\",\"b4f83947-968d-4e2f-82ad-804be07697ae\",\"java:3.1.1-BETA.2\",1,\"\",\"\",\"Azure\",\"AppRequests\",\"/subscriptions/faa080af-c1d8-40ad-9cce-e1a450ca5b57/resourcegroups/srnagar-azuresdkgroup/providers/microsoft.insights/components/srnagarappinsights\"],[\"d2d0e126-fa1e-4b0a-b647-250cdd471e68\",\"2021-06-02T19:56:10.867Z\",\"854f3af64c9ea966\",\"\",\"ServiceBus.process\",\"\",true,\"200\",4,\"<250ms\",\"{\\\"x-opt-enqueued-time\\\":\\\"1622661414\\\"}\",null,\"ServiceBus.process\",\"7c3a5c68a23cc2f9366d4e45178a4827\",null,\"711d76e16c8f8985\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"srikanta\",\"PC\",\"\",\"\",\"0.0.0.0\",\"Edmonds\",\"Washington\",\"United States\",\"\",\"fc5f5a5d-d6d1-47f9-be1b-aa57185ec6be\",\"b4f83947-968d-4e2f-82ad-804be07697ae\",\"java:3.1.1-BETA.2\",1,\"\",\"\",\"Azure\",\"AppRequests\",\"/subscriptions/faa080af-c1d8-40ad-9cce-e1a450ca5b57/resourcegroups/srnagar-azuresdkgroup/providers/microsoft.insights/components/srnagarappinsights\"],[\"d2d0e126-fa1e-4b0a-b647-250cdd471e68\",\"2021-06-02T19:56:11.087Z\",\"83a1a249ad1f1654\",\"\",\"ServiceBus.process\",\"\",true,\"200\",1,\"<250ms\",\"{\\\"x-opt-enqueued-time\\\":\\\"1622663707\\\"}\",null,\"ServiceBus.process\",\"b7204711693dcd589c48291ab9bce504\",null,\"79b3fc43b0fe4bd6\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"srikanta\",\"PC\",\"\",\"\",\"0.0.0.0\",\"Edmonds\",\"Washington\",\"United States\",\"\",\"fc5f5a5d-d6d1-47f9-be1b-aa57185ec6be\",\"b4f83947-968d-4e2f-82ad-804be07697ae\",\"java:3.1.1-BETA.2\",1,\"\",\"\",\"Azure\",\"AppRequests\",\"/subscriptions/faa080af-c1d8-40ad-9cce-e1a450ca5b57/resourcegroups/srnagar-azuresdkgroup/providers/microsoft.insights/components/srnagarappinsights\"]]}],\"statistics\":{\"query\":{\"executionTime\":0.0469116,\"resourceUsage\":{\"cache\":{\"memory\":{\"hits\":476,\"misses\":0,\"total\":476},\"disk\":{\"hits\":0,\"misses\":0,\"total\":0},\"shards\":{\"hot\":{\"hitbytes\":0,\"missbytes\":0,\"retrievebytes\":0},\"cold\":{\"hitbytes\":0,\"missbytes\":0,\"retrievebytes\":0},\"bypassbytes\":0}},\"cpu\":{\"user\":\"00:00:00.0312500\",\"kernel\":\"00:00:00.0312500\",\"totalCpu\":\"00:00:00.0625000\"},\"memory\":{\"peakPerNode\":36268352}},\"inputDatasetStatistics\":{\"extents\":{\"total\":160,\"scanned\":7,\"scannedMinDatetime\":\"2021-04-23T23:54:25.4931197Z\",\"scannedMaxDatetime\":\"2021-06-03T08:34:29.9559097Z\"},\"rows\":{\"total\":139071230,\"scanned\":6968413},\"rowstores\":{\"scannedRows\":6456,\"scannedValuesSize\":2447060},\"shards\":{\"queriesGeneric\":0,\"queriesSpecialized\":0}},\"datasetStatistics\":[{\"tableRowCount\":22,\"tableSize\":11356}]}}}", + "Age" : "62", + "Content-Type" : "application/json; charset=utf-8" + }, + "Exception" : null + } ], + "variables" : [ ] +} \ No newline at end of file diff --git a/sdk/monitor/azure-monitor-query/src/test/resources/session-records/MetricsClientTest.testMetricsQuery.json b/sdk/monitor/azure-monitor-query/src/test/resources/session-records/MetricsClientTest.testMetricsQuery.json deleted file mode 100644 index ad0d2fa2096d..000000000000 --- a/sdk/monitor/azure-monitor-query/src/test/resources/session-records/MetricsClientTest.testMetricsQuery.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "GET", - "Uri" : "https://REDACTED.azure.com//subscriptions/faa080af-c1d8-40ad-9cce-e1a450ca5b57/resourceGroups/srnagar-azuresdkgroup/providers/Microsoft.CognitiveServices/accounts/srnagara-textanalytics/providers/microsoft.insights/metrics?timespan=PT720H&interval=PT1H&metric=SuccessfulCalls&aggregation=1%2C2%2C3%2C4%2C5&top=100&resultType=Data&api-version=2017-05-01-preview&metricnamespace=Microsoft.CognitiveServices/accounts", - "Headers" : { - "User-Agent" : "azsdk-java-UnknownName/UnknownVersion (14.0.2; Windows 10; 10.0)" - }, - "Response" : { - "Server" : "Microsoft-IIS/10.0", - "X-Content-Type-Options" : "nosniff", - "retry-after" : "0", - "x-ms-ratelimit-remaining-subscription-reads" : "11999", - "StatusCode" : "200", - "x-ms-correlation-request-id" : "c2224e2b-e4a8-4639-9429-5c9ece62906b", - "Date" : "Thu, 06 May 2021 09:01:53 GMT", - "Access-Control-Expose-Headers" : "Request-Context", - "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", - "Cache-Control" : "no-cache", - "x-ms-routing-request-id" : "WESTUS2:20210506T090153Z:c2224e2b-e4a8-4639-9429-5c9ece62906b", - "X-AspNet-Version" : "4.0.30319", - "Vary" : "Accept-Encoding", - "Content-Length" : "74798", - "x-ms-request-id" : "{c2224e2b-e4a8-4639-9429-5c9ece62906b}", - "Body" : "{\"cost\":215995,\"timespan\":\"2021-04-06T09:00:53Z/2021-05-06T09:00:53Z\",\"interval\":\"PT1H\",\"value\":[{\"id\":\"/subscriptions/faa080af-c1d8-40ad-9cce-e1a450ca5b57/resourceGroups/srnagar-azuresdkgroup/providers/Microsoft.CognitiveServices/accounts/srnagara-textanalytics/providers/Microsoft.Insights/metrics/SuccessfulCalls\",\"type\":\"Microsoft.Insights/metrics\",\"name\":{\"value\":\"SuccessfulCalls\",\"localizedValue\":\"Successful Calls\"},\"displayDescription\":\"Number of successful calls.\",\"unit\":\"Count\",\"timeseries\":[{\"metadatavalues\":[],\"data\":[{\"timeStamp\":\"2021-04-06T09:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-06T10:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-06T11:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-06T12:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-06T13:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-06T14:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-06T15:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-06T16:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-06T17:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-06T18:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-06T19:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-06T20:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-06T21:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-06T22:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-06T23:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-07T00:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-07T01:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-07T02:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-07T03:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-07T04:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-07T05:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-07T06:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-07T07:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-07T08:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-07T09:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-07T10:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-07T11:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-07T12:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-07T13:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-07T14:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-07T15:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-07T16:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-07T17:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-07T18:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-07T19:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-07T20:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-07T21:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-07T22:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-07T23:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-08T00:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-08T01:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-08T02:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-08T03:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-08T04:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-08T05:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-08T06:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-08T07:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-08T08:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-08T09:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-08T10:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-08T11:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-08T12:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-08T13:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-08T14:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-08T15:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-08T16:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-08T17:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-08T18:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-08T19:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-08T20:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-08T21:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-08T22:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-08T23:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-09T00:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-09T01:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-09T02:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-09T03:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-09T04:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-09T05:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-09T06:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-09T07:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-09T08:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-09T09:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-09T10:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-09T11:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-09T12:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-09T13:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-09T14:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-09T15:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-09T16:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-09T17:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-09T18:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-09T19:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-09T20:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-09T21:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-09T22:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-09T23:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-10T00:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-10T01:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-10T02:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-10T03:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-10T04:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-10T05:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-10T06:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-10T07:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-10T08:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-10T09:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-10T10:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-10T11:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-10T12:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-10T13:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-10T14:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-10T15:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-10T16:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-10T17:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-10T18:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-10T19:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-10T20:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-10T21:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-10T22:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-10T23:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-11T00:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-11T01:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-11T02:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-11T03:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-11T04:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-11T05:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-11T06:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-11T07:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-11T08:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-11T09:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-11T10:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-11T11:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-11T12:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-11T13:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-11T14:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-11T15:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-11T16:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-11T17:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-11T18:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-11T19:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-11T20:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-11T21:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-11T22:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-11T23:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-12T00:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-12T01:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-12T02:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-12T03:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-12T04:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-12T05:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-12T06:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-12T07:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-12T08:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-12T09:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-12T10:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-12T11:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-12T12:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-12T13:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-12T14:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-12T15:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-12T16:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-12T17:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-12T18:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-12T19:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-12T20:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-12T21:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-12T22:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-12T23:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-13T00:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-13T01:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-13T02:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-13T03:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-13T04:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-13T05:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-13T06:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-13T07:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-13T08:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-13T09:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-13T10:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-13T11:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-13T12:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-13T13:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-13T14:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-13T15:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-13T16:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-13T17:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-13T18:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-13T19:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-13T20:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-13T21:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-13T22:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-13T23:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-14T00:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-14T01:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-14T02:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-14T03:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-14T04:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-14T05:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-14T06:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-14T07:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-14T08:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-14T09:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-14T10:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-14T11:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-14T12:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-14T13:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-14T14:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-14T15:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-14T16:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-14T17:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-14T18:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-14T19:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-14T20:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-14T21:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-14T22:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-14T23:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-15T00:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-15T01:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-15T02:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-15T03:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-15T04:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-15T05:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-15T06:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-15T07:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-15T08:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-15T09:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-15T10:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-15T11:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-15T12:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-15T13:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-15T14:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-15T15:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-15T16:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-15T17:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-15T18:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-15T19:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-15T20:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-15T21:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-15T22:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-15T23:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-16T00:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-16T01:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-16T02:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-16T03:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-16T04:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-16T05:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-16T06:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-16T07:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-16T08:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-16T09:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-16T10:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-16T11:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-16T12:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-16T13:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-16T14:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-16T15:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-16T16:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-16T17:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-16T18:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-16T19:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-16T20:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-16T21:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-16T22:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-16T23:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-17T00:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-17T01:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-17T02:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-17T03:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-17T04:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-17T05:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-17T06:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-17T07:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-17T08:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-17T09:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-17T10:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-17T11:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-17T12:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-17T13:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-17T14:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-17T15:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-17T16:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-17T17:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-17T18:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-17T19:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-17T20:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-17T21:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-17T22:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-17T23:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-18T00:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-18T01:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-18T02:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-18T03:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-18T04:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-18T05:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-18T06:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-18T07:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-18T08:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-18T09:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-18T10:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-18T11:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-18T12:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-18T13:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-18T14:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-18T15:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-18T16:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-18T17:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-18T18:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-18T19:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-18T20:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-18T21:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-18T22:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-18T23:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-19T00:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-19T01:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-19T02:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-19T03:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-19T04:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-19T05:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-19T06:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-19T07:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-19T08:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-19T09:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-19T10:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-19T11:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-19T12:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-19T13:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-19T14:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-19T15:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-19T16:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-19T17:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-19T18:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-19T19:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-19T20:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-19T21:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-19T22:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-19T23:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-20T00:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-20T01:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-20T02:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-20T03:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-20T04:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-20T05:00:00Z\",\"total\":4.0,\"count\":4.0,\"average\":1.0,\"minimum\":1.0,\"maximum\":1.0},{\"timeStamp\":\"2021-04-20T06:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-20T07:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-20T08:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-20T09:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-20T10:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-20T11:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-20T12:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-20T13:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-20T14:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-20T15:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-20T16:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-20T17:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-20T18:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-20T19:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-20T20:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-20T21:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-20T22:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-20T23:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-21T00:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-21T01:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-21T02:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-21T03:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-21T04:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-21T05:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-21T06:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-21T07:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-21T08:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-21T09:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-21T10:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-21T11:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-21T12:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-21T13:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-21T14:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-21T15:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-21T16:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-21T17:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-21T18:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-21T19:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-21T20:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-21T21:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-21T22:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-21T23:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-22T00:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-22T01:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-22T02:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-22T03:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-22T04:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-22T05:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-22T06:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-22T07:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-22T08:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-22T09:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-22T10:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-22T11:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-22T12:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-22T13:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-22T14:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-22T15:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-22T16:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-22T17:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-22T18:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-22T19:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-22T20:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-22T21:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-22T22:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-22T23:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-23T00:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-23T01:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-23T02:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-23T03:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-23T04:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-23T05:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-23T06:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-23T07:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-23T08:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-23T09:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-23T10:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-23T11:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-23T12:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-23T13:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-23T14:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-23T15:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-23T16:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-23T17:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-23T18:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-23T19:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-23T20:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-23T21:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-23T22:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-23T23:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-24T00:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-24T01:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-24T02:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-24T03:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-24T04:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-24T05:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-24T06:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-24T07:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-24T08:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-24T09:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-24T10:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-24T11:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-24T12:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-24T13:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-24T14:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-24T15:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-24T16:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-24T17:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-24T18:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-24T19:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-24T20:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-24T21:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-24T22:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-24T23:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-25T00:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-25T01:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-25T02:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-25T03:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-25T04:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-25T05:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-25T06:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-25T07:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-25T08:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-25T09:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-25T10:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-25T11:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-25T12:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-25T13:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-25T14:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-25T15:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-25T16:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-25T17:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-25T18:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-25T19:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-25T20:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-25T21:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-25T22:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-25T23:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-26T00:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-26T01:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-26T02:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-26T03:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-26T04:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-26T05:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-26T06:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-26T07:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-26T08:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-26T09:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-26T10:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-26T11:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-26T12:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-26T13:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-26T14:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-26T15:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-26T16:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-26T17:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-26T18:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-26T19:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-26T20:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-26T21:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-26T22:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-26T23:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-27T00:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-27T01:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-27T02:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-27T03:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-27T04:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-27T05:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-27T06:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-27T07:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-27T08:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-27T09:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-27T10:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-27T11:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-27T12:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-27T13:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-27T14:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-27T15:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-27T16:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-27T17:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-27T18:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-27T19:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-27T20:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-27T21:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-27T22:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-27T23:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-28T00:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-28T01:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-28T02:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-28T03:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-28T04:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-28T05:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-28T06:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-28T07:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-28T08:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-28T09:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-28T10:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-28T11:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-28T12:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-28T13:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-28T14:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-28T15:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-28T16:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-28T17:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-28T18:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-28T19:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-28T20:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-28T21:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-28T22:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-28T23:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-29T00:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-29T01:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-29T02:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-29T03:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-29T04:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-29T05:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-29T06:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-29T07:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-29T08:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-29T09:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-29T10:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-29T11:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-29T12:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-29T13:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-29T14:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-29T15:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-29T16:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-29T17:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-29T18:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-29T19:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-29T20:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-29T21:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-29T22:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-29T23:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-30T00:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-30T01:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-30T02:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-30T03:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-30T04:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-30T05:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-30T06:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-30T07:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-30T08:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-30T09:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-30T10:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-30T11:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-30T12:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-30T13:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-30T14:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-30T15:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-30T16:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-30T17:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-30T18:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-30T19:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-30T20:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-30T21:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-30T22:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-04-30T23:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-05-01T00:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-05-01T01:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-05-01T02:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-05-01T03:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-05-01T04:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-05-01T05:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-05-01T06:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-05-01T07:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-05-01T08:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-05-01T09:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-05-01T10:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-05-01T11:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-05-01T12:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-05-01T13:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-05-01T14:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-05-01T15:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-05-01T16:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-05-01T17:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-05-01T18:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-05-01T19:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-05-01T20:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-05-01T21:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-05-01T22:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-05-01T23:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-05-02T00:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-05-02T01:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-05-02T02:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-05-02T03:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-05-02T04:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-05-02T05:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-05-02T06:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-05-02T07:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-05-02T08:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-05-02T09:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-05-02T10:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-05-02T11:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-05-02T12:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-05-02T13:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-05-02T14:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-05-02T15:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-05-02T16:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-05-02T17:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-05-02T18:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-05-02T19:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-05-02T20:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-05-02T21:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-05-02T22:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-05-02T23:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-05-03T00:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-05-03T01:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-05-03T02:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-05-03T03:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-05-03T04:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-05-03T05:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-05-03T06:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-05-03T07:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-05-03T08:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-05-03T09:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-05-03T10:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-05-03T11:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-05-03T12:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-05-03T13:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-05-03T14:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-05-03T15:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-05-03T16:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-05-03T17:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-05-03T18:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-05-03T19:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-05-03T20:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-05-03T21:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-05-03T22:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-05-03T23:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-05-04T00:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-05-04T01:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-05-04T02:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-05-04T03:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-05-04T04:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-05-04T05:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-05-04T06:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-05-04T07:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-05-04T08:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-05-04T09:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-05-04T10:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-05-04T11:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-05-04T12:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-05-04T13:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-05-04T14:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-05-04T15:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-05-04T16:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-05-04T17:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-05-04T18:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-05-04T19:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-05-04T20:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-05-04T21:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-05-04T22:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-05-04T23:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-05-05T00:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-05-05T01:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-05-05T02:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-05-05T03:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-05-05T04:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-05-05T05:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-05-05T06:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-05-05T07:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-05-05T08:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-05-05T09:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-05-05T10:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-05-05T11:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-05-05T12:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-05-05T13:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-05-05T14:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-05-05T15:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-05-05T16:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-05-05T17:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-05-05T18:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-05-05T19:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-05-05T20:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-05-05T21:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-05-05T22:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-05-05T23:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-05-06T00:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-05-06T01:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-05-06T02:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-05-06T03:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-05-06T04:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-05-06T05:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-05-06T06:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-05-06T07:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-05-06T08:00:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0}]}],\"errorCode\":\"Success\"}],\"namespace\":\"Microsoft.CognitiveServices/accounts\",\"resourceregion\":\"westus2\"}", - "Content-Type" : "application/json", - "Request-Context" : "appId=cid-v1:b021da79-5252-4375-9df5-2e17c1dcd822", - "X-Powered-By" : "ASP.NET" - }, - "Exception" : null - } ], - "variables" : [ ] -} diff --git a/sdk/monitor/azure-monitor-query/src/test/resources/session-records/MetricsQueryClientTest.testMetricsDefinition.json b/sdk/monitor/azure-monitor-query/src/test/resources/session-records/MetricsQueryClientTest.testMetricsDefinition.json new file mode 100644 index 000000000000..bbea73232481 --- /dev/null +++ b/sdk/monitor/azure-monitor-query/src/test/resources/session-records/MetricsQueryClientTest.testMetricsDefinition.json @@ -0,0 +1,32 @@ +{ + "networkCallRecords" : [ { + "Method" : "GET", + "Uri" : "https://REDACTED.azure.com/subscriptions/faa080af-c1d8-40ad-9cce-e1a450ca5b57/resourceGroups/srnagar-azuresdkgroup/providers/Microsoft.CognitiveServices/accounts/srnagara-textanalytics/providers/microsoft.insights/metricDefinitions?api-version=2017-05-01-preview&metricnamespace=Microsoft.CognitiveServices/accounts", + "Headers" : { + "User-Agent" : "azsdk-java-UnknownName/UnknownVersion (11.0.8; Windows 10; 10.0)" + }, + "Response" : { + "content-length" : "9840", + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11998", + "StatusCode" : "200", + "x-ms-correlation-request-id" : "eea9b794-3219-44f6-b3e7-29fd18bfc632", + "Date" : "Mon, 07 Jun 2021 04:58:06 GMT", + "Access-Control-Expose-Headers" : "Request-Context", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "x-ms-routing-request-id" : "WESTUS2:20210607T045807Z:eea9b794-3219-44f6-b3e7-29fd18bfc632", + "X-AspNet-Version" : "4.0.30319", + "Vary" : "Accept-Encoding", + "x-ms-request-id" : "{eea9b794-3219-44f6-b3e7-29fd18bfc632}", + "Body" : "{\"value\":[{\"id\":\"/subscriptions/faa080af-c1d8-40ad-9cce-e1a450ca5b57/resourceGroups/srnagar-azuresdkgroup/providers/Microsoft.CognitiveServices/accounts/srnagara-textanalytics/providers/microsoft.insights/metricdefinitions/TotalCalls\",\"resourceId\":\"/subscriptions/faa080af-c1d8-40ad-9cce-e1a450ca5b57/resourceGroups/srnagar-azuresdkgroup/providers/Microsoft.CognitiveServices/accounts/srnagara-textanalytics\",\"category\":\"HTTP Requests\",\"name\":{\"value\":\"TotalCalls\",\"localizedValue\":\"Total Calls\"},\"displayDescription\":\"Total number of calls.\",\"isDimensionRequired\":false,\"unit\":\"Count\",\"primaryAggregationType\":\"Total\",\"metricAvailabilities\":[{\"timeGrain\":\"PT1M\",\"retention\":\"P93D\"},{\"timeGrain\":\"PT1H\",\"retention\":\"P93D\"}],\"dimensions\":[{\"value\":\"ApiName\",\"localizedValue\":\"ApiName\"},{\"value\":\"OperationName\",\"localizedValue\":\"OperationName\"},{\"value\":\"Region\",\"localizedValue\":\"Region\"}]},{\"id\":\"/subscriptions/faa080af-c1d8-40ad-9cce-e1a450ca5b57/resourceGroups/srnagar-azuresdkgroup/providers/Microsoft.CognitiveServices/accounts/srnagara-textanalytics/providers/microsoft.insights/metricdefinitions/SuccessfulCalls\",\"resourceId\":\"/subscriptions/faa080af-c1d8-40ad-9cce-e1a450ca5b57/resourceGroups/srnagar-azuresdkgroup/providers/Microsoft.CognitiveServices/accounts/srnagara-textanalytics\",\"category\":\"HTTP Requests\",\"name\":{\"value\":\"SuccessfulCalls\",\"localizedValue\":\"Successful Calls\"},\"displayDescription\":\"Number of successful calls.\",\"isDimensionRequired\":false,\"unit\":\"Count\",\"primaryAggregationType\":\"Total\",\"metricAvailabilities\":[{\"timeGrain\":\"PT1M\",\"retention\":\"P93D\"},{\"timeGrain\":\"PT1H\",\"retention\":\"P93D\"}],\"dimensions\":[{\"value\":\"ApiName\",\"localizedValue\":\"ApiName\"},{\"value\":\"OperationName\",\"localizedValue\":\"OperationName\"},{\"value\":\"Region\",\"localizedValue\":\"Region\"}]},{\"id\":\"/subscriptions/faa080af-c1d8-40ad-9cce-e1a450ca5b57/resourceGroups/srnagar-azuresdkgroup/providers/Microsoft.CognitiveServices/accounts/srnagara-textanalytics/providers/microsoft.insights/metricdefinitions/TotalErrors\",\"resourceId\":\"/subscriptions/faa080af-c1d8-40ad-9cce-e1a450ca5b57/resourceGroups/srnagar-azuresdkgroup/providers/Microsoft.CognitiveServices/accounts/srnagara-textanalytics\",\"category\":\"HTTP Requests\",\"name\":{\"value\":\"TotalErrors\",\"localizedValue\":\"Total Errors\"},\"displayDescription\":\"Total number of calls with error response (HTTP response code 4xx or 5xx).\",\"isDimensionRequired\":false,\"unit\":\"Count\",\"primaryAggregationType\":\"Total\",\"metricAvailabilities\":[{\"timeGrain\":\"PT1M\",\"retention\":\"P93D\"},{\"timeGrain\":\"PT1H\",\"retention\":\"P93D\"}],\"dimensions\":[{\"value\":\"ApiName\",\"localizedValue\":\"ApiName\"},{\"value\":\"OperationName\",\"localizedValue\":\"OperationName\"},{\"value\":\"Region\",\"localizedValue\":\"Region\"}]},{\"id\":\"/subscriptions/faa080af-c1d8-40ad-9cce-e1a450ca5b57/resourceGroups/srnagar-azuresdkgroup/providers/Microsoft.CognitiveServices/accounts/srnagara-textanalytics/providers/microsoft.insights/metricdefinitions/BlockedCalls\",\"resourceId\":\"/subscriptions/faa080af-c1d8-40ad-9cce-e1a450ca5b57/resourceGroups/srnagar-azuresdkgroup/providers/Microsoft.CognitiveServices/accounts/srnagara-textanalytics\",\"category\":\"HTTP Requests\",\"name\":{\"value\":\"BlockedCalls\",\"localizedValue\":\"Blocked Calls\"},\"displayDescription\":\"Number of calls that exceeded rate or quota limit.\",\"isDimensionRequired\":false,\"unit\":\"Count\",\"primaryAggregationType\":\"Total\",\"metricAvailabilities\":[{\"timeGrain\":\"PT1M\",\"retention\":\"P93D\"},{\"timeGrain\":\"PT1H\",\"retention\":\"P93D\"}],\"dimensions\":[{\"value\":\"ApiName\",\"localizedValue\":\"ApiName\"},{\"value\":\"OperationName\",\"localizedValue\":\"OperationName\"},{\"value\":\"Region\",\"localizedValue\":\"Region\"}]},{\"id\":\"/subscriptions/faa080af-c1d8-40ad-9cce-e1a450ca5b57/resourceGroups/srnagar-azuresdkgroup/providers/Microsoft.CognitiveServices/accounts/srnagara-textanalytics/providers/microsoft.insights/metricdefinitions/ServerErrors\",\"resourceId\":\"/subscriptions/faa080af-c1d8-40ad-9cce-e1a450ca5b57/resourceGroups/srnagar-azuresdkgroup/providers/Microsoft.CognitiveServices/accounts/srnagara-textanalytics\",\"category\":\"HTTP Requests\",\"name\":{\"value\":\"ServerErrors\",\"localizedValue\":\"Server Errors\"},\"displayDescription\":\"Number of calls with service internal error (HTTP response code 5xx).\",\"isDimensionRequired\":false,\"unit\":\"Count\",\"primaryAggregationType\":\"Total\",\"metricAvailabilities\":[{\"timeGrain\":\"PT1M\",\"retention\":\"P93D\"},{\"timeGrain\":\"PT1H\",\"retention\":\"P93D\"}],\"dimensions\":[{\"value\":\"ApiName\",\"localizedValue\":\"ApiName\"},{\"value\":\"OperationName\",\"localizedValue\":\"OperationName\"},{\"value\":\"Region\",\"localizedValue\":\"Region\"}]},{\"id\":\"/subscriptions/faa080af-c1d8-40ad-9cce-e1a450ca5b57/resourceGroups/srnagar-azuresdkgroup/providers/Microsoft.CognitiveServices/accounts/srnagara-textanalytics/providers/microsoft.insights/metricdefinitions/ClientErrors\",\"resourceId\":\"/subscriptions/faa080af-c1d8-40ad-9cce-e1a450ca5b57/resourceGroups/srnagar-azuresdkgroup/providers/Microsoft.CognitiveServices/accounts/srnagara-textanalytics\",\"category\":\"HTTP Requests\",\"name\":{\"value\":\"ClientErrors\",\"localizedValue\":\"Client Errors\"},\"displayDescription\":\"Number of calls with client side error (HTTP response code 4xx).\",\"isDimensionRequired\":false,\"unit\":\"Count\",\"primaryAggregationType\":\"Total\",\"metricAvailabilities\":[{\"timeGrain\":\"PT1M\",\"retention\":\"P93D\"},{\"timeGrain\":\"PT1H\",\"retention\":\"P93D\"}],\"dimensions\":[{\"value\":\"ApiName\",\"localizedValue\":\"ApiName\"},{\"value\":\"OperationName\",\"localizedValue\":\"OperationName\"},{\"value\":\"Region\",\"localizedValue\":\"Region\"}]},{\"id\":\"/subscriptions/faa080af-c1d8-40ad-9cce-e1a450ca5b57/resourceGroups/srnagar-azuresdkgroup/providers/Microsoft.CognitiveServices/accounts/srnagara-textanalytics/providers/microsoft.insights/metricdefinitions/DataIn\",\"resourceId\":\"/subscriptions/faa080af-c1d8-40ad-9cce-e1a450ca5b57/resourceGroups/srnagar-azuresdkgroup/providers/Microsoft.CognitiveServices/accounts/srnagara-textanalytics\",\"category\":\"HTTP Requests\",\"name\":{\"value\":\"DataIn\",\"localizedValue\":\"Data In\"},\"displayDescription\":\"Size of incoming data in bytes.\",\"isDimensionRequired\":false,\"unit\":\"Bytes\",\"primaryAggregationType\":\"Total\",\"metricAvailabilities\":[{\"timeGrain\":\"PT1M\",\"retention\":\"P93D\"},{\"timeGrain\":\"PT1H\",\"retention\":\"P93D\"}],\"dimensions\":[{\"value\":\"ApiName\",\"localizedValue\":\"ApiName\"},{\"value\":\"OperationName\",\"localizedValue\":\"OperationName\"},{\"value\":\"Region\",\"localizedValue\":\"Region\"}]},{\"id\":\"/subscriptions/faa080af-c1d8-40ad-9cce-e1a450ca5b57/resourceGroups/srnagar-azuresdkgroup/providers/Microsoft.CognitiveServices/accounts/srnagara-textanalytics/providers/microsoft.insights/metricdefinitions/DataOut\",\"resourceId\":\"/subscriptions/faa080af-c1d8-40ad-9cce-e1a450ca5b57/resourceGroups/srnagar-azuresdkgroup/providers/Microsoft.CognitiveServices/accounts/srnagara-textanalytics\",\"category\":\"HTTP Requests\",\"name\":{\"value\":\"DataOut\",\"localizedValue\":\"Data Out\"},\"displayDescription\":\"Size of outgoing data in bytes.\",\"isDimensionRequired\":false,\"unit\":\"Bytes\",\"primaryAggregationType\":\"Total\",\"metricAvailabilities\":[{\"timeGrain\":\"PT1M\",\"retention\":\"P93D\"},{\"timeGrain\":\"PT1H\",\"retention\":\"P93D\"}],\"dimensions\":[{\"value\":\"ApiName\",\"localizedValue\":\"ApiName\"},{\"value\":\"OperationName\",\"localizedValue\":\"OperationName\"},{\"value\":\"Region\",\"localizedValue\":\"Region\"}]},{\"id\":\"/subscriptions/faa080af-c1d8-40ad-9cce-e1a450ca5b57/resourceGroups/srnagar-azuresdkgroup/providers/Microsoft.CognitiveServices/accounts/srnagara-textanalytics/providers/microsoft.insights/metricdefinitions/Latency\",\"resourceId\":\"/subscriptions/faa080af-c1d8-40ad-9cce-e1a450ca5b57/resourceGroups/srnagar-azuresdkgroup/providers/Microsoft.CognitiveServices/accounts/srnagara-textanalytics\",\"category\":\"HTTP Requests\",\"name\":{\"value\":\"Latency\",\"localizedValue\":\"Latency\"},\"displayDescription\":\"Latency in milliseconds.\",\"isDimensionRequired\":false,\"unit\":\"MilliSeconds\",\"primaryAggregationType\":\"Average\",\"metricAvailabilities\":[{\"timeGrain\":\"PT1M\",\"retention\":\"P93D\"},{\"timeGrain\":\"PT1H\",\"retention\":\"P93D\"}],\"dimensions\":[{\"value\":\"ApiName\",\"localizedValue\":\"ApiName\"},{\"value\":\"OperationName\",\"localizedValue\":\"OperationName\"},{\"value\":\"Region\",\"localizedValue\":\"Region\"}]},{\"id\":\"/subscriptions/faa080af-c1d8-40ad-9cce-e1a450ca5b57/resourceGroups/srnagar-azuresdkgroup/providers/Microsoft.CognitiveServices/accounts/srnagara-textanalytics/providers/microsoft.insights/metricdefinitions/TotalTransactions\",\"resourceId\":\"/subscriptions/faa080af-c1d8-40ad-9cce-e1a450ca5b57/resourceGroups/srnagar-azuresdkgroup/providers/Microsoft.CognitiveServices/accounts/srnagara-textanalytics\",\"category\":\"Usage\",\"name\":{\"value\":\"TotalTransactions\",\"localizedValue\":\"Total Transactions\"},\"displayDescription\":\"Total number of transactions.\",\"isDimensionRequired\":false,\"unit\":\"Count\",\"primaryAggregationType\":\"Total\",\"metricAvailabilities\":[{\"timeGrain\":\"PT1M\",\"retention\":\"P93D\"},{\"timeGrain\":\"PT1H\",\"retention\":\"P93D\"}]},{\"id\":\"/subscriptions/faa080af-c1d8-40ad-9cce-e1a450ca5b57/resourceGroups/srnagar-azuresdkgroup/providers/Microsoft.CognitiveServices/accounts/srnagara-textanalytics/providers/microsoft.insights/metricdefinitions/ProcessedTextRecords\",\"resourceId\":\"/subscriptions/faa080af-c1d8-40ad-9cce-e1a450ca5b57/resourceGroups/srnagar-azuresdkgroup/providers/Microsoft.CognitiveServices/accounts/srnagara-textanalytics\",\"category\":\"Usage\",\"name\":{\"value\":\"ProcessedTextRecords\",\"localizedValue\":\"Processed Text Records\"},\"displayDescription\":\"Count of Text Records.\",\"isDimensionRequired\":false,\"unit\":\"Count\",\"primaryAggregationType\":\"Total\",\"metricAvailabilities\":[{\"timeGrain\":\"PT1M\",\"retention\":\"P93D\"},{\"timeGrain\":\"PT1H\",\"retention\":\"P93D\"}],\"dimensions\":[{\"value\":\"ApiName\",\"localizedValue\":\"ApiName\"},{\"value\":\"FeatureName\",\"localizedValue\":\"FeatureName\"},{\"value\":\"UsageChannel\",\"localizedValue\":\"UsageChannel\"},{\"value\":\"Region\",\"localizedValue\":\"Region\"}]}]}", + "Content-Type" : "application/json", + "Request-Context" : "appId=cid-v1:b021da79-5252-4375-9df5-2e17c1dcd822", + "X-Powered-By" : "ASP.NET" + }, + "Exception" : null + } ], + "variables" : [ ] +} \ No newline at end of file diff --git a/sdk/monitor/azure-monitor-query/src/test/resources/session-records/MetricsQueryClientTest.testMetricsNamespaces.json b/sdk/monitor/azure-monitor-query/src/test/resources/session-records/MetricsQueryClientTest.testMetricsNamespaces.json new file mode 100644 index 000000000000..90a7d703ee97 --- /dev/null +++ b/sdk/monitor/azure-monitor-query/src/test/resources/session-records/MetricsQueryClientTest.testMetricsNamespaces.json @@ -0,0 +1,31 @@ +{ + "networkCallRecords" : [ { + "Method" : "GET", + "Uri" : "https://REDACTED.azure.com//subscriptions/faa080af-c1d8-40ad-9cce-e1a450ca5b57/resourceGroups/srnagar-azuresdkgroup/providers/Microsoft.CognitiveServices/accounts/srnagara-textanalytics/providers/microsoft.insights/metricNamespaces?api-version=2017-12-01-preview&startTime=2021-06-01T00%3A00Z", + "Headers" : { + "User-Agent" : "azsdk-java-UnknownName/UnknownVersion (14.0.2; Windows 10; 10.0)" + }, + "Response" : { + "content-length" : "829", + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11999", + "StatusCode" : "200", + "x-ms-correlation-request-id" : "41c50e57-6857-4ba3-b6e6-c1a5ad6c1143", + "Date" : "Mon, 07 Jun 2021 17:38:44 GMT", + "Access-Control-Expose-Headers" : "Request-Context", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "x-ms-routing-request-id" : "WESTUS2:20210607T173845Z:41c50e57-6857-4ba3-b6e6-c1a5ad6c1143", + "Vary" : "Accept-Encoding", + "x-ms-request-id" : "{41c50e57-6857-4ba3-b6e6-c1a5ad6c1143}", + "Body" : "{\"value\":[{\"id\":\"/subscriptions/faa080af-c1d8-40ad-9cce-e1a450ca5b57/resourceGroups/srnagar-azuresdkgroup/providers/Microsoft.CognitiveServices/accounts/srnagara-textanalytics/providers/microsoft.insights/metricNamespaces/newNamespace\",\"name\":\"newNamespace\",\"type\":\"Microsoft.Insights/metricNamespaces\",\"classification\":\"Custom\",\"properties\":{\"metricNamespaceName\":\"newNamespace\"}},{\"id\":\"/subscriptions/faa080af-c1d8-40ad-9cce-e1a450ca5b57/resourceGroups/srnagar-azuresdkgroup/providers/Microsoft.CognitiveServices/accounts/srnagara-textanalytics/providers/microsoft.insights/metricNamespaces/Microsoft.CognitiveServices-accounts\",\"name\":\"Microsoft.CognitiveServices-accounts\",\"type\":\"Microsoft.Insights/metricNamespaces\",\"classification\":\"Platform\",\"properties\":{\"metricNamespaceName\":\"Microsoft.CognitiveServices/accounts\"}}]}", + "Content-Type" : "application/json", + "Request-Context" : "appId=cid-v1:b021da79-5252-4375-9df5-2e17c1dcd822", + "X-Powered-By" : "ASP.NET" + }, + "Exception" : null + } ], + "variables" : [ ] +} \ No newline at end of file diff --git a/sdk/monitor/azure-monitor-query/src/test/resources/session-records/MetricsQueryClientTest.testMetricsQuery.json b/sdk/monitor/azure-monitor-query/src/test/resources/session-records/MetricsQueryClientTest.testMetricsQuery.json new file mode 100644 index 000000000000..7b76a13aa739 --- /dev/null +++ b/sdk/monitor/azure-monitor-query/src/test/resources/session-records/MetricsQueryClientTest.testMetricsQuery.json @@ -0,0 +1,32 @@ +{ + "networkCallRecords" : [ { + "Method" : "GET", + "Uri" : "https://REDACTED.azure.com/subscriptions/faa080af-c1d8-40ad-9cce-e1a450ca5b57/resourceGroups/srnagar-azuresdkgroup/providers/Microsoft.CognitiveServices/accounts/srnagara-textanalytics/providers/microsoft.insights/metrics?timespan=PT240H&interval=PT1H&metric=SuccessfulCalls&aggregation=2%2C5%2C4%2C3%2C1&top=100&resultType=Data&api-version=2017-05-01-preview&metricnamespace=Microsoft.CognitiveServices/accounts", + "Headers" : { + "User-Agent" : "azsdk-java-UnknownName/UnknownVersion (11.0.8; Windows 10; 10.0)" + }, + "Response" : { + "content-length" : "25279", + "Server" : "Microsoft-IIS/10.0", + "X-Content-Type-Options" : "nosniff", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11999", + "StatusCode" : "200", + "x-ms-correlation-request-id" : "979ab618-a81c-484e-bb0e-2e54e009789c", + "Date" : "Mon, 07 Jun 2021 04:58:05 GMT", + "Access-Control-Expose-Headers" : "Request-Context", + "Strict-Transport-Security" : "max-age=31536000; includeSubDomains", + "Cache-Control" : "no-cache", + "x-ms-routing-request-id" : "WESTUS2:20210607T045806Z:979ab618-a81c-484e-bb0e-2e54e009789c", + "X-AspNet-Version" : "4.0.30319", + "Vary" : "Accept-Encoding", + "x-ms-request-id" : "{979ab618-a81c-484e-bb0e-2e54e009789c}", + "Body" : "{\"cost\":71995,\"timespan\":\"2021-05-28T04:57:05Z/2021-06-07T04:57:05Z\",\"interval\":\"PT1H\",\"value\":[{\"id\":\"/subscriptions/faa080af-c1d8-40ad-9cce-e1a450ca5b57/resourceGroups/srnagar-azuresdkgroup/providers/Microsoft.CognitiveServices/accounts/srnagara-textanalytics/providers/Microsoft.Insights/metrics/SuccessfulCalls\",\"type\":\"Microsoft.Insights/metrics\",\"name\":{\"value\":\"SuccessfulCalls\",\"localizedValue\":\"Successful Calls\"},\"displayDescription\":\"Number of successful calls.\",\"unit\":\"Count\",\"timeseries\":[{\"metadatavalues\":[],\"data\":[{\"timeStamp\":\"2021-05-28T04:57:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-05-28T05:57:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-05-28T06:57:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-05-28T07:57:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-05-28T08:57:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-05-28T09:57:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-05-28T10:57:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-05-28T11:57:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-05-28T12:57:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-05-28T13:57:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-05-28T14:57:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-05-28T15:57:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-05-28T16:57:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-05-28T17:57:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-05-28T18:57:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-05-28T19:57:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-05-28T20:57:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-05-28T21:57:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-05-28T22:57:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-05-28T23:57:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-05-29T00:57:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-05-29T01:57:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-05-29T02:57:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-05-29T03:57:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-05-29T04:57:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-05-29T05:57:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-05-29T06:57:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-05-29T07:57:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-05-29T08:57:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-05-29T09:57:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-05-29T10:57:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-05-29T11:57:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-05-29T12:57:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-05-29T13:57:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-05-29T14:57:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-05-29T15:57:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-05-29T16:57:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-05-29T17:57:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-05-29T18:57:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-05-29T19:57:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-05-29T20:57:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-05-29T21:57:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-05-29T22:57:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-05-29T23:57:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-05-30T00:57:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-05-30T01:57:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-05-30T02:57:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-05-30T03:57:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-05-30T04:57:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-05-30T05:57:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-05-30T06:57:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-05-30T07:57:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-05-30T08:57:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-05-30T09:57:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-05-30T10:57:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-05-30T11:57:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-05-30T12:57:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-05-30T13:57:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-05-30T14:57:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-05-30T15:57:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-05-30T16:57:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-05-30T17:57:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-05-30T18:57:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-05-30T19:57:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-05-30T20:57:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-05-30T21:57:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-05-30T22:57:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-05-30T23:57:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-05-31T00:57:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-05-31T01:57:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-05-31T02:57:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-05-31T03:57:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-05-31T04:57:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-05-31T05:57:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-05-31T06:57:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-05-31T07:57:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-05-31T08:57:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-05-31T09:57:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-05-31T10:57:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-05-31T11:57:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-05-31T12:57:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-05-31T13:57:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-05-31T14:57:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-05-31T15:57:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-05-31T16:57:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-05-31T17:57:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-05-31T18:57:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-05-31T19:57:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-05-31T20:57:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-05-31T21:57:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-05-31T22:57:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-05-31T23:57:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-06-01T00:57:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-06-01T01:57:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-06-01T02:57:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-06-01T03:57:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-06-01T04:57:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-06-01T05:57:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-06-01T06:57:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-06-01T07:57:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-06-01T08:57:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-06-01T09:57:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-06-01T10:57:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-06-01T11:57:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-06-01T12:57:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-06-01T13:57:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-06-01T14:57:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-06-01T15:57:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-06-01T16:57:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-06-01T17:57:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-06-01T18:57:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-06-01T19:57:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-06-01T20:57:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-06-01T21:57:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-06-01T22:57:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-06-01T23:57:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-06-02T00:57:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-06-02T01:57:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-06-02T02:57:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-06-02T03:57:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-06-02T04:57:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-06-02T05:57:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-06-02T06:57:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-06-02T07:57:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-06-02T08:57:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-06-02T09:57:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-06-02T10:57:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-06-02T11:57:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-06-02T12:57:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-06-02T13:57:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-06-02T14:57:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-06-02T15:57:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-06-02T16:57:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-06-02T17:57:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-06-02T18:57:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-06-02T19:57:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-06-02T20:57:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-06-02T21:57:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-06-02T22:57:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-06-02T23:57:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-06-03T00:57:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-06-03T01:57:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-06-03T02:57:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-06-03T03:57:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-06-03T04:57:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-06-03T05:57:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-06-03T06:57:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-06-03T07:57:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-06-03T08:57:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-06-03T09:57:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-06-03T10:57:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-06-03T11:57:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-06-03T12:57:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-06-03T13:57:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-06-03T14:57:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-06-03T15:57:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-06-03T16:57:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-06-03T17:57:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-06-03T18:57:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-06-03T19:57:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-06-03T20:57:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-06-03T21:57:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-06-03T22:57:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-06-03T23:57:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-06-04T00:57:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-06-04T01:57:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-06-04T02:57:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-06-04T03:57:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-06-04T04:57:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-06-04T05:57:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-06-04T06:57:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-06-04T07:57:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-06-04T08:57:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-06-04T09:57:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-06-04T10:57:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-06-04T11:57:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-06-04T12:57:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-06-04T13:57:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-06-04T14:57:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-06-04T15:57:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-06-04T16:57:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-06-04T17:57:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-06-04T18:57:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-06-04T19:57:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-06-04T20:57:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-06-04T21:57:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-06-04T22:57:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-06-04T23:57:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-06-05T00:57:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-06-05T01:57:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-06-05T02:57:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-06-05T03:57:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-06-05T04:57:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-06-05T05:57:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-06-05T06:57:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-06-05T07:57:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-06-05T08:57:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-06-05T09:57:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-06-05T10:57:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-06-05T11:57:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-06-05T12:57:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-06-05T13:57:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-06-05T14:57:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-06-05T15:57:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-06-05T16:57:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-06-05T17:57:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-06-05T18:57:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-06-05T19:57:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-06-05T20:57:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-06-05T21:57:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-06-05T22:57:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-06-05T23:57:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-06-06T00:57:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-06-06T01:57:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-06-06T02:57:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-06-06T03:57:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-06-06T04:57:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-06-06T05:57:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-06-06T06:57:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-06-06T07:57:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-06-06T08:57:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-06-06T09:57:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-06-06T10:57:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-06-06T11:57:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-06-06T12:57:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-06-06T13:57:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-06-06T14:57:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-06-06T15:57:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-06-06T16:57:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-06-06T17:57:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-06-06T18:57:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-06-06T19:57:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-06-06T20:57:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-06-06T21:57:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-06-06T22:57:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-06-06T23:57:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-06-07T00:57:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-06-07T01:57:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-06-07T02:57:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0},{\"timeStamp\":\"2021-06-07T03:57:00Z\",\"total\":0.0,\"count\":0.0,\"average\":0.0,\"minimum\":0.0,\"maximum\":0.0}]}],\"errorCode\":\"Success\"}]}", + "Content-Type" : "application/json", + "Request-Context" : "appId=cid-v1:b021da79-5252-4375-9df5-2e17c1dcd822", + "X-Powered-By" : "ASP.NET" + }, + "Exception" : null + } ], + "variables" : [ ] +} \ No newline at end of file diff --git a/sdk/monitor/azure-monitor-query/swagger/README.md b/sdk/monitor/azure-monitor-query/swagger/README.md index 9368fa30d8db..6faa0fdf08ea 100644 --- a/sdk/monitor/azure-monitor-query/swagger/README.md +++ b/sdk/monitor/azure-monitor-query/swagger/README.md @@ -6,7 +6,7 @@ These settings apply only when `--tag=package-log` is specified on the command l ``` yaml $(tag) == 'package-log' use: '@autorest/java@4.0.22' -input-file: https://raw.githubusercontent.com/srnagar/azure-rest-api-specs/azmon-query-swagger/specification/operationalinsights/data-plane/Microsoft.OperationalInsights/preview/2021-05-19/OperationalInsights.json +input-file: https://raw.githubusercontent.com/srnagar/azure-rest-api-specs/azmon-query-swagger/specification/operationalinsights/data-plane/Microsoft.OperationalInsights/preview/2021-05-19_Preview/OperationalInsights.json java: true output-folder: ../ namespace: com.azure.monitor.query.log From e2afc2c58a02f103c15260f55e2c2859e23e7925 Mon Sep 17 00:00:00 2001 From: Connie Yau Date: Mon, 7 Jun 2021 23:56:17 -0700 Subject: [PATCH 11/21] Fix Management Bug (#22122) * Adding missing return statement. * Using common logic for status codes. * Adding isSuccessful. --- .../amqp/implementation/ManagementChannel.java | 7 +++---- .../amqp/implementation/RequestResponseUtils.java | 4 ++++ .../implementation/ManagementChannel.java | 14 +++++++------- 3 files changed, 14 insertions(+), 11 deletions(-) diff --git a/sdk/core/azure-core-amqp/src/main/java/com/azure/core/amqp/implementation/ManagementChannel.java b/sdk/core/azure-core-amqp/src/main/java/com/azure/core/amqp/implementation/ManagementChannel.java index f469f879dede..04145e4ece7b 100644 --- a/sdk/core/azure-core-amqp/src/main/java/com/azure/core/amqp/implementation/ManagementChannel.java +++ b/sdk/core/azure-core-amqp/src/main/java/com/azure/core/amqp/implementation/ManagementChannel.java @@ -116,14 +116,13 @@ private Mono isAuthorized() { .next() .switchIfEmpty(Mono.error(new AmqpException(false, "Did not get response from tokenManager: " + entityPath, getErrorContext()))) .handle((response, sink) -> { - if (response != AmqpResponseCode.ACCEPTED && response != AmqpResponseCode.OK) { + if (RequestResponseUtils.isSuccessful(response)) { + sink.complete(); + } else { final String message = String.format("User does not have authorization to perform operation " + "on entity [%s]. Response: [%s]", entityPath, response); sink.error(ExceptionUtil.amqpResponseCodeToException(response.getValue(), message, getErrorContext())); - - } else { - sink.complete(); } }); } diff --git a/sdk/core/azure-core-amqp/src/main/java/com/azure/core/amqp/implementation/RequestResponseUtils.java b/sdk/core/azure-core-amqp/src/main/java/com/azure/core/amqp/implementation/RequestResponseUtils.java index d61b8594b9de..d0c2fead82a1 100644 --- a/sdk/core/azure-core-amqp/src/main/java/com/azure/core/amqp/implementation/RequestResponseUtils.java +++ b/sdk/core/azure-core-amqp/src/main/java/com/azure/core/amqp/implementation/RequestResponseUtils.java @@ -28,6 +28,10 @@ public class RequestResponseUtils { public static boolean isSuccessful(Message message) { final AmqpResponseCode statusCode = getStatusCode(message); + return isSuccessful(statusCode); + } + + public static boolean isSuccessful(AmqpResponseCode statusCode) { return statusCode == AmqpResponseCode.OK || statusCode == AmqpResponseCode.ACCEPTED; } diff --git a/sdk/eventhubs/azure-messaging-eventhubs/src/main/java/com/azure/messaging/eventhubs/implementation/ManagementChannel.java b/sdk/eventhubs/azure-messaging-eventhubs/src/main/java/com/azure/messaging/eventhubs/implementation/ManagementChannel.java index 9fd59529d17e..254e37b16e66 100644 --- a/sdk/eventhubs/azure-messaging-eventhubs/src/main/java/com/azure/messaging/eventhubs/implementation/ManagementChannel.java +++ b/sdk/eventhubs/azure-messaging-eventhubs/src/main/java/com/azure/messaging/eventhubs/implementation/ManagementChannel.java @@ -162,14 +162,14 @@ private Mono getProperties(Map properties, Class respo .handle((message, sink) -> { if (RequestResponseUtils.isSuccessful(message)) { sink.next(messageSerializer.deserialize(message, responseType)); - } - - final AmqpResponseCode statusCode = RequestResponseUtils.getStatusCode(message); - final String statusDescription = RequestResponseUtils.getStatusDescription(message); - final Throwable error = ExceptionUtil.amqpResponseCodeToException(statusCode.getValue(), - statusDescription, channel.getErrorContext()); + } else { + final AmqpResponseCode statusCode = RequestResponseUtils.getStatusCode(message); + final String statusDescription = RequestResponseUtils.getStatusDescription(message); + final Throwable error = ExceptionUtil.amqpResponseCodeToException(statusCode.getValue(), + statusDescription, channel.getErrorContext()); - sink.error(logger.logExceptionAsWarning(Exceptions.propagate(error))); + sink.error(logger.logExceptionAsWarning(Exceptions.propagate(error))); + } })); }); } From 0cebcebe7ce318c3f4599eb7a410de06e686ac45 Mon Sep 17 00:00:00 2001 From: Weidong Xu Date: Tue, 8 Jun 2021 15:21:12 +0800 Subject: [PATCH 12/21] mgmt, upgrade aks (#22136) --- sdk/resourcemanager/api-specs.json | 2 +- .../CHANGELOG.md | 1 + .../pom.xml | 2 + .../ContainerServiceManagementClient.java | 28 +- .../fluent/ManagedClustersClient.java | 113 +++- .../fluent/models/AgentPoolInner.java | 38 +- .../OutboundEnvironmentEndpointInner.java | 84 +++ .../implementation/AgentPoolsClientImpl.java | 28 +- .../ContainerServiceManagementClientImpl.java | 52 +- .../KubernetesClusterAgentPoolImpl.java | 1 + .../MaintenanceConfigurationsClientImpl.java | 16 +- .../ManagedClustersClientImpl.java | 517 ++++++++++++++++-- .../implementation/OperationsClientImpl.java | 4 +- .../PrivateEndpointConnectionsClientImpl.java | 16 +- .../PrivateLinkResourcesClientImpl.java | 4 +- ...esolvePrivateLinkServiceIdsClientImpl.java | 4 +- .../containerservice/models/Count.java | 22 +- .../models/EndpointDependency.java | 80 +++ .../models/EndpointDetail.java | 128 +++++ .../ManagedClusterAgentPoolProfile.java | 7 + ...agedClusterAgentPoolProfileProperties.java | 38 +- .../ManagedClusterApiServerAccessProfile.java | 29 + ...OutboundEnvironmentEndpointCollection.java | 75 +++ ...rsTests.canAutoScaleKubernetesCluster.json | 32 +- ...lustersTests.canCRUDKubernetesCluster.json | 20 +- ...stersTests.canCreateClusterWithSpotVM.json | 20 +- ...rceManagerTests.testKubernetesCluster.json | 36 +- ...etesCniTests.testKubernetesClusterCni.json | 8 +- ...ivateLinkTests.testPrivateEndpointAKS.json | 12 +- 29 files changed, 1189 insertions(+), 228 deletions(-) create mode 100644 sdk/resourcemanager/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/OutboundEnvironmentEndpointInner.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/EndpointDependency.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/EndpointDetail.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/OutboundEnvironmentEndpointCollection.java diff --git a/sdk/resourcemanager/api-specs.json b/sdk/resourcemanager/api-specs.json index e67792ca9b02..71f5c262f4e2 100644 --- a/sdk/resourcemanager/api-specs.json +++ b/sdk/resourcemanager/api-specs.json @@ -102,7 +102,7 @@ "dir": "azure-resourcemanager-containerservice", "source": "specification/containerservice/resource-manager/readme.md", "package": "com.azure.resourcemanager.containerservice", - "args": "--payload-flattening-threshold=1 --tag=package-2021-03 --title=ContainerServiceManagementClient --description=\"Container Service Client\" --remove-model=BaseManagedCluster --rename-model=ManagedClusterIdentityUserAssignedIdentitiesValue:ManagedClusterIdentityUserAssignedIdentities,ManagedClusterPropertiesIdentityProfile:ManagedClusterPropertiesIdentityProfileValue", + "args": "--payload-flattening-threshold=1 --tag=package-2021-05 --title=ContainerServiceManagementClient --description=\"Container Service Client\" --remove-model=BaseManagedCluster --rename-model=ManagedClusterIdentityUserAssignedIdentitiesValue:ManagedClusterIdentityUserAssignedIdentities,ManagedClusterPropertiesIdentityProfile:ManagedClusterPropertiesIdentityProfileValue", "note": "Remove 'final' from 'ManagedClusterAgentPoolProfile'" }, "cosmos": { diff --git a/sdk/resourcemanager/azure-resourcemanager-containerservice/CHANGELOG.md b/sdk/resourcemanager/azure-resourcemanager-containerservice/CHANGELOG.md index a4e3277decb1..c17d66399d84 100644 --- a/sdk/resourcemanager/azure-resourcemanager-containerservice/CHANGELOG.md +++ b/sdk/resourcemanager/azure-resourcemanager-containerservice/CHANGELOG.md @@ -2,6 +2,7 @@ ## 2.6.0-beta.1 (Unreleased) +- Updated `api-version` to `2021-05-01` - Supported spot virtual machine for agent pool of `KubernetesCluster`. ## 2.5.0 (2021-05-28) diff --git a/sdk/resourcemanager/azure-resourcemanager-containerservice/pom.xml b/sdk/resourcemanager/azure-resourcemanager-containerservice/pom.xml index 8c90bac5ddb7..2f32ad9ccd05 100644 --- a/sdk/resourcemanager/azure-resourcemanager-containerservice/pom.xml +++ b/sdk/resourcemanager/azure-resourcemanager-containerservice/pom.xml @@ -148,6 +148,8 @@ revapi-maven-plugin 0.11.2 + true + diff --git a/sdk/resourcemanager/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/ContainerServiceManagementClient.java b/sdk/resourcemanager/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/ContainerServiceManagementClient.java index 7d3ff2b0ba6e..2b3a723a43c1 100644 --- a/sdk/resourcemanager/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/ContainerServiceManagementClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/ContainerServiceManagementClient.java @@ -38,6 +38,20 @@ public interface ContainerServiceManagementClient { */ Duration getDefaultPollInterval(); + /** + * Gets the OpenShiftManagedClustersClient object to access its operations. + * + * @return the OpenShiftManagedClustersClient object. + */ + OpenShiftManagedClustersClient getOpenShiftManagedClusters(); + + /** + * Gets the ContainerServicesClient object to access its operations. + * + * @return the ContainerServicesClient object. + */ + ContainerServicesClient getContainerServices(); + /** * Gets the OperationsClient object to access its operations. * @@ -86,18 +100,4 @@ public interface ContainerServiceManagementClient { * @return the ResolvePrivateLinkServiceIdsClient object. */ ResolvePrivateLinkServiceIdsClient getResolvePrivateLinkServiceIds(); - - /** - * Gets the OpenShiftManagedClustersClient object to access its operations. - * - * @return the OpenShiftManagedClustersClient object. - */ - OpenShiftManagedClustersClient getOpenShiftManagedClusters(); - - /** - * Gets the ContainerServicesClient object to access its operations. - * - * @return the ContainerServicesClient object. - */ - ContainerServicesClient getContainerServices(); } diff --git a/sdk/resourcemanager/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/ManagedClustersClient.java b/sdk/resourcemanager/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/ManagedClustersClient.java index 5f8d88740ab8..01e37bf223c7 100644 --- a/sdk/resourcemanager/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/ManagedClustersClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/ManagedClustersClient.java @@ -18,6 +18,7 @@ import com.azure.resourcemanager.containerservice.fluent.models.ManagedClusterInner; import com.azure.resourcemanager.containerservice.fluent.models.ManagedClusterUpgradeProfileInner; import com.azure.resourcemanager.containerservice.fluent.models.OSOptionProfileInner; +import com.azure.resourcemanager.containerservice.fluent.models.OutboundEnvironmentEndpointInner; import com.azure.resourcemanager.containerservice.fluent.models.RunCommandResultInner; import com.azure.resourcemanager.containerservice.models.ManagedClusterAadProfile; import com.azure.resourcemanager.containerservice.models.ManagedClusterServicePrincipalProfile; @@ -318,6 +319,7 @@ Response getAccessProfileWithResponse( * * @param resourceGroupName The name of the resource group. * @param resourceName The name of the managed cluster resource. + * @param serverFqdn server fqdn type for credentials to be returned. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -325,7 +327,22 @@ Response getAccessProfileWithResponse( */ @ServiceMethod(returns = ReturnType.SINGLE) Mono> listClusterAdminCredentialsWithResponseAsync( - String resourceGroupName, String resourceName); + String resourceGroupName, String resourceName, String serverFqdn); + + /** + * Gets cluster admin credential of the managed cluster with a specified resource group and name. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the managed cluster resource. + * @param serverFqdn server fqdn type for credentials to be returned. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return cluster admin credential of the managed cluster with a specified resource group and name. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono listClusterAdminCredentialsAsync( + String resourceGroupName, String resourceName, String serverFqdn); /** * Gets cluster admin credential of the managed cluster with a specified resource group and name. @@ -358,6 +375,7 @@ Mono> listClusterAdminCredentialsWithResponseAs * * @param resourceGroupName The name of the resource group. * @param resourceName The name of the managed cluster resource. + * @param serverFqdn server fqdn type for credentials to be returned. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -366,13 +384,14 @@ Mono> listClusterAdminCredentialsWithResponseAs */ @ServiceMethod(returns = ReturnType.SINGLE) Response listClusterAdminCredentialsWithResponse( - String resourceGroupName, String resourceName, Context context); + String resourceGroupName, String resourceName, String serverFqdn, Context context); /** * Gets cluster user credential of the managed cluster with a specified resource group and name. * * @param resourceGroupName The name of the resource group. * @param resourceName The name of the managed cluster resource. + * @param serverFqdn server fqdn type for credentials to be returned. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -380,7 +399,22 @@ Response listClusterAdminCredentialsWithResponse( */ @ServiceMethod(returns = ReturnType.SINGLE) Mono> listClusterUserCredentialsWithResponseAsync( - String resourceGroupName, String resourceName); + String resourceGroupName, String resourceName, String serverFqdn); + + /** + * Gets cluster user credential of the managed cluster with a specified resource group and name. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the managed cluster resource. + * @param serverFqdn server fqdn type for credentials to be returned. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return cluster user credential of the managed cluster with a specified resource group and name. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono listClusterUserCredentialsAsync( + String resourceGroupName, String resourceName, String serverFqdn); /** * Gets cluster user credential of the managed cluster with a specified resource group and name. @@ -413,6 +447,7 @@ Mono> listClusterUserCredentialsWithResponseAsy * * @param resourceGroupName The name of the resource group. * @param resourceName The name of the managed cluster resource. + * @param serverFqdn server fqdn type for credentials to be returned. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -421,13 +456,14 @@ Mono> listClusterUserCredentialsWithResponseAsy */ @ServiceMethod(returns = ReturnType.SINGLE) Response listClusterUserCredentialsWithResponse( - String resourceGroupName, String resourceName, Context context); + String resourceGroupName, String resourceName, String serverFqdn, Context context); /** * Gets cluster monitoring user credential of the managed cluster with a specified resource group and name. * * @param resourceGroupName The name of the resource group. * @param resourceName The name of the managed cluster resource. + * @param serverFqdn server fqdn type for credentials to be returned. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -435,7 +471,22 @@ Response listClusterUserCredentialsWithResponse( */ @ServiceMethod(returns = ReturnType.SINGLE) Mono> listClusterMonitoringUserCredentialsWithResponseAsync( - String resourceGroupName, String resourceName); + String resourceGroupName, String resourceName, String serverFqdn); + + /** + * Gets cluster monitoring user credential of the managed cluster with a specified resource group and name. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the managed cluster resource. + * @param serverFqdn server fqdn type for credentials to be returned. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return cluster monitoring user credential of the managed cluster with a specified resource group and name. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono listClusterMonitoringUserCredentialsAsync( + String resourceGroupName, String resourceName, String serverFqdn); /** * Gets cluster monitoring user credential of the managed cluster with a specified resource group and name. @@ -469,6 +520,7 @@ Mono listClusterMonitoringUserCredentialsAsync( * * @param resourceGroupName The name of the resource group. * @param resourceName The name of the managed cluster resource. + * @param serverFqdn server fqdn type for credentials to be returned. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -477,7 +529,7 @@ Mono listClusterMonitoringUserCredentialsAsync( */ @ServiceMethod(returns = ReturnType.SINGLE) Response listClusterMonitoringUserCredentialsWithResponse( - String resourceGroupName, String resourceName, Context context); + String resourceGroupName, String resourceName, String serverFqdn, Context context); /** * Gets the details of the managed cluster with a specified resource group and name. @@ -1516,4 +1568,53 @@ Mono> getCommandResultWithResponseAsync( @ServiceMethod(returns = ReturnType.SINGLE) Response getCommandResultWithResponse( String resourceGroupName, String resourceName, String commandId, Context context); + + /** + * Gets a list of egress endpoints (network endpoints of all outbound dependencies) in the specified managed + * cluster. The operation returns properties of each egress endpoint. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of egress endpoints (network endpoints of all outbound dependencies) in the specified managed + * cluster. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux listOutboundNetworkDependenciesEndpointsAsync( + String resourceGroupName, String resourceName); + + /** + * Gets a list of egress endpoints (network endpoints of all outbound dependencies) in the specified managed + * cluster. The operation returns properties of each egress endpoint. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of egress endpoints (network endpoints of all outbound dependencies) in the specified managed + * cluster. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listOutboundNetworkDependenciesEndpoints( + String resourceGroupName, String resourceName); + + /** + * Gets a list of egress endpoints (network endpoints of all outbound dependencies) in the specified managed + * cluster. The operation returns properties of each egress endpoint. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the managed cluster resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of egress endpoints (network endpoints of all outbound dependencies) in the specified managed + * cluster. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listOutboundNetworkDependenciesEndpoints( + String resourceGroupName, String resourceName, Context context); } diff --git a/sdk/resourcemanager/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/AgentPoolInner.java b/sdk/resourcemanager/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/AgentPoolInner.java index f617afe97115..9ebf9da9962c 100644 --- a/sdk/resourcemanager/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/AgentPoolInner.java +++ b/sdk/resourcemanager/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/AgentPoolInner.java @@ -34,8 +34,8 @@ public class AgentPoolInner extends SubResource { /* * Number of agents (VMs) to host docker containers. Allowed values must be - * in the range of 0 to 100 (inclusive) for user pools and in the range of - * 1 to 100 (inclusive) for system pools. The default value is 1. + * in the range of 0 to 1000 (inclusive) for user pools and in the range of + * 1 to 1000 (inclusive) for system pools. The default value is 1. */ @JsonProperty(value = "properties.count") private Integer count; @@ -252,6 +252,12 @@ public class AgentPoolInner extends SubResource { @JsonProperty(value = "properties.enableEncryptionAtHost") private Boolean enableEncryptionAtHost; + /* + * Whether to enable UltraSSD + */ + @JsonProperty(value = "properties.enableUltraSSD") + private Boolean enableUltraSsd; + /* * Whether to use FIPS enabled OS */ @@ -281,8 +287,8 @@ public class AgentPoolInner extends SubResource { /** * Get the count property: Number of agents (VMs) to host docker containers. Allowed values must be in the range of - * 0 to 100 (inclusive) for user pools and in the range of 1 to 100 (inclusive) for system pools. The default value - * is 1. + * 0 to 1000 (inclusive) for user pools and in the range of 1 to 1000 (inclusive) for system pools. The default + * value is 1. * * @return the count value. */ @@ -292,8 +298,8 @@ public Integer count() { /** * Set the count property: Number of agents (VMs) to host docker containers. Allowed values must be in the range of - * 0 to 100 (inclusive) for user pools and in the range of 1 to 100 (inclusive) for system pools. The default value - * is 1. + * 0 to 1000 (inclusive) for user pools and in the range of 1 to 1000 (inclusive) for system pools. The default + * value is 1. * * @param count the count value to set. * @return the AgentPoolInner object itself. @@ -935,6 +941,26 @@ public AgentPoolInner withEnableEncryptionAtHost(Boolean enableEncryptionAtHost) return this; } + /** + * Get the enableUltraSsd property: Whether to enable UltraSSD. + * + * @return the enableUltraSsd value. + */ + public Boolean enableUltraSsd() { + return this.enableUltraSsd; + } + + /** + * Set the enableUltraSsd property: Whether to enable UltraSSD. + * + * @param enableUltraSsd the enableUltraSsd value to set. + * @return the AgentPoolInner object itself. + */ + public AgentPoolInner withEnableUltraSsd(Boolean enableUltraSsd) { + this.enableUltraSsd = enableUltraSsd; + return this; + } + /** * Get the enableFips property: Whether to use FIPS enabled OS. * diff --git a/sdk/resourcemanager/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/OutboundEnvironmentEndpointInner.java b/sdk/resourcemanager/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/OutboundEnvironmentEndpointInner.java new file mode 100644 index 000000000000..1680fde8f372 --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/OutboundEnvironmentEndpointInner.java @@ -0,0 +1,84 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.containerservice.models.EndpointDependency; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Egress endpoints which AKS agent nodes connect to for common purpose. */ +@Fluent +public final class OutboundEnvironmentEndpointInner { + @JsonIgnore private final ClientLogger logger = new ClientLogger(OutboundEnvironmentEndpointInner.class); + + /* + * The category of endpoints accessed by the AKS agent node, e.g. + * azure-resource-management, apiserver, etc. + */ + @JsonProperty(value = "category") + private String category; + + /* + * The endpoints that AKS agent nodes connect to + */ + @JsonProperty(value = "endpoints") + private List endpoints; + + /** + * Get the category property: The category of endpoints accessed by the AKS agent node, e.g. + * azure-resource-management, apiserver, etc. + * + * @return the category value. + */ + public String category() { + return this.category; + } + + /** + * Set the category property: The category of endpoints accessed by the AKS agent node, e.g. + * azure-resource-management, apiserver, etc. + * + * @param category the category value to set. + * @return the OutboundEnvironmentEndpointInner object itself. + */ + public OutboundEnvironmentEndpointInner withCategory(String category) { + this.category = category; + return this; + } + + /** + * Get the endpoints property: The endpoints that AKS agent nodes connect to. + * + * @return the endpoints value. + */ + public List endpoints() { + return this.endpoints; + } + + /** + * Set the endpoints property: The endpoints that AKS agent nodes connect to. + * + * @param endpoints the endpoints value to set. + * @return the OutboundEnvironmentEndpointInner object itself. + */ + public OutboundEnvironmentEndpointInner withEndpoints(List endpoints) { + this.endpoints = endpoints; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (endpoints() != null) { + endpoints().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/AgentPoolsClientImpl.java b/sdk/resourcemanager/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/AgentPoolsClientImpl.java index 19d59f22a3e9..0dca33d850e9 100644 --- a/sdk/resourcemanager/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/AgentPoolsClientImpl.java +++ b/sdk/resourcemanager/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/AgentPoolsClientImpl.java @@ -223,7 +223,7 @@ private Mono> listSinglePageAsync(String resourceG if (resourceName == null) { return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); } - final String apiVersion = "2021-03-01"; + final String apiVersion = "2021-05-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -282,7 +282,7 @@ private Mono> listSinglePageAsync( if (resourceName == null) { return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); } - final String apiVersion = "2021-03-01"; + final String apiVersion = "2021-05-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -406,7 +406,7 @@ public Mono> getWithResponseAsync( if (agentPoolName == null) { return Mono.error(new IllegalArgumentException("Parameter agentPoolName is required and cannot be null.")); } - final String apiVersion = "2021-03-01"; + final String apiVersion = "2021-05-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -461,7 +461,7 @@ private Mono> getWithResponseAsync( if (agentPoolName == null) { return Mono.error(new IllegalArgumentException("Parameter agentPoolName is required and cannot be null.")); } - final String apiVersion = "2021-03-01"; + final String apiVersion = "2021-05-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -576,7 +576,7 @@ public Mono>> createOrUpdateWithResponseAsync( } else { parameters.validate(); } - final String apiVersion = "2021-03-01"; + final String apiVersion = "2021-05-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -642,7 +642,7 @@ private Mono>> createOrUpdateWithResponseAsync( } else { parameters.validate(); } - final String apiVersion = "2021-03-01"; + final String apiVersion = "2021-05-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -874,7 +874,7 @@ public Mono>> deleteWithResponseAsync( if (agentPoolName == null) { return Mono.error(new IllegalArgumentException("Parameter agentPoolName is required and cannot be null.")); } - final String apiVersion = "2021-03-01"; + final String apiVersion = "2021-05-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -929,7 +929,7 @@ private Mono>> deleteWithResponseAsync( if (agentPoolName == null) { return Mono.error(new IllegalArgumentException("Parameter agentPoolName is required and cannot be null.")); } - final String apiVersion = "2021-03-01"; + final String apiVersion = "2021-05-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -1129,7 +1129,7 @@ public Mono> getUpgradeProfileWithRespons if (agentPoolName == null) { return Mono.error(new IllegalArgumentException("Parameter agentPoolName is required and cannot be null.")); } - final String apiVersion = "2021-03-01"; + final String apiVersion = "2021-05-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -1186,7 +1186,7 @@ private Mono> getUpgradeProfileWithRespon if (agentPoolName == null) { return Mono.error(new IllegalArgumentException("Parameter agentPoolName is required and cannot be null.")); } - final String apiVersion = "2021-03-01"; + final String apiVersion = "2021-05-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -1299,7 +1299,7 @@ public Mono> getAvailableAgentPoolVers if (resourceName == null) { return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); } - final String apiVersion = "2021-03-01"; + final String apiVersion = "2021-05-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -1349,7 +1349,7 @@ private Mono> getAvailableAgentPoolVer if (resourceName == null) { return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); } - final String apiVersion = "2021-03-01"; + final String apiVersion = "2021-05-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -1456,7 +1456,7 @@ public Mono>> upgradeNodeImageVersionWithResponseAsync if (agentPoolName == null) { return Mono.error(new IllegalArgumentException("Parameter agentPoolName is required and cannot be null.")); } - final String apiVersion = "2021-03-01"; + final String apiVersion = "2021-05-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -1511,7 +1511,7 @@ private Mono>> upgradeNodeImageVersionWithResponseAsyn if (agentPoolName == null) { return Mono.error(new IllegalArgumentException("Parameter agentPoolName is required and cannot be null.")); } - final String apiVersion = "2021-03-01"; + final String apiVersion = "2021-05-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service diff --git a/sdk/resourcemanager/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/ContainerServiceManagementClientImpl.java b/sdk/resourcemanager/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/ContainerServiceManagementClientImpl.java index fe01f80642bb..841517d813ad 100644 --- a/sdk/resourcemanager/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/ContainerServiceManagementClientImpl.java +++ b/sdk/resourcemanager/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/ContainerServiceManagementClientImpl.java @@ -92,6 +92,30 @@ public Duration getDefaultPollInterval() { return this.defaultPollInterval; } + /** The OpenShiftManagedClustersClient object to access its operations. */ + private final OpenShiftManagedClustersClient openShiftManagedClusters; + + /** + * Gets the OpenShiftManagedClustersClient object to access its operations. + * + * @return the OpenShiftManagedClustersClient object. + */ + public OpenShiftManagedClustersClient getOpenShiftManagedClusters() { + return this.openShiftManagedClusters; + } + + /** The ContainerServicesClient object to access its operations. */ + private final ContainerServicesClient containerServices; + + /** + * Gets the ContainerServicesClient object to access its operations. + * + * @return the ContainerServicesClient object. + */ + public ContainerServicesClient getContainerServices() { + return this.containerServices; + } + /** The OperationsClient object to access its operations. */ private final OperationsClient operations; @@ -176,30 +200,6 @@ public ResolvePrivateLinkServiceIdsClient getResolvePrivateLinkServiceIds() { return this.resolvePrivateLinkServiceIds; } - /** The OpenShiftManagedClustersClient object to access its operations. */ - private final OpenShiftManagedClustersClient openShiftManagedClusters; - - /** - * Gets the OpenShiftManagedClustersClient object to access its operations. - * - * @return the OpenShiftManagedClustersClient object. - */ - public OpenShiftManagedClustersClient getOpenShiftManagedClusters() { - return this.openShiftManagedClusters; - } - - /** The ContainerServicesClient object to access its operations. */ - private final ContainerServicesClient containerServices; - - /** - * Gets the ContainerServicesClient object to access its operations. - * - * @return the ContainerServicesClient object. - */ - public ContainerServicesClient getContainerServices() { - return this.containerServices; - } - /** * Initializes an instance of ContainerServiceManagementClient client. * @@ -224,6 +224,8 @@ public ContainerServicesClient getContainerServices() { this.defaultPollInterval = defaultPollInterval; this.subscriptionId = subscriptionId; this.endpoint = endpoint; + this.openShiftManagedClusters = new OpenShiftManagedClustersClientImpl(this); + this.containerServices = new ContainerServicesClientImpl(this); this.operations = new OperationsClientImpl(this); this.managedClusters = new ManagedClustersClientImpl(this); this.maintenanceConfigurations = new MaintenanceConfigurationsClientImpl(this); @@ -231,7 +233,5 @@ public ContainerServicesClient getContainerServices() { this.privateEndpointConnections = new PrivateEndpointConnectionsClientImpl(this); this.privateLinkResources = new PrivateLinkResourcesClientImpl(this); this.resolvePrivateLinkServiceIds = new ResolvePrivateLinkServiceIdsClientImpl(this); - this.openShiftManagedClusters = new OpenShiftManagedClustersClientImpl(this); - this.containerServices = new ContainerServicesClientImpl(this); } } diff --git a/sdk/resourcemanager/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/KubernetesClusterAgentPoolImpl.java b/sdk/resourcemanager/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/KubernetesClusterAgentPoolImpl.java index 17d64112be5d..7cbdb6467508 100644 --- a/sdk/resourcemanager/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/KubernetesClusterAgentPoolImpl.java +++ b/sdk/resourcemanager/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/KubernetesClusterAgentPoolImpl.java @@ -233,6 +233,7 @@ public AgentPoolInner getAgentPoolInner() { agentPoolInner.withKubeletConfig(innerModel().kubeletConfig()); agentPoolInner.withLinuxOSConfig(innerModel().linuxOSConfig()); agentPoolInner.withEnableEncryptionAtHost(innerModel().enableEncryptionAtHost()); + agentPoolInner.withEnableUltraSsd(innerModel().enableUltraSsd()); agentPoolInner.withEnableFips(innerModel().enableFips()); agentPoolInner.withGpuInstanceProfile(innerModel().gpuInstanceProfile()); return agentPoolInner; diff --git a/sdk/resourcemanager/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/MaintenanceConfigurationsClientImpl.java b/sdk/resourcemanager/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/MaintenanceConfigurationsClientImpl.java index e6f015acc517..0c83f3a301cd 100644 --- a/sdk/resourcemanager/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/MaintenanceConfigurationsClientImpl.java +++ b/sdk/resourcemanager/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/MaintenanceConfigurationsClientImpl.java @@ -172,7 +172,7 @@ private Mono> listByManagedClusterS if (resourceName == null) { return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); } - final String apiVersion = "2021-03-01"; + final String apiVersion = "2021-05-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -232,7 +232,7 @@ private Mono> listByManagedClusterS if (resourceName == null) { return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); } - final String apiVersion = "2021-03-01"; + final String apiVersion = "2021-05-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -365,7 +365,7 @@ public Mono> getWithResponseAsync( if (configName == null) { return Mono.error(new IllegalArgumentException("Parameter configName is required and cannot be null.")); } - final String apiVersion = "2021-03-01"; + final String apiVersion = "2021-05-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -420,7 +420,7 @@ private Mono> getWithResponseAsync( if (configName == null) { return Mono.error(new IllegalArgumentException("Parameter configName is required and cannot be null.")); } - final String apiVersion = "2021-03-01"; + final String apiVersion = "2021-05-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -536,7 +536,7 @@ public Mono> createOrUpdateWithResponseA } else { parameters.validate(); } - final String apiVersion = "2021-03-01"; + final String apiVersion = "2021-05-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -602,7 +602,7 @@ private Mono> createOrUpdateWithResponse } else { parameters.validate(); } - final String apiVersion = "2021-03-01"; + final String apiVersion = "2021-05-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -722,7 +722,7 @@ public Mono> deleteWithResponseAsync( if (configName == null) { return Mono.error(new IllegalArgumentException("Parameter configName is required and cannot be null.")); } - final String apiVersion = "2021-03-01"; + final String apiVersion = "2021-05-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -777,7 +777,7 @@ private Mono> deleteWithResponseAsync( if (configName == null) { return Mono.error(new IllegalArgumentException("Parameter configName is required and cannot be null.")); } - final String apiVersion = "2021-03-01"; + final String apiVersion = "2021-05-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service diff --git a/sdk/resourcemanager/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/ManagedClustersClientImpl.java b/sdk/resourcemanager/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/ManagedClustersClientImpl.java index 9f7d87bf4b72..9018b403c497 100644 --- a/sdk/resourcemanager/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/ManagedClustersClientImpl.java +++ b/sdk/resourcemanager/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/ManagedClustersClientImpl.java @@ -40,10 +40,12 @@ import com.azure.resourcemanager.containerservice.fluent.models.ManagedClusterInner; import com.azure.resourcemanager.containerservice.fluent.models.ManagedClusterUpgradeProfileInner; import com.azure.resourcemanager.containerservice.fluent.models.OSOptionProfileInner; +import com.azure.resourcemanager.containerservice.fluent.models.OutboundEnvironmentEndpointInner; import com.azure.resourcemanager.containerservice.fluent.models.RunCommandResultInner; import com.azure.resourcemanager.containerservice.models.ManagedClusterAadProfile; import com.azure.resourcemanager.containerservice.models.ManagedClusterListResult; import com.azure.resourcemanager.containerservice.models.ManagedClusterServicePrincipalProfile; +import com.azure.resourcemanager.containerservice.models.OutboundEnvironmentEndpointCollection; import com.azure.resourcemanager.containerservice.models.RunCommandRequest; import com.azure.resourcemanager.containerservice.models.TagsObject; import com.azure.resourcemanager.resources.fluentcore.collection.InnerSupportsDelete; @@ -169,6 +171,7 @@ Mono> listClusterAdminCredentials( @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, + @QueryParam("server-fqdn") String serverFqdn, @HeaderParam("Accept") String accept, Context context); @@ -184,6 +187,7 @@ Mono> listClusterUserCredentials( @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, + @QueryParam("server-fqdn") String serverFqdn, @HeaderParam("Accept") String accept, Context context); @@ -199,6 +203,7 @@ Mono> listClusterMonitoringUserCredentials( @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, + @QueryParam("server-fqdn") String serverFqdn, @HeaderParam("Accept") String accept, Context context); @@ -373,6 +378,21 @@ Mono> getCommandResult( @HeaderParam("Accept") String accept, Context context); + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService" + + "/managedClusters/{resourceName}/outboundNetworkDependenciesEndpoints") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listOutboundNetworkDependenciesEndpoints( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("resourceName") String resourceName, + @HeaderParam("Accept") String accept, + Context context); + @Headers({"Content-Type: application/json"}) @Get("{nextLink}") @ExpectedResponses({200}) @@ -392,6 +412,16 @@ Mono> listByResourceGroupNext( @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); + + @Headers({"Content-Type: application/json"}) + @Get("{nextLink}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listOutboundNetworkDependenciesEndpointsNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, + Context context); } /** @@ -421,7 +451,7 @@ public Mono> getOSOptionsWithResponseAsync(String if (location == null) { return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); } - final String apiVersion = "2021-03-01"; + final String apiVersion = "2021-05-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -467,7 +497,7 @@ private Mono> getOSOptionsWithResponseAsync( if (location == null) { return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); } - final String apiVersion = "2021-03-01"; + final String apiVersion = "2021-05-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -581,7 +611,7 @@ private Mono> listSinglePageAsync() { new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2021-03-01"; + final String apiVersion = "2021-05-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -624,7 +654,7 @@ private Mono> listSinglePageAsync(Context con new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2021-03-01"; + final String apiVersion = "2021-05-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -725,7 +755,7 @@ private Mono> listByResourceGroupSinglePageAs return Mono .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } - final String apiVersion = "2021-03-01"; + final String apiVersion = "2021-05-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -780,7 +810,7 @@ private Mono> listByResourceGroupSinglePageAs return Mono .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } - final String apiVersion = "2021-03-01"; + final String apiVersion = "2021-05-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -900,7 +930,7 @@ public Mono> getUpgradeProfileWithRe if (resourceName == null) { return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); } - final String apiVersion = "2021-03-01"; + final String apiVersion = "2021-05-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -950,7 +980,7 @@ private Mono> getUpgradeProfileWithR if (resourceName == null) { return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); } - final String apiVersion = "2021-03-01"; + final String apiVersion = "2021-05-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -1062,7 +1092,7 @@ public Mono> getAccessProfileWithResp if (roleName == null) { return Mono.error(new IllegalArgumentException("Parameter roleName is required and cannot be null.")); } - final String apiVersion = "2021-03-01"; + final String apiVersion = "2021-05-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -1123,7 +1153,7 @@ private Mono> getAccessProfileWithRes if (roleName == null) { return Mono.error(new IllegalArgumentException("Parameter roleName is required and cannot be null.")); } - final String apiVersion = "2021-03-01"; + final String apiVersion = "2021-05-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -1221,6 +1251,7 @@ public Response getAccessProfileWithResponse( * * @param resourceGroupName The name of the resource group. * @param resourceName The name of the managed cluster resource. + * @param serverFqdn server fqdn type for credentials to be returned. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1228,7 +1259,7 @@ public Response getAccessProfileWithResponse( */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono> listClusterAdminCredentialsWithResponseAsync( - String resourceGroupName, String resourceName) { + String resourceGroupName, String resourceName, String serverFqdn) { if (this.client.getEndpoint() == null) { return Mono .error( @@ -1248,7 +1279,7 @@ public Mono> listClusterAdminCredentialsWithRes if (resourceName == null) { return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); } - final String apiVersion = "2021-03-01"; + final String apiVersion = "2021-05-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -1260,6 +1291,7 @@ public Mono> listClusterAdminCredentialsWithRes this.client.getSubscriptionId(), resourceGroupName, resourceName, + serverFqdn, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); @@ -1270,6 +1302,7 @@ public Mono> listClusterAdminCredentialsWithRes * * @param resourceGroupName The name of the resource group. * @param resourceName The name of the managed cluster resource. + * @param serverFqdn server fqdn type for credentials to be returned. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1278,7 +1311,7 @@ public Mono> listClusterAdminCredentialsWithRes */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listClusterAdminCredentialsWithResponseAsync( - String resourceGroupName, String resourceName, Context context) { + String resourceGroupName, String resourceName, String serverFqdn, Context context) { if (this.client.getEndpoint() == null) { return Mono .error( @@ -1298,7 +1331,7 @@ private Mono> listClusterAdminCredentialsWithRe if (resourceName == null) { return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); } - final String apiVersion = "2021-03-01"; + final String apiVersion = "2021-05-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -1308,10 +1341,36 @@ private Mono> listClusterAdminCredentialsWithRe this.client.getSubscriptionId(), resourceGroupName, resourceName, + serverFqdn, accept, context); } + /** + * Gets cluster admin credential of the managed cluster with a specified resource group and name. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the managed cluster resource. + * @param serverFqdn server fqdn type for credentials to be returned. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return cluster admin credential of the managed cluster with a specified resource group and name. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono listClusterAdminCredentialsAsync( + String resourceGroupName, String resourceName, String serverFqdn) { + return listClusterAdminCredentialsWithResponseAsync(resourceGroupName, resourceName, serverFqdn) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + /** * Gets cluster admin credential of the managed cluster with a specified resource group and name. * @@ -1325,7 +1384,8 @@ private Mono> listClusterAdminCredentialsWithRe @ServiceMethod(returns = ReturnType.SINGLE) public Mono listClusterAdminCredentialsAsync( String resourceGroupName, String resourceName) { - return listClusterAdminCredentialsWithResponseAsync(resourceGroupName, resourceName) + final String serverFqdn = null; + return listClusterAdminCredentialsWithResponseAsync(resourceGroupName, resourceName, serverFqdn) .flatMap( (Response res) -> { if (res.getValue() != null) { @@ -1348,7 +1408,8 @@ public Mono listClusterAdminCredentialsAsync( */ @ServiceMethod(returns = ReturnType.SINGLE) public CredentialResultsInner listClusterAdminCredentials(String resourceGroupName, String resourceName) { - return listClusterAdminCredentialsAsync(resourceGroupName, resourceName).block(); + final String serverFqdn = null; + return listClusterAdminCredentialsAsync(resourceGroupName, resourceName, serverFqdn).block(); } /** @@ -1356,6 +1417,7 @@ public CredentialResultsInner listClusterAdminCredentials(String resourceGroupNa * * @param resourceGroupName The name of the resource group. * @param resourceName The name of the managed cluster resource. + * @param serverFqdn server fqdn type for credentials to be returned. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1364,8 +1426,9 @@ public CredentialResultsInner listClusterAdminCredentials(String resourceGroupNa */ @ServiceMethod(returns = ReturnType.SINGLE) public Response listClusterAdminCredentialsWithResponse( - String resourceGroupName, String resourceName, Context context) { - return listClusterAdminCredentialsWithResponseAsync(resourceGroupName, resourceName, context).block(); + String resourceGroupName, String resourceName, String serverFqdn, Context context) { + return listClusterAdminCredentialsWithResponseAsync(resourceGroupName, resourceName, serverFqdn, context) + .block(); } /** @@ -1373,6 +1436,7 @@ public Response listClusterAdminCredentialsWithResponse( * * @param resourceGroupName The name of the resource group. * @param resourceName The name of the managed cluster resource. + * @param serverFqdn server fqdn type for credentials to be returned. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1380,7 +1444,7 @@ public Response listClusterAdminCredentialsWithResponse( */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono> listClusterUserCredentialsWithResponseAsync( - String resourceGroupName, String resourceName) { + String resourceGroupName, String resourceName, String serverFqdn) { if (this.client.getEndpoint() == null) { return Mono .error( @@ -1400,7 +1464,7 @@ public Mono> listClusterUserCredentialsWithResp if (resourceName == null) { return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); } - final String apiVersion = "2021-03-01"; + final String apiVersion = "2021-05-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -1412,6 +1476,7 @@ public Mono> listClusterUserCredentialsWithResp this.client.getSubscriptionId(), resourceGroupName, resourceName, + serverFqdn, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); @@ -1422,6 +1487,7 @@ public Mono> listClusterUserCredentialsWithResp * * @param resourceGroupName The name of the resource group. * @param resourceName The name of the managed cluster resource. + * @param serverFqdn server fqdn type for credentials to be returned. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1430,7 +1496,7 @@ public Mono> listClusterUserCredentialsWithResp */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listClusterUserCredentialsWithResponseAsync( - String resourceGroupName, String resourceName, Context context) { + String resourceGroupName, String resourceName, String serverFqdn, Context context) { if (this.client.getEndpoint() == null) { return Mono .error( @@ -1450,7 +1516,7 @@ private Mono> listClusterUserCredentialsWithRes if (resourceName == null) { return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); } - final String apiVersion = "2021-03-01"; + final String apiVersion = "2021-05-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -1460,10 +1526,36 @@ private Mono> listClusterUserCredentialsWithRes this.client.getSubscriptionId(), resourceGroupName, resourceName, + serverFqdn, accept, context); } + /** + * Gets cluster user credential of the managed cluster with a specified resource group and name. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the managed cluster resource. + * @param serverFqdn server fqdn type for credentials to be returned. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return cluster user credential of the managed cluster with a specified resource group and name. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono listClusterUserCredentialsAsync( + String resourceGroupName, String resourceName, String serverFqdn) { + return listClusterUserCredentialsWithResponseAsync(resourceGroupName, resourceName, serverFqdn) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + /** * Gets cluster user credential of the managed cluster with a specified resource group and name. * @@ -1476,7 +1568,8 @@ private Mono> listClusterUserCredentialsWithRes */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono listClusterUserCredentialsAsync(String resourceGroupName, String resourceName) { - return listClusterUserCredentialsWithResponseAsync(resourceGroupName, resourceName) + final String serverFqdn = null; + return listClusterUserCredentialsWithResponseAsync(resourceGroupName, resourceName, serverFqdn) .flatMap( (Response res) -> { if (res.getValue() != null) { @@ -1499,7 +1592,8 @@ public Mono listClusterUserCredentialsAsync(String resou */ @ServiceMethod(returns = ReturnType.SINGLE) public CredentialResultsInner listClusterUserCredentials(String resourceGroupName, String resourceName) { - return listClusterUserCredentialsAsync(resourceGroupName, resourceName).block(); + final String serverFqdn = null; + return listClusterUserCredentialsAsync(resourceGroupName, resourceName, serverFqdn).block(); } /** @@ -1507,6 +1601,7 @@ public CredentialResultsInner listClusterUserCredentials(String resourceGroupNam * * @param resourceGroupName The name of the resource group. * @param resourceName The name of the managed cluster resource. + * @param serverFqdn server fqdn type for credentials to be returned. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1515,8 +1610,9 @@ public CredentialResultsInner listClusterUserCredentials(String resourceGroupNam */ @ServiceMethod(returns = ReturnType.SINGLE) public Response listClusterUserCredentialsWithResponse( - String resourceGroupName, String resourceName, Context context) { - return listClusterUserCredentialsWithResponseAsync(resourceGroupName, resourceName, context).block(); + String resourceGroupName, String resourceName, String serverFqdn, Context context) { + return listClusterUserCredentialsWithResponseAsync(resourceGroupName, resourceName, serverFqdn, context) + .block(); } /** @@ -1524,6 +1620,7 @@ public Response listClusterUserCredentialsWithResponse( * * @param resourceGroupName The name of the resource group. * @param resourceName The name of the managed cluster resource. + * @param serverFqdn server fqdn type for credentials to be returned. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1531,7 +1628,7 @@ public Response listClusterUserCredentialsWithResponse( */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono> listClusterMonitoringUserCredentialsWithResponseAsync( - String resourceGroupName, String resourceName) { + String resourceGroupName, String resourceName, String serverFqdn) { if (this.client.getEndpoint() == null) { return Mono .error( @@ -1551,7 +1648,7 @@ public Mono> listClusterMonitoringUserCredentia if (resourceName == null) { return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); } - final String apiVersion = "2021-03-01"; + final String apiVersion = "2021-05-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -1563,6 +1660,7 @@ public Mono> listClusterMonitoringUserCredentia this.client.getSubscriptionId(), resourceGroupName, resourceName, + serverFqdn, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); @@ -1573,6 +1671,7 @@ public Mono> listClusterMonitoringUserCredentia * * @param resourceGroupName The name of the resource group. * @param resourceName The name of the managed cluster resource. + * @param serverFqdn server fqdn type for credentials to be returned. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1581,7 +1680,7 @@ public Mono> listClusterMonitoringUserCredentia */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listClusterMonitoringUserCredentialsWithResponseAsync( - String resourceGroupName, String resourceName, Context context) { + String resourceGroupName, String resourceName, String serverFqdn, Context context) { if (this.client.getEndpoint() == null) { return Mono .error( @@ -1601,7 +1700,7 @@ private Mono> listClusterMonitoringUserCredenti if (resourceName == null) { return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); } - final String apiVersion = "2021-03-01"; + final String apiVersion = "2021-05-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -1611,10 +1710,36 @@ private Mono> listClusterMonitoringUserCredenti this.client.getSubscriptionId(), resourceGroupName, resourceName, + serverFqdn, accept, context); } + /** + * Gets cluster monitoring user credential of the managed cluster with a specified resource group and name. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the managed cluster resource. + * @param serverFqdn server fqdn type for credentials to be returned. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return cluster monitoring user credential of the managed cluster with a specified resource group and name. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono listClusterMonitoringUserCredentialsAsync( + String resourceGroupName, String resourceName, String serverFqdn) { + return listClusterMonitoringUserCredentialsWithResponseAsync(resourceGroupName, resourceName, serverFqdn) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + /** * Gets cluster monitoring user credential of the managed cluster with a specified resource group and name. * @@ -1628,7 +1753,8 @@ private Mono> listClusterMonitoringUserCredenti @ServiceMethod(returns = ReturnType.SINGLE) public Mono listClusterMonitoringUserCredentialsAsync( String resourceGroupName, String resourceName) { - return listClusterMonitoringUserCredentialsWithResponseAsync(resourceGroupName, resourceName) + final String serverFqdn = null; + return listClusterMonitoringUserCredentialsWithResponseAsync(resourceGroupName, resourceName, serverFqdn) .flatMap( (Response res) -> { if (res.getValue() != null) { @@ -1651,7 +1777,8 @@ public Mono listClusterMonitoringUserCredentialsAsync( */ @ServiceMethod(returns = ReturnType.SINGLE) public CredentialResultsInner listClusterMonitoringUserCredentials(String resourceGroupName, String resourceName) { - return listClusterMonitoringUserCredentialsAsync(resourceGroupName, resourceName).block(); + final String serverFqdn = null; + return listClusterMonitoringUserCredentialsAsync(resourceGroupName, resourceName, serverFqdn).block(); } /** @@ -1659,6 +1786,7 @@ public CredentialResultsInner listClusterMonitoringUserCredentials(String resour * * @param resourceGroupName The name of the resource group. * @param resourceName The name of the managed cluster resource. + * @param serverFqdn server fqdn type for credentials to be returned. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1667,8 +1795,10 @@ public CredentialResultsInner listClusterMonitoringUserCredentials(String resour */ @ServiceMethod(returns = ReturnType.SINGLE) public Response listClusterMonitoringUserCredentialsWithResponse( - String resourceGroupName, String resourceName, Context context) { - return listClusterMonitoringUserCredentialsWithResponseAsync(resourceGroupName, resourceName, context).block(); + String resourceGroupName, String resourceName, String serverFqdn, Context context) { + return listClusterMonitoringUserCredentialsWithResponseAsync( + resourceGroupName, resourceName, serverFqdn, context) + .block(); } /** @@ -1703,7 +1833,7 @@ public Mono> getByResourceGroupWithResponseAsync( if (resourceName == null) { return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); } - final String apiVersion = "2021-03-01"; + final String apiVersion = "2021-05-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -1753,7 +1883,7 @@ private Mono> getByResourceGroupWithResponseAsync( if (resourceName == null) { return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); } - final String apiVersion = "2021-03-01"; + final String apiVersion = "2021-05-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -1860,7 +1990,7 @@ public Mono>> createOrUpdateWithResponseAsync( } else { parameters.validate(); } - final String apiVersion = "2021-03-01"; + final String apiVersion = "2021-05-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -1917,7 +2047,7 @@ private Mono>> createOrUpdateWithResponseAsync( } else { parameters.validate(); } - final String apiVersion = "2021-03-01"; + final String apiVersion = "2021-05-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -2124,7 +2254,7 @@ public Mono>> updateTagsWithResponseAsync( if (resourceName == null) { return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); } - final String apiVersion = "2021-03-01"; + final String apiVersion = "2021-05-01"; final String accept = "application/json"; TagsObject parameters = new TagsObject(); parameters.withTags(tags); @@ -2178,7 +2308,7 @@ private Mono>> updateTagsWithResponseAsync( if (resourceName == null) { return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); } - final String apiVersion = "2021-03-01"; + final String apiVersion = "2021-05-01"; final String accept = "application/json"; TagsObject parameters = new TagsObject(); parameters.withTags(tags); @@ -2417,7 +2547,7 @@ public Mono>> deleteWithResponseAsync(String resourceG if (resourceName == null) { return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); } - final String apiVersion = "2021-03-01"; + final String apiVersion = "2021-05-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -2467,7 +2597,7 @@ private Mono>> deleteWithResponseAsync( if (resourceName == null) { return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); } - final String apiVersion = "2021-03-01"; + final String apiVersion = "2021-05-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -2652,7 +2782,7 @@ public Mono>> resetServicePrincipalProfileWithResponse } else { parameters.validate(); } - final String apiVersion = "2021-03-01"; + final String apiVersion = "2021-05-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -2712,7 +2842,7 @@ private Mono>> resetServicePrincipalProfileWithRespons } else { parameters.validate(); } - final String apiVersion = "2021-03-01"; + final String apiVersion = "2021-05-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -2929,7 +3059,7 @@ public Mono>> resetAadProfileWithResponseAsync( } else { parameters.validate(); } - final String apiVersion = "2021-03-01"; + final String apiVersion = "2021-05-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -2986,7 +3116,7 @@ private Mono>> resetAadProfileWithResponseAsync( } else { parameters.validate(); } - final String apiVersion = "2021-03-01"; + final String apiVersion = "2021-05-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -3183,7 +3313,7 @@ public Mono>> rotateClusterCertificatesWithResponseAsy if (resourceName == null) { return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); } - final String apiVersion = "2021-03-01"; + final String apiVersion = "2021-05-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -3233,7 +3363,7 @@ private Mono>> rotateClusterCertificatesWithResponseAs if (resourceName == null) { return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); } - final String apiVersion = "2021-03-01"; + final String apiVersion = "2021-05-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -3417,7 +3547,7 @@ public Mono>> stopWithResponseAsync(String resourceGro if (resourceName == null) { return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); } - final String apiVersion = "2021-03-01"; + final String apiVersion = "2021-05-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -3467,7 +3597,7 @@ private Mono>> stopWithResponseAsync( if (resourceName == null) { return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); } - final String apiVersion = "2021-03-01"; + final String apiVersion = "2021-05-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -3645,7 +3775,7 @@ public Mono>> startWithResponseAsync(String resourceGr if (resourceName == null) { return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); } - final String apiVersion = "2021-03-01"; + final String apiVersion = "2021-05-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -3695,7 +3825,7 @@ private Mono>> startWithResponseAsync( if (resourceName == null) { return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); } - final String apiVersion = "2021-03-01"; + final String apiVersion = "2021-05-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -3880,7 +4010,7 @@ public Mono>> runCommandWithResponseAsync( } else { requestPayload.validate(); } - final String apiVersion = "2021-03-01"; + final String apiVersion = "2021-05-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -3937,7 +4067,7 @@ private Mono>> runCommandWithResponseAsync( } else { requestPayload.validate(); } - final String apiVersion = "2021-03-01"; + final String apiVersion = "2021-05-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -4147,7 +4277,7 @@ public Mono> getCommandResultWithResponseAsync( if (commandId == null) { return Mono.error(new IllegalArgumentException("Parameter commandId is required and cannot be null.")); } - final String apiVersion = "2021-03-01"; + final String apiVersion = "2021-05-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -4202,7 +4332,7 @@ private Mono> getCommandResultWithResponseAsync( if (commandId == null) { return Mono.error(new IllegalArgumentException("Parameter commandId is required and cannot be null.")); } - final String apiVersion = "2021-03-01"; + final String apiVersion = "2021-05-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -4276,6 +4406,204 @@ public Response getCommandResultWithResponse( return getCommandResultWithResponseAsync(resourceGroupName, resourceName, commandId, context).block(); } + /** + * Gets a list of egress endpoints (network endpoints of all outbound dependencies) in the specified managed + * cluster. The operation returns properties of each egress endpoint. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of egress endpoints (network endpoints of all outbound dependencies) in the specified managed + * cluster. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + listOutboundNetworkDependenciesEndpointsSinglePageAsync(String resourceGroupName, String resourceName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + final String apiVersion = "2021-05-01"; + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .listOutboundNetworkDependenciesEndpoints( + this.client.getEndpoint(), + apiVersion, + this.client.getSubscriptionId(), + resourceGroupName, + resourceName, + accept, + context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets a list of egress endpoints (network endpoints of all outbound dependencies) in the specified managed + * cluster. The operation returns properties of each egress endpoint. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the managed cluster resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of egress endpoints (network endpoints of all outbound dependencies) in the specified managed + * cluster. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + listOutboundNetworkDependenciesEndpointsSinglePageAsync( + String resourceGroupName, String resourceName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + final String apiVersion = "2021-05-01"; + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listOutboundNetworkDependenciesEndpoints( + this.client.getEndpoint(), + apiVersion, + this.client.getSubscriptionId(), + resourceGroupName, + resourceName, + accept, + context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * Gets a list of egress endpoints (network endpoints of all outbound dependencies) in the specified managed + * cluster. The operation returns properties of each egress endpoint. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of egress endpoints (network endpoints of all outbound dependencies) in the specified managed + * cluster. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listOutboundNetworkDependenciesEndpointsAsync( + String resourceGroupName, String resourceName) { + return new PagedFlux<>( + () -> listOutboundNetworkDependenciesEndpointsSinglePageAsync(resourceGroupName, resourceName), + nextLink -> listOutboundNetworkDependenciesEndpointsNextSinglePageAsync(nextLink)); + } + + /** + * Gets a list of egress endpoints (network endpoints of all outbound dependencies) in the specified managed + * cluster. The operation returns properties of each egress endpoint. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the managed cluster resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of egress endpoints (network endpoints of all outbound dependencies) in the specified managed + * cluster. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listOutboundNetworkDependenciesEndpointsAsync( + String resourceGroupName, String resourceName, Context context) { + return new PagedFlux<>( + () -> listOutboundNetworkDependenciesEndpointsSinglePageAsync(resourceGroupName, resourceName, context), + nextLink -> listOutboundNetworkDependenciesEndpointsNextSinglePageAsync(nextLink, context)); + } + + /** + * Gets a list of egress endpoints (network endpoints of all outbound dependencies) in the specified managed + * cluster. The operation returns properties of each egress endpoint. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of egress endpoints (network endpoints of all outbound dependencies) in the specified managed + * cluster. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listOutboundNetworkDependenciesEndpoints( + String resourceGroupName, String resourceName) { + return new PagedIterable<>(listOutboundNetworkDependenciesEndpointsAsync(resourceGroupName, resourceName)); + } + + /** + * Gets a list of egress endpoints (network endpoints of all outbound dependencies) in the specified managed + * cluster. The operation returns properties of each egress endpoint. + * + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the managed cluster resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of egress endpoints (network endpoints of all outbound dependencies) in the specified managed + * cluster. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listOutboundNetworkDependenciesEndpoints( + String resourceGroupName, String resourceName, Context context) { + return new PagedIterable<>( + listOutboundNetworkDependenciesEndpointsAsync(resourceGroupName, resourceName, context)); + } + /** * Get the next page of items. * @@ -4419,4 +4747,81 @@ private Mono> listByResourceGroupNextSinglePa res.getValue().nextLink(), null)); } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of OutboundEnvironmentEndpoint. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + listOutboundNetworkDependenciesEndpointsNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .listOutboundNetworkDependenciesEndpointsNext( + nextLink, this.client.getEndpoint(), accept, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of OutboundEnvironmentEndpoint. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + listOutboundNetworkDependenciesEndpointsNextSinglePageAsync(String nextLink, Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listOutboundNetworkDependenciesEndpointsNext(nextLink, this.client.getEndpoint(), accept, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/OperationsClientImpl.java b/sdk/resourcemanager/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/OperationsClientImpl.java index e5dba604fe90..5d440150c25e 100644 --- a/sdk/resourcemanager/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/OperationsClientImpl.java +++ b/sdk/resourcemanager/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/OperationsClientImpl.java @@ -84,7 +84,7 @@ private Mono> listSinglePageAsync() { new IllegalArgumentException( "Parameter this.client.getEndpoint() is required and cannot be null.")); } - final String apiVersion = "2021-03-01"; + final String apiVersion = "2021-05-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.list(this.client.getEndpoint(), apiVersion, accept, context)) @@ -112,7 +112,7 @@ private Mono> listSinglePageAsync(Context con new IllegalArgumentException( "Parameter this.client.getEndpoint() is required and cannot be null.")); } - final String apiVersion = "2021-03-01"; + final String apiVersion = "2021-05-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service diff --git a/sdk/resourcemanager/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/PrivateEndpointConnectionsClientImpl.java b/sdk/resourcemanager/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/PrivateEndpointConnectionsClientImpl.java index bdc6c7b1a6ba..c15142d93c2d 100644 --- a/sdk/resourcemanager/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/PrivateEndpointConnectionsClientImpl.java +++ b/sdk/resourcemanager/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/PrivateEndpointConnectionsClientImpl.java @@ -163,7 +163,7 @@ public Mono> listWithResponse if (resourceName == null) { return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); } - final String apiVersion = "2021-03-01"; + final String apiVersion = "2021-05-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -214,7 +214,7 @@ private Mono> listWithRespons if (resourceName == null) { return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); } - final String apiVersion = "2021-03-01"; + final String apiVersion = "2021-05-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -325,7 +325,7 @@ public Mono> getWithResponseAsync( new IllegalArgumentException( "Parameter privateEndpointConnectionName is required and cannot be null.")); } - final String apiVersion = "2021-03-01"; + final String apiVersion = "2021-05-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -383,7 +383,7 @@ private Mono> getWithResponseAsync( new IllegalArgumentException( "Parameter privateEndpointConnectionName is required and cannot be null.")); } - final String apiVersion = "2021-03-01"; + final String apiVersion = "2021-05-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -506,7 +506,7 @@ public Mono> updateWithResponseAsync( } else { parameters.validate(); } - final String apiVersion = "2021-03-01"; + final String apiVersion = "2021-05-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -575,7 +575,7 @@ private Mono> updateWithResponseAsync( } else { parameters.validate(); } - final String apiVersion = "2021-03-01"; + final String apiVersion = "2021-05-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -705,7 +705,7 @@ public Mono>> deleteWithResponseAsync( new IllegalArgumentException( "Parameter privateEndpointConnectionName is required and cannot be null.")); } - final String apiVersion = "2021-03-01"; + final String apiVersion = "2021-05-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -763,7 +763,7 @@ private Mono>> deleteWithResponseAsync( new IllegalArgumentException( "Parameter privateEndpointConnectionName is required and cannot be null.")); } - final String apiVersion = "2021-03-01"; + final String apiVersion = "2021-05-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service diff --git a/sdk/resourcemanager/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/PrivateLinkResourcesClientImpl.java b/sdk/resourcemanager/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/PrivateLinkResourcesClientImpl.java index 3ee8b05c911f..e1cc61d080bf 100644 --- a/sdk/resourcemanager/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/PrivateLinkResourcesClientImpl.java +++ b/sdk/resourcemanager/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/PrivateLinkResourcesClientImpl.java @@ -104,7 +104,7 @@ public Mono> listWithResponseAsync if (resourceName == null) { return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); } - final String apiVersion = "2021-03-01"; + final String apiVersion = "2021-05-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -155,7 +155,7 @@ private Mono> listWithResponseAsyn if (resourceName == null) { return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); } - final String apiVersion = "2021-03-01"; + final String apiVersion = "2021-05-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service diff --git a/sdk/resourcemanager/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/ResolvePrivateLinkServiceIdsClientImpl.java b/sdk/resourcemanager/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/ResolvePrivateLinkServiceIdsClientImpl.java index b0f73226572e..b91f00b552ef 100644 --- a/sdk/resourcemanager/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/ResolvePrivateLinkServiceIdsClientImpl.java +++ b/sdk/resourcemanager/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/ResolvePrivateLinkServiceIdsClientImpl.java @@ -112,7 +112,7 @@ public Mono> postWithResponseAsync( } else { parameters.validate(); } - final String apiVersion = "2021-03-01"; + final String apiVersion = "2021-05-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -169,7 +169,7 @@ private Mono> postWithResponseAsync( } else { parameters.validate(); } - final String apiVersion = "2021-03-01"; + final String apiVersion = "2021-05-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service diff --git a/sdk/resourcemanager/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/Count.java b/sdk/resourcemanager/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/Count.java index 2c452cc0f0d5..02c7b0568cf3 100644 --- a/sdk/resourcemanager/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/Count.java +++ b/sdk/resourcemanager/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/Count.java @@ -10,18 +10,18 @@ /** Defines values for Count. */ public enum Count { /** Enum value 1. */ - ONE(1), + ONE("1"), /** Enum value 3. */ - THREE(3), + THREE("3"), /** Enum value 5. */ - FIVE(5); + FIVE("5"); /** The actual serialized value for a Count instance. */ - private final int value; + private final String value; - Count(int value) { + Count(String value) { this.value = value; } @@ -32,23 +32,19 @@ public enum Count { * @return the parsed Count object, or null if unable to parse. */ @JsonCreator - public static Count fromInt(int value) { + public static Count fromString(String value) { Count[] items = Count.values(); for (Count item : items) { - if (item.toInt() == value) { + if (item.toString().equalsIgnoreCase(value)) { return item; } } return null; } - /** - * De-serializes the instance to int value. - * - * @return the int value. - */ @JsonValue - public int toInt() { + @Override + public String toString() { return this.value; } } diff --git a/sdk/resourcemanager/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/EndpointDependency.java b/sdk/resourcemanager/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/EndpointDependency.java new file mode 100644 index 000000000000..9c5140c2d58a --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/EndpointDependency.java @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** A domain name that AKS agent nodes are reaching at. */ +@Fluent +public final class EndpointDependency { + @JsonIgnore private final ClientLogger logger = new ClientLogger(EndpointDependency.class); + + /* + * The domain name of the dependency. + */ + @JsonProperty(value = "domainName") + private String domainName; + + /* + * The Ports and Protocols used when connecting to domainName. + */ + @JsonProperty(value = "endpointDetails") + private List endpointDetails; + + /** + * Get the domainName property: The domain name of the dependency. + * + * @return the domainName value. + */ + public String domainName() { + return this.domainName; + } + + /** + * Set the domainName property: The domain name of the dependency. + * + * @param domainName the domainName value to set. + * @return the EndpointDependency object itself. + */ + public EndpointDependency withDomainName(String domainName) { + this.domainName = domainName; + return this; + } + + /** + * Get the endpointDetails property: The Ports and Protocols used when connecting to domainName. + * + * @return the endpointDetails value. + */ + public List endpointDetails() { + return this.endpointDetails; + } + + /** + * Set the endpointDetails property: The Ports and Protocols used when connecting to domainName. + * + * @param endpointDetails the endpointDetails value to set. + * @return the EndpointDependency object itself. + */ + public EndpointDependency withEndpointDetails(List endpointDetails) { + this.endpointDetails = endpointDetails; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (endpointDetails() != null) { + endpointDetails().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/EndpointDetail.java b/sdk/resourcemanager/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/EndpointDetail.java new file mode 100644 index 000000000000..aff6a09c7447 --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/EndpointDetail.java @@ -0,0 +1,128 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** connect information from the AKS agent nodes to a single endpoint. */ +@Fluent +public final class EndpointDetail { + @JsonIgnore private final ClientLogger logger = new ClientLogger(EndpointDetail.class); + + /* + * An IP Address that Domain Name currently resolves to. + */ + @JsonProperty(value = "ipAddress") + private String ipAddress; + + /* + * The port an endpoint is connected to. + */ + @JsonProperty(value = "port") + private Integer port; + + /* + * The protocol used for connection + */ + @JsonProperty(value = "protocol") + private String protocol; + + /* + * Description of the detail + */ + @JsonProperty(value = "description") + private String description; + + /** + * Get the ipAddress property: An IP Address that Domain Name currently resolves to. + * + * @return the ipAddress value. + */ + public String ipAddress() { + return this.ipAddress; + } + + /** + * Set the ipAddress property: An IP Address that Domain Name currently resolves to. + * + * @param ipAddress the ipAddress value to set. + * @return the EndpointDetail object itself. + */ + public EndpointDetail withIpAddress(String ipAddress) { + this.ipAddress = ipAddress; + return this; + } + + /** + * Get the port property: The port an endpoint is connected to. + * + * @return the port value. + */ + public Integer port() { + return this.port; + } + + /** + * Set the port property: The port an endpoint is connected to. + * + * @param port the port value to set. + * @return the EndpointDetail object itself. + */ + public EndpointDetail withPort(Integer port) { + this.port = port; + return this; + } + + /** + * Get the protocol property: The protocol used for connection. + * + * @return the protocol value. + */ + public String protocol() { + return this.protocol; + } + + /** + * Set the protocol property: The protocol used for connection. + * + * @param protocol the protocol value to set. + * @return the EndpointDetail object itself. + */ + public EndpointDetail withProtocol(String protocol) { + this.protocol = protocol; + return this; + } + + /** + * Get the description property: Description of the detail. + * + * @return the description value. + */ + public String description() { + return this.description; + } + + /** + * Set the description property: Description of the detail. + * + * @param description the description value to set. + * @return the EndpointDetail object itself. + */ + public EndpointDetail withDescription(String description) { + this.description = description; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterAgentPoolProfile.java b/sdk/resourcemanager/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterAgentPoolProfile.java index aea1bcd24e81..baab5e1abcf8 100644 --- a/sdk/resourcemanager/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterAgentPoolProfile.java +++ b/sdk/resourcemanager/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterAgentPoolProfile.java @@ -255,6 +255,13 @@ public ManagedClusterAgentPoolProfile withEnableEncryptionAtHost(Boolean enableE return this; } + /** {@inheritDoc} */ + @Override + public ManagedClusterAgentPoolProfile withEnableUltraSsd(Boolean enableUltraSsd) { + super.withEnableUltraSsd(enableUltraSsd); + return this; + } + /** {@inheritDoc} */ @Override public ManagedClusterAgentPoolProfile withEnableFips(Boolean enableFips) { diff --git a/sdk/resourcemanager/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterAgentPoolProfileProperties.java b/sdk/resourcemanager/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterAgentPoolProfileProperties.java index 2348f4aca6a3..d9eb87d6b271 100644 --- a/sdk/resourcemanager/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterAgentPoolProfileProperties.java +++ b/sdk/resourcemanager/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterAgentPoolProfileProperties.java @@ -18,8 +18,8 @@ public class ManagedClusterAgentPoolProfileProperties { /* * Number of agents (VMs) to host docker containers. Allowed values must be - * in the range of 0 to 100 (inclusive) for user pools and in the range of - * 1 to 100 (inclusive) for system pools. The default value is 1. + * in the range of 0 to 1000 (inclusive) for user pools and in the range of + * 1 to 1000 (inclusive) for system pools. The default value is 1. */ @JsonProperty(value = "count") private Integer count; @@ -236,6 +236,12 @@ public class ManagedClusterAgentPoolProfileProperties { @JsonProperty(value = "enableEncryptionAtHost") private Boolean enableEncryptionAtHost; + /* + * Whether to enable UltraSSD + */ + @JsonProperty(value = "enableUltraSSD") + private Boolean enableUltraSsd; + /* * Whether to use FIPS enabled OS */ @@ -252,8 +258,8 @@ public class ManagedClusterAgentPoolProfileProperties { /** * Get the count property: Number of agents (VMs) to host docker containers. Allowed values must be in the range of - * 0 to 100 (inclusive) for user pools and in the range of 1 to 100 (inclusive) for system pools. The default value - * is 1. + * 0 to 1000 (inclusive) for user pools and in the range of 1 to 1000 (inclusive) for system pools. The default + * value is 1. * * @return the count value. */ @@ -263,8 +269,8 @@ public Integer count() { /** * Set the count property: Number of agents (VMs) to host docker containers. Allowed values must be in the range of - * 0 to 100 (inclusive) for user pools and in the range of 1 to 100 (inclusive) for system pools. The default value - * is 1. + * 0 to 1000 (inclusive) for user pools and in the range of 1 to 1000 (inclusive) for system pools. The default + * value is 1. * * @param count the count value to set. * @return the ManagedClusterAgentPoolProfileProperties object itself. @@ -907,6 +913,26 @@ public ManagedClusterAgentPoolProfileProperties withEnableEncryptionAtHost(Boole return this; } + /** + * Get the enableUltraSsd property: Whether to enable UltraSSD. + * + * @return the enableUltraSsd value. + */ + public Boolean enableUltraSsd() { + return this.enableUltraSsd; + } + + /** + * Set the enableUltraSsd property: Whether to enable UltraSSD. + * + * @param enableUltraSsd the enableUltraSsd value to set. + * @return the ManagedClusterAgentPoolProfileProperties object itself. + */ + public ManagedClusterAgentPoolProfileProperties withEnableUltraSsd(Boolean enableUltraSsd) { + this.enableUltraSsd = enableUltraSsd; + return this; + } + /** * Get the enableFips property: Whether to use FIPS enabled OS. * diff --git a/sdk/resourcemanager/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterApiServerAccessProfile.java b/sdk/resourcemanager/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterApiServerAccessProfile.java index ab9770322394..bb2705333d19 100644 --- a/sdk/resourcemanager/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterApiServerAccessProfile.java +++ b/sdk/resourcemanager/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterApiServerAccessProfile.java @@ -33,6 +33,12 @@ public final class ManagedClusterApiServerAccessProfile { @JsonProperty(value = "privateDNSZone") private String privateDnsZone; + /* + * Whether to create additional public FQDN for private cluster or not. + */ + @JsonProperty(value = "enablePrivateClusterPublicFQDN") + private Boolean enablePrivateClusterPublicFqdn; + /** * Get the authorizedIpRanges property: Authorized IP Ranges to kubernetes API server. * @@ -93,6 +99,29 @@ public ManagedClusterApiServerAccessProfile withPrivateDnsZone(String privateDns return this; } + /** + * Get the enablePrivateClusterPublicFqdn property: Whether to create additional public FQDN for private cluster or + * not. + * + * @return the enablePrivateClusterPublicFqdn value. + */ + public Boolean enablePrivateClusterPublicFqdn() { + return this.enablePrivateClusterPublicFqdn; + } + + /** + * Set the enablePrivateClusterPublicFqdn property: Whether to create additional public FQDN for private cluster or + * not. + * + * @param enablePrivateClusterPublicFqdn the enablePrivateClusterPublicFqdn value to set. + * @return the ManagedClusterApiServerAccessProfile object itself. + */ + public ManagedClusterApiServerAccessProfile withEnablePrivateClusterPublicFqdn( + Boolean enablePrivateClusterPublicFqdn) { + this.enablePrivateClusterPublicFqdn = enablePrivateClusterPublicFqdn; + return this; + } + /** * Validates the instance. * diff --git a/sdk/resourcemanager/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/OutboundEnvironmentEndpointCollection.java b/sdk/resourcemanager/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/OutboundEnvironmentEndpointCollection.java new file mode 100644 index 000000000000..eea2239d3f1c --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/OutboundEnvironmentEndpointCollection.java @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.containerservice.fluent.models.OutboundEnvironmentEndpointInner; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Collection of OutboundEnvironmentEndpoint. */ +@Fluent +public final class OutboundEnvironmentEndpointCollection { + @JsonIgnore private final ClientLogger logger = new ClientLogger(OutboundEnvironmentEndpointCollection.class); + + /* + * Collection of resources. + */ + @JsonProperty(value = "value", required = true) + private List value; + + /* + * Link to next page of resources. + */ + @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) + private String nextLink; + + /** + * Get the value property: Collection of resources. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Set the value property: Collection of resources. + * + * @param value the value value to set. + * @return the OutboundEnvironmentEndpointCollection object itself. + */ + public OutboundEnvironmentEndpointCollection withValue(List value) { + this.value = value; + return this; + } + + /** + * Get the nextLink property: Link to next page of resources. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property value in model OutboundEnvironmentEndpointCollection")); + } else { + value().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager-containerservice/src/test/resources/session-records/KubernetesClustersTests.canAutoScaleKubernetesCluster.json b/sdk/resourcemanager/azure-resourcemanager-containerservice/src/test/resources/session-records/KubernetesClustersTests.canAutoScaleKubernetesCluster.json index c13d2e86bb39..9b64ba666853 100644 --- a/sdk/resourcemanager/azure-resourcemanager-containerservice/src/test/resources/session-records/KubernetesClustersTests.canAutoScaleKubernetesCluster.json +++ b/sdk/resourcemanager/azure-resourcemanager-containerservice/src/test/resources/session-records/KubernetesClustersTests.canAutoScaleKubernetesCluster.json @@ -27,7 +27,7 @@ "Exception" : null }, { "Method" : "PUT", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javaacsrg34976/providers/Microsoft.ContainerService/managedClusters/aks66476663?api-version=2021-03-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javaacsrg34976/providers/Microsoft.ContainerService/managedClusters/aks66476663?api-version=2021-05-01", "Headers" : { "User-Agent" : "azsdk-java-com.azure.resourcemanager.containerservice/2.5.0-beta.1 (15.0.1; Windows 10; 10.0)", "x-ms-client-request-id" : "33f018fe-b6ac-4c0d-97e4-e08f39e775d7", @@ -237,7 +237,7 @@ "Exception" : null }, { "Method" : "GET", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javaacsrg34976/providers/Microsoft.ContainerService/managedClusters/aks66476663?api-version=2021-03-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javaacsrg34976/providers/Microsoft.ContainerService/managedClusters/aks66476663?api-version=2021-05-01", "Headers" : { "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (15.0.1; Windows 10; 10.0)", "x-ms-client-request-id" : "b87c1078-31fc-49a0-a64b-d0d5d1100b07" @@ -263,7 +263,7 @@ "Exception" : null }, { "Method" : "POST", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javaacsrg34976/providers/Microsoft.ContainerService/managedClusters/aks66476663/listClusterUserCredential?api-version=2021-03-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javaacsrg34976/providers/Microsoft.ContainerService/managedClusters/aks66476663/listClusterUserCredential?api-version=2021-05-01", "Headers" : { "User-Agent" : "azsdk-java-com.azure.resourcemanager.containerservice/2.5.0-beta.1 (15.0.1; Windows 10; 10.0)", "x-ms-client-request-id" : "6d883205-65d0-452f-b389-3954a43502e7", @@ -290,7 +290,7 @@ "Exception" : null }, { "Method" : "POST", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javaacsrg34976/providers/Microsoft.ContainerService/managedClusters/aks66476663/listClusterAdminCredential?api-version=2021-03-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javaacsrg34976/providers/Microsoft.ContainerService/managedClusters/aks66476663/listClusterAdminCredential?api-version=2021-05-01", "Headers" : { "User-Agent" : "azsdk-java-com.azure.resourcemanager.containerservice/2.5.0-beta.1 (15.0.1; Windows 10; 10.0)", "x-ms-client-request-id" : "bb70578d-26e0-46bd-921a-b82f3d46eb95", @@ -317,7 +317,7 @@ "Exception" : null }, { "Method" : "PUT", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javaacsrg34976/providers/Microsoft.ContainerService/managedClusters/aks66476663?api-version=2021-03-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javaacsrg34976/providers/Microsoft.ContainerService/managedClusters/aks66476663?api-version=2021-05-01", "Headers" : { "User-Agent" : "azsdk-java-com.azure.resourcemanager.containerservice/2.5.0-beta.1 (15.0.1; Windows 10; 10.0)", "x-ms-client-request-id" : "c51889b6-4588-428f-8bd5-bf3155015b84", @@ -397,7 +397,7 @@ "Exception" : null }, { "Method" : "GET", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javaacsrg34976/providers/Microsoft.ContainerService/managedClusters/aks66476663?api-version=2021-03-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javaacsrg34976/providers/Microsoft.ContainerService/managedClusters/aks66476663?api-version=2021-05-01", "Headers" : { "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (15.0.1; Windows 10; 10.0)", "x-ms-client-request-id" : "2a9d0aa9-6ea9-4553-8e6e-ba4d651714ff" @@ -423,7 +423,7 @@ "Exception" : null }, { "Method" : "POST", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javaacsrg34976/providers/Microsoft.ContainerService/managedClusters/aks66476663/listClusterUserCredential?api-version=2021-03-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javaacsrg34976/providers/Microsoft.ContainerService/managedClusters/aks66476663/listClusterUserCredential?api-version=2021-05-01", "Headers" : { "User-Agent" : "azsdk-java-com.azure.resourcemanager.containerservice/2.5.0-beta.1 (15.0.1; Windows 10; 10.0)", "x-ms-client-request-id" : "9c4f865e-b0fb-488f-9883-2edb3d91b069", @@ -450,7 +450,7 @@ "Exception" : null }, { "Method" : "POST", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javaacsrg34976/providers/Microsoft.ContainerService/managedClusters/aks66476663/listClusterAdminCredential?api-version=2021-03-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javaacsrg34976/providers/Microsoft.ContainerService/managedClusters/aks66476663/listClusterAdminCredential?api-version=2021-05-01", "Headers" : { "User-Agent" : "azsdk-java-com.azure.resourcemanager.containerservice/2.5.0-beta.1 (15.0.1; Windows 10; 10.0)", "x-ms-client-request-id" : "125eb424-5a7e-48e0-8d44-15bfde9e9c90", @@ -477,7 +477,7 @@ "Exception" : null }, { "Method" : "DELETE", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javaacsrg34976/providers/Microsoft.ContainerService/managedClusters/aks66476663/agentPools/ap2833070?api-version=2021-03-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javaacsrg34976/providers/Microsoft.ContainerService/managedClusters/aks66476663/agentPools/ap2833070?api-version=2021-05-01", "Headers" : { "User-Agent" : "azsdk-java-com.azure.resourcemanager.containerservice/2.5.0-beta.1 (15.0.1; Windows 10; 10.0)", "x-ms-client-request-id" : "01a98f6d-2813-4000-876b-8c69a694fafc", @@ -504,7 +504,7 @@ "Exception" : null }, { "Method" : "DELETE", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javaacsrg34976/providers/Microsoft.ContainerService/managedClusters/aks66476663/agentPools/ap1839091?api-version=2021-03-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javaacsrg34976/providers/Microsoft.ContainerService/managedClusters/aks66476663/agentPools/ap1839091?api-version=2021-05-01", "Headers" : { "User-Agent" : "azsdk-java-com.azure.resourcemanager.containerservice/2.5.0-beta.1 (15.0.1; Windows 10; 10.0)", "x-ms-client-request-id" : "f5a61dc6-8c32-4a35-8593-d0ad30e7fe32", @@ -531,7 +531,7 @@ "Exception" : null }, { "Method" : "PUT", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javaacsrg34976/providers/Microsoft.ContainerService/managedClusters/aks66476663/agentPools/ap257704b?api-version=2021-03-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javaacsrg34976/providers/Microsoft.ContainerService/managedClusters/aks66476663/agentPools/ap257704b?api-version=2021-05-01", "Headers" : { "User-Agent" : "azsdk-java-com.azure.resourcemanager.containerservice/2.5.0-beta.1 (15.0.1; Windows 10; 10.0)", "x-ms-client-request-id" : "943f78cb-02ca-4b84-9b91-707a46594083", @@ -663,7 +663,7 @@ "Exception" : null }, { "Method" : "GET", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javaacsrg34976/providers/Microsoft.ContainerService/managedClusters/aks66476663/agentPools/ap257704b?api-version=2021-03-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javaacsrg34976/providers/Microsoft.ContainerService/managedClusters/aks66476663/agentPools/ap257704b?api-version=2021-05-01", "Headers" : { "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (15.0.1; Windows 10; 10.0)", "x-ms-client-request-id" : "531ee082-3d2c-4584-8f05-dd5c4a66003a" @@ -767,7 +767,7 @@ "Exception" : null }, { "Method" : "PUT", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javaacsrg34976/providers/Microsoft.ContainerService/managedClusters/aks66476663?api-version=2021-03-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javaacsrg34976/providers/Microsoft.ContainerService/managedClusters/aks66476663?api-version=2021-05-01", "Headers" : { "User-Agent" : "azsdk-java-com.azure.resourcemanager.containerservice/2.5.0-beta.1 (15.0.1; Windows 10; 10.0)", "x-ms-client-request-id" : "fb4661be-dadd-4228-9ff0-83fc72a60d98", @@ -847,7 +847,7 @@ "Exception" : null }, { "Method" : "GET", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javaacsrg34976/providers/Microsoft.ContainerService/managedClusters/aks66476663?api-version=2021-03-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javaacsrg34976/providers/Microsoft.ContainerService/managedClusters/aks66476663?api-version=2021-05-01", "Headers" : { "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (15.0.1; Windows 10; 10.0)", "x-ms-client-request-id" : "1727d346-af08-4327-b7b8-3399a1a780fa" @@ -873,7 +873,7 @@ "Exception" : null }, { "Method" : "POST", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javaacsrg34976/providers/Microsoft.ContainerService/managedClusters/aks66476663/listClusterUserCredential?api-version=2021-03-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javaacsrg34976/providers/Microsoft.ContainerService/managedClusters/aks66476663/listClusterUserCredential?api-version=2021-05-01", "Headers" : { "User-Agent" : "azsdk-java-com.azure.resourcemanager.containerservice/2.5.0-beta.1 (15.0.1; Windows 10; 10.0)", "x-ms-client-request-id" : "e92af272-af2e-472f-bb5f-4ac2232ef0d0", @@ -900,7 +900,7 @@ "Exception" : null }, { "Method" : "POST", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javaacsrg34976/providers/Microsoft.ContainerService/managedClusters/aks66476663/listClusterAdminCredential?api-version=2021-03-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javaacsrg34976/providers/Microsoft.ContainerService/managedClusters/aks66476663/listClusterAdminCredential?api-version=2021-05-01", "Headers" : { "User-Agent" : "azsdk-java-com.azure.resourcemanager.containerservice/2.5.0-beta.1 (15.0.1; Windows 10; 10.0)", "x-ms-client-request-id" : "cf910f01-ab98-4b86-9137-4513dc22feaa", diff --git a/sdk/resourcemanager/azure-resourcemanager-containerservice/src/test/resources/session-records/KubernetesClustersTests.canCRUDKubernetesCluster.json b/sdk/resourcemanager/azure-resourcemanager-containerservice/src/test/resources/session-records/KubernetesClustersTests.canCRUDKubernetesCluster.json index 9da96df998c5..a46f83871324 100644 --- a/sdk/resourcemanager/azure-resourcemanager-containerservice/src/test/resources/session-records/KubernetesClustersTests.canCRUDKubernetesCluster.json +++ b/sdk/resourcemanager/azure-resourcemanager-containerservice/src/test/resources/session-records/KubernetesClustersTests.canCRUDKubernetesCluster.json @@ -27,7 +27,7 @@ "Exception" : null }, { "Method" : "PUT", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javaacsrg58615/providers/Microsoft.ContainerService/managedClusters/aks57792c8d?api-version=2021-03-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javaacsrg58615/providers/Microsoft.ContainerService/managedClusters/aks57792c8d?api-version=2021-05-01", "Headers" : { "User-Agent" : "azsdk-java-com.azure.resourcemanager.containerservice/2.2.0-beta.1 (15.0.1; Windows 10; 10.0)", "x-ms-client-request-id" : "b4f6eb28-58d5-43f2-aa65-b2904dffcee6", @@ -237,7 +237,7 @@ "Exception" : null }, { "Method" : "GET", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javaacsrg58615/providers/Microsoft.ContainerService/managedClusters/aks57792c8d?api-version=2021-03-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javaacsrg58615/providers/Microsoft.ContainerService/managedClusters/aks57792c8d?api-version=2021-05-01", "Headers" : { "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (15.0.1; Windows 10; 10.0)", "x-ms-client-request-id" : "f7a9bb1a-6b09-4a2d-bac0-2a2d2da64fe0" @@ -263,7 +263,7 @@ "Exception" : null }, { "Method" : "POST", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javaacsrg58615/providers/Microsoft.ContainerService/managedClusters/aks57792c8d/listClusterAdminCredential?api-version=2021-03-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javaacsrg58615/providers/Microsoft.ContainerService/managedClusters/aks57792c8d/listClusterAdminCredential?api-version=2021-05-01", "Headers" : { "User-Agent" : "azsdk-java-com.azure.resourcemanager.containerservice/2.2.0-beta.1 (15.0.1; Windows 10; 10.0)", "x-ms-client-request-id" : "fcab0927-fecf-49be-b917-3333958f0bb3", @@ -290,7 +290,7 @@ "Exception" : null }, { "Method" : "POST", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javaacsrg58615/providers/Microsoft.ContainerService/managedClusters/aks57792c8d/listClusterUserCredential?api-version=2021-03-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javaacsrg58615/providers/Microsoft.ContainerService/managedClusters/aks57792c8d/listClusterUserCredential?api-version=2021-05-01", "Headers" : { "User-Agent" : "azsdk-java-com.azure.resourcemanager.containerservice/2.2.0-beta.1 (15.0.1; Windows 10; 10.0)", "x-ms-client-request-id" : "b7b91f4d-618f-4a57-aeb9-d6a68ac685e8", @@ -317,7 +317,7 @@ "Exception" : null }, { "Method" : "PUT", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javaacsrg58615/providers/Microsoft.ContainerService/managedClusters/aks57792c8d/agentPools/ap2650379?api-version=2021-03-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javaacsrg58615/providers/Microsoft.ContainerService/managedClusters/aks57792c8d/agentPools/ap2650379?api-version=2021-05-01", "Headers" : { "User-Agent" : "azsdk-java-com.azure.resourcemanager.containerservice/2.2.0-beta.1 (15.0.1; Windows 10; 10.0)", "x-ms-client-request-id" : "47859fbb-a712-4ed6-8dd9-48e51be2dfb7", @@ -527,7 +527,7 @@ "Exception" : null }, { "Method" : "GET", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javaacsrg58615/providers/Microsoft.ContainerService/managedClusters/aks57792c8d/agentPools/ap2650379?api-version=2021-03-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javaacsrg58615/providers/Microsoft.ContainerService/managedClusters/aks57792c8d/agentPools/ap2650379?api-version=2021-05-01", "Headers" : { "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (15.0.1; Windows 10; 10.0)", "x-ms-client-request-id" : "ea350cb5-fafd-4af5-af42-d53cd2c5d047" @@ -553,7 +553,7 @@ "Exception" : null }, { "Method" : "PUT", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javaacsrg58615/providers/Microsoft.ContainerService/managedClusters/aks57792c8d?api-version=2021-03-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javaacsrg58615/providers/Microsoft.ContainerService/managedClusters/aks57792c8d?api-version=2021-05-01", "Headers" : { "User-Agent" : "azsdk-java-com.azure.resourcemanager.containerservice/2.2.0-beta.1 (15.0.1; Windows 10; 10.0)", "x-ms-client-request-id" : "73af6c43-b588-4dbd-9a12-e4ff186c403f", @@ -789,7 +789,7 @@ "Exception" : null }, { "Method" : "GET", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javaacsrg58615/providers/Microsoft.ContainerService/managedClusters/aks57792c8d?api-version=2021-03-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javaacsrg58615/providers/Microsoft.ContainerService/managedClusters/aks57792c8d?api-version=2021-05-01", "Headers" : { "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (15.0.1; Windows 10; 10.0)", "x-ms-client-request-id" : "8f3c684d-547e-4317-948f-3b05879369d9" @@ -815,7 +815,7 @@ "Exception" : null }, { "Method" : "POST", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javaacsrg58615/providers/Microsoft.ContainerService/managedClusters/aks57792c8d/listClusterUserCredential?api-version=2021-03-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javaacsrg58615/providers/Microsoft.ContainerService/managedClusters/aks57792c8d/listClusterUserCredential?api-version=2021-05-01", "Headers" : { "User-Agent" : "azsdk-java-com.azure.resourcemanager.containerservice/2.2.0-beta.1 (15.0.1; Windows 10; 10.0)", "x-ms-client-request-id" : "8f3082a4-1fdf-43fe-b141-584166321645", @@ -842,7 +842,7 @@ "Exception" : null }, { "Method" : "POST", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javaacsrg58615/providers/Microsoft.ContainerService/managedClusters/aks57792c8d/listClusterAdminCredential?api-version=2021-03-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javaacsrg58615/providers/Microsoft.ContainerService/managedClusters/aks57792c8d/listClusterAdminCredential?api-version=2021-05-01", "Headers" : { "User-Agent" : "azsdk-java-com.azure.resourcemanager.containerservice/2.2.0-beta.1 (15.0.1; Windows 10; 10.0)", "x-ms-client-request-id" : "837ddcfb-bc8d-4750-a9b8-247b20daad9b", diff --git a/sdk/resourcemanager/azure-resourcemanager-containerservice/src/test/resources/session-records/KubernetesClustersTests.canCreateClusterWithSpotVM.json b/sdk/resourcemanager/azure-resourcemanager-containerservice/src/test/resources/session-records/KubernetesClustersTests.canCreateClusterWithSpotVM.json index 8e5d2d11bb1f..464585771246 100644 --- a/sdk/resourcemanager/azure-resourcemanager-containerservice/src/test/resources/session-records/KubernetesClustersTests.canCreateClusterWithSpotVM.json +++ b/sdk/resourcemanager/azure-resourcemanager-containerservice/src/test/resources/session-records/KubernetesClustersTests.canCreateClusterWithSpotVM.json @@ -27,7 +27,7 @@ "Exception" : null }, { "Method" : "PUT", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javaacsrg83451/providers/Microsoft.ContainerService/managedClusters/aks69744203?api-version=2021-03-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javaacsrg83451/providers/Microsoft.ContainerService/managedClusters/aks69744203?api-version=2021-05-01", "Headers" : { "User-Agent" : "azsdk-java-com.azure.resourcemanager.containerservice/2.6.0-beta.1 (15.0.1; Windows 10; 10.0)", "x-ms-client-request-id" : "990e872a-0d4b-438b-be4d-e9dc7de7185c", @@ -237,7 +237,7 @@ "Exception" : null }, { "Method" : "GET", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javaacsrg83451/providers/Microsoft.ContainerService/managedClusters/aks69744203?api-version=2021-03-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javaacsrg83451/providers/Microsoft.ContainerService/managedClusters/aks69744203?api-version=2021-05-01", "Headers" : { "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (15.0.1; Windows 10; 10.0)", "x-ms-client-request-id" : "e848db11-62bf-4956-b3ab-728440d38818" @@ -263,7 +263,7 @@ "Exception" : null }, { "Method" : "POST", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javaacsrg83451/providers/Microsoft.ContainerService/managedClusters/aks69744203/listClusterUserCredential?api-version=2021-03-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javaacsrg83451/providers/Microsoft.ContainerService/managedClusters/aks69744203/listClusterUserCredential?api-version=2021-05-01", "Headers" : { "User-Agent" : "azsdk-java-com.azure.resourcemanager.containerservice/2.6.0-beta.1 (15.0.1; Windows 10; 10.0)", "x-ms-client-request-id" : "a92018e7-f29e-481f-87ff-131fd4c3ac4a", @@ -290,7 +290,7 @@ "Exception" : null }, { "Method" : "POST", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javaacsrg83451/providers/Microsoft.ContainerService/managedClusters/aks69744203/listClusterAdminCredential?api-version=2021-03-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javaacsrg83451/providers/Microsoft.ContainerService/managedClusters/aks69744203/listClusterAdminCredential?api-version=2021-05-01", "Headers" : { "User-Agent" : "azsdk-java-com.azure.resourcemanager.containerservice/2.6.0-beta.1 (15.0.1; Windows 10; 10.0)", "x-ms-client-request-id" : "92b1f554-5949-421b-b97f-5afea3c894cf", @@ -317,7 +317,7 @@ "Exception" : null }, { "Method" : "PUT", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javaacsrg83451/providers/Microsoft.ContainerService/managedClusters/aks69744203/agentPools/ap2978030?api-version=2021-03-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javaacsrg83451/providers/Microsoft.ContainerService/managedClusters/aks69744203/agentPools/ap2978030?api-version=2021-05-01", "Headers" : { "User-Agent" : "azsdk-java-com.azure.resourcemanager.containerservice/2.6.0-beta.1 (15.0.1; Windows 10; 10.0)", "x-ms-client-request-id" : "3186f21f-307a-44eb-9bb6-592d7992ad5a", @@ -475,7 +475,7 @@ "Exception" : null }, { "Method" : "GET", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javaacsrg83451/providers/Microsoft.ContainerService/managedClusters/aks69744203/agentPools/ap2978030?api-version=2021-03-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javaacsrg83451/providers/Microsoft.ContainerService/managedClusters/aks69744203/agentPools/ap2978030?api-version=2021-05-01", "Headers" : { "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (15.0.1; Windows 10; 10.0)", "x-ms-client-request-id" : "66e158b7-d618-4ae2-b39d-feb50b90368f" @@ -501,7 +501,7 @@ "Exception" : null }, { "Method" : "PUT", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javaacsrg83451/providers/Microsoft.ContainerService/managedClusters/aks69744203?api-version=2021-03-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javaacsrg83451/providers/Microsoft.ContainerService/managedClusters/aks69744203?api-version=2021-05-01", "Headers" : { "User-Agent" : "azsdk-java-com.azure.resourcemanager.containerservice/2.6.0-beta.1 (15.0.1; Windows 10; 10.0)", "x-ms-client-request-id" : "44feab6e-f3c6-42b7-b881-b26de5166e88", @@ -581,7 +581,7 @@ "Exception" : null }, { "Method" : "GET", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javaacsrg83451/providers/Microsoft.ContainerService/managedClusters/aks69744203?api-version=2021-03-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javaacsrg83451/providers/Microsoft.ContainerService/managedClusters/aks69744203?api-version=2021-05-01", "Headers" : { "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (15.0.1; Windows 10; 10.0)", "x-ms-client-request-id" : "3af040ea-bd2b-4253-a063-f3a51a79e07b" @@ -607,7 +607,7 @@ "Exception" : null }, { "Method" : "POST", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javaacsrg83451/providers/Microsoft.ContainerService/managedClusters/aks69744203/listClusterAdminCredential?api-version=2021-03-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javaacsrg83451/providers/Microsoft.ContainerService/managedClusters/aks69744203/listClusterAdminCredential?api-version=2021-05-01", "Headers" : { "User-Agent" : "azsdk-java-com.azure.resourcemanager.containerservice/2.6.0-beta.1 (15.0.1; Windows 10; 10.0)", "x-ms-client-request-id" : "7fa3b441-c524-432d-ac0e-3895928198d6", @@ -634,7 +634,7 @@ "Exception" : null }, { "Method" : "POST", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javaacsrg83451/providers/Microsoft.ContainerService/managedClusters/aks69744203/listClusterUserCredential?api-version=2021-03-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javaacsrg83451/providers/Microsoft.ContainerService/managedClusters/aks69744203/listClusterUserCredential?api-version=2021-05-01", "Headers" : { "User-Agent" : "azsdk-java-com.azure.resourcemanager.containerservice/2.6.0-beta.1 (15.0.1; Windows 10; 10.0)", "x-ms-client-request-id" : "433ea229-0231-421f-a8b2-b0a8af913e3d", diff --git a/sdk/resourcemanager/azure-resourcemanager/src/test/resources/session-records/AzureResourceManagerTests.testKubernetesCluster.json b/sdk/resourcemanager/azure-resourcemanager/src/test/resources/session-records/AzureResourceManagerTests.testKubernetesCluster.json index d81e2e01e4c0..ace53bcd8cab 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/test/resources/session-records/AzureResourceManagerTests.testKubernetesCluster.json +++ b/sdk/resourcemanager/azure-resourcemanager/src/test/resources/session-records/AzureResourceManagerTests.testKubernetesCluster.json @@ -1,7 +1,7 @@ { "networkCallRecords" : [ { "Method" : "GET", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/managedClusters?api-version=2021-03-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/managedClusters?api-version=2021-05-01", "Headers" : { "User-Agent" : "azsdk-java-com.azure.resourcemanager.containerservice/2.2.0-beta.1 (15.0.1; Windows 10; 10.0)", "x-ms-client-request-id" : "6f7db7d0-47a3-435f-aa47-05d0f5ff6765", @@ -28,7 +28,7 @@ "Exception" : null }, { "Method" : "GET", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/managedClusters?api-version=2021-03-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/managedClusters?api-version=2021-05-01", "Headers" : { "User-Agent" : "azsdk-java-com.azure.resourcemanager.containerservice/2.2.0-beta.1 (15.0.1; Windows 10; 10.0)", "x-ms-client-request-id" : "083b3afb-1ef8-4c84-82ad-99e9fd032839", @@ -81,7 +81,7 @@ "Exception" : null }, { "Method" : "PUT", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/aks57554egroup/providers/Microsoft.ContainerService/managedClusters/aks57554e?api-version=2021-03-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/aks57554egroup/providers/Microsoft.ContainerService/managedClusters/aks57554e?api-version=2021-05-01", "Headers" : { "User-Agent" : "azsdk-java-com.azure.resourcemanager.containerservice/2.2.0-beta.1 (15.0.1; Windows 10; 10.0)", "x-ms-client-request-id" : "2627d20e-94de-4ab4-b189-f19a4c6c07a9", @@ -265,7 +265,7 @@ "Exception" : null }, { "Method" : "GET", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/aks57554egroup/providers/Microsoft.ContainerService/managedClusters/aks57554e?api-version=2021-03-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/aks57554egroup/providers/Microsoft.ContainerService/managedClusters/aks57554e?api-version=2021-05-01", "Headers" : { "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (15.0.1; Windows 10; 10.0)", "x-ms-client-request-id" : "806047fa-103e-4659-810c-33e616865966" @@ -291,7 +291,7 @@ "Exception" : null }, { "Method" : "POST", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/aks57554egroup/providers/Microsoft.ContainerService/managedClusters/aks57554e/listClusterUserCredential?api-version=2021-03-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/aks57554egroup/providers/Microsoft.ContainerService/managedClusters/aks57554e/listClusterUserCredential?api-version=2021-05-01", "Headers" : { "User-Agent" : "azsdk-java-com.azure.resourcemanager.containerservice/2.2.0-beta.1 (15.0.1; Windows 10; 10.0)", "x-ms-client-request-id" : "55d67267-4bbb-4f19-8aa2-56f2322183ae", @@ -318,7 +318,7 @@ "Exception" : null }, { "Method" : "POST", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/aks57554egroup/providers/Microsoft.ContainerService/managedClusters/aks57554e/listClusterAdminCredential?api-version=2021-03-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/aks57554egroup/providers/Microsoft.ContainerService/managedClusters/aks57554e/listClusterAdminCredential?api-version=2021-05-01", "Headers" : { "User-Agent" : "azsdk-java-com.azure.resourcemanager.containerservice/2.2.0-beta.1 (15.0.1; Windows 10; 10.0)", "x-ms-client-request-id" : "7d105e78-fa98-4a7a-aaef-728fe1238385", @@ -345,7 +345,7 @@ "Exception" : null }, { "Method" : "GET", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/aks57554egroup/providers/Microsoft.ContainerService/managedClusters/aks57554e?api-version=2021-03-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/aks57554egroup/providers/Microsoft.ContainerService/managedClusters/aks57554e?api-version=2021-05-01", "Headers" : { "User-Agent" : "azsdk-java-com.azure.resourcemanager.containerservice/2.2.0-beta.1 (15.0.1; Windows 10; 10.0)", "x-ms-client-request-id" : "65545be4-435f-4157-b617-8066e0c8d1aa", @@ -372,7 +372,7 @@ "Exception" : null }, { "Method" : "POST", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/aks57554egroup/providers/Microsoft.ContainerService/managedClusters/aks57554e/listClusterAdminCredential?api-version=2021-03-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/aks57554egroup/providers/Microsoft.ContainerService/managedClusters/aks57554e/listClusterAdminCredential?api-version=2021-05-01", "Headers" : { "User-Agent" : "azsdk-java-com.azure.resourcemanager.containerservice/2.2.0-beta.1 (15.0.1; Windows 10; 10.0)", "x-ms-client-request-id" : "d04b382a-78f7-45c1-b021-5c6387976b47", @@ -399,7 +399,7 @@ "Exception" : null }, { "Method" : "POST", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/aks57554egroup/providers/Microsoft.ContainerService/managedClusters/aks57554e/listClusterUserCredential?api-version=2021-03-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/aks57554egroup/providers/Microsoft.ContainerService/managedClusters/aks57554e/listClusterUserCredential?api-version=2021-05-01", "Headers" : { "User-Agent" : "azsdk-java-com.azure.resourcemanager.containerservice/2.2.0-beta.1 (15.0.1; Windows 10; 10.0)", "x-ms-client-request-id" : "ac18bd03-4165-4459-bc8b-57fd1d57a04e", @@ -426,7 +426,7 @@ "Exception" : null }, { "Method" : "GET", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/managedClusters?api-version=2021-03-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/managedClusters?api-version=2021-05-01", "Headers" : { "User-Agent" : "azsdk-java-com.azure.resourcemanager.containerservice/2.2.0-beta.1 (15.0.1; Windows 10; 10.0)", "x-ms-client-request-id" : "c0b49b0a-b733-46c5-8e93-fb8f5986ae52", @@ -453,7 +453,7 @@ "Exception" : null }, { "Method" : "GET", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/managedClusters?api-version=2021-03-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/managedClusters?api-version=2021-05-01", "Headers" : { "User-Agent" : "azsdk-java-com.azure.resourcemanager.containerservice/2.2.0-beta.1 (15.0.1; Windows 10; 10.0)", "x-ms-client-request-id" : "02bcabca-f341-4fb9-b3fe-39c684247294", @@ -480,7 +480,7 @@ "Exception" : null }, { "Method" : "GET", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/aks57554egroup/providers/Microsoft.ContainerService/managedClusters/aks57554e?api-version=2021-03-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/aks57554egroup/providers/Microsoft.ContainerService/managedClusters/aks57554e?api-version=2021-05-01", "Headers" : { "User-Agent" : "azsdk-java-com.azure.resourcemanager.containerservice/2.2.0-beta.1 (15.0.1; Windows 10; 10.0)", "x-ms-client-request-id" : "0d1e2780-e211-4186-b41a-c1ec239148ff", @@ -507,7 +507,7 @@ "Exception" : null }, { "Method" : "GET", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/aks57554egroup/providers/Microsoft.ContainerService/managedClusters/aks57554e?api-version=2021-03-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/aks57554egroup/providers/Microsoft.ContainerService/managedClusters/aks57554e?api-version=2021-05-01", "Headers" : { "User-Agent" : "azsdk-java-com.azure.resourcemanager.containerservice/2.2.0-beta.1 (15.0.1; Windows 10; 10.0)", "x-ms-client-request-id" : "80872f84-5263-4d63-8ebc-83de4243034f", @@ -534,7 +534,7 @@ "Exception" : null }, { "Method" : "PUT", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/aks57554egroup/providers/Microsoft.ContainerService/managedClusters/aks57554e?api-version=2021-03-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/aks57554egroup/providers/Microsoft.ContainerService/managedClusters/aks57554e?api-version=2021-05-01", "Headers" : { "User-Agent" : "azsdk-java-com.azure.resourcemanager.containerservice/2.2.0-beta.1 (15.0.1; Windows 10; 10.0)", "x-ms-client-request-id" : "22cf7d74-9100-4553-9a3a-65445190602c", @@ -718,7 +718,7 @@ "Exception" : null }, { "Method" : "GET", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/aks57554egroup/providers/Microsoft.ContainerService/managedClusters/aks57554e?api-version=2021-03-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/aks57554egroup/providers/Microsoft.ContainerService/managedClusters/aks57554e?api-version=2021-05-01", "Headers" : { "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (15.0.1; Windows 10; 10.0)", "x-ms-client-request-id" : "1c1b238b-3325-4593-a2f9-1ece14e29276" @@ -744,7 +744,7 @@ "Exception" : null }, { "Method" : "POST", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/aks57554egroup/providers/Microsoft.ContainerService/managedClusters/aks57554e/listClusterAdminCredential?api-version=2021-03-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/aks57554egroup/providers/Microsoft.ContainerService/managedClusters/aks57554e/listClusterAdminCredential?api-version=2021-05-01", "Headers" : { "User-Agent" : "azsdk-java-com.azure.resourcemanager.containerservice/2.2.0-beta.1 (15.0.1; Windows 10; 10.0)", "x-ms-client-request-id" : "65d4bdf0-de29-4227-a5ad-8707b936b141", @@ -771,7 +771,7 @@ "Exception" : null }, { "Method" : "POST", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/aks57554egroup/providers/Microsoft.ContainerService/managedClusters/aks57554e/listClusterUserCredential?api-version=2021-03-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/aks57554egroup/providers/Microsoft.ContainerService/managedClusters/aks57554e/listClusterUserCredential?api-version=2021-05-01", "Headers" : { "User-Agent" : "azsdk-java-com.azure.resourcemanager.containerservice/2.2.0-beta.1 (15.0.1; Windows 10; 10.0)", "x-ms-client-request-id" : "6e39d12d-631a-43f5-b99e-061e355d321f", @@ -798,7 +798,7 @@ "Exception" : null }, { "Method" : "DELETE", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/aks57554egroup/providers/Microsoft.ContainerService/managedClusters/aks57554e?api-version=2021-03-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/aks57554egroup/providers/Microsoft.ContainerService/managedClusters/aks57554e?api-version=2021-05-01", "Headers" : { "User-Agent" : "azsdk-java-com.azure.resourcemanager.containerservice/2.2.0-beta.1 (15.0.1; Windows 10; 10.0)", "x-ms-client-request-id" : "eece328c-17a1-4283-a363-508cee33947f", diff --git a/sdk/resourcemanager/azure-resourcemanager/src/test/resources/session-records/KubernetesCniTests.testKubernetesClusterCni.json b/sdk/resourcemanager/azure-resourcemanager/src/test/resources/session-records/KubernetesCniTests.testKubernetesClusterCni.json index 8869dd297aa1..a570b4fce845 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/test/resources/session-records/KubernetesCniTests.testKubernetesClusterCni.json +++ b/sdk/resourcemanager/azure-resourcemanager/src/test/resources/session-records/KubernetesCniTests.testKubernetesClusterCni.json @@ -115,7 +115,7 @@ "Exception" : null }, { "Method" : "PUT", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg30673/providers/Microsoft.ContainerService/managedClusters/aks564242dd?api-version=2021-03-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg30673/providers/Microsoft.ContainerService/managedClusters/aks564242dd?api-version=2021-05-01", "Headers" : { "User-Agent" : "azsdk-java-com.azure.resourcemanager.containerservice/2.5.0-beta.1 (15.0.1; Windows 10; 10.0)", "x-ms-client-request-id" : "f09a27c2-0c26-43d9-9380-b4e7093b19cb", @@ -299,7 +299,7 @@ "Exception" : null }, { "Method" : "GET", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg30673/providers/Microsoft.ContainerService/managedClusters/aks564242dd?api-version=2021-03-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg30673/providers/Microsoft.ContainerService/managedClusters/aks564242dd?api-version=2021-05-01", "Headers" : { "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (15.0.1; Windows 10; 10.0)", "x-ms-client-request-id" : "9bbab3c8-d3c6-4541-a0b5-12b74ebe26d3" @@ -325,7 +325,7 @@ "Exception" : null }, { "Method" : "POST", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg30673/providers/Microsoft.ContainerService/managedClusters/aks564242dd/listClusterUserCredential?api-version=2021-03-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg30673/providers/Microsoft.ContainerService/managedClusters/aks564242dd/listClusterUserCredential?api-version=2021-05-01", "Headers" : { "User-Agent" : "azsdk-java-com.azure.resourcemanager.containerservice/2.5.0-beta.1 (15.0.1; Windows 10; 10.0)", "x-ms-client-request-id" : "62b6678c-3fd1-4917-9b6c-f4c13a188c93", @@ -352,7 +352,7 @@ "Exception" : null }, { "Method" : "POST", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg30673/providers/Microsoft.ContainerService/managedClusters/aks564242dd/listClusterAdminCredential?api-version=2021-03-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg30673/providers/Microsoft.ContainerService/managedClusters/aks564242dd/listClusterAdminCredential?api-version=2021-05-01", "Headers" : { "User-Agent" : "azsdk-java-com.azure.resourcemanager.containerservice/2.5.0-beta.1 (15.0.1; Windows 10; 10.0)", "x-ms-client-request-id" : "fc0a088e-7f55-41ff-ad73-694a55242dd1", diff --git a/sdk/resourcemanager/azure-resourcemanager/src/test/resources/session-records/PrivateLinkTests.testPrivateEndpointAKS.json b/sdk/resourcemanager/azure-resourcemanager/src/test/resources/session-records/PrivateLinkTests.testPrivateEndpointAKS.json index d99eacd223ac..d75510f7f907 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/test/resources/session-records/PrivateLinkTests.testPrivateEndpointAKS.json +++ b/sdk/resourcemanager/azure-resourcemanager/src/test/resources/session-records/PrivateLinkTests.testPrivateEndpointAKS.json @@ -27,7 +27,7 @@ "Exception" : null }, { "Method" : "PUT", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg26720/providers/Microsoft.ContainerService/managedClusters/aks08596?api-version=2021-03-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg26720/providers/Microsoft.ContainerService/managedClusters/aks08596?api-version=2021-05-01", "Headers" : { "User-Agent" : "azsdk-java-com.azure.resourcemanager.containerservice/2.4.0-beta.1 (15.0.1; Windows 10; 10.0)", "x-ms-client-request-id" : "beb79570-84c2-4d48-8358-616599b539a1", @@ -419,7 +419,7 @@ "Exception" : null }, { "Method" : "GET", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg26720/providers/Microsoft.ContainerService/managedClusters/aks08596?api-version=2021-03-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg26720/providers/Microsoft.ContainerService/managedClusters/aks08596?api-version=2021-05-01", "Headers" : { "User-Agent" : "azsdk-java-com.azure.resourcemanager.resources.fluentcore.policy/null (15.0.1; Windows 10; 10.0)", "x-ms-client-request-id" : "5fb8abd2-186e-4874-a296-68f9d5b028c8" @@ -445,7 +445,7 @@ "Exception" : null }, { "Method" : "POST", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg26720/providers/Microsoft.ContainerService/managedClusters/aks08596/listClusterUserCredential?api-version=2021-03-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg26720/providers/Microsoft.ContainerService/managedClusters/aks08596/listClusterUserCredential?api-version=2021-05-01", "Headers" : { "User-Agent" : "azsdk-java-com.azure.resourcemanager.containerservice/2.4.0-beta.1 (15.0.1; Windows 10; 10.0)", "x-ms-client-request-id" : "519175ed-5b6f-4c0d-9003-55c24b7af1d2", @@ -472,7 +472,7 @@ "Exception" : null }, { "Method" : "POST", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg26720/providers/Microsoft.ContainerService/managedClusters/aks08596/listClusterAdminCredential?api-version=2021-03-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg26720/providers/Microsoft.ContainerService/managedClusters/aks08596/listClusterAdminCredential?api-version=2021-05-01", "Headers" : { "User-Agent" : "azsdk-java-com.azure.resourcemanager.containerservice/2.4.0-beta.1 (15.0.1; Windows 10; 10.0)", "x-ms-client-request-id" : "240f4883-1e3d-439d-a4b2-7472379442f6", @@ -499,7 +499,7 @@ "Exception" : null }, { "Method" : "GET", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg26720/providers/Microsoft.ContainerService/managedClusters/aks08596/privateLinkResources?api-version=2021-03-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg26720/providers/Microsoft.ContainerService/managedClusters/aks08596/privateLinkResources?api-version=2021-05-01", "Headers" : { "User-Agent" : "azsdk-java-com.azure.resourcemanager.containerservice/2.4.0-beta.1 (15.0.1; Windows 10; 10.0)", "x-ms-client-request-id" : "7bbe5f55-c43e-4f04-8461-654c7f136551", @@ -526,7 +526,7 @@ "Exception" : null }, { "Method" : "GET", - "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg26720/providers/Microsoft.ContainerService/managedClusters/aks08596/privateEndpointConnections?api-version=2021-03-01", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/javacsmrg26720/providers/Microsoft.ContainerService/managedClusters/aks08596/privateEndpointConnections?api-version=2021-05-01", "Headers" : { "User-Agent" : "azsdk-java-com.azure.resourcemanager.containerservice/2.4.0-beta.1 (15.0.1; Windows 10; 10.0)", "x-ms-client-request-id" : "0cda42de-5a93-4379-9c45-5266619cb74e", From 2b7514b1a48147626e93346b0006cf589429b4aa Mon Sep 17 00:00:00 2001 From: gaohan <1135494872@qq.com> Date: Tue, 8 Jun 2021 17:26:04 +0800 Subject: [PATCH 13/21] Add domain_hint in aad-stater. (#22134) --- .../CHANGELOG.md | 2 +- sdk/spring/azure-spring-boot/CHANGELOG.md | 2 +- .../AADOAuth2AuthorizationRequestResolver.java | 17 ++++++++++++----- .../webapp/AADWebSecurityConfigurerAdapter.java | 2 +- .../aad/AADAuthenticationProperties.java | 13 +++++++++++++ 5 files changed, 28 insertions(+), 8 deletions(-) diff --git a/sdk/spring/azure-spring-boot-starter-active-directory/CHANGELOG.md b/sdk/spring/azure-spring-boot-starter-active-directory/CHANGELOG.md index d5b665c1ef00..d7189f5a4bd8 100644 --- a/sdk/spring/azure-spring-boot-starter-active-directory/CHANGELOG.md +++ b/sdk/spring/azure-spring-boot-starter-active-directory/CHANGELOG.md @@ -1,7 +1,7 @@ # Release History ## 3.6.0-beta.1 (Unreleased) - +- Support domain_hint in aad-starter.([#21517](https://github.com/Azure/azure-sdk-for-java/issues/21517)) ## 3.5.0 (2021-05-24) ### New Features diff --git a/sdk/spring/azure-spring-boot/CHANGELOG.md b/sdk/spring/azure-spring-boot/CHANGELOG.md index c01299e98334..c71ce3e52585 100644 --- a/sdk/spring/azure-spring-boot/CHANGELOG.md +++ b/sdk/spring/azure-spring-boot/CHANGELOG.md @@ -1,7 +1,7 @@ # Release History ## 3.6.0-beta.1 (Unreleased) - +- Support domain_hint in aad-starter.([#21517](https://github.com/Azure/azure-sdk-for-java/issues/21517)) ## 3.5.0 (2021-05-24) ### New Features diff --git a/sdk/spring/azure-spring-boot/src/main/java/com/azure/spring/aad/webapp/AADOAuth2AuthorizationRequestResolver.java b/sdk/spring/azure-spring-boot/src/main/java/com/azure/spring/aad/webapp/AADOAuth2AuthorizationRequestResolver.java index 2f3680065c05..a449ed171930 100644 --- a/sdk/spring/azure-spring-boot/src/main/java/com/azure/spring/aad/webapp/AADOAuth2AuthorizationRequestResolver.java +++ b/sdk/spring/azure-spring-boot/src/main/java/com/azure/spring/aad/webapp/AADOAuth2AuthorizationRequestResolver.java @@ -3,6 +3,7 @@ package com.azure.spring.aad.webapp; +import com.azure.spring.autoconfigure.aad.AADAuthenticationProperties; import com.azure.spring.autoconfigure.aad.Constants; import org.springframework.security.oauth2.client.registration.ClientRegistrationRepository; import org.springframework.security.oauth2.client.web.DefaultOAuth2AuthorizationRequestResolver; @@ -21,11 +22,15 @@ public class AADOAuth2AuthorizationRequestResolver implements OAuth2AuthorizationRequestResolver { private final OAuth2AuthorizationRequestResolver defaultResolver; - public AADOAuth2AuthorizationRequestResolver(ClientRegistrationRepository clientRegistrationRepository) { + private final AADAuthenticationProperties properties; + + public AADOAuth2AuthorizationRequestResolver(ClientRegistrationRepository clientRegistrationRepository, + AADAuthenticationProperties properties) { this.defaultResolver = new DefaultOAuth2AuthorizationRequestResolver( clientRegistrationRepository, OAuth2AuthorizationRequestRedirectFilter.DEFAULT_AUTHORIZATION_REQUEST_BASE_URI ); + this.properties = properties; } @Override @@ -56,11 +61,13 @@ private OAuth2AuthorizationRequest addClaims(HttpServletRequest httpServletReque return claims; }) .orElse(null); - if (conditionalAccessPolicyClaims == null) { - return oAuth2AuthorizationRequest; - } final Map additionalParameters = new HashMap<>(); - additionalParameters.put(Constants.CLAIMS, conditionalAccessPolicyClaims); + if (conditionalAccessPolicyClaims != null) { + additionalParameters.put(Constants.CLAIMS, conditionalAccessPolicyClaims); + } + Optional.ofNullable(properties) + .map(AADAuthenticationProperties::getAuthenticateAdditionalParameters) + .ifPresent(additionalParameters::putAll); Optional.of(oAuth2AuthorizationRequest) .map(OAuth2AuthorizationRequest::getAdditionalParameters) .ifPresent(additionalParameters::putAll); diff --git a/sdk/spring/azure-spring-boot/src/main/java/com/azure/spring/aad/webapp/AADWebSecurityConfigurerAdapter.java b/sdk/spring/azure-spring-boot/src/main/java/com/azure/spring/aad/webapp/AADWebSecurityConfigurerAdapter.java index 0938f3d34390..5988440d5dd3 100644 --- a/sdk/spring/azure-spring-boot/src/main/java/com/azure/spring/aad/webapp/AADWebSecurityConfigurerAdapter.java +++ b/sdk/spring/azure-spring-boot/src/main/java/com/azure/spring/aad/webapp/AADWebSecurityConfigurerAdapter.java @@ -71,6 +71,6 @@ protected OAuth2AccessTokenResponseClient a } protected OAuth2AuthorizationRequestResolver requestResolver() { - return new AADOAuth2AuthorizationRequestResolver(this.repo); + return new AADOAuth2AuthorizationRequestResolver(this.repo, properties); } } diff --git a/sdk/spring/azure-spring-boot/src/main/java/com/azure/spring/autoconfigure/aad/AADAuthenticationProperties.java b/sdk/spring/azure-spring-boot/src/main/java/com/azure/spring/autoconfigure/aad/AADAuthenticationProperties.java index b62ecbcf4493..c6472727377e 100644 --- a/sdk/spring/azure-spring-boot/src/main/java/com/azure/spring/autoconfigure/aad/AADAuthenticationProperties.java +++ b/sdk/spring/azure-spring-boot/src/main/java/com/azure/spring/autoconfigure/aad/AADAuthenticationProperties.java @@ -64,6 +64,11 @@ public class AADAuthenticationProperties implements InitializingBean { */ private String appIdUri; + /** + * Add additional parameters to the Authorization URL. + */ + private Map authenticateAdditionalParameters; + /** * Connection Timeout for the JWKSet Remote URL call. */ @@ -248,6 +253,14 @@ public void setAppIdUri(String appIdUri) { this.appIdUri = appIdUri; } + public Map getAuthenticateAdditionalParameters() { + return authenticateAdditionalParameters; + } + + public void setAuthenticateAdditionalParameters(Map authenticateAdditionalParameters) { + this.authenticateAdditionalParameters = authenticateAdditionalParameters; + } + public int getJwtConnectTimeout() { return jwtConnectTimeout; } From bee04747a2c0a247bce92e6323c4083b2a5a697e Mon Sep 17 00:00:00 2001 From: Azure SDK Bot <53356347+azure-sdk@users.noreply.github.com> Date: Tue, 8 Jun 2021 10:21:15 -0700 Subject: [PATCH 14/21] Increment version for core releases (#22124) Increment package version after release of Core libraries --- common/smoke-tests/pom.xml | 8 +++--- eng/jacoco-test-coverage/pom.xml | 18 ++++++------- eng/versioning/version_client.txt | 26 +++++++++---------- .../azure-resourcemanager-advisor/pom.xml | 4 +-- .../azure-ai-anomalydetector/pom.xml | 6 ++--- .../pom.xml | 4 +-- .../azure-data-appconfiguration/pom.xml | 8 +++--- .../pom.xml | 4 +-- .../pom.xml | 4 +-- .../pom.xml | 4 +-- .../pom.xml | 4 +-- .../azure-resourcemanager-attestation/pom.xml | 4 +-- .../azure-security-attestation/pom.xml | 6 ++--- .../azure-resourcemanager-automation/pom.xml | 4 +-- sdk/avs/azure-resourcemanager-avs/pom.xml | 4 +-- .../azure-resourcemanager-azurestack/pom.xml | 4 +-- .../pom.xml | 4 +-- sdk/batch/azure-resourcemanager-batch/pom.xml | 4 +-- .../azure-resourcemanager-batchai/pom.xml | 4 +-- .../azure-resourcemanager-billing/pom.xml | 4 +-- sdk/boms/azure-spring-boot-bom/pom.xml | 2 +- .../azure-spring-cloud-dependencies/pom.xml | 2 +- .../azure-resourcemanager-botservice/pom.xml | 4 +-- .../pom.xml | 4 +-- .../pom.xml | 4 +-- .../azure-resourcemanager-commerce/pom.xml | 4 +-- .../azure-communication-chat/pom.xml | 6 ++--- .../azure-communication-common/pom.xml | 4 +-- .../azure-communication-identity/pom.xml | 6 ++--- .../azure-communication-phonenumbers/pom.xml | 6 ++--- .../azure-communication-sms/pom.xml | 6 ++--- .../pom.xml | 4 +-- .../azure-security-confidentialledger/pom.xml | 10 +++---- .../azure-resourcemanager-confluent/pom.xml | 6 ++--- .../azure-resourcemanager-consumption/pom.xml | 4 +-- .../pom.xml | 8 +++--- sdk/core/azure-core-amqp/pom.xml | 2 +- sdk/core/azure-core-experimental/CHANGELOG.md | 3 +++ sdk/core/azure-core-experimental/pom.xml | 4 +-- .../azure-core-http-jdk-httpclient/pom.xml | 8 +++--- sdk/core/azure-core-http-netty/CHANGELOG.md | 3 +++ sdk/core/azure-core-http-netty/pom.xml | 10 +++---- sdk/core/azure-core-http-okhttp/CHANGELOG.md | 3 +++ sdk/core/azure-core-http-okhttp/pom.xml | 10 +++---- sdk/core/azure-core-management/CHANGELOG.md | 3 +++ sdk/core/azure-core-management/pom.xml | 6 ++--- .../CHANGELOG.md | 3 +++ .../azure-core-serializer-avro-apache/pom.xml | 6 ++--- .../pom.xml | 4 +-- .../CHANGELOG.md | 3 +++ .../azure-core-serializer-json-gson/pom.xml | 4 +-- .../CHANGELOG.md | 3 +++ .../pom.xml | 4 +-- sdk/core/azure-core-test/CHANGELOG.md | 3 +++ sdk/core/azure-core-test/pom.xml | 4 +-- .../CHANGELOG.md | 3 +++ .../azure-core-tracing-opentelemetry/pom.xml | 6 ++--- sdk/core/azure-core/CHANGELOG.md | 3 +++ sdk/core/azure-core/pom.xml | 2 +- sdk/core/pom.xml | 18 ++++++------- sdk/cosmos/azure-cosmos/pom.xml | 4 +-- .../pom.xml | 4 +-- .../pom.xml | 4 +-- .../azure-resourcemanager-databox/pom.xml | 4 +-- .../azure-resourcemanager-databoxedge/pom.xml | 4 +-- .../azure-resourcemanager-databricks/pom.xml | 4 +-- .../azure-resourcemanager-datadog/pom.xml | 4 +-- .../azure-resourcemanager-datafactory/pom.xml | 6 ++--- .../pom.xml | 4 +-- .../pom.xml | 4 +-- .../pom.xml | 4 +-- .../pom.xml | 4 +-- .../pom.xml | 4 +-- .../pom.xml | 6 ++--- .../azure-iot-deviceupdate/pom.xml | 6 ++--- .../azure-resourcemanager-devspaces/pom.xml | 4 +-- .../azure-resourcemanager-devtestlabs/pom.xml | 4 +-- .../azure-digitaltwins-core/pom.xml | 10 +++---- .../pom.xml | 6 ++--- sdk/e2e/pom.xml | 6 ++--- .../azure-messaging-eventgrid/pom.xml | 8 +++--- .../azure-resourcemanager-eventgrid/pom.xml | 4 +-- .../azure-messaging-eventhubs/pom.xml | 4 +-- .../azure-verticals-agrifood-farming/pom.xml | 10 +++---- .../azure-ai-formrecognizer/pom.xml | 8 +++--- .../azure-resourcemanager-frontdoor/pom.xml | 4 +-- .../azure-resourcemanager-hanaonazure/pom.xml | 4 +-- .../azure-resourcemanager-hdinsight/pom.xml | 6 ++--- .../azure-resourcemanager-healthbot/pom.xml | 2 +- .../pom.xml | 4 +-- .../pom.xml | 4 +-- .../pom.xml | 4 +-- sdk/identity/azure-identity/pom.xml | 4 +-- .../pom.xml | 6 ++--- .../azure-resourcemanager-iotcentral/pom.xml | 4 +-- .../azure-resourcemanager-iothub/pom.xml | 4 +-- .../pom.xml | 8 +++--- .../pom.xml | 8 +++--- .../azure-security-keyvault-jca/pom.xml | 2 +- .../azure-security-keyvault-keys/pom.xml | 8 +++--- .../azure-security-keyvault-secrets/pom.xml | 8 +++--- .../azure-security-test-keyvault-jca/pom.xml | 2 +- .../pom.xml | 4 +-- sdk/kusto/azure-resourcemanager-kusto/pom.xml | 4 +-- .../azure-resourcemanager-labservices/pom.xml | 4 +-- .../pom.xml | 4 +-- .../microsoft-azure-loganalytics/pom.xml | 2 +- sdk/logic/azure-resourcemanager-logic/pom.xml | 4 +-- .../pom.xml | 4 +-- .../azure-resourcemanager-maintenance/pom.xml | 6 ++--- .../pom.xml | 4 +-- sdk/maps/azure-resourcemanager-maps/pom.xml | 6 ++--- .../azure-resourcemanager-mariadb/pom.xml | 4 +-- .../pom.xml | 4 +-- .../pom.xml | 4 +-- .../azure-ai-metricsadvisor/pom.xml | 8 +++--- .../azure-mixedreality-authentication/pom.xml | 8 +++--- .../pom.xml | 4 +-- .../azure-iot-modelsrepository/pom.xml | 8 +++--- .../pom.xml | 8 +++--- sdk/monitor/azure-monitor-query/pom.xml | 10 +++---- sdk/mysql/azure-resourcemanager-mysql/pom.xml | 4 +-- .../azure-resourcemanager-netapp/pom.xml | 6 ++--- .../pom.xml | 4 +-- .../pom.xml | 4 +-- .../azure-resourcemanager-peering/pom.xml | 4 +-- .../pom.xml | 4 +-- .../azure-resourcemanager-postgresql/pom.xml | 4 +-- .../pom.xml | 4 +-- .../azure-analytics-purview-catalog/pom.xml | 10 +++---- .../azure-analytics-purview-scanning/pom.xml | 10 +++---- sdk/quantum/azure-quantum-jobs/pom.xml | 6 ++--- .../pom.xml | 2 +- .../pom.xml | 4 +-- .../pom.xml | 4 +-- sdk/relay/azure-resourcemanager-relay/pom.xml | 2 +- .../pom.xml | 6 ++--- .../pom.xml | 6 ++--- .../pom.xml | 4 +-- .../azure-resourcemanager-appplatform/pom.xml | 2 +- .../azure-resourcemanager-appservice/pom.xml | 2 +- .../pom.xml | 2 +- .../azure-resourcemanager-cdn/pom.xml | 2 +- .../azure-resourcemanager-compute/pom.xml | 2 +- .../pom.xml | 2 +- .../pom.xml | 2 +- .../pom.xml | 2 +- .../azure-resourcemanager-cosmos/pom.xml | 2 +- .../azure-resourcemanager-dns/pom.xml | 2 +- .../azure-resourcemanager-eventhubs/pom.xml | 2 +- .../azure-resourcemanager-keyvault/pom.xml | 2 +- .../azure-resourcemanager-monitor/pom.xml | 2 +- .../azure-resourcemanager-msi/pom.xml | 2 +- .../azure-resourcemanager-network/pom.xml | 2 +- .../azure-resourcemanager-privatedns/pom.xml | 2 +- .../azure-resourcemanager-redis/pom.xml | 2 +- .../azure-resourcemanager-resources/pom.xml | 6 ++--- .../azure-resourcemanager-samples/pom.xml | 2 +- .../azure-resourcemanager-search/pom.xml | 2 +- .../azure-resourcemanager-servicebus/pom.xml | 2 +- .../azure-resourcemanager-sql/pom.xml | 2 +- .../azure-resourcemanager-storage/pom.xml | 2 +- .../azure-resourcemanager-test/pom.xml | 8 +++--- .../pom.xml | 2 +- .../azure-resourcemanager/pom.xml | 4 +-- .../pom.xml | 4 +-- .../azure-data-schemaregistry-avro/pom.xml | 2 +- .../azure-data-schemaregistry/pom.xml | 4 +-- sdk/search/azure-search-documents/pom.xml | 8 +++--- .../azure-messaging-servicebus/pom.xml | 8 +++--- .../pom.xml | 4 +-- .../azure-resourcemanager-signalr/pom.xml | 4 +-- .../pom.xml | 2 +- .../pom.xml | 2 +- .../azure-appconfiguration-sample/pom.xml | 2 +- .../pom.xml | 2 +- .../pom.xml | 2 +- .../pom.xml | 2 +- .../pom.xml | 2 +- .../pom.xml | 2 +- .../pom.xml | 2 +- .../pom.xml | 2 +- .../pom.xml | 2 +- .../pom.xml | 2 +- .../azure-spring-boot-sample-cosmos/pom.xml | 2 +- .../pom.xml | 2 +- .../pom.xml | 2 +- .../pom.xml | 2 +- .../pom.xml | 2 +- .../pom.xml | 2 +- .../pom.xml | 2 +- .../pom.xml | 2 +- .../azure-spring-cloud-sample-cache/pom.xml | 2 +- .../pom.xml | 2 +- .../pom.xml | 2 +- .../pom.xml | 2 +- .../pom.xml | 2 +- .../pom.xml | 2 +- .../pom.xml | 2 +- .../pom.xml | 2 +- .../pom.xml | 2 +- .../pom.xml | 2 +- .../pom.xml | 2 +- .../pom.xml | 2 +- .../pom.xml | 2 +- .../pom.xml | 2 +- .../feature-management-sample/pom.xml | 2 +- .../feature-management-web-sample/pom.xml | 2 +- .../azure-spring-boot-test-parent/pom.xml | 2 +- .../pom.xml | 2 +- .../pom.xml | 2 +- sdk/storage/azure-storage-blob-batch/pom.xml | 6 ++--- .../azure-storage-blob-changefeed/pom.xml | 6 ++--- .../azure-storage-blob-cryptography/pom.xml | 6 ++--- sdk/storage/azure-storage-blob-nio/pom.xml | 6 ++--- sdk/storage/azure-storage-blob/pom.xml | 6 ++--- sdk/storage/azure-storage-common/pom.xml | 6 ++--- .../azure-storage-file-datalake/pom.xml | 6 ++--- sdk/storage/azure-storage-file-share/pom.xml | 6 ++--- .../azure-storage-internal-avro/pom.xml | 4 +-- sdk/storage/azure-storage-queue/pom.xml | 6 ++--- .../pom.xml | 4 +-- .../pom.xml | 4 +-- .../pom.xml | 4 +-- .../pom.xml | 4 +-- .../azure-resourcemanager-support/pom.xml | 4 +-- .../pom.xml | 8 +++--- .../azure-analytics-synapse-artifacts/pom.xml | 8 +++--- .../pom.xml | 8 +++--- .../pom.xml | 8 +++--- .../azure-analytics-synapse-spark/pom.xml | 8 +++--- .../azure-resourcemanager-synapse/pom.xml | 4 +-- sdk/tables/azure-data-tables/pom.xml | 6 ++--- sdk/template/azure-sdk-template/pom.xml | 2 +- .../azure-ai-textanalytics/pom.xml | 8 +++--- .../pom.xml | 4 +-- .../azure-ai-documenttranslator/pom.xml | 10 +++---- .../azure-media-videoanalyzer-edge/pom.xml | 4 +-- .../pom.xml | 4 +-- .../pom.xml | 4 +-- .../azure-messaging-webpubsub/pom.xml | 6 ++--- 241 files changed, 550 insertions(+), 522 deletions(-) diff --git a/common/smoke-tests/pom.xml b/common/smoke-tests/pom.xml index a1bc535cad2f..a0034c023985 100644 --- a/common/smoke-tests/pom.xml +++ b/common/smoke-tests/pom.xml @@ -88,25 +88,25 @@ com.azure azure-core - 1.16.0 + 1.17.0 com.azure azure-core-http-netty - 1.9.2 + 1.10.0 com.azure azure-core-tracing-opentelemetry - 1.0.0-beta.10 + 1.0.0-beta.11 com.azure azure-core-http-okhttp - 1.6.2 + 1.7.0 diff --git a/eng/jacoco-test-coverage/pom.xml b/eng/jacoco-test-coverage/pom.xml index 4f7e61d7a243..dc7ebf33ad67 100644 --- a/eng/jacoco-test-coverage/pom.xml +++ b/eng/jacoco-test-coverage/pom.xml @@ -104,7 +104,7 @@ com.azure azure-core - 1.17.0 + 1.18.0-beta.1 com.azure @@ -119,7 +119,7 @@ com.azure azure-core-experimental - 1.0.0-beta.14 + 1.0.0-beta.15 com.azure @@ -129,37 +129,37 @@ com.azure azure-core-http-netty - 1.10.0 + 1.11.0-beta.1 com.azure azure-core-http-okhttp - 1.7.0 + 1.8.0-beta.1 com.azure azure-core-management - 1.3.0 + 1.4.0-beta.1 com.azure azure-core-serializer-avro-apache - 1.0.0-beta.11 + 1.0.0-beta.12 com.azure azure-core-serializer-json-gson - 1.1.3 + 1.2.0-beta.1 com.azure azure-core-serializer-json-jackson - 1.2.4 + 1.3.0-beta.1 com.azure azure-core-tracing-opentelemetry - 1.0.0-beta.11 + 1.0.0-beta.12 com.azure diff --git a/eng/versioning/version_client.txt b/eng/versioning/version_client.txt index 02a722170a8b..84b94d5b9b25 100644 --- a/eng/versioning/version_client.txt +++ b/eng/versioning/version_client.txt @@ -2,8 +2,8 @@ # :;dependency-version;current-version # # The dependency-version is used by other Azure SDKs outside of the release group when listing the library as a Maven -# dependency in its POM. The current-version is used by the library to denote its version and as the Maven dependency -# version for other Azure SDKs inside the same release group. +# dependency in its POM. The current-version is used by the library to denote its in-development version and as the +# Maven dependency version for other Azure SDKs inside the same release group. # # Given com.azure:azure-example;1.1.0;1.2.0-beta.1 in the release group /sdk/example # - com.azure:azure-example2 in release group /sdk/example will use the current-version (1.2.0-beta.1) when using @@ -57,20 +57,20 @@ com.azure:azure-communication-sms;1.0.1;1.0.3 com.azure:azure-communication-identity;1.1.0;1.1.1 com.azure:azure-communication-phonenumbers;1.0.1;1.0.3 com.azure:azure-containers-containerregistry;1.0.0-beta.2;1.0.0-beta.3 -com.azure:azure-core;1.16.0;1.17.0 +com.azure:azure-core;1.17.0;1.18.0-beta.1 com.azure:azure-core-amqp;2.0.6;2.1.0-beta.1 com.azure:azure-core-amqp-experimental;1.0.0-beta.1;1.0.0-beta.1 -com.azure:azure-core-experimental;1.0.0-beta.13;1.0.0-beta.14 +com.azure:azure-core-experimental;1.0.0-beta.14;1.0.0-beta.15 com.azure:azure-core-http-jdk-httpclient;1.0.0-beta.1;1.0.0-beta.1 -com.azure:azure-core-http-netty;1.9.2;1.10.0 -com.azure:azure-core-http-okhttp;1.6.2;1.7.0 -com.azure:azure-core-management;1.2.2;1.3.0 -com.azure:azure-core-serializer-avro-apache;1.0.0-beta.10;1.0.0-beta.11 +com.azure:azure-core-http-netty;1.10.0;1.11.0-beta.1 +com.azure:azure-core-http-okhttp;1.7.0;1.8.0-beta.1 +com.azure:azure-core-management;1.3.0;1.4.0-beta.1 +com.azure:azure-core-serializer-avro-apache;1.0.0-beta.11;1.0.0-beta.12 com.azure:azure-core-serializer-avro-jackson;1.0.0-beta.1;1.0.0-beta.2 -com.azure:azure-core-serializer-json-gson;1.1.2;1.1.3 -com.azure:azure-core-serializer-json-jackson;1.2.3;1.2.4 -com.azure:azure-core-test;1.6.2;1.6.3 -com.azure:azure-core-tracing-opentelemetry;1.0.0-beta.10;1.0.0-beta.11 +com.azure:azure-core-serializer-json-gson;1.1.3;1.2.0-beta.1 +com.azure:azure-core-serializer-json-jackson;1.2.4;1.3.0-beta.1 +com.azure:azure-core-test;1.6.3;1.7.0-beta.1 +com.azure:azure-core-tracing-opentelemetry;1.0.0-beta.11;1.0.0-beta.12 com.azure:azure-cosmos;4.15.0;4.16.0-beta.2 com.azure:azure-cosmos-benchmark;4.0.1-beta.1;4.0.1-beta.1 com.azure:azure-cosmos-dotnet-benchmark;4.0.1-beta.1;4.0.1-beta.1 @@ -306,9 +306,7 @@ com.azure.resourcemanager:azure-resourcemanager-deviceprovisioningservices;1.0.0 # note: The unreleased dependencies will not be manipulated with the automatic PR creation code. # In the pom, the version update tag after the version should name the unreleased package and the dependency version: # -unreleased_com.azure:azure-core;1.17.0 unreleased_com.azure:azure-core-amqp;2.1.0-beta.1 -unreleased_com.azure:azure-core-management;1.3.0 # Released Beta dependencies: Copy the entry from above, prepend "beta_", remove the current # version and set the version to the released beta. Released beta dependencies are only valid diff --git a/sdk/advisor/azure-resourcemanager-advisor/pom.xml b/sdk/advisor/azure-resourcemanager-advisor/pom.xml index 5c4b109b1439..bb1d18f32768 100644 --- a/sdk/advisor/azure-resourcemanager-advisor/pom.xml +++ b/sdk/advisor/azure-resourcemanager-advisor/pom.xml @@ -44,12 +44,12 @@ com.azure azure-core - 1.16.0 + 1.17.0 com.azure azure-core-management - 1.2.2 + 1.3.0 diff --git a/sdk/anomalydetector/azure-ai-anomalydetector/pom.xml b/sdk/anomalydetector/azure-ai-anomalydetector/pom.xml index 9907935aa585..9bd5e281b0af 100644 --- a/sdk/anomalydetector/azure-ai-anomalydetector/pom.xml +++ b/sdk/anomalydetector/azure-ai-anomalydetector/pom.xml @@ -38,12 +38,12 @@ com.azure azure-core - 1.16.0 + 1.17.0 com.azure azure-core-http-netty - 1.9.2 + 1.10.0 @@ -68,7 +68,7 @@ com.azure azure-core-test - 1.6.2 + 1.6.3 test diff --git a/sdk/apimanagement/azure-resourcemanager-apimanagement/pom.xml b/sdk/apimanagement/azure-resourcemanager-apimanagement/pom.xml index b5d992efbcab..8e18099fea16 100644 --- a/sdk/apimanagement/azure-resourcemanager-apimanagement/pom.xml +++ b/sdk/apimanagement/azure-resourcemanager-apimanagement/pom.xml @@ -44,12 +44,12 @@ com.azure azure-core - 1.16.0 + 1.17.0 com.azure azure-core-management - 1.2.2 + 1.3.0 diff --git a/sdk/appconfiguration/azure-data-appconfiguration/pom.xml b/sdk/appconfiguration/azure-data-appconfiguration/pom.xml index b259c48619c0..300b0ebb732e 100644 --- a/sdk/appconfiguration/azure-data-appconfiguration/pom.xml +++ b/sdk/appconfiguration/azure-data-appconfiguration/pom.xml @@ -36,25 +36,25 @@ com.azure azure-core - 1.16.0 + 1.17.0 com.azure azure-core-http-netty - 1.9.2 + 1.10.0 com.azure azure-core-test - 1.6.2 + 1.6.3 test com.azure azure-core-http-okhttp - 1.6.2 + 1.7.0 test diff --git a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/pom.xml b/sdk/appconfiguration/azure-resourcemanager-appconfiguration/pom.xml index 5153383b7cf1..a8606d455e46 100644 --- a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/pom.xml +++ b/sdk/appconfiguration/azure-resourcemanager-appconfiguration/pom.xml @@ -44,12 +44,12 @@ com.azure azure-core - 1.16.0 + 1.17.0 com.azure azure-core-management - 1.2.2 + 1.3.0 diff --git a/sdk/appconfiguration/azure-spring-cloud-appconfiguration-config/pom.xml b/sdk/appconfiguration/azure-spring-cloud-appconfiguration-config/pom.xml index 94dfd0b05480..201dde0f9e5b 100644 --- a/sdk/appconfiguration/azure-spring-cloud-appconfiguration-config/pom.xml +++ b/sdk/appconfiguration/azure-spring-cloud-appconfiguration-config/pom.xml @@ -62,7 +62,7 @@ com.azure azure-core - 1.16.0 + 1.17.0 com.azure @@ -82,7 +82,7 @@ com.azure azure-core-http-netty - 1.9.2 + 1.10.0 org.hibernate.validator diff --git a/sdk/appconfiguration/spring-cloud-azure-appconfiguration-config/pom.xml b/sdk/appconfiguration/spring-cloud-azure-appconfiguration-config/pom.xml index dec372c9f937..a5c464da66da 100644 --- a/sdk/appconfiguration/spring-cloud-azure-appconfiguration-config/pom.xml +++ b/sdk/appconfiguration/spring-cloud-azure-appconfiguration-config/pom.xml @@ -62,7 +62,7 @@ com.azure azure-core - 1.16.0 + 1.17.0 com.azure @@ -82,7 +82,7 @@ com.azure azure-core-http-netty - 1.9.2 + 1.10.0 org.apache.commons diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/pom.xml b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/pom.xml index e34895bb9282..85f137548ba4 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/pom.xml +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/pom.xml @@ -44,12 +44,12 @@ com.azure azure-core - 1.16.0 + 1.17.0 com.azure azure-core-management - 1.2.2 + 1.3.0 diff --git a/sdk/attestation/azure-resourcemanager-attestation/pom.xml b/sdk/attestation/azure-resourcemanager-attestation/pom.xml index b62e4a18e7eb..68843b9a440d 100644 --- a/sdk/attestation/azure-resourcemanager-attestation/pom.xml +++ b/sdk/attestation/azure-resourcemanager-attestation/pom.xml @@ -44,12 +44,12 @@ com.azure azure-core - 1.16.0 + 1.17.0 com.azure azure-core-management - 1.2.2 + 1.3.0 diff --git a/sdk/attestation/azure-security-attestation/pom.xml b/sdk/attestation/azure-security-attestation/pom.xml index c350646d663e..e7b0d89d1a7c 100644 --- a/sdk/attestation/azure-security-attestation/pom.xml +++ b/sdk/attestation/azure-security-attestation/pom.xml @@ -31,7 +31,7 @@ com.azure azure-core - 1.16.0 + 1.17.0 @@ -55,13 +55,13 @@ com.azure azure-core-test - 1.6.2 + 1.6.3 test com.azure azure-core-http-okhttp - 1.6.2 + 1.7.0 test diff --git a/sdk/automation/azure-resourcemanager-automation/pom.xml b/sdk/automation/azure-resourcemanager-automation/pom.xml index 3239de17e24b..1c736078adb7 100644 --- a/sdk/automation/azure-resourcemanager-automation/pom.xml +++ b/sdk/automation/azure-resourcemanager-automation/pom.xml @@ -44,12 +44,12 @@ com.azure azure-core - 1.16.0 + 1.17.0 com.azure azure-core-management - 1.2.2 + 1.3.0 diff --git a/sdk/avs/azure-resourcemanager-avs/pom.xml b/sdk/avs/azure-resourcemanager-avs/pom.xml index ee4782c4aca7..044a6d53da10 100644 --- a/sdk/avs/azure-resourcemanager-avs/pom.xml +++ b/sdk/avs/azure-resourcemanager-avs/pom.xml @@ -44,12 +44,12 @@ com.azure azure-core - 1.16.0 + 1.17.0 com.azure azure-core-management - 1.2.2 + 1.3.0 diff --git a/sdk/azurestack/azure-resourcemanager-azurestack/pom.xml b/sdk/azurestack/azure-resourcemanager-azurestack/pom.xml index 442072eea9e4..c2422e06c421 100644 --- a/sdk/azurestack/azure-resourcemanager-azurestack/pom.xml +++ b/sdk/azurestack/azure-resourcemanager-azurestack/pom.xml @@ -44,12 +44,12 @@ com.azure azure-core - 1.16.0 + 1.17.0 com.azure azure-core-management - 1.2.2 + 1.3.0 diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/pom.xml b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/pom.xml index 118a85cc4917..804f96907ecd 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/pom.xml +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/pom.xml @@ -44,12 +44,12 @@ com.azure azure-core - 1.16.0 + 1.17.0 com.azure azure-core-management - 1.2.2 + 1.3.0 diff --git a/sdk/batch/azure-resourcemanager-batch/pom.xml b/sdk/batch/azure-resourcemanager-batch/pom.xml index d40f1afe0afe..7e409e555504 100644 --- a/sdk/batch/azure-resourcemanager-batch/pom.xml +++ b/sdk/batch/azure-resourcemanager-batch/pom.xml @@ -44,12 +44,12 @@ com.azure azure-core - 1.16.0 + 1.17.0 com.azure azure-core-management - 1.2.2 + 1.3.0 diff --git a/sdk/batchai/azure-resourcemanager-batchai/pom.xml b/sdk/batchai/azure-resourcemanager-batchai/pom.xml index 6e6db219fdf6..ce97be5fa80c 100644 --- a/sdk/batchai/azure-resourcemanager-batchai/pom.xml +++ b/sdk/batchai/azure-resourcemanager-batchai/pom.xml @@ -44,12 +44,12 @@ com.azure azure-core - 1.16.0 + 1.17.0 com.azure azure-core-management - 1.2.2 + 1.3.0 diff --git a/sdk/billing/azure-resourcemanager-billing/pom.xml b/sdk/billing/azure-resourcemanager-billing/pom.xml index 0544df863434..917d34cb5fbb 100644 --- a/sdk/billing/azure-resourcemanager-billing/pom.xml +++ b/sdk/billing/azure-resourcemanager-billing/pom.xml @@ -44,12 +44,12 @@ com.azure azure-core - 1.16.0 + 1.17.0 com.azure azure-core-management - 1.2.2 + 1.3.0 diff --git a/sdk/boms/azure-spring-boot-bom/pom.xml b/sdk/boms/azure-spring-boot-bom/pom.xml index 8ad902386ad2..949b7a9c75b0 100644 --- a/sdk/boms/azure-spring-boot-bom/pom.xml +++ b/sdk/boms/azure-spring-boot-bom/pom.xml @@ -39,7 +39,7 @@ ${project.version} ${project.version} - 1.16.0 + 1.17.0 1.3.0 4.2.8 1.9.1 diff --git a/sdk/boms/azure-spring-cloud-dependencies/pom.xml b/sdk/boms/azure-spring-cloud-dependencies/pom.xml index e63748da8b4f..eeff9b2a3e38 100644 --- a/sdk/boms/azure-spring-cloud-dependencies/pom.xml +++ b/sdk/boms/azure-spring-cloud-dependencies/pom.xml @@ -46,7 +46,7 @@ ${project.version} 1.5.0 1.3.0 - 1.16.0 + 1.17.0 5.7.1 1.7.1 3.6.1 diff --git a/sdk/botservice/azure-resourcemanager-botservice/pom.xml b/sdk/botservice/azure-resourcemanager-botservice/pom.xml index 4eec70475989..94ee24ffab42 100644 --- a/sdk/botservice/azure-resourcemanager-botservice/pom.xml +++ b/sdk/botservice/azure-resourcemanager-botservice/pom.xml @@ -44,12 +44,12 @@ com.azure azure-core - 1.16.0 + 1.17.0 com.azure azure-core-management - 1.2.2 + 1.3.0 diff --git a/sdk/changeanalysis/azure-resourcemanager-changeanalysis/pom.xml b/sdk/changeanalysis/azure-resourcemanager-changeanalysis/pom.xml index b43a28d513ef..f91535977bf9 100644 --- a/sdk/changeanalysis/azure-resourcemanager-changeanalysis/pom.xml +++ b/sdk/changeanalysis/azure-resourcemanager-changeanalysis/pom.xml @@ -44,12 +44,12 @@ com.azure azure-core - 1.16.0 + 1.17.0 com.azure azure-core-management - 1.2.2 + 1.3.0 diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/pom.xml b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/pom.xml index bed24ce1720c..57776146919c 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/pom.xml +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/pom.xml @@ -44,12 +44,12 @@ com.azure azure-core - 1.16.0 + 1.17.0 com.azure azure-core-management - 1.2.2 + 1.3.0 diff --git a/sdk/commerce/azure-resourcemanager-commerce/pom.xml b/sdk/commerce/azure-resourcemanager-commerce/pom.xml index 070c3877de05..96f24b9a90b0 100644 --- a/sdk/commerce/azure-resourcemanager-commerce/pom.xml +++ b/sdk/commerce/azure-resourcemanager-commerce/pom.xml @@ -44,12 +44,12 @@ com.azure azure-core - 1.16.0 + 1.17.0 com.azure azure-core-management - 1.2.2 + 1.3.0 diff --git a/sdk/communication/azure-communication-chat/pom.xml b/sdk/communication/azure-communication-chat/pom.xml index e48c15bf2f26..396763240119 100644 --- a/sdk/communication/azure-communication-chat/pom.xml +++ b/sdk/communication/azure-communication-chat/pom.xml @@ -45,7 +45,7 @@ com.azure azure-core - 1.16.0 + 1.17.0 com.azure @@ -61,7 +61,7 @@ com.azure azure-core-test - 1.6.2 + 1.6.3 test @@ -91,7 +91,7 @@ com.azure azure-core-http-okhttp - 1.6.2 + 1.7.0 test diff --git a/sdk/communication/azure-communication-common/pom.xml b/sdk/communication/azure-communication-common/pom.xml index 9f90268ac67f..693177a279e4 100644 --- a/sdk/communication/azure-communication-common/pom.xml +++ b/sdk/communication/azure-communication-common/pom.xml @@ -46,12 +46,12 @@ com.azure azure-core - 1.16.0 + 1.17.0 com.azure azure-core-http-netty - 1.9.2 + 1.10.0 compile diff --git a/sdk/communication/azure-communication-identity/pom.xml b/sdk/communication/azure-communication-identity/pom.xml index e01aa05fef26..ed9e170361a4 100644 --- a/sdk/communication/azure-communication-identity/pom.xml +++ b/sdk/communication/azure-communication-identity/pom.xml @@ -58,7 +58,7 @@ com.azure azure-core - 1.16.0 + 1.17.0 com.azure @@ -98,7 +98,7 @@ com.azure azure-core-test - 1.6.2 + 1.6.3 test @@ -110,7 +110,7 @@ com.azure azure-core-http-okhttp - 1.6.2 + 1.7.0 test diff --git a/sdk/communication/azure-communication-phonenumbers/pom.xml b/sdk/communication/azure-communication-phonenumbers/pom.xml index f657d5e4be19..e71f16adedca 100644 --- a/sdk/communication/azure-communication-phonenumbers/pom.xml +++ b/sdk/communication/azure-communication-phonenumbers/pom.xml @@ -58,7 +58,7 @@ com.azure azure-core - 1.16.0 + 1.17.0 com.azure @@ -98,7 +98,7 @@ com.azure azure-core-test - 1.6.2 + 1.6.3 test @@ -110,7 +110,7 @@ com.azure azure-core-http-okhttp - 1.6.2 + 1.7.0 test diff --git a/sdk/communication/azure-communication-sms/pom.xml b/sdk/communication/azure-communication-sms/pom.xml index 355f87fcce9c..93a07dcefe97 100644 --- a/sdk/communication/azure-communication-sms/pom.xml +++ b/sdk/communication/azure-communication-sms/pom.xml @@ -50,7 +50,7 @@ com.azure azure-core - 1.16.0 + 1.17.0 com.azure @@ -60,7 +60,7 @@ com.azure azure-core-test - 1.6.2 + 1.6.3 test @@ -96,7 +96,7 @@ com.azure azure-core-http-okhttp - 1.6.2 + 1.7.0 test diff --git a/sdk/communication/azure-resourcemanager-communication/pom.xml b/sdk/communication/azure-resourcemanager-communication/pom.xml index bc17c1872f6d..95d0367ba775 100644 --- a/sdk/communication/azure-resourcemanager-communication/pom.xml +++ b/sdk/communication/azure-resourcemanager-communication/pom.xml @@ -44,12 +44,12 @@ com.azure azure-core - 1.16.0 + 1.17.0 com.azure azure-core-management - 1.2.2 + 1.3.0 diff --git a/sdk/confidentialledger/azure-security-confidentialledger/pom.xml b/sdk/confidentialledger/azure-security-confidentialledger/pom.xml index 5351f5222b65..bc5ece276e2c 100644 --- a/sdk/confidentialledger/azure-security-confidentialledger/pom.xml +++ b/sdk/confidentialledger/azure-security-confidentialledger/pom.xml @@ -38,17 +38,17 @@ com.azure azure-core - 1.16.0 + 1.17.0 com.azure azure-core-experimental - 1.0.0-beta.13 + 1.0.0-beta.14 com.azure azure-core-http-netty - 1.9.2 + 1.10.0 @@ -73,7 +73,7 @@ com.azure azure-core-test - 1.6.2 + 1.6.3 test @@ -97,7 +97,7 @@ com.azure azure-core-serializer-json-jackson - 1.2.3 + 1.2.4 test diff --git a/sdk/confluent/azure-resourcemanager-confluent/pom.xml b/sdk/confluent/azure-resourcemanager-confluent/pom.xml index 3f3a7c56fa07..62ee6bd218e3 100644 --- a/sdk/confluent/azure-resourcemanager-confluent/pom.xml +++ b/sdk/confluent/azure-resourcemanager-confluent/pom.xml @@ -44,12 +44,12 @@ com.azure azure-core - 1.16.0 + 1.17.0 com.azure azure-core-management - 1.2.2 + 1.3.0 com.azure @@ -60,7 +60,7 @@ com.azure azure-core-test - 1.6.2 + 1.6.3 test diff --git a/sdk/consumption/azure-resourcemanager-consumption/pom.xml b/sdk/consumption/azure-resourcemanager-consumption/pom.xml index c968c37dd0d6..9aebfc9940bf 100644 --- a/sdk/consumption/azure-resourcemanager-consumption/pom.xml +++ b/sdk/consumption/azure-resourcemanager-consumption/pom.xml @@ -44,12 +44,12 @@ com.azure azure-core - 1.16.0 + 1.17.0 com.azure azure-core-management - 1.2.2 + 1.3.0 diff --git a/sdk/containerregistry/azure-containers-containerregistry/pom.xml b/sdk/containerregistry/azure-containers-containerregistry/pom.xml index 29d32973cfd3..d8a58801811d 100644 --- a/sdk/containerregistry/azure-containers-containerregistry/pom.xml +++ b/sdk/containerregistry/azure-containers-containerregistry/pom.xml @@ -31,12 +31,12 @@ com.azure azure-core - 1.16.0 + 1.17.0 com.azure azure-core-http-netty - 1.9.2 + 1.10.0 @@ -72,13 +72,13 @@ com.azure azure-core-test - 1.6.2 + 1.6.3 test com.azure azure-core-http-okhttp - 1.6.2 + 1.7.0 test diff --git a/sdk/core/azure-core-amqp/pom.xml b/sdk/core/azure-core-amqp/pom.xml index 5b1572cc945f..a22175309619 100644 --- a/sdk/core/azure-core-amqp/pom.xml +++ b/sdk/core/azure-core-amqp/pom.xml @@ -58,7 +58,7 @@ com.azure azure-core - 1.17.0 + 1.18.0-beta.1 com.microsoft.azure diff --git a/sdk/core/azure-core-experimental/CHANGELOG.md b/sdk/core/azure-core-experimental/CHANGELOG.md index afe9bf8980f5..f95b1e193664 100644 --- a/sdk/core/azure-core-experimental/CHANGELOG.md +++ b/sdk/core/azure-core-experimental/CHANGELOG.md @@ -1,5 +1,8 @@ # Release History +## 1.0.0-beta.15 (Unreleased) + + ## 1.0.0-beta.14 (2021-06-07) ### Breaking Changes diff --git a/sdk/core/azure-core-experimental/pom.xml b/sdk/core/azure-core-experimental/pom.xml index f779e708f6ec..438517d35a22 100644 --- a/sdk/core/azure-core-experimental/pom.xml +++ b/sdk/core/azure-core-experimental/pom.xml @@ -15,7 +15,7 @@ com.azure azure-core-experimental jar - 1.0.0-beta.14 + 1.0.0-beta.15 Microsoft Azure Java Core Experimental Library This package contains experimental core types for Azure Java clients. @@ -60,7 +60,7 @@ com.azure azure-core - 1.17.0 + 1.18.0-beta.1 diff --git a/sdk/core/azure-core-http-jdk-httpclient/pom.xml b/sdk/core/azure-core-http-jdk-httpclient/pom.xml index 13f3d00dec86..1d2311b911b5 100644 --- a/sdk/core/azure-core-http-jdk-httpclient/pom.xml +++ b/sdk/core/azure-core-http-jdk-httpclient/pom.xml @@ -62,27 +62,27 @@ com.azure azure-core - 1.17.0 + 1.18.0-beta.1 com.azure azure-core - 1.17.0 + 1.18.0-beta.1 test-jar test com.azure azure-core-test - 1.6.3 + 1.7.0-beta.1 test com.azure azure-core-test - 1.6.3 + 1.7.0-beta.1 test-jar test diff --git a/sdk/core/azure-core-http-netty/CHANGELOG.md b/sdk/core/azure-core-http-netty/CHANGELOG.md index f75b411cd312..2d6d78804e8e 100644 --- a/sdk/core/azure-core-http-netty/CHANGELOG.md +++ b/sdk/core/azure-core-http-netty/CHANGELOG.md @@ -1,5 +1,8 @@ # Release History +## 1.11.0-beta.1 (Unreleased) + + ## 1.10.0 (2021-06-07) ### Dependency Updates diff --git a/sdk/core/azure-core-http-netty/pom.xml b/sdk/core/azure-core-http-netty/pom.xml index 5e0a1ddfa5c4..0577afc2ea6f 100644 --- a/sdk/core/azure-core-http-netty/pom.xml +++ b/sdk/core/azure-core-http-netty/pom.xml @@ -15,7 +15,7 @@ com.azure azure-core-http-netty jar - 1.10.0 + 1.11.0-beta.1 Microsoft Azure Netty HTTP Client Library This package contains the Netty HTTP client plugin for azure-core. @@ -60,7 +60,7 @@ com.azure azure-core - 1.17.0 + 1.18.0-beta.1 @@ -117,20 +117,20 @@ com.azure azure-core - 1.17.0 + 1.18.0-beta.1 test-jar test com.azure azure-core-test - 1.6.3 + 1.7.0-beta.1 test com.azure azure-core-test - 1.6.3 + 1.7.0-beta.1 test-jar test diff --git a/sdk/core/azure-core-http-okhttp/CHANGELOG.md b/sdk/core/azure-core-http-okhttp/CHANGELOG.md index 27249b04ccc0..7ed6e9345bb9 100644 --- a/sdk/core/azure-core-http-okhttp/CHANGELOG.md +++ b/sdk/core/azure-core-http-okhttp/CHANGELOG.md @@ -1,5 +1,8 @@ # Release History +## 1.8.0-beta.1 (Unreleased) + + ## 1.7.0 (2021-06-07) ### Dependency Updates diff --git a/sdk/core/azure-core-http-okhttp/pom.xml b/sdk/core/azure-core-http-okhttp/pom.xml index 9789ee761ea1..2df456de8f45 100644 --- a/sdk/core/azure-core-http-okhttp/pom.xml +++ b/sdk/core/azure-core-http-okhttp/pom.xml @@ -15,7 +15,7 @@ com.azure azure-core-http-okhttp jar - 1.7.0 + 1.8.0-beta.1 Microsoft Azure OkHttp HTTP Client Library This package contains the OkHttp HTTP client plugin for azure-core. @@ -60,7 +60,7 @@ com.azure azure-core - 1.17.0 + 1.18.0-beta.1 @@ -73,20 +73,20 @@ com.azure azure-core - 1.17.0 + 1.18.0-beta.1 test-jar test com.azure azure-core-test - 1.6.3 + 1.7.0-beta.1 test com.azure azure-core-test - 1.6.3 + 1.7.0-beta.1 test-jar test diff --git a/sdk/core/azure-core-management/CHANGELOG.md b/sdk/core/azure-core-management/CHANGELOG.md index c33757baadf5..4131ee27602b 100644 --- a/sdk/core/azure-core-management/CHANGELOG.md +++ b/sdk/core/azure-core-management/CHANGELOG.md @@ -1,5 +1,8 @@ # Release History +## 1.4.0-beta.1 (Unreleased) + + ## 1.3.0 (2021-06-07) ### Features Added diff --git a/sdk/core/azure-core-management/pom.xml b/sdk/core/azure-core-management/pom.xml index 24f2c4c7aaf5..80dd154e66be 100644 --- a/sdk/core/azure-core-management/pom.xml +++ b/sdk/core/azure-core-management/pom.xml @@ -13,7 +13,7 @@ com.azure azure-core-management - 1.3.0 + 1.4.0-beta.1 jar Microsoft Azure Management Java Core Library @@ -59,7 +59,7 @@ com.azure azure-core - 1.17.0 + 1.18.0-beta.1 @@ -83,7 +83,7 @@ com.azure azure-core-http-netty - 1.10.0 + 1.11.0-beta.1 test diff --git a/sdk/core/azure-core-serializer-avro-apache/CHANGELOG.md b/sdk/core/azure-core-serializer-avro-apache/CHANGELOG.md index 7dcbc1424c73..eadf54f7737d 100644 --- a/sdk/core/azure-core-serializer-avro-apache/CHANGELOG.md +++ b/sdk/core/azure-core-serializer-avro-apache/CHANGELOG.md @@ -1,5 +1,8 @@ # Release History +## 1.0.0-beta.12 (Unreleased) + + ## 1.0.0-beta.11 (2021-06-07) ### Dependency Updates diff --git a/sdk/core/azure-core-serializer-avro-apache/pom.xml b/sdk/core/azure-core-serializer-avro-apache/pom.xml index 9139582a8086..c6ac72902f28 100644 --- a/sdk/core/azure-core-serializer-avro-apache/pom.xml +++ b/sdk/core/azure-core-serializer-avro-apache/pom.xml @@ -15,7 +15,7 @@ com.azure azure-core-serializer-avro-apache jar - 1.0.0-beta.11 + 1.0.0-beta.12 Microsoft Azure Apache Avro Serializer Library This package contains the Apache Avro serializer client plugin for azure-core. @@ -58,12 +58,12 @@ com.azure azure-core - 1.17.0 + 1.18.0-beta.1 com.azure azure-core-experimental - 1.0.0-beta.14 + 1.0.0-beta.15 diff --git a/sdk/core/azure-core-serializer-avro-jackson/pom.xml b/sdk/core/azure-core-serializer-avro-jackson/pom.xml index f08cd107a94f..073542f61a50 100644 --- a/sdk/core/azure-core-serializer-avro-jackson/pom.xml +++ b/sdk/core/azure-core-serializer-avro-jackson/pom.xml @@ -58,12 +58,12 @@ com.azure azure-core - 1.17.0 + 1.18.0-beta.1 com.azure azure-core-experimental - 1.0.0-beta.14 + 1.0.0-beta.15 diff --git a/sdk/core/azure-core-serializer-json-gson/CHANGELOG.md b/sdk/core/azure-core-serializer-json-gson/CHANGELOG.md index 56485eb40b52..d09014b0e920 100644 --- a/sdk/core/azure-core-serializer-json-gson/CHANGELOG.md +++ b/sdk/core/azure-core-serializer-json-gson/CHANGELOG.md @@ -1,5 +1,8 @@ # Release History +## 1.2.0-beta.1 (Unreleased) + + ## 1.1.3 (2021-06-07) ### Dependency Updates diff --git a/sdk/core/azure-core-serializer-json-gson/pom.xml b/sdk/core/azure-core-serializer-json-gson/pom.xml index 02b6afb989f3..7c3a6d9ae79a 100644 --- a/sdk/core/azure-core-serializer-json-gson/pom.xml +++ b/sdk/core/azure-core-serializer-json-gson/pom.xml @@ -15,7 +15,7 @@ com.azure azure-core-serializer-json-gson jar - 1.1.3 + 1.2.0-beta.1 Microsoft Azure Gson JSON Serializer Library This package contains the Gson JSON serializer client plugin for azure-core. @@ -58,7 +58,7 @@ com.azure azure-core - 1.17.0 + 1.18.0-beta.1 diff --git a/sdk/core/azure-core-serializer-json-jackson/CHANGELOG.md b/sdk/core/azure-core-serializer-json-jackson/CHANGELOG.md index 186018f345d0..234bcf7e8a2b 100644 --- a/sdk/core/azure-core-serializer-json-jackson/CHANGELOG.md +++ b/sdk/core/azure-core-serializer-json-jackson/CHANGELOG.md @@ -1,5 +1,8 @@ # Release History +## 1.3.0-beta.1 (Unreleased) + + ## 1.2.4 (2021-06-07) ### Dependency Updates diff --git a/sdk/core/azure-core-serializer-json-jackson/pom.xml b/sdk/core/azure-core-serializer-json-jackson/pom.xml index 8535ad4f5813..9d92a1fad9f9 100644 --- a/sdk/core/azure-core-serializer-json-jackson/pom.xml +++ b/sdk/core/azure-core-serializer-json-jackson/pom.xml @@ -15,7 +15,7 @@ com.azure azure-core-serializer-json-jackson jar - 1.2.4 + 1.3.0-beta.1 Microsoft Azure Jackson JSON Serializer Library This package contains the Jackson JSON serializer client plugin for azure-core. @@ -58,7 +58,7 @@ com.azure azure-core - 1.17.0 + 1.18.0-beta.1 diff --git a/sdk/core/azure-core-test/CHANGELOG.md b/sdk/core/azure-core-test/CHANGELOG.md index 6cbd44756455..c6ccfa11be7f 100644 --- a/sdk/core/azure-core-test/CHANGELOG.md +++ b/sdk/core/azure-core-test/CHANGELOG.md @@ -1,5 +1,8 @@ # Release History +## 1.7.0-beta.1 (Unreleased) + + ## 1.6.3 (2021-06-07) ### Features Added diff --git a/sdk/core/azure-core-test/pom.xml b/sdk/core/azure-core-test/pom.xml index 08ce5dc71006..7257c31c45e8 100644 --- a/sdk/core/azure-core-test/pom.xml +++ b/sdk/core/azure-core-test/pom.xml @@ -13,7 +13,7 @@ com.azure azure-core-test jar - 1.6.3 + 1.7.0-beta.1 Microsoft Azure Java Core Test Library This package contains core test types for Azure Java clients. @@ -37,7 +37,7 @@ com.azure azure-core - 1.17.0 + 1.18.0-beta.1 diff --git a/sdk/core/azure-core-tracing-opentelemetry/CHANGELOG.md b/sdk/core/azure-core-tracing-opentelemetry/CHANGELOG.md index 8bb6f27c9237..873f7228e695 100644 --- a/sdk/core/azure-core-tracing-opentelemetry/CHANGELOG.md +++ b/sdk/core/azure-core-tracing-opentelemetry/CHANGELOG.md @@ -1,5 +1,8 @@ # Release History +## 1.0.0-beta.12 (Unreleased) + + ## 1.0.0-beta.11 (2021-06-07) ### Dependency Updates diff --git a/sdk/core/azure-core-tracing-opentelemetry/pom.xml b/sdk/core/azure-core-tracing-opentelemetry/pom.xml index 92ae82766c43..4d1fc563f1f7 100644 --- a/sdk/core/azure-core-tracing-opentelemetry/pom.xml +++ b/sdk/core/azure-core-tracing-opentelemetry/pom.xml @@ -12,7 +12,7 @@ com.azure azure-core-tracing-opentelemetry - 1.0.0-beta.11 + 1.0.0-beta.12 Microsoft Azure OpenTelemetry tracing plugin This package contains the OpenTelemetry tracing plugin for Azure client libraries. @@ -40,7 +40,7 @@ com.azure azure-core - 1.17.0 + 1.18.0-beta.1 com.google.code.findbugs @@ -59,7 +59,7 @@ com.azure azure-core-http-netty - 1.10.0 + 1.11.0-beta.1 test diff --git a/sdk/core/azure-core/CHANGELOG.md b/sdk/core/azure-core/CHANGELOG.md index 8773ba6b5377..c47b664d9cca 100644 --- a/sdk/core/azure-core/CHANGELOG.md +++ b/sdk/core/azure-core/CHANGELOG.md @@ -1,5 +1,8 @@ # Release History +## 1.18.0-beta.1 (Unreleased) + + ## 1.17.0 (2021-06-07) ### Features Added diff --git a/sdk/core/azure-core/pom.xml b/sdk/core/azure-core/pom.xml index 6ac5326bb46b..9576ce59ab03 100644 --- a/sdk/core/azure-core/pom.xml +++ b/sdk/core/azure-core/pom.xml @@ -15,7 +15,7 @@ com.azure azure-core jar - 1.17.0 + 1.18.0-beta.1 Microsoft Azure Java Core Library This package contains core types for Azure Java clients. diff --git a/sdk/core/pom.xml b/sdk/core/pom.xml index 4bc74600871f..fd79eb793a66 100644 --- a/sdk/core/pom.xml +++ b/sdk/core/pom.xml @@ -32,7 +32,7 @@ com.azure azure-core - 1.17.0 + 1.18.0-beta.1 com.azure @@ -47,7 +47,7 @@ com.azure azure-core-experimental - 1.0.0-beta.14 + 1.0.0-beta.15 com.azure @@ -57,37 +57,37 @@ com.azure azure-core-http-netty - 1.10.0 + 1.11.0-beta.1 com.azure azure-core-http-okhttp - 1.7.0 + 1.8.0-beta.1 com.azure azure-core-management - 1.3.0 + 1.4.0-beta.1 com.azure azure-core-serializer-avro-apache - 1.0.0-beta.11 + 1.0.0-beta.12 com.azure azure-core-serializer-json-gson - 1.1.3 + 1.2.0-beta.1 com.azure azure-core-serializer-json-jackson - 1.2.4 + 1.3.0-beta.1 com.azure azure-core-tracing-opentelemetry - 1.0.0-beta.11 + 1.0.0-beta.12 diff --git a/sdk/cosmos/azure-cosmos/pom.xml b/sdk/cosmos/azure-cosmos/pom.xml index 1f6fb9acebd0..61d14db1e72a 100644 --- a/sdk/cosmos/azure-cosmos/pom.xml +++ b/sdk/cosmos/azure-cosmos/pom.xml @@ -65,7 +65,7 @@ Licensed under the MIT License. com.azure azure-core - 1.16.0 + 1.17.0 com.azure @@ -77,7 +77,7 @@ Licensed under the MIT License. com.azure azure-core-http-netty - 1.9.2 + 1.10.0 com.azure diff --git a/sdk/costmanagement/azure-resourcemanager-costmanagement/pom.xml b/sdk/costmanagement/azure-resourcemanager-costmanagement/pom.xml index 54996499581a..bd5f1d5843c5 100644 --- a/sdk/costmanagement/azure-resourcemanager-costmanagement/pom.xml +++ b/sdk/costmanagement/azure-resourcemanager-costmanagement/pom.xml @@ -44,12 +44,12 @@ com.azure azure-core - 1.16.0 + 1.17.0 com.azure azure-core-management - 1.2.2 + 1.3.0 diff --git a/sdk/customerinsights/azure-resourcemanager-customerinsights/pom.xml b/sdk/customerinsights/azure-resourcemanager-customerinsights/pom.xml index 554c2ccbbf8f..301eb713b3d3 100644 --- a/sdk/customerinsights/azure-resourcemanager-customerinsights/pom.xml +++ b/sdk/customerinsights/azure-resourcemanager-customerinsights/pom.xml @@ -44,12 +44,12 @@ com.azure azure-core - 1.16.0 + 1.17.0 com.azure azure-core-management - 1.2.2 + 1.3.0 diff --git a/sdk/databox/azure-resourcemanager-databox/pom.xml b/sdk/databox/azure-resourcemanager-databox/pom.xml index 64a1afdaf1aa..c193525ca7f2 100644 --- a/sdk/databox/azure-resourcemanager-databox/pom.xml +++ b/sdk/databox/azure-resourcemanager-databox/pom.xml @@ -44,12 +44,12 @@ com.azure azure-core - 1.16.0 + 1.17.0 com.azure azure-core-management - 1.2.2 + 1.3.0 diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/pom.xml b/sdk/databoxedge/azure-resourcemanager-databoxedge/pom.xml index 11ed9011229e..3868640834ed 100644 --- a/sdk/databoxedge/azure-resourcemanager-databoxedge/pom.xml +++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/pom.xml @@ -44,12 +44,12 @@ com.azure azure-core - 1.16.0 + 1.17.0 com.azure azure-core-management - 1.2.2 + 1.3.0 diff --git a/sdk/databricks/azure-resourcemanager-databricks/pom.xml b/sdk/databricks/azure-resourcemanager-databricks/pom.xml index 67c304b20b1c..0a991506116a 100644 --- a/sdk/databricks/azure-resourcemanager-databricks/pom.xml +++ b/sdk/databricks/azure-resourcemanager-databricks/pom.xml @@ -44,12 +44,12 @@ com.azure azure-core - 1.16.0 + 1.17.0 com.azure azure-core-management - 1.2.2 + 1.3.0 diff --git a/sdk/datadog/azure-resourcemanager-datadog/pom.xml b/sdk/datadog/azure-resourcemanager-datadog/pom.xml index d3a522e67ff7..0965357cdafa 100644 --- a/sdk/datadog/azure-resourcemanager-datadog/pom.xml +++ b/sdk/datadog/azure-resourcemanager-datadog/pom.xml @@ -44,12 +44,12 @@ com.azure azure-core - 1.16.0 + 1.17.0 com.azure azure-core-management - 1.2.2 + 1.3.0 diff --git a/sdk/datafactory/azure-resourcemanager-datafactory/pom.xml b/sdk/datafactory/azure-resourcemanager-datafactory/pom.xml index fc57bbfb1a17..8e4fc7cee986 100644 --- a/sdk/datafactory/azure-resourcemanager-datafactory/pom.xml +++ b/sdk/datafactory/azure-resourcemanager-datafactory/pom.xml @@ -44,12 +44,12 @@ com.azure azure-core - 1.16.0 + 1.17.0 com.azure azure-core-management - 1.2.2 + 1.3.0 com.azure @@ -60,7 +60,7 @@ com.azure azure-core-test - 1.6.2 + 1.6.3 test diff --git a/sdk/datalakeanalytics/azure-resourcemanager-datalakeanalytics/pom.xml b/sdk/datalakeanalytics/azure-resourcemanager-datalakeanalytics/pom.xml index 7625cc622204..8349a3131d28 100644 --- a/sdk/datalakeanalytics/azure-resourcemanager-datalakeanalytics/pom.xml +++ b/sdk/datalakeanalytics/azure-resourcemanager-datalakeanalytics/pom.xml @@ -44,12 +44,12 @@ com.azure azure-core - 1.16.0 + 1.17.0 com.azure azure-core-management - 1.2.2 + 1.3.0 diff --git a/sdk/datalakestore/azure-resourcemanager-datalakestore/pom.xml b/sdk/datalakestore/azure-resourcemanager-datalakestore/pom.xml index 7ee259f1ba40..afa5522d7a12 100644 --- a/sdk/datalakestore/azure-resourcemanager-datalakestore/pom.xml +++ b/sdk/datalakestore/azure-resourcemanager-datalakestore/pom.xml @@ -44,12 +44,12 @@ com.azure azure-core - 1.16.0 + 1.17.0 com.azure azure-core-management - 1.2.2 + 1.3.0 diff --git a/sdk/datamigration/azure-resourcemanager-datamigration/pom.xml b/sdk/datamigration/azure-resourcemanager-datamigration/pom.xml index 9ade0b761665..12fb39bdd567 100644 --- a/sdk/datamigration/azure-resourcemanager-datamigration/pom.xml +++ b/sdk/datamigration/azure-resourcemanager-datamigration/pom.xml @@ -44,12 +44,12 @@ com.azure azure-core - 1.16.0 + 1.17.0 com.azure azure-core-management - 1.2.2 + 1.3.0 diff --git a/sdk/delegatednetwork/azure-resourcemanager-delegatednetwork/pom.xml b/sdk/delegatednetwork/azure-resourcemanager-delegatednetwork/pom.xml index 1d124607ed09..a8f236e945ad 100644 --- a/sdk/delegatednetwork/azure-resourcemanager-delegatednetwork/pom.xml +++ b/sdk/delegatednetwork/azure-resourcemanager-delegatednetwork/pom.xml @@ -44,12 +44,12 @@ com.azure azure-core - 1.16.0 + 1.17.0 com.azure azure-core-management - 1.2.2 + 1.3.0 diff --git a/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/pom.xml b/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/pom.xml index de80c5fa35db..5250139e7d31 100644 --- a/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/pom.xml +++ b/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/pom.xml @@ -44,12 +44,12 @@ com.azure azure-core - 1.16.0 + 1.17.0 com.azure azure-core-management - 1.2.2 + 1.3.0 diff --git a/sdk/deviceprovisioningservices/azure-resourcemanager-deviceprovisioningservices/pom.xml b/sdk/deviceprovisioningservices/azure-resourcemanager-deviceprovisioningservices/pom.xml index e76bef539de2..fa20c4206763 100644 --- a/sdk/deviceprovisioningservices/azure-resourcemanager-deviceprovisioningservices/pom.xml +++ b/sdk/deviceprovisioningservices/azure-resourcemanager-deviceprovisioningservices/pom.xml @@ -44,12 +44,12 @@ com.azure azure-core - 1.16.0 + 1.17.0 com.azure azure-core-management - 1.2.2 + 1.3.0 com.azure @@ -66,7 +66,7 @@ com.azure azure-core-test - 1.6.2 + 1.6.3 test diff --git a/sdk/deviceupdate/azure-iot-deviceupdate/pom.xml b/sdk/deviceupdate/azure-iot-deviceupdate/pom.xml index f7c4f8c3d35c..5471693dde31 100644 --- a/sdk/deviceupdate/azure-iot-deviceupdate/pom.xml +++ b/sdk/deviceupdate/azure-iot-deviceupdate/pom.xml @@ -31,12 +31,12 @@ com.azure azure-core - 1.16.0 + 1.17.0 com.azure azure-core-http-netty - 1.9.2 + 1.10.0 com.azure @@ -47,7 +47,7 @@ com.azure azure-core-test - 1.6.2 + 1.6.3 test diff --git a/sdk/devspaces/azure-resourcemanager-devspaces/pom.xml b/sdk/devspaces/azure-resourcemanager-devspaces/pom.xml index 4d54cd05659d..b712472a5c4d 100644 --- a/sdk/devspaces/azure-resourcemanager-devspaces/pom.xml +++ b/sdk/devspaces/azure-resourcemanager-devspaces/pom.xml @@ -44,12 +44,12 @@ com.azure azure-core - 1.16.0 + 1.17.0 com.azure azure-core-management - 1.2.2 + 1.3.0 diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/pom.xml b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/pom.xml index 16257ab1be03..d92aaec035bf 100644 --- a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/pom.xml +++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/pom.xml @@ -44,12 +44,12 @@ com.azure azure-core - 1.16.0 + 1.17.0 com.azure azure-core-management - 1.2.2 + 1.3.0 diff --git a/sdk/digitaltwins/azure-digitaltwins-core/pom.xml b/sdk/digitaltwins/azure-digitaltwins-core/pom.xml index 797c9a915a86..d253456e30a1 100644 --- a/sdk/digitaltwins/azure-digitaltwins-core/pom.xml +++ b/sdk/digitaltwins/azure-digitaltwins-core/pom.xml @@ -36,17 +36,17 @@ com.azure azure-core - 1.16.0 + 1.17.0 com.azure azure-core-http-netty - 1.9.2 + 1.10.0 com.azure azure-core-serializer-json-jackson - 1.2.3 + 1.2.4 com.fasterxml.jackson.core @@ -58,7 +58,7 @@ com.azure azure-core-test - 1.6.2 + 1.6.3 test @@ -70,7 +70,7 @@ com.azure azure-core-http-okhttp - 1.6.2 + 1.7.0 test diff --git a/sdk/digitaltwins/azure-resourcemanager-digitaltwins/pom.xml b/sdk/digitaltwins/azure-resourcemanager-digitaltwins/pom.xml index ffa58e772ba7..30b865ab03d1 100644 --- a/sdk/digitaltwins/azure-resourcemanager-digitaltwins/pom.xml +++ b/sdk/digitaltwins/azure-resourcemanager-digitaltwins/pom.xml @@ -44,12 +44,12 @@ com.azure azure-core - 1.16.0 + 1.17.0 com.azure azure-core-management - 1.2.2 + 1.3.0 com.azure @@ -66,7 +66,7 @@ com.azure azure-core-test - 1.6.2 + 1.6.3 test diff --git a/sdk/e2e/pom.xml b/sdk/e2e/pom.xml index 1794d1047678..d5afffe87504 100644 --- a/sdk/e2e/pom.xml +++ b/sdk/e2e/pom.xml @@ -23,12 +23,12 @@ com.azure azure-core - 1.17.0 + 1.18.0-beta.1 com.azure azure-core-http-netty - 1.10.0 + 1.11.0-beta.1 com.azure @@ -64,7 +64,7 @@ com.azure azure-core-test - 1.6.3 + 1.7.0-beta.1 test diff --git a/sdk/eventgrid/azure-messaging-eventgrid/pom.xml b/sdk/eventgrid/azure-messaging-eventgrid/pom.xml index 55cb969bef46..bb2d53dcd90a 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/pom.xml +++ b/sdk/eventgrid/azure-messaging-eventgrid/pom.xml @@ -62,19 +62,19 @@ com.azure azure-core - 1.16.0 + 1.17.0 com.azure azure-core-http-netty - 1.9.2 + 1.10.0 com.azure azure-core-serializer-json-jackson - 1.2.3 + 1.2.4 test @@ -104,7 +104,7 @@ com.azure azure-core-test - 1.6.2 + 1.6.3 test diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/pom.xml b/sdk/eventgrid/azure-resourcemanager-eventgrid/pom.xml index 70069bf7e40d..790929709e3a 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/pom.xml +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/pom.xml @@ -44,12 +44,12 @@ com.azure azure-core - 1.16.0 + 1.17.0 com.azure azure-core-management - 1.2.2 + 1.3.0 diff --git a/sdk/eventhubs/azure-messaging-eventhubs/pom.xml b/sdk/eventhubs/azure-messaging-eventhubs/pom.xml index b0bb1b36de22..40d7cdae4782 100644 --- a/sdk/eventhubs/azure-messaging-eventhubs/pom.xml +++ b/sdk/eventhubs/azure-messaging-eventhubs/pom.xml @@ -37,7 +37,7 @@ com.azure azure-core - 1.17.0 + 1.17.0 com.azure @@ -55,7 +55,7 @@ com.azure azure-core-test - 1.6.2 + 1.6.3 test diff --git a/sdk/farmbeats/azure-verticals-agrifood-farming/pom.xml b/sdk/farmbeats/azure-verticals-agrifood-farming/pom.xml index 1532efa43c2e..6122844b676e 100644 --- a/sdk/farmbeats/azure-verticals-agrifood-farming/pom.xml +++ b/sdk/farmbeats/azure-verticals-agrifood-farming/pom.xml @@ -38,17 +38,17 @@ com.azure azure-core - 1.16.0 + 1.17.0 com.azure azure-core-experimental - 1.0.0-beta.13 + 1.0.0-beta.14 com.azure azure-core-http-netty - 1.9.2 + 1.10.0 @@ -73,7 +73,7 @@ com.azure azure-core-test - 1.6.2 + 1.6.3 test @@ -97,7 +97,7 @@ com.azure azure-core-serializer-json-jackson - 1.2.3 + 1.2.4 test diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/pom.xml b/sdk/formrecognizer/azure-ai-formrecognizer/pom.xml index a64a20e82106..4ce784402a86 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/pom.xml +++ b/sdk/formrecognizer/azure-ai-formrecognizer/pom.xml @@ -36,25 +36,25 @@ com.azure azure-core - 1.16.0 + 1.17.0 com.azure azure-core-http-netty - 1.9.2 + 1.10.0 com.azure azure-core-test - 1.6.2 + 1.6.3 test com.azure azure-core-http-okhttp - 1.6.2 + 1.7.0 test diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/pom.xml b/sdk/frontdoor/azure-resourcemanager-frontdoor/pom.xml index 59ea88487915..e00660c09184 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/pom.xml +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/pom.xml @@ -44,12 +44,12 @@ com.azure azure-core - 1.16.0 + 1.17.0 com.azure azure-core-management - 1.2.2 + 1.3.0 diff --git a/sdk/hanaonazure/azure-resourcemanager-hanaonazure/pom.xml b/sdk/hanaonazure/azure-resourcemanager-hanaonazure/pom.xml index 548298b5cbc2..49af13d36077 100644 --- a/sdk/hanaonazure/azure-resourcemanager-hanaonazure/pom.xml +++ b/sdk/hanaonazure/azure-resourcemanager-hanaonazure/pom.xml @@ -44,12 +44,12 @@ com.azure azure-core - 1.16.0 + 1.17.0 com.azure azure-core-management - 1.2.2 + 1.3.0 diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/pom.xml b/sdk/hdinsight/azure-resourcemanager-hdinsight/pom.xml index 3e534d81f925..5a456eb10f65 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/pom.xml +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight/pom.xml @@ -44,12 +44,12 @@ com.azure azure-core - 1.16.0 + 1.17.0 com.azure azure-core-management - 1.2.2 + 1.3.0 com.azure @@ -60,7 +60,7 @@ com.azure azure-core-test - 1.6.2 + 1.6.3 test diff --git a/sdk/healthbot/azure-resourcemanager-healthbot/pom.xml b/sdk/healthbot/azure-resourcemanager-healthbot/pom.xml index dc8f0ca42e13..33c23f2e4336 100644 --- a/sdk/healthbot/azure-resourcemanager-healthbot/pom.xml +++ b/sdk/healthbot/azure-resourcemanager-healthbot/pom.xml @@ -44,7 +44,7 @@ com.azure azure-core-management - 1.2.2 + 1.3.0 diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/pom.xml b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/pom.xml index 19b96363d01c..c276cae20c30 100644 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/pom.xml +++ b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/pom.xml @@ -44,12 +44,12 @@ com.azure azure-core - 1.16.0 + 1.17.0 com.azure azure-core-management - 1.2.2 + 1.3.0 diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/pom.xml b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/pom.xml index 171307481fc1..90319a5d83c1 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/pom.xml +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/pom.xml @@ -44,12 +44,12 @@ com.azure azure-core - 1.16.0 + 1.17.0 com.azure azure-core-management - 1.2.2 + 1.3.0 diff --git a/sdk/hybridkubernetes/azure-resourcemanager-hybridkubernetes/pom.xml b/sdk/hybridkubernetes/azure-resourcemanager-hybridkubernetes/pom.xml index 384a1a22a2d4..9746db488bda 100644 --- a/sdk/hybridkubernetes/azure-resourcemanager-hybridkubernetes/pom.xml +++ b/sdk/hybridkubernetes/azure-resourcemanager-hybridkubernetes/pom.xml @@ -44,12 +44,12 @@ com.azure azure-core - 1.16.0 + 1.17.0 com.azure azure-core-management - 1.2.2 + 1.3.0 diff --git a/sdk/identity/azure-identity/pom.xml b/sdk/identity/azure-identity/pom.xml index 7ce03e26f74f..c8ac8141a68d 100644 --- a/sdk/identity/azure-identity/pom.xml +++ b/sdk/identity/azure-identity/pom.xml @@ -27,12 +27,12 @@ com.azure azure-core - 1.16.0 + 1.17.0 com.azure azure-core-http-netty - 1.9.2 + 1.10.0 com.microsoft.azure diff --git a/sdk/imagebuilder/azure-resourcemanager-imagebuilder/pom.xml b/sdk/imagebuilder/azure-resourcemanager-imagebuilder/pom.xml index fe2a44b6984d..6817ac04c92a 100644 --- a/sdk/imagebuilder/azure-resourcemanager-imagebuilder/pom.xml +++ b/sdk/imagebuilder/azure-resourcemanager-imagebuilder/pom.xml @@ -44,12 +44,12 @@ com.azure azure-core - 1.16.0 + 1.17.0 com.azure azure-core-management - 1.2.2 + 1.3.0 com.azure @@ -60,7 +60,7 @@ com.azure azure-core-test - 1.6.2 + 1.6.3 test diff --git a/sdk/iotcentral/azure-resourcemanager-iotcentral/pom.xml b/sdk/iotcentral/azure-resourcemanager-iotcentral/pom.xml index 10e516651be5..e660526b55b4 100644 --- a/sdk/iotcentral/azure-resourcemanager-iotcentral/pom.xml +++ b/sdk/iotcentral/azure-resourcemanager-iotcentral/pom.xml @@ -44,12 +44,12 @@ com.azure azure-core - 1.16.0 + 1.17.0 com.azure azure-core-management - 1.2.2 + 1.3.0 diff --git a/sdk/iothub/azure-resourcemanager-iothub/pom.xml b/sdk/iothub/azure-resourcemanager-iothub/pom.xml index 4cf636de3616..ef593cdb3b62 100644 --- a/sdk/iothub/azure-resourcemanager-iothub/pom.xml +++ b/sdk/iothub/azure-resourcemanager-iothub/pom.xml @@ -44,12 +44,12 @@ com.azure azure-core - 1.16.0 + 1.17.0 com.azure azure-core-management - 1.2.2 + 1.3.0 diff --git a/sdk/keyvault/azure-security-keyvault-administration/pom.xml b/sdk/keyvault/azure-security-keyvault-administration/pom.xml index 6697f4608964..5b2fa815ef15 100644 --- a/sdk/keyvault/azure-security-keyvault-administration/pom.xml +++ b/sdk/keyvault/azure-security-keyvault-administration/pom.xml @@ -36,12 +36,12 @@ com.azure azure-core - 1.16.0 + 1.17.0 com.azure azure-core-http-netty - 1.9.2 + 1.10.0 @@ -77,13 +77,13 @@ com.azure azure-core-test - 1.6.2 + 1.6.3 test com.azure azure-core-http-okhttp - 1.6.2 + 1.7.0 test diff --git a/sdk/keyvault/azure-security-keyvault-certificates/pom.xml b/sdk/keyvault/azure-security-keyvault-certificates/pom.xml index 315f50f93652..346c64f14e62 100644 --- a/sdk/keyvault/azure-security-keyvault-certificates/pom.xml +++ b/sdk/keyvault/azure-security-keyvault-certificates/pom.xml @@ -36,13 +36,13 @@ com.azure azure-core - 1.16.0 + 1.17.0 com.azure azure-core-http-netty - 1.9.2 + 1.10.0 @@ -84,14 +84,14 @@ com.azure azure-core-test - 1.6.2 + 1.6.3 test com.azure azure-core-http-okhttp - 1.6.2 + 1.7.0 test diff --git a/sdk/keyvault/azure-security-keyvault-jca/pom.xml b/sdk/keyvault/azure-security-keyvault-jca/pom.xml index cc2aaefd87e8..02e150a147de 100644 --- a/sdk/keyvault/azure-security-keyvault-jca/pom.xml +++ b/sdk/keyvault/azure-security-keyvault-jca/pom.xml @@ -206,7 +206,7 @@ com.azure azure-core-test - 1.6.2 + 1.6.3 test diff --git a/sdk/keyvault/azure-security-keyvault-keys/pom.xml b/sdk/keyvault/azure-security-keyvault-keys/pom.xml index 8f29cb0c4254..9f7d098471b6 100644 --- a/sdk/keyvault/azure-security-keyvault-keys/pom.xml +++ b/sdk/keyvault/azure-security-keyvault-keys/pom.xml @@ -50,13 +50,13 @@ com.azure azure-core - 1.16.0 + 1.17.0 com.azure azure-core-http-netty - 1.9.2 + 1.10.0 @@ -93,13 +93,13 @@ com.azure azure-core-test - 1.6.2 + 1.6.3 test com.azure azure-core-http-okhttp - 1.6.2 + 1.7.0 test diff --git a/sdk/keyvault/azure-security-keyvault-secrets/pom.xml b/sdk/keyvault/azure-security-keyvault-secrets/pom.xml index 4effd6397d70..b83d4ec16ba5 100644 --- a/sdk/keyvault/azure-security-keyvault-secrets/pom.xml +++ b/sdk/keyvault/azure-security-keyvault-secrets/pom.xml @@ -47,20 +47,20 @@ com.azure azure-core - 1.16.0 + 1.17.0 com.azure azure-core-http-netty - 1.9.2 + 1.10.0 com.azure azure-core-http-okhttp - 1.6.2 + 1.7.0 test @@ -98,7 +98,7 @@ com.azure azure-core-test - 1.6.2 + 1.6.3 test diff --git a/sdk/keyvault/azure-security-test-keyvault-jca/pom.xml b/sdk/keyvault/azure-security-test-keyvault-jca/pom.xml index 7e0640d9f98e..74ccad911497 100644 --- a/sdk/keyvault/azure-security-test-keyvault-jca/pom.xml +++ b/sdk/keyvault/azure-security-test-keyvault-jca/pom.xml @@ -78,7 +78,7 @@ com.azure azure-core-test - 1.6.2 + 1.6.3 test diff --git a/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/pom.xml b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/pom.xml index e207a9d495d1..b57ae233ec3a 100644 --- a/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/pom.xml +++ b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/pom.xml @@ -44,12 +44,12 @@ com.azure azure-core - 1.16.0 + 1.17.0 com.azure azure-core-management - 1.2.2 + 1.3.0 diff --git a/sdk/kusto/azure-resourcemanager-kusto/pom.xml b/sdk/kusto/azure-resourcemanager-kusto/pom.xml index a79379a31e28..11ec937e4cb0 100644 --- a/sdk/kusto/azure-resourcemanager-kusto/pom.xml +++ b/sdk/kusto/azure-resourcemanager-kusto/pom.xml @@ -44,12 +44,12 @@ com.azure azure-core - 1.16.0 + 1.17.0 com.azure azure-core-management - 1.2.2 + 1.3.0 diff --git a/sdk/labservices/azure-resourcemanager-labservices/pom.xml b/sdk/labservices/azure-resourcemanager-labservices/pom.xml index 8cf209a7b9f3..a3fe4728dc02 100644 --- a/sdk/labservices/azure-resourcemanager-labservices/pom.xml +++ b/sdk/labservices/azure-resourcemanager-labservices/pom.xml @@ -44,12 +44,12 @@ com.azure azure-core - 1.16.0 + 1.17.0 com.azure azure-core-management - 1.2.2 + 1.3.0 diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/pom.xml b/sdk/loganalytics/azure-resourcemanager-loganalytics/pom.xml index dbdb7cc7663f..ca9ba499a6ef 100644 --- a/sdk/loganalytics/azure-resourcemanager-loganalytics/pom.xml +++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/pom.xml @@ -44,12 +44,12 @@ com.azure azure-core - 1.16.0 + 1.17.0 com.azure azure-core-management - 1.2.2 + 1.3.0 diff --git a/sdk/loganalytics/microsoft-azure-loganalytics/pom.xml b/sdk/loganalytics/microsoft-azure-loganalytics/pom.xml index e37c089925bc..6151f291e754 100644 --- a/sdk/loganalytics/microsoft-azure-loganalytics/pom.xml +++ b/sdk/loganalytics/microsoft-azure-loganalytics/pom.xml @@ -71,7 +71,7 @@ com.azure azure-core-test - 1.6.2 + 1.6.3 test diff --git a/sdk/logic/azure-resourcemanager-logic/pom.xml b/sdk/logic/azure-resourcemanager-logic/pom.xml index 215f6d0d2e88..38bc72f26525 100644 --- a/sdk/logic/azure-resourcemanager-logic/pom.xml +++ b/sdk/logic/azure-resourcemanager-logic/pom.xml @@ -44,12 +44,12 @@ com.azure azure-core - 1.16.0 + 1.17.0 com.azure azure-core-management - 1.2.2 + 1.3.0 diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/pom.xml b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/pom.xml index 2bab4d1624f1..5d14e4b62dae 100644 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/pom.xml +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/pom.xml @@ -44,12 +44,12 @@ com.azure azure-core - 1.16.0 + 1.17.0 com.azure azure-core-management - 1.2.2 + 1.3.0 diff --git a/sdk/maintenance/azure-resourcemanager-maintenance/pom.xml b/sdk/maintenance/azure-resourcemanager-maintenance/pom.xml index ab0b5fc19a5c..b9132bb32b8e 100644 --- a/sdk/maintenance/azure-resourcemanager-maintenance/pom.xml +++ b/sdk/maintenance/azure-resourcemanager-maintenance/pom.xml @@ -44,12 +44,12 @@ com.azure azure-core - 1.16.0 + 1.17.0 com.azure azure-core-management - 1.2.2 + 1.3.0 com.azure @@ -60,7 +60,7 @@ com.azure azure-core-test - 1.6.2 + 1.6.3 test diff --git a/sdk/managedapplications/azure-resourcemanager-managedapplications/pom.xml b/sdk/managedapplications/azure-resourcemanager-managedapplications/pom.xml index ef14b0cbb68d..7e9ea9b3a015 100644 --- a/sdk/managedapplications/azure-resourcemanager-managedapplications/pom.xml +++ b/sdk/managedapplications/azure-resourcemanager-managedapplications/pom.xml @@ -44,12 +44,12 @@ com.azure azure-core - 1.16.0 + 1.17.0 com.azure azure-core-management - 1.2.2 + 1.3.0 diff --git a/sdk/maps/azure-resourcemanager-maps/pom.xml b/sdk/maps/azure-resourcemanager-maps/pom.xml index a8c0c74310ad..7df181450229 100644 --- a/sdk/maps/azure-resourcemanager-maps/pom.xml +++ b/sdk/maps/azure-resourcemanager-maps/pom.xml @@ -44,12 +44,12 @@ com.azure azure-core - 1.16.0 + 1.17.0 com.azure azure-core-management - 1.2.2 + 1.3.0 com.azure @@ -60,7 +60,7 @@ com.azure azure-core-test - 1.6.2 + 1.6.3 test diff --git a/sdk/mariadb/azure-resourcemanager-mariadb/pom.xml b/sdk/mariadb/azure-resourcemanager-mariadb/pom.xml index b12fe799e36b..f2669b748194 100644 --- a/sdk/mariadb/azure-resourcemanager-mariadb/pom.xml +++ b/sdk/mariadb/azure-resourcemanager-mariadb/pom.xml @@ -44,12 +44,12 @@ com.azure azure-core - 1.16.0 + 1.17.0 com.azure azure-core-management - 1.2.2 + 1.3.0 diff --git a/sdk/marketplaceordering/azure-resourcemanager-marketplaceordering/pom.xml b/sdk/marketplaceordering/azure-resourcemanager-marketplaceordering/pom.xml index b32e2bda52e2..684efa0b86be 100644 --- a/sdk/marketplaceordering/azure-resourcemanager-marketplaceordering/pom.xml +++ b/sdk/marketplaceordering/azure-resourcemanager-marketplaceordering/pom.xml @@ -44,12 +44,12 @@ com.azure azure-core - 1.16.0 + 1.17.0 com.azure azure-core-management - 1.2.2 + 1.3.0 diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/pom.xml b/sdk/mediaservices/azure-resourcemanager-mediaservices/pom.xml index 842edbde2855..f23669b4f481 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/pom.xml +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/pom.xml @@ -44,12 +44,12 @@ com.azure azure-core - 1.16.0 + 1.17.0 com.azure azure-core-management - 1.2.2 + 1.3.0 diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/pom.xml b/sdk/metricsadvisor/azure-ai-metricsadvisor/pom.xml index 5708fc67482d..24d4f991b6de 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/pom.xml +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/pom.xml @@ -36,25 +36,25 @@ com.azure azure-core - 1.16.0 + 1.17.0 com.azure azure-core-http-netty - 1.9.2 + 1.10.0 com.azure azure-core-test - 1.6.2 + 1.6.3 test com.azure azure-core-http-okhttp - 1.6.2 + 1.7.0 test diff --git a/sdk/mixedreality/azure-mixedreality-authentication/pom.xml b/sdk/mixedreality/azure-mixedreality-authentication/pom.xml index 610e110b08a1..0bdbb1c6d2f3 100644 --- a/sdk/mixedreality/azure-mixedreality-authentication/pom.xml +++ b/sdk/mixedreality/azure-mixedreality-authentication/pom.xml @@ -34,25 +34,25 @@ com.azure azure-core - 1.16.0 + 1.17.0 com.azure azure-core-http-netty - 1.9.2 + 1.10.0 com.azure azure-core-test - 1.6.2 + 1.6.3 test com.azure azure-core-http-okhttp - 1.6.2 + 1.7.0 test diff --git a/sdk/mixedreality/azure-resourcemanager-mixedreality/pom.xml b/sdk/mixedreality/azure-resourcemanager-mixedreality/pom.xml index 1da182339874..f29b0db2567f 100644 --- a/sdk/mixedreality/azure-resourcemanager-mixedreality/pom.xml +++ b/sdk/mixedreality/azure-resourcemanager-mixedreality/pom.xml @@ -44,12 +44,12 @@ com.azure azure-core - 1.16.0 + 1.17.0 com.azure azure-core-management - 1.2.2 + 1.3.0 diff --git a/sdk/modelsrepository/azure-iot-modelsrepository/pom.xml b/sdk/modelsrepository/azure-iot-modelsrepository/pom.xml index 93c683e923e1..b503ab04f42b 100644 --- a/sdk/modelsrepository/azure-iot-modelsrepository/pom.xml +++ b/sdk/modelsrepository/azure-iot-modelsrepository/pom.xml @@ -41,19 +41,19 @@ com.azure azure-core - 1.16.0 + 1.17.0 com.azure azure-core-http-netty - 1.9.2 + 1.10.0 com.azure azure-core-test - 1.6.2 + 1.6.3 test @@ -65,7 +65,7 @@ com.azure azure-core-http-okhttp - 1.6.2 + 1.7.0 test diff --git a/sdk/monitor/azure-monitor-opentelemetry-exporter/pom.xml b/sdk/monitor/azure-monitor-opentelemetry-exporter/pom.xml index 73b28051efbb..38a8ea52065f 100644 --- a/sdk/monitor/azure-monitor-opentelemetry-exporter/pom.xml +++ b/sdk/monitor/azure-monitor-opentelemetry-exporter/pom.xml @@ -34,12 +34,12 @@ com.azure azure-core - 1.16.0 + 1.17.0 com.azure azure-core-http-netty - 1.9.2 + 1.10.0 io.opentelemetry @@ -95,13 +95,13 @@ com.azure azure-core-tracing-opentelemetry - 1.0.0-beta.10 + 1.0.0-beta.11 test com.azure azure-core-test - 1.6.2 + 1.6.3 test diff --git a/sdk/monitor/azure-monitor-query/pom.xml b/sdk/monitor/azure-monitor-query/pom.xml index 9d0be9049e48..1bf8d4e3311c 100644 --- a/sdk/monitor/azure-monitor-query/pom.xml +++ b/sdk/monitor/azure-monitor-query/pom.xml @@ -31,17 +31,17 @@ com.azure azure-core - 1.16.0 + 1.17.0 com.azure azure-core-experimental - 1.0.0-beta.13 + 1.0.0-beta.14 com.azure azure-core-http-netty - 1.9.2 + 1.10.0 org.junit.jupiter @@ -70,13 +70,13 @@ com.azure azure-core-test - 1.6.2 + 1.6.3 test com.azure azure-core-serializer-json-jackson - 1.2.3 + 1.2.4 test diff --git a/sdk/mysql/azure-resourcemanager-mysql/pom.xml b/sdk/mysql/azure-resourcemanager-mysql/pom.xml index 175b73117a5b..a8af3b945d2f 100644 --- a/sdk/mysql/azure-resourcemanager-mysql/pom.xml +++ b/sdk/mysql/azure-resourcemanager-mysql/pom.xml @@ -44,12 +44,12 @@ com.azure azure-core - 1.16.0 + 1.17.0 com.azure azure-core-management - 1.2.2 + 1.3.0 diff --git a/sdk/netapp/azure-resourcemanager-netapp/pom.xml b/sdk/netapp/azure-resourcemanager-netapp/pom.xml index 395e7f3aeff9..4dff37e253eb 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/pom.xml +++ b/sdk/netapp/azure-resourcemanager-netapp/pom.xml @@ -44,12 +44,12 @@ com.azure azure-core - 1.16.0 + 1.17.0 com.azure azure-core-management - 1.2.2 + 1.3.0 com.azure @@ -60,7 +60,7 @@ com.azure azure-core-test - 1.6.2 + 1.6.3 test diff --git a/sdk/notificationhubs/azure-resourcemanager-notificationhubs/pom.xml b/sdk/notificationhubs/azure-resourcemanager-notificationhubs/pom.xml index e6dea73233ec..cd6f3d2e2486 100644 --- a/sdk/notificationhubs/azure-resourcemanager-notificationhubs/pom.xml +++ b/sdk/notificationhubs/azure-resourcemanager-notificationhubs/pom.xml @@ -44,12 +44,12 @@ com.azure azure-core - 1.16.0 + 1.17.0 com.azure azure-core-management - 1.2.2 + 1.3.0 diff --git a/sdk/operationsmanagement/azure-resourcemanager-operationsmanagement/pom.xml b/sdk/operationsmanagement/azure-resourcemanager-operationsmanagement/pom.xml index ce9edd044ea5..06d5a85cba47 100644 --- a/sdk/operationsmanagement/azure-resourcemanager-operationsmanagement/pom.xml +++ b/sdk/operationsmanagement/azure-resourcemanager-operationsmanagement/pom.xml @@ -44,12 +44,12 @@ com.azure azure-core - 1.16.0 + 1.17.0 com.azure azure-core-management - 1.2.2 + 1.3.0 diff --git a/sdk/peering/azure-resourcemanager-peering/pom.xml b/sdk/peering/azure-resourcemanager-peering/pom.xml index f780548f5a50..f59992bf6410 100644 --- a/sdk/peering/azure-resourcemanager-peering/pom.xml +++ b/sdk/peering/azure-resourcemanager-peering/pom.xml @@ -44,12 +44,12 @@ com.azure azure-core - 1.16.0 + 1.17.0 com.azure azure-core-management - 1.2.2 + 1.3.0 diff --git a/sdk/policyinsights/azure-resourcemanager-policyinsights/pom.xml b/sdk/policyinsights/azure-resourcemanager-policyinsights/pom.xml index 965148791b4e..500439e02135 100644 --- a/sdk/policyinsights/azure-resourcemanager-policyinsights/pom.xml +++ b/sdk/policyinsights/azure-resourcemanager-policyinsights/pom.xml @@ -44,12 +44,12 @@ com.azure azure-core - 1.16.0 + 1.17.0 com.azure azure-core-management - 1.2.2 + 1.3.0 diff --git a/sdk/postgresql/azure-resourcemanager-postgresql/pom.xml b/sdk/postgresql/azure-resourcemanager-postgresql/pom.xml index 2bfb822354ec..6ab10124594b 100644 --- a/sdk/postgresql/azure-resourcemanager-postgresql/pom.xml +++ b/sdk/postgresql/azure-resourcemanager-postgresql/pom.xml @@ -44,12 +44,12 @@ com.azure azure-core - 1.16.0 + 1.17.0 com.azure azure-core-management - 1.2.2 + 1.3.0 diff --git a/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/pom.xml b/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/pom.xml index 149846e175f0..a421f6c5dc8c 100644 --- a/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/pom.xml +++ b/sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/pom.xml @@ -44,12 +44,12 @@ com.azure azure-core - 1.16.0 + 1.17.0 com.azure azure-core-management - 1.2.2 + 1.3.0 diff --git a/sdk/purview/azure-analytics-purview-catalog/pom.xml b/sdk/purview/azure-analytics-purview-catalog/pom.xml index d3e42a84f918..593427d0c88d 100644 --- a/sdk/purview/azure-analytics-purview-catalog/pom.xml +++ b/sdk/purview/azure-analytics-purview-catalog/pom.xml @@ -37,17 +37,17 @@ com.azure azure-core - 1.16.0 + 1.17.0 com.azure azure-core-experimental - 1.0.0-beta.13 + 1.0.0-beta.14 com.azure azure-core-http-netty - 1.9.2 + 1.10.0 @@ -72,7 +72,7 @@ com.azure azure-core-test - 1.6.2 + 1.6.3 test @@ -96,7 +96,7 @@ com.azure azure-core-serializer-json-jackson - 1.2.3 + 1.2.4 diff --git a/sdk/purview/azure-analytics-purview-scanning/pom.xml b/sdk/purview/azure-analytics-purview-scanning/pom.xml index 9aad4cd8035d..bc622abacec7 100644 --- a/sdk/purview/azure-analytics-purview-scanning/pom.xml +++ b/sdk/purview/azure-analytics-purview-scanning/pom.xml @@ -37,17 +37,17 @@ com.azure azure-core - 1.16.0 + 1.17.0 com.azure azure-core-experimental - 1.0.0-beta.13 + 1.0.0-beta.14 com.azure azure-core-http-netty - 1.9.2 + 1.10.0 @@ -72,7 +72,7 @@ com.azure azure-core-test - 1.6.2 + 1.6.3 test @@ -96,7 +96,7 @@ com.azure azure-core-serializer-json-jackson - 1.2.3 + 1.2.4 diff --git a/sdk/quantum/azure-quantum-jobs/pom.xml b/sdk/quantum/azure-quantum-jobs/pom.xml index 421f23a93d92..1818452666dc 100644 --- a/sdk/quantum/azure-quantum-jobs/pom.xml +++ b/sdk/quantum/azure-quantum-jobs/pom.xml @@ -42,12 +42,12 @@ com.azure azure-core - 1.16.0 + 1.17.0 com.azure azure-core-http-netty - 1.9.2 + 1.10.0 @@ -62,7 +62,7 @@ com.azure azure-core-test - 1.6.2 + 1.6.3 test diff --git a/sdk/recoveryservices/azure-resourcemanager-recoveryservices/pom.xml b/sdk/recoveryservices/azure-resourcemanager-recoveryservices/pom.xml index 54b752af07a5..84cbb1dea7ad 100644 --- a/sdk/recoveryservices/azure-resourcemanager-recoveryservices/pom.xml +++ b/sdk/recoveryservices/azure-resourcemanager-recoveryservices/pom.xml @@ -44,7 +44,7 @@ com.azure azure-core-management - 1.2.2 + 1.3.0 diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/pom.xml b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/pom.xml index f6d69ccf5f8b..9caad6eb4d40 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/pom.xml +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/pom.xml @@ -44,12 +44,12 @@ com.azure azure-core - 1.16.0 + 1.17.0 com.azure azure-core-management - 1.2.2 + 1.3.0 diff --git a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/pom.xml b/sdk/redisenterprise/azure-resourcemanager-redisenterprise/pom.xml index a8527ab04096..b594e287c1e2 100644 --- a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/pom.xml +++ b/sdk/redisenterprise/azure-resourcemanager-redisenterprise/pom.xml @@ -44,12 +44,12 @@ com.azure azure-core - 1.16.0 + 1.17.0 com.azure azure-core-management - 1.2.2 + 1.3.0 diff --git a/sdk/relay/azure-resourcemanager-relay/pom.xml b/sdk/relay/azure-resourcemanager-relay/pom.xml index c98f6c738d06..b2f33d8e3b1b 100644 --- a/sdk/relay/azure-resourcemanager-relay/pom.xml +++ b/sdk/relay/azure-resourcemanager-relay/pom.xml @@ -44,7 +44,7 @@ com.azure azure-core-management - 1.2.2 + 1.3.0 diff --git a/sdk/remoterendering/azure-mixedreality-remoterendering/pom.xml b/sdk/remoterendering/azure-mixedreality-remoterendering/pom.xml index 41a2472c2e38..2189b9ab50c6 100644 --- a/sdk/remoterendering/azure-mixedreality-remoterendering/pom.xml +++ b/sdk/remoterendering/azure-mixedreality-remoterendering/pom.xml @@ -31,7 +31,7 @@ com.azure azure-core - 1.16.0 + 1.17.0 com.azure @@ -43,13 +43,13 @@ com.azure azure-core-test - 1.6.2 + 1.6.3 test com.azure azure-core-http-okhttp - 1.6.2 + 1.7.0 test diff --git a/sdk/resourcegraph/azure-resourcemanager-resourcegraph/pom.xml b/sdk/resourcegraph/azure-resourcemanager-resourcegraph/pom.xml index 25e441b400c1..df88f34b080d 100644 --- a/sdk/resourcegraph/azure-resourcemanager-resourcegraph/pom.xml +++ b/sdk/resourcegraph/azure-resourcemanager-resourcegraph/pom.xml @@ -44,12 +44,12 @@ com.azure azure-core - 1.16.0 + 1.17.0 com.azure azure-core-management - 1.2.2 + 1.3.0 com.azure @@ -60,7 +60,7 @@ com.azure azure-core-test - 1.6.2 + 1.6.3 test diff --git a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/pom.xml b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/pom.xml index 577dc0fcc03e..5abac9e94cb3 100644 --- a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/pom.xml +++ b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/pom.xml @@ -44,12 +44,12 @@ com.azure azure-core - 1.16.0 + 1.17.0 com.azure azure-core-management - 1.2.2 + 1.3.0 diff --git a/sdk/resourcemanager/azure-resourcemanager-appplatform/pom.xml b/sdk/resourcemanager/azure-resourcemanager-appplatform/pom.xml index 289daaa4402f..117c9aa0f77c 100644 --- a/sdk/resourcemanager/azure-resourcemanager-appplatform/pom.xml +++ b/sdk/resourcemanager/azure-resourcemanager-appplatform/pom.xml @@ -86,7 +86,7 @@ com.azure azure-core-http-netty - 1.9.2 + 1.10.0 test diff --git a/sdk/resourcemanager/azure-resourcemanager-appservice/pom.xml b/sdk/resourcemanager/azure-resourcemanager-appservice/pom.xml index a10876b50697..3fd0ee69635b 100644 --- a/sdk/resourcemanager/azure-resourcemanager-appservice/pom.xml +++ b/sdk/resourcemanager/azure-resourcemanager-appservice/pom.xml @@ -95,7 +95,7 @@ com.azure azure-core-http-netty - 1.9.2 + 1.10.0 test diff --git a/sdk/resourcemanager/azure-resourcemanager-authorization/pom.xml b/sdk/resourcemanager/azure-resourcemanager-authorization/pom.xml index 6c8159622321..00c8ba03f0c0 100644 --- a/sdk/resourcemanager/azure-resourcemanager-authorization/pom.xml +++ b/sdk/resourcemanager/azure-resourcemanager-authorization/pom.xml @@ -75,7 +75,7 @@ com.azure azure-core-http-netty - 1.9.2 + 1.10.0 test diff --git a/sdk/resourcemanager/azure-resourcemanager-cdn/pom.xml b/sdk/resourcemanager/azure-resourcemanager-cdn/pom.xml index 6720dfc28aac..0b9e544f427c 100644 --- a/sdk/resourcemanager/azure-resourcemanager-cdn/pom.xml +++ b/sdk/resourcemanager/azure-resourcemanager-cdn/pom.xml @@ -69,7 +69,7 @@ com.azure azure-core-http-netty - 1.9.2 + 1.10.0 test diff --git a/sdk/resourcemanager/azure-resourcemanager-compute/pom.xml b/sdk/resourcemanager/azure-resourcemanager-compute/pom.xml index b491408dd73a..28f7d5bdd3ea 100644 --- a/sdk/resourcemanager/azure-resourcemanager-compute/pom.xml +++ b/sdk/resourcemanager/azure-resourcemanager-compute/pom.xml @@ -95,7 +95,7 @@ com.azure azure-core-http-netty - 1.9.2 + 1.10.0 test diff --git a/sdk/resourcemanager/azure-resourcemanager-containerinstance/pom.xml b/sdk/resourcemanager/azure-resourcemanager-containerinstance/pom.xml index 63a85a3b0480..ce9aa0e1736c 100644 --- a/sdk/resourcemanager/azure-resourcemanager-containerinstance/pom.xml +++ b/sdk/resourcemanager/azure-resourcemanager-containerinstance/pom.xml @@ -96,7 +96,7 @@ com.azure azure-core-http-netty - 1.9.2 + 1.10.0 test diff --git a/sdk/resourcemanager/azure-resourcemanager-containerregistry/pom.xml b/sdk/resourcemanager/azure-resourcemanager-containerregistry/pom.xml index 450533d5b7f6..940cca87cb3a 100644 --- a/sdk/resourcemanager/azure-resourcemanager-containerregistry/pom.xml +++ b/sdk/resourcemanager/azure-resourcemanager-containerregistry/pom.xml @@ -76,7 +76,7 @@ com.azure azure-core-http-netty - 1.9.2 + 1.10.0 test diff --git a/sdk/resourcemanager/azure-resourcemanager-containerservice/pom.xml b/sdk/resourcemanager/azure-resourcemanager-containerservice/pom.xml index 2f32ad9ccd05..488ab4457064 100644 --- a/sdk/resourcemanager/azure-resourcemanager-containerservice/pom.xml +++ b/sdk/resourcemanager/azure-resourcemanager-containerservice/pom.xml @@ -71,7 +71,7 @@ com.azure azure-core-http-netty - 1.9.2 + 1.10.0 test diff --git a/sdk/resourcemanager/azure-resourcemanager-cosmos/pom.xml b/sdk/resourcemanager/azure-resourcemanager-cosmos/pom.xml index b0e4bd643df0..2b265d02e030 100644 --- a/sdk/resourcemanager/azure-resourcemanager-cosmos/pom.xml +++ b/sdk/resourcemanager/azure-resourcemanager-cosmos/pom.xml @@ -83,7 +83,7 @@ com.azure azure-core-http-netty - 1.9.2 + 1.10.0 test diff --git a/sdk/resourcemanager/azure-resourcemanager-dns/pom.xml b/sdk/resourcemanager/azure-resourcemanager-dns/pom.xml index 288be2b2bfff..17f8ea39c815 100644 --- a/sdk/resourcemanager/azure-resourcemanager-dns/pom.xml +++ b/sdk/resourcemanager/azure-resourcemanager-dns/pom.xml @@ -81,7 +81,7 @@ com.azure azure-core-http-netty - 1.9.2 + 1.10.0 test diff --git a/sdk/resourcemanager/azure-resourcemanager-eventhubs/pom.xml b/sdk/resourcemanager/azure-resourcemanager-eventhubs/pom.xml index 4bb25fc087dc..9238d3e4d601 100644 --- a/sdk/resourcemanager/azure-resourcemanager-eventhubs/pom.xml +++ b/sdk/resourcemanager/azure-resourcemanager-eventhubs/pom.xml @@ -74,7 +74,7 @@ com.azure azure-core-http-netty - 1.9.2 + 1.10.0 test diff --git a/sdk/resourcemanager/azure-resourcemanager-keyvault/pom.xml b/sdk/resourcemanager/azure-resourcemanager-keyvault/pom.xml index 389fca8e3485..d1af477b8f01 100644 --- a/sdk/resourcemanager/azure-resourcemanager-keyvault/pom.xml +++ b/sdk/resourcemanager/azure-resourcemanager-keyvault/pom.xml @@ -96,7 +96,7 @@ com.azure azure-core-http-netty - 1.9.2 + 1.10.0 test diff --git a/sdk/resourcemanager/azure-resourcemanager-monitor/pom.xml b/sdk/resourcemanager/azure-resourcemanager-monitor/pom.xml index cc40ca1075d9..082b283a8add 100644 --- a/sdk/resourcemanager/azure-resourcemanager-monitor/pom.xml +++ b/sdk/resourcemanager/azure-resourcemanager-monitor/pom.xml @@ -65,7 +65,7 @@ com.azure azure-core-http-netty - 1.9.2 + 1.10.0 test diff --git a/sdk/resourcemanager/azure-resourcemanager-msi/pom.xml b/sdk/resourcemanager/azure-resourcemanager-msi/pom.xml index e49ca9fd8e02..615d2f08bffd 100644 --- a/sdk/resourcemanager/azure-resourcemanager-msi/pom.xml +++ b/sdk/resourcemanager/azure-resourcemanager-msi/pom.xml @@ -64,7 +64,7 @@ com.azure azure-core-http-netty - 1.9.2 + 1.10.0 test diff --git a/sdk/resourcemanager/azure-resourcemanager-network/pom.xml b/sdk/resourcemanager/azure-resourcemanager-network/pom.xml index b7b8ae12b800..f78df9361895 100644 --- a/sdk/resourcemanager/azure-resourcemanager-network/pom.xml +++ b/sdk/resourcemanager/azure-resourcemanager-network/pom.xml @@ -69,7 +69,7 @@ com.azure azure-core-http-netty - 1.9.2 + 1.10.0 test diff --git a/sdk/resourcemanager/azure-resourcemanager-privatedns/pom.xml b/sdk/resourcemanager/azure-resourcemanager-privatedns/pom.xml index 0de2e94b3edd..f525906f6124 100644 --- a/sdk/resourcemanager/azure-resourcemanager-privatedns/pom.xml +++ b/sdk/resourcemanager/azure-resourcemanager-privatedns/pom.xml @@ -75,7 +75,7 @@ com.azure azure-core-http-netty - 1.9.2 + 1.10.0 test diff --git a/sdk/resourcemanager/azure-resourcemanager-redis/pom.xml b/sdk/resourcemanager/azure-resourcemanager-redis/pom.xml index 547e0d77e6fa..08fd36e1031a 100644 --- a/sdk/resourcemanager/azure-resourcemanager-redis/pom.xml +++ b/sdk/resourcemanager/azure-resourcemanager-redis/pom.xml @@ -69,7 +69,7 @@ com.azure azure-core-http-netty - 1.9.2 + 1.10.0 test diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/pom.xml b/sdk/resourcemanager/azure-resourcemanager-resources/pom.xml index a84985dc5794..2a1425fe0488 100644 --- a/sdk/resourcemanager/azure-resourcemanager-resources/pom.xml +++ b/sdk/resourcemanager/azure-resourcemanager-resources/pom.xml @@ -52,12 +52,12 @@ com.azure azure-core - 1.16.0 + 1.17.0 com.azure azure-core-management - 1.3.0 + 1.3.0 org.slf4j @@ -80,7 +80,7 @@ com.azure azure-core-http-netty - 1.9.2 + 1.10.0 test diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/pom.xml b/sdk/resourcemanager/azure-resourcemanager-samples/pom.xml index 10e5419d3793..7163a6e0fdec 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/pom.xml +++ b/sdk/resourcemanager/azure-resourcemanager-samples/pom.xml @@ -52,7 +52,7 @@ com.azure azure-core - 1.16.0 + 1.17.0 com.azure diff --git a/sdk/resourcemanager/azure-resourcemanager-search/pom.xml b/sdk/resourcemanager/azure-resourcemanager-search/pom.xml index 806cb99b07ac..ba1c53051cd6 100644 --- a/sdk/resourcemanager/azure-resourcemanager-search/pom.xml +++ b/sdk/resourcemanager/azure-resourcemanager-search/pom.xml @@ -69,7 +69,7 @@ com.azure azure-core-http-netty - 1.9.2 + 1.10.0 test diff --git a/sdk/resourcemanager/azure-resourcemanager-servicebus/pom.xml b/sdk/resourcemanager/azure-resourcemanager-servicebus/pom.xml index c74990a63f72..7a3e8d79da49 100644 --- a/sdk/resourcemanager/azure-resourcemanager-servicebus/pom.xml +++ b/sdk/resourcemanager/azure-resourcemanager-servicebus/pom.xml @@ -69,7 +69,7 @@ com.azure azure-core-http-netty - 1.9.2 + 1.10.0 test diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/pom.xml b/sdk/resourcemanager/azure-resourcemanager-sql/pom.xml index 486e57535c4a..88221c7f6d0d 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/pom.xml +++ b/sdk/resourcemanager/azure-resourcemanager-sql/pom.xml @@ -80,7 +80,7 @@ com.azure azure-core-http-netty - 1.9.2 + 1.10.0 test diff --git a/sdk/resourcemanager/azure-resourcemanager-storage/pom.xml b/sdk/resourcemanager/azure-resourcemanager-storage/pom.xml index 45f890285205..0c08032aa043 100644 --- a/sdk/resourcemanager/azure-resourcemanager-storage/pom.xml +++ b/sdk/resourcemanager/azure-resourcemanager-storage/pom.xml @@ -69,7 +69,7 @@ com.azure azure-core-http-netty - 1.9.2 + 1.10.0 test diff --git a/sdk/resourcemanager/azure-resourcemanager-test/pom.xml b/sdk/resourcemanager/azure-resourcemanager-test/pom.xml index 6c2414c69a64..92a2e1dabb4f 100644 --- a/sdk/resourcemanager/azure-resourcemanager-test/pom.xml +++ b/sdk/resourcemanager/azure-resourcemanager-test/pom.xml @@ -52,17 +52,17 @@ com.azure azure-core-test - 1.6.2 + 1.6.3 com.azure azure-core - 1.16.0 + 1.17.0 com.azure azure-core-management - 1.3.0 + 1.3.0 com.azure @@ -72,7 +72,7 @@ com.azure azure-core-http-netty - 1.9.2 + 1.10.0 diff --git a/sdk/resourcemanager/azure-resourcemanager-trafficmanager/pom.xml b/sdk/resourcemanager/azure-resourcemanager-trafficmanager/pom.xml index 001241c057c2..ffac241056dd 100644 --- a/sdk/resourcemanager/azure-resourcemanager-trafficmanager/pom.xml +++ b/sdk/resourcemanager/azure-resourcemanager-trafficmanager/pom.xml @@ -69,7 +69,7 @@ com.azure azure-core-http-netty - 1.9.2 + 1.10.0 test diff --git a/sdk/resourcemanager/azure-resourcemanager/pom.xml b/sdk/resourcemanager/azure-resourcemanager/pom.xml index 39d78b6b5987..dea8463535af 100644 --- a/sdk/resourcemanager/azure-resourcemanager/pom.xml +++ b/sdk/resourcemanager/azure-resourcemanager/pom.xml @@ -186,13 +186,13 @@ com.azure azure-core-http-netty - 1.9.2 + 1.10.0 test com.azure azure-core-http-okhttp - 1.6.2 + 1.7.0 test diff --git a/sdk/resourcemover/azure-resourcemanager-resourcemover/pom.xml b/sdk/resourcemover/azure-resourcemanager-resourcemover/pom.xml index 73fa7fee7fd1..21e855959005 100644 --- a/sdk/resourcemover/azure-resourcemanager-resourcemover/pom.xml +++ b/sdk/resourcemover/azure-resourcemanager-resourcemover/pom.xml @@ -44,12 +44,12 @@ com.azure azure-core - 1.16.0 + 1.17.0 com.azure azure-core-management - 1.2.2 + 1.3.0 diff --git a/sdk/schemaregistry/azure-data-schemaregistry-avro/pom.xml b/sdk/schemaregistry/azure-data-schemaregistry-avro/pom.xml index e9b57495b4d9..15d49199a1f8 100644 --- a/sdk/schemaregistry/azure-data-schemaregistry-avro/pom.xml +++ b/sdk/schemaregistry/azure-data-schemaregistry-avro/pom.xml @@ -44,7 +44,7 @@ com.azure azure-core-serializer-avro-apache - 1.0.0-beta.10 + 1.0.0-beta.11 diff --git a/sdk/schemaregistry/azure-data-schemaregistry/pom.xml b/sdk/schemaregistry/azure-data-schemaregistry/pom.xml index 225a9614fef2..1e3b98d0d8ae 100644 --- a/sdk/schemaregistry/azure-data-schemaregistry/pom.xml +++ b/sdk/schemaregistry/azure-data-schemaregistry/pom.xml @@ -42,12 +42,12 @@ com.azure azure-core - 1.16.0 + 1.17.0 com.azure azure-core-http-netty - 1.9.2 + 1.10.0 diff --git a/sdk/search/azure-search-documents/pom.xml b/sdk/search/azure-search-documents/pom.xml index c66ffd1ef084..d029c6bfaf31 100644 --- a/sdk/search/azure-search-documents/pom.xml +++ b/sdk/search/azure-search-documents/pom.xml @@ -30,17 +30,17 @@ com.azure azure-core - 1.17.0 + 1.17.0 com.azure azure-core-http-netty - 1.9.2 + 1.10.0 com.azure azure-core-serializer-json-jackson - 1.2.3 + 1.2.4 + 1.6.3 test diff --git a/sdk/servicebus/azure-messaging-servicebus/pom.xml b/sdk/servicebus/azure-messaging-servicebus/pom.xml index 2301d5e47afe..30d24c989d1d 100644 --- a/sdk/servicebus/azure-messaging-servicebus/pom.xml +++ b/sdk/servicebus/azure-messaging-servicebus/pom.xml @@ -42,7 +42,7 @@ com.azure azure-core - 1.17.0 + 1.17.0 com.azure @@ -52,20 +52,20 @@ com.azure azure-core-http-netty - 1.9.2 + 1.10.0 com.azure azure-core-test - 1.6.2 + 1.6.3 test com.azure azure-core-http-okhttp - 1.6.2 + 1.7.0 test diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/pom.xml b/sdk/servicefabric/azure-resourcemanager-servicefabric/pom.xml index 4456e5255fcc..e4f672bf6f53 100644 --- a/sdk/servicefabric/azure-resourcemanager-servicefabric/pom.xml +++ b/sdk/servicefabric/azure-resourcemanager-servicefabric/pom.xml @@ -44,12 +44,12 @@ com.azure azure-core - 1.16.0 + 1.17.0 com.azure azure-core-management - 1.2.2 + 1.3.0 diff --git a/sdk/signalr/azure-resourcemanager-signalr/pom.xml b/sdk/signalr/azure-resourcemanager-signalr/pom.xml index f489d6207075..e407c48fc45b 100644 --- a/sdk/signalr/azure-resourcemanager-signalr/pom.xml +++ b/sdk/signalr/azure-resourcemanager-signalr/pom.xml @@ -44,12 +44,12 @@ com.azure azure-core - 1.16.0 + 1.17.0 com.azure azure-core-management - 1.2.2 + 1.3.0 diff --git a/sdk/spring/azure-spring-boot-samples/azure-appconfiguration-conversion-sample-complete/pom.xml b/sdk/spring/azure-spring-boot-samples/azure-appconfiguration-conversion-sample-complete/pom.xml index e8265edb3898..fa1313aafdbd 100644 --- a/sdk/spring/azure-spring-boot-samples/azure-appconfiguration-conversion-sample-complete/pom.xml +++ b/sdk/spring/azure-spring-boot-samples/azure-appconfiguration-conversion-sample-complete/pom.xml @@ -20,7 +20,7 @@ com.azure azure-core - 1.16.0 + 1.17.0 diff --git a/sdk/spring/azure-spring-boot-samples/azure-appconfiguration-conversion-sample-initial/pom.xml b/sdk/spring/azure-spring-boot-samples/azure-appconfiguration-conversion-sample-initial/pom.xml index d367bafb9b3f..1b28f6cc1cd8 100644 --- a/sdk/spring/azure-spring-boot-samples/azure-appconfiguration-conversion-sample-initial/pom.xml +++ b/sdk/spring/azure-spring-boot-samples/azure-appconfiguration-conversion-sample-initial/pom.xml @@ -21,7 +21,7 @@ com.azure azure-core - 1.16.0 + 1.17.0 diff --git a/sdk/spring/azure-spring-boot-samples/azure-appconfiguration-sample/pom.xml b/sdk/spring/azure-spring-boot-samples/azure-appconfiguration-sample/pom.xml index 690564e04004..db12c22964d8 100644 --- a/sdk/spring/azure-spring-boot-samples/azure-appconfiguration-sample/pom.xml +++ b/sdk/spring/azure-spring-boot-samples/azure-appconfiguration-sample/pom.xml @@ -19,7 +19,7 @@ com.azure azure-core - 1.16.0 + 1.17.0 diff --git a/sdk/spring/azure-spring-boot-samples/azure-cloud-foundry-service-sample/pom.xml b/sdk/spring/azure-spring-boot-samples/azure-cloud-foundry-service-sample/pom.xml index 12262aac88c2..e4a067d6dd3c 100644 --- a/sdk/spring/azure-spring-boot-samples/azure-cloud-foundry-service-sample/pom.xml +++ b/sdk/spring/azure-spring-boot-samples/azure-cloud-foundry-service-sample/pom.xml @@ -23,7 +23,7 @@ com.azure azure-core - 1.16.0 + 1.17.0 diff --git a/sdk/spring/azure-spring-boot-samples/azure-spring-boot-sample-active-directory-b2c-oidc/pom.xml b/sdk/spring/azure-spring-boot-samples/azure-spring-boot-sample-active-directory-b2c-oidc/pom.xml index 452d587bdd5e..db875835864a 100644 --- a/sdk/spring/azure-spring-boot-samples/azure-spring-boot-sample-active-directory-b2c-oidc/pom.xml +++ b/sdk/spring/azure-spring-boot-samples/azure-spring-boot-sample-active-directory-b2c-oidc/pom.xml @@ -23,7 +23,7 @@ com.azure azure-core - 1.16.0 + 1.17.0 diff --git a/sdk/spring/azure-spring-boot-samples/azure-spring-boot-sample-active-directory-resource-server-by-filter-stateless/pom.xml b/sdk/spring/azure-spring-boot-samples/azure-spring-boot-sample-active-directory-resource-server-by-filter-stateless/pom.xml index 71fdbdd39842..6bfd202602f9 100644 --- a/sdk/spring/azure-spring-boot-samples/azure-spring-boot-sample-active-directory-resource-server-by-filter-stateless/pom.xml +++ b/sdk/spring/azure-spring-boot-samples/azure-spring-boot-sample-active-directory-resource-server-by-filter-stateless/pom.xml @@ -23,7 +23,7 @@ com.azure azure-core - 1.16.0 + 1.17.0 diff --git a/sdk/spring/azure-spring-boot-samples/azure-spring-boot-sample-active-directory-resource-server-by-filter/pom.xml b/sdk/spring/azure-spring-boot-samples/azure-spring-boot-sample-active-directory-resource-server-by-filter/pom.xml index 12d08b493407..e2d62074de19 100644 --- a/sdk/spring/azure-spring-boot-samples/azure-spring-boot-sample-active-directory-resource-server-by-filter/pom.xml +++ b/sdk/spring/azure-spring-boot-samples/azure-spring-boot-sample-active-directory-resource-server-by-filter/pom.xml @@ -23,7 +23,7 @@ com.azure azure-core - 1.16.0 + 1.17.0 diff --git a/sdk/spring/azure-spring-boot-samples/azure-spring-boot-sample-active-directory-resource-server-obo/pom.xml b/sdk/spring/azure-spring-boot-samples/azure-spring-boot-sample-active-directory-resource-server-obo/pom.xml index 51dba3b3afae..63ba0ab8eccd 100644 --- a/sdk/spring/azure-spring-boot-samples/azure-spring-boot-sample-active-directory-resource-server-obo/pom.xml +++ b/sdk/spring/azure-spring-boot-samples/azure-spring-boot-sample-active-directory-resource-server-obo/pom.xml @@ -19,7 +19,7 @@ com.azure azure-core - 1.16.0 + 1.17.0 diff --git a/sdk/spring/azure-spring-boot-samples/azure-spring-boot-sample-active-directory-resource-server/pom.xml b/sdk/spring/azure-spring-boot-samples/azure-spring-boot-sample-active-directory-resource-server/pom.xml index 1cc76f303bf6..5ff4dcb53d2f 100644 --- a/sdk/spring/azure-spring-boot-samples/azure-spring-boot-sample-active-directory-resource-server/pom.xml +++ b/sdk/spring/azure-spring-boot-samples/azure-spring-boot-sample-active-directory-resource-server/pom.xml @@ -19,7 +19,7 @@ com.azure azure-core - 1.16.0 + 1.17.0 diff --git a/sdk/spring/azure-spring-boot-samples/azure-spring-boot-sample-active-directory-webapp/pom.xml b/sdk/spring/azure-spring-boot-samples/azure-spring-boot-sample-active-directory-webapp/pom.xml index b55f2a8ed1f5..9dfac1caef45 100644 --- a/sdk/spring/azure-spring-boot-samples/azure-spring-boot-sample-active-directory-webapp/pom.xml +++ b/sdk/spring/azure-spring-boot-samples/azure-spring-boot-sample-active-directory-webapp/pom.xml @@ -23,7 +23,7 @@ com.azure azure-core - 1.16.0 + 1.17.0 diff --git a/sdk/spring/azure-spring-boot-samples/azure-spring-boot-sample-cosmos-multi-database-multi-account/pom.xml b/sdk/spring/azure-spring-boot-samples/azure-spring-boot-sample-cosmos-multi-database-multi-account/pom.xml index 03cf2a855d3f..1289395d61b0 100644 --- a/sdk/spring/azure-spring-boot-samples/azure-spring-boot-sample-cosmos-multi-database-multi-account/pom.xml +++ b/sdk/spring/azure-spring-boot-samples/azure-spring-boot-sample-cosmos-multi-database-multi-account/pom.xml @@ -19,7 +19,7 @@ com.azure azure-core - 1.16.0 + 1.17.0 diff --git a/sdk/spring/azure-spring-boot-samples/azure-spring-boot-sample-cosmos-multi-database-single-account/pom.xml b/sdk/spring/azure-spring-boot-samples/azure-spring-boot-sample-cosmos-multi-database-single-account/pom.xml index cd5fa5bb27ec..6aa7c4cfc68d 100644 --- a/sdk/spring/azure-spring-boot-samples/azure-spring-boot-sample-cosmos-multi-database-single-account/pom.xml +++ b/sdk/spring/azure-spring-boot-samples/azure-spring-boot-sample-cosmos-multi-database-single-account/pom.xml @@ -19,7 +19,7 @@ com.azure azure-core - 1.16.0 + 1.17.0 diff --git a/sdk/spring/azure-spring-boot-samples/azure-spring-boot-sample-cosmos/pom.xml b/sdk/spring/azure-spring-boot-samples/azure-spring-boot-sample-cosmos/pom.xml index dff421b2b961..ffbd7c349f1e 100644 --- a/sdk/spring/azure-spring-boot-samples/azure-spring-boot-sample-cosmos/pom.xml +++ b/sdk/spring/azure-spring-boot-samples/azure-spring-boot-sample-cosmos/pom.xml @@ -23,7 +23,7 @@ com.azure azure-core - 1.16.0 + 1.17.0 diff --git a/sdk/spring/azure-spring-boot-samples/azure-spring-boot-sample-keyvault-certificates-server-side/pom.xml b/sdk/spring/azure-spring-boot-samples/azure-spring-boot-sample-keyvault-certificates-server-side/pom.xml index 25810e73cfa7..8715b75eff5f 100644 --- a/sdk/spring/azure-spring-boot-samples/azure-spring-boot-sample-keyvault-certificates-server-side/pom.xml +++ b/sdk/spring/azure-spring-boot-samples/azure-spring-boot-sample-keyvault-certificates-server-side/pom.xml @@ -29,7 +29,7 @@ com.azure azure-core - 1.16.0 + 1.17.0 diff --git a/sdk/spring/azure-spring-boot-samples/azure-spring-boot-sample-keyvault-secrets/pom.xml b/sdk/spring/azure-spring-boot-samples/azure-spring-boot-sample-keyvault-secrets/pom.xml index fc823bd15a1c..47649aba5ad5 100644 --- a/sdk/spring/azure-spring-boot-samples/azure-spring-boot-sample-keyvault-secrets/pom.xml +++ b/sdk/spring/azure-spring-boot-samples/azure-spring-boot-sample-keyvault-secrets/pom.xml @@ -24,7 +24,7 @@ com.azure azure-core - 1.16.0 + 1.17.0 diff --git a/sdk/spring/azure-spring-boot-samples/azure-spring-boot-sample-mediaservices/pom.xml b/sdk/spring/azure-spring-boot-samples/azure-spring-boot-sample-mediaservices/pom.xml index 16ac17381eb8..56de3d336b42 100644 --- a/sdk/spring/azure-spring-boot-samples/azure-spring-boot-sample-mediaservices/pom.xml +++ b/sdk/spring/azure-spring-boot-samples/azure-spring-boot-sample-mediaservices/pom.xml @@ -24,7 +24,7 @@ com.azure azure-core - 1.16.0 + 1.17.0 diff --git a/sdk/spring/azure-spring-boot-samples/azure-spring-boot-sample-servicebus-jms-queue/pom.xml b/sdk/spring/azure-spring-boot-samples/azure-spring-boot-sample-servicebus-jms-queue/pom.xml index e9cd55f30ecc..962df166c4ff 100644 --- a/sdk/spring/azure-spring-boot-samples/azure-spring-boot-sample-servicebus-jms-queue/pom.xml +++ b/sdk/spring/azure-spring-boot-samples/azure-spring-boot-sample-servicebus-jms-queue/pom.xml @@ -24,7 +24,7 @@ com.azure azure-core - 1.16.0 + 1.17.0 diff --git a/sdk/spring/azure-spring-boot-samples/azure-spring-boot-sample-servicebus-jms-topic/pom.xml b/sdk/spring/azure-spring-boot-samples/azure-spring-boot-sample-servicebus-jms-topic/pom.xml index bdcedb81baab..1a1114399633 100644 --- a/sdk/spring/azure-spring-boot-samples/azure-spring-boot-sample-servicebus-jms-topic/pom.xml +++ b/sdk/spring/azure-spring-boot-samples/azure-spring-boot-sample-servicebus-jms-topic/pom.xml @@ -24,7 +24,7 @@ com.azure azure-core - 1.16.0 + 1.17.0 diff --git a/sdk/spring/azure-spring-boot-samples/azure-spring-boot-sample-servicebus/pom.xml b/sdk/spring/azure-spring-boot-samples/azure-spring-boot-sample-servicebus/pom.xml index 3b7d5f0c8b8b..f63d04df20b0 100644 --- a/sdk/spring/azure-spring-boot-samples/azure-spring-boot-sample-servicebus/pom.xml +++ b/sdk/spring/azure-spring-boot-samples/azure-spring-boot-sample-servicebus/pom.xml @@ -24,7 +24,7 @@ com.azure azure-core - 1.16.0 + 1.17.0 diff --git a/sdk/spring/azure-spring-boot-samples/azure-spring-boot-sample-storage-resource/pom.xml b/sdk/spring/azure-spring-boot-samples/azure-spring-boot-sample-storage-resource/pom.xml index c24adb06b444..471b95683155 100644 --- a/sdk/spring/azure-spring-boot-samples/azure-spring-boot-sample-storage-resource/pom.xml +++ b/sdk/spring/azure-spring-boot-samples/azure-spring-boot-sample-storage-resource/pom.xml @@ -19,7 +19,7 @@ com.azure azure-core - 1.16.0 + 1.17.0 diff --git a/sdk/spring/azure-spring-boot-samples/azure-spring-cloud-sample-cache/pom.xml b/sdk/spring/azure-spring-boot-samples/azure-spring-cloud-sample-cache/pom.xml index 1ec43d311127..49cdcf7bac43 100644 --- a/sdk/spring/azure-spring-boot-samples/azure-spring-cloud-sample-cache/pom.xml +++ b/sdk/spring/azure-spring-boot-samples/azure-spring-cloud-sample-cache/pom.xml @@ -26,7 +26,7 @@ com.azure azure-core - 1.16.0 + 1.17.0 diff --git a/sdk/spring/azure-spring-boot-samples/azure-spring-cloud-sample-eventhubs-binder/pom.xml b/sdk/spring/azure-spring-boot-samples/azure-spring-cloud-sample-eventhubs-binder/pom.xml index 216478b1e2c6..40ecf676e9d4 100644 --- a/sdk/spring/azure-spring-boot-samples/azure-spring-cloud-sample-eventhubs-binder/pom.xml +++ b/sdk/spring/azure-spring-boot-samples/azure-spring-cloud-sample-eventhubs-binder/pom.xml @@ -30,7 +30,7 @@ com.azure azure-core - 1.16.0 + 1.17.0 diff --git a/sdk/spring/azure-spring-boot-samples/azure-spring-cloud-sample-eventhubs-kafka/pom.xml b/sdk/spring/azure-spring-boot-samples/azure-spring-cloud-sample-eventhubs-kafka/pom.xml index 7bdd5af8de0c..e22b46e16f13 100644 --- a/sdk/spring/azure-spring-boot-samples/azure-spring-cloud-sample-eventhubs-kafka/pom.xml +++ b/sdk/spring/azure-spring-boot-samples/azure-spring-cloud-sample-eventhubs-kafka/pom.xml @@ -30,7 +30,7 @@ com.azure azure-core - 1.16.0 + 1.17.0 diff --git a/sdk/spring/azure-spring-boot-samples/azure-spring-cloud-sample-eventhubs-multibinders/pom.xml b/sdk/spring/azure-spring-boot-samples/azure-spring-cloud-sample-eventhubs-multibinders/pom.xml index 1ca839391544..85a38b886099 100644 --- a/sdk/spring/azure-spring-boot-samples/azure-spring-cloud-sample-eventhubs-multibinders/pom.xml +++ b/sdk/spring/azure-spring-boot-samples/azure-spring-cloud-sample-eventhubs-multibinders/pom.xml @@ -27,7 +27,7 @@ com.azure azure-core - 1.16.0 + 1.17.0 diff --git a/sdk/spring/azure-spring-boot-samples/azure-spring-cloud-sample-eventhubs-operation/pom.xml b/sdk/spring/azure-spring-boot-samples/azure-spring-cloud-sample-eventhubs-operation/pom.xml index ba5a286c70bb..9f525f33e374 100644 --- a/sdk/spring/azure-spring-boot-samples/azure-spring-cloud-sample-eventhubs-operation/pom.xml +++ b/sdk/spring/azure-spring-boot-samples/azure-spring-cloud-sample-eventhubs-operation/pom.xml @@ -26,7 +26,7 @@ com.azure azure-core - 1.16.0 + 1.17.0 diff --git a/sdk/spring/azure-spring-boot-samples/azure-spring-cloud-sample-messaging-eventhubs/pom.xml b/sdk/spring/azure-spring-boot-samples/azure-spring-cloud-sample-messaging-eventhubs/pom.xml index 896c6e967c2b..0ef86258d066 100644 --- a/sdk/spring/azure-spring-boot-samples/azure-spring-cloud-sample-messaging-eventhubs/pom.xml +++ b/sdk/spring/azure-spring-boot-samples/azure-spring-cloud-sample-messaging-eventhubs/pom.xml @@ -26,7 +26,7 @@ com.azure azure-core - 1.16.0 + 1.17.0 diff --git a/sdk/spring/azure-spring-boot-samples/azure-spring-cloud-sample-servicebus-operation/pom.xml b/sdk/spring/azure-spring-boot-samples/azure-spring-cloud-sample-servicebus-operation/pom.xml index 454c79f2f95d..5e2759e3b89b 100644 --- a/sdk/spring/azure-spring-boot-samples/azure-spring-cloud-sample-servicebus-operation/pom.xml +++ b/sdk/spring/azure-spring-boot-samples/azure-spring-cloud-sample-servicebus-operation/pom.xml @@ -26,7 +26,7 @@ com.azure azure-core - 1.16.0 + 1.17.0 diff --git a/sdk/spring/azure-spring-boot-samples/azure-spring-cloud-sample-servicebus-queue-binder/pom.xml b/sdk/spring/azure-spring-boot-samples/azure-spring-cloud-sample-servicebus-queue-binder/pom.xml index 6c6d0f6d709f..74f7090165ec 100644 --- a/sdk/spring/azure-spring-boot-samples/azure-spring-cloud-sample-servicebus-queue-binder/pom.xml +++ b/sdk/spring/azure-spring-boot-samples/azure-spring-cloud-sample-servicebus-queue-binder/pom.xml @@ -26,7 +26,7 @@ com.azure azure-core - 1.16.0 + 1.17.0 diff --git a/sdk/spring/azure-spring-boot-samples/azure-spring-cloud-sample-servicebus-queue-multibinders/pom.xml b/sdk/spring/azure-spring-boot-samples/azure-spring-cloud-sample-servicebus-queue-multibinders/pom.xml index 7fb06e4ecba8..b857f8657d1c 100644 --- a/sdk/spring/azure-spring-boot-samples/azure-spring-cloud-sample-servicebus-queue-multibinders/pom.xml +++ b/sdk/spring/azure-spring-boot-samples/azure-spring-cloud-sample-servicebus-queue-multibinders/pom.xml @@ -26,7 +26,7 @@ com.azure azure-core - 1.16.0 + 1.17.0 diff --git a/sdk/spring/azure-spring-boot-samples/azure-spring-cloud-sample-servicebus-topic-binder/pom.xml b/sdk/spring/azure-spring-boot-samples/azure-spring-cloud-sample-servicebus-topic-binder/pom.xml index 6de18cb00d45..614cc5498b48 100644 --- a/sdk/spring/azure-spring-boot-samples/azure-spring-cloud-sample-servicebus-topic-binder/pom.xml +++ b/sdk/spring/azure-spring-boot-samples/azure-spring-cloud-sample-servicebus-topic-binder/pom.xml @@ -26,7 +26,7 @@ com.azure azure-core - 1.16.0 + 1.17.0 diff --git a/sdk/spring/azure-spring-boot-samples/azure-spring-cloud-sample-storage-queue-operation/pom.xml b/sdk/spring/azure-spring-boot-samples/azure-spring-cloud-sample-storage-queue-operation/pom.xml index 25d97a781602..1e371d32da35 100644 --- a/sdk/spring/azure-spring-boot-samples/azure-spring-cloud-sample-storage-queue-operation/pom.xml +++ b/sdk/spring/azure-spring-boot-samples/azure-spring-cloud-sample-storage-queue-operation/pom.xml @@ -26,7 +26,7 @@ com.azure azure-core - 1.16.0 + 1.17.0 diff --git a/sdk/spring/azure-spring-boot-samples/azure-spring-integration-sample-eventhubs/pom.xml b/sdk/spring/azure-spring-boot-samples/azure-spring-integration-sample-eventhubs/pom.xml index 74cb2908e99f..11ee29419486 100644 --- a/sdk/spring/azure-spring-boot-samples/azure-spring-integration-sample-eventhubs/pom.xml +++ b/sdk/spring/azure-spring-boot-samples/azure-spring-integration-sample-eventhubs/pom.xml @@ -26,7 +26,7 @@ com.azure azure-core - 1.16.0 + 1.17.0 diff --git a/sdk/spring/azure-spring-boot-samples/azure-spring-integration-sample-servicebus/pom.xml b/sdk/spring/azure-spring-boot-samples/azure-spring-integration-sample-servicebus/pom.xml index 722c114e48a8..fe473b291024 100644 --- a/sdk/spring/azure-spring-boot-samples/azure-spring-integration-sample-servicebus/pom.xml +++ b/sdk/spring/azure-spring-boot-samples/azure-spring-integration-sample-servicebus/pom.xml @@ -26,7 +26,7 @@ com.azure azure-core - 1.16.0 + 1.17.0 diff --git a/sdk/spring/azure-spring-boot-samples/azure-spring-integration-sample-storage-queue/pom.xml b/sdk/spring/azure-spring-boot-samples/azure-spring-integration-sample-storage-queue/pom.xml index afce41995a0c..b040613cf8cf 100644 --- a/sdk/spring/azure-spring-boot-samples/azure-spring-integration-sample-storage-queue/pom.xml +++ b/sdk/spring/azure-spring-boot-samples/azure-spring-integration-sample-storage-queue/pom.xml @@ -26,7 +26,7 @@ com.azure azure-core - 1.16.0 + 1.17.0 diff --git a/sdk/spring/azure-spring-boot-samples/feature-management-sample/pom.xml b/sdk/spring/azure-spring-boot-samples/feature-management-sample/pom.xml index 5d078edfe7d6..b87d819ef60e 100644 --- a/sdk/spring/azure-spring-boot-samples/feature-management-sample/pom.xml +++ b/sdk/spring/azure-spring-boot-samples/feature-management-sample/pom.xml @@ -19,7 +19,7 @@ com.azure azure-core - 1.16.0 + 1.17.0 diff --git a/sdk/spring/azure-spring-boot-samples/feature-management-web-sample/pom.xml b/sdk/spring/azure-spring-boot-samples/feature-management-web-sample/pom.xml index 5853edd70d4e..889b12c9081b 100644 --- a/sdk/spring/azure-spring-boot-samples/feature-management-web-sample/pom.xml +++ b/sdk/spring/azure-spring-boot-samples/feature-management-web-sample/pom.xml @@ -19,7 +19,7 @@ com.azure azure-core - 1.16.0 + 1.17.0 diff --git a/sdk/spring/azure-spring-boot-test-parent/pom.xml b/sdk/spring/azure-spring-boot-test-parent/pom.xml index f1aec9f4ef5d..db815e177c73 100644 --- a/sdk/spring/azure-spring-boot-test-parent/pom.xml +++ b/sdk/spring/azure-spring-boot-test-parent/pom.xml @@ -33,7 +33,7 @@ com.azure azure-core - 1.16.0 + 1.17.0 diff --git a/sdk/spring/azure-spring-integration-servicebus/pom.xml b/sdk/spring/azure-spring-integration-servicebus/pom.xml index 882bde7023fd..7db51ac80e8d 100644 --- a/sdk/spring/azure-spring-integration-servicebus/pom.xml +++ b/sdk/spring/azure-spring-integration-servicebus/pom.xml @@ -51,7 +51,7 @@ com.azure azure-core-serializer-json-jackson - 1.2.3 + 1.2.4 test diff --git a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/pom.xml b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/pom.xml index 5ebbb54a52aa..a62b63028a18 100644 --- a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/pom.xml +++ b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/pom.xml @@ -44,7 +44,7 @@ com.azure azure-core-management - 1.2.2 + 1.3.0 diff --git a/sdk/storage/azure-storage-blob-batch/pom.xml b/sdk/storage/azure-storage-blob-batch/pom.xml index ab65bb365e8e..994edea2f942 100644 --- a/sdk/storage/azure-storage-blob-batch/pom.xml +++ b/sdk/storage/azure-storage-blob-batch/pom.xml @@ -55,12 +55,12 @@ com.azure azure-core - 1.17.0 + 1.17.0 com.azure azure-core-http-netty - 1.9.2 + 1.10.0 com.azure @@ -89,7 +89,7 @@ com.azure azure-core-test - 1.6.2 + 1.6.3 test diff --git a/sdk/storage/azure-storage-blob-changefeed/pom.xml b/sdk/storage/azure-storage-blob-changefeed/pom.xml index f05aec3f395e..0463378375be 100644 --- a/sdk/storage/azure-storage-blob-changefeed/pom.xml +++ b/sdk/storage/azure-storage-blob-changefeed/pom.xml @@ -55,12 +55,12 @@ com.azure azure-core - 1.17.0 + 1.17.0 com.azure azure-core-http-netty - 1.9.2 + 1.10.0 com.azure @@ -89,7 +89,7 @@ com.azure azure-core-test - 1.6.2 + 1.6.3 test diff --git a/sdk/storage/azure-storage-blob-cryptography/pom.xml b/sdk/storage/azure-storage-blob-cryptography/pom.xml index 7de3440791d4..c5641dbcca79 100644 --- a/sdk/storage/azure-storage-blob-cryptography/pom.xml +++ b/sdk/storage/azure-storage-blob-cryptography/pom.xml @@ -41,12 +41,12 @@ com.azure azure-core - 1.17.0 + 1.17.0 com.azure azure-core-http-netty - 1.9.2 + 1.10.0 com.azure @@ -64,7 +64,7 @@ com.azure azure-core-test - 1.6.2 + 1.6.3 test diff --git a/sdk/storage/azure-storage-blob-nio/pom.xml b/sdk/storage/azure-storage-blob-nio/pom.xml index 4326b88cdcc7..0593c22bd0e3 100644 --- a/sdk/storage/azure-storage-blob-nio/pom.xml +++ b/sdk/storage/azure-storage-blob-nio/pom.xml @@ -54,12 +54,12 @@ com.azure azure-core - 1.17.0 + 1.17.0 com.azure azure-core-http-netty - 1.9.2 + 1.10.0 com.azure @@ -78,7 +78,7 @@ com.azure azure-core-test - 1.6.2 + 1.6.3 test diff --git a/sdk/storage/azure-storage-blob/pom.xml b/sdk/storage/azure-storage-blob/pom.xml index ba7346b59941..e223c14a3653 100644 --- a/sdk/storage/azure-storage-blob/pom.xml +++ b/sdk/storage/azure-storage-blob/pom.xml @@ -55,12 +55,12 @@ com.azure azure-core - 1.17.0 + 1.17.0 com.azure azure-core-http-netty - 1.9.2 + 1.10.0 com.azure @@ -93,7 +93,7 @@ com.azure azure-core-test - 1.6.2 + 1.6.3 test diff --git a/sdk/storage/azure-storage-common/pom.xml b/sdk/storage/azure-storage-common/pom.xml index 9e99299fd8a7..f8286377d479 100644 --- a/sdk/storage/azure-storage-common/pom.xml +++ b/sdk/storage/azure-storage-common/pom.xml @@ -41,12 +41,12 @@ com.azure azure-core - 1.17.0 + 1.17.0 com.azure azure-core-http-netty - 1.9.2 + 1.10.0 + 1.6.3 test diff --git a/sdk/storage/azure-storage-file-datalake/pom.xml b/sdk/storage/azure-storage-file-datalake/pom.xml index 7d23b2dd9bc4..0eda70478605 100644 --- a/sdk/storage/azure-storage-file-datalake/pom.xml +++ b/sdk/storage/azure-storage-file-datalake/pom.xml @@ -55,12 +55,12 @@ com.azure azure-core - 1.17.0 + 1.17.0 com.azure azure-core-http-netty - 1.9.2 + 1.10.0 com.azure @@ -89,7 +89,7 @@ com.azure azure-core-test - 1.6.2 + 1.6.3 test diff --git a/sdk/storage/azure-storage-file-share/pom.xml b/sdk/storage/azure-storage-file-share/pom.xml index cd69da14c300..2b4aa1abb975 100644 --- a/sdk/storage/azure-storage-file-share/pom.xml +++ b/sdk/storage/azure-storage-file-share/pom.xml @@ -36,12 +36,12 @@ com.azure azure-core - 1.17.0 + 1.17.0 com.azure azure-core-http-netty - 1.9.2 + 1.10.0 com.azure @@ -70,7 +70,7 @@ com.azure azure-core-test - 1.6.2 + 1.6.3 test diff --git a/sdk/storage/azure-storage-internal-avro/pom.xml b/sdk/storage/azure-storage-internal-avro/pom.xml index ff94845ba0b8..47893af149d5 100644 --- a/sdk/storage/azure-storage-internal-avro/pom.xml +++ b/sdk/storage/azure-storage-internal-avro/pom.xml @@ -41,12 +41,12 @@ com.azure azure-core - 1.17.0 + 1.17.0 com.azure azure-core-http-netty - 1.9.2 + 1.10.0 com.azure diff --git a/sdk/storage/azure-storage-queue/pom.xml b/sdk/storage/azure-storage-queue/pom.xml index 786a10604970..08a1aeef5d39 100644 --- a/sdk/storage/azure-storage-queue/pom.xml +++ b/sdk/storage/azure-storage-queue/pom.xml @@ -36,12 +36,12 @@ com.azure azure-core - 1.17.0 + 1.17.0 com.azure azure-core-http-netty - 1.9.2 + 1.10.0 com.azure @@ -59,7 +59,7 @@ com.azure azure-core-test - 1.6.2 + 1.6.3 test diff --git a/sdk/storagecache/azure-resourcemanager-storagecache/pom.xml b/sdk/storagecache/azure-resourcemanager-storagecache/pom.xml index 4db89363717b..00ea0e41c0e8 100644 --- a/sdk/storagecache/azure-resourcemanager-storagecache/pom.xml +++ b/sdk/storagecache/azure-resourcemanager-storagecache/pom.xml @@ -44,12 +44,12 @@ com.azure azure-core - 1.16.0 + 1.17.0 com.azure azure-core-management - 1.2.2 + 1.3.0 diff --git a/sdk/storageimportexport/azure-resourcemanager-storageimportexport/pom.xml b/sdk/storageimportexport/azure-resourcemanager-storageimportexport/pom.xml index 3dd9d6dc69b9..4259173321af 100644 --- a/sdk/storageimportexport/azure-resourcemanager-storageimportexport/pom.xml +++ b/sdk/storageimportexport/azure-resourcemanager-storageimportexport/pom.xml @@ -44,12 +44,12 @@ com.azure azure-core - 1.16.0 + 1.17.0 com.azure azure-core-management - 1.2.2 + 1.3.0 diff --git a/sdk/streamanalytics/azure-resourcemanager-streamanalytics/pom.xml b/sdk/streamanalytics/azure-resourcemanager-streamanalytics/pom.xml index d2cd15a17027..43edc6acaf23 100644 --- a/sdk/streamanalytics/azure-resourcemanager-streamanalytics/pom.xml +++ b/sdk/streamanalytics/azure-resourcemanager-streamanalytics/pom.xml @@ -44,12 +44,12 @@ com.azure azure-core - 1.16.0 + 1.17.0 com.azure azure-core-management - 1.2.2 + 1.3.0 diff --git a/sdk/subscription/azure-resourcemanager-subscription/pom.xml b/sdk/subscription/azure-resourcemanager-subscription/pom.xml index 1d77af625f1d..8a332e59c17c 100644 --- a/sdk/subscription/azure-resourcemanager-subscription/pom.xml +++ b/sdk/subscription/azure-resourcemanager-subscription/pom.xml @@ -44,12 +44,12 @@ com.azure azure-core - 1.16.0 + 1.17.0 com.azure azure-core-management - 1.2.2 + 1.3.0 diff --git a/sdk/support/azure-resourcemanager-support/pom.xml b/sdk/support/azure-resourcemanager-support/pom.xml index e62f2056121e..7cc80ee331f8 100644 --- a/sdk/support/azure-resourcemanager-support/pom.xml +++ b/sdk/support/azure-resourcemanager-support/pom.xml @@ -44,12 +44,12 @@ com.azure azure-core - 1.16.0 + 1.17.0 com.azure azure-core-management - 1.2.2 + 1.3.0 diff --git a/sdk/synapse/azure-analytics-synapse-accesscontrol/pom.xml b/sdk/synapse/azure-analytics-synapse-accesscontrol/pom.xml index 88b01ac0cc0a..f29e83346f8b 100644 --- a/sdk/synapse/azure-analytics-synapse-accesscontrol/pom.xml +++ b/sdk/synapse/azure-analytics-synapse-accesscontrol/pom.xml @@ -41,25 +41,25 @@ com.azure azure-core - 1.16.0 + 1.17.0 com.azure azure-core-http-netty - 1.9.2 + 1.10.0 com.azure azure-core-test - 1.6.2 + 1.6.3 test com.azure azure-core-http-okhttp - 1.6.2 + 1.7.0 test diff --git a/sdk/synapse/azure-analytics-synapse-artifacts/pom.xml b/sdk/synapse/azure-analytics-synapse-artifacts/pom.xml index 6c2591034d28..46fd69e6c228 100644 --- a/sdk/synapse/azure-analytics-synapse-artifacts/pom.xml +++ b/sdk/synapse/azure-analytics-synapse-artifacts/pom.xml @@ -41,25 +41,25 @@ com.azure azure-core - 1.16.0 + 1.17.0 com.azure azure-core-http-netty - 1.9.2 + 1.10.0 com.azure azure-core-test - 1.6.2 + 1.6.3 test com.azure azure-core-http-okhttp - 1.6.2 + 1.7.0 test diff --git a/sdk/synapse/azure-analytics-synapse-managedprivateendpoints/pom.xml b/sdk/synapse/azure-analytics-synapse-managedprivateendpoints/pom.xml index 7909d44a15cd..42fe8e8e9a23 100644 --- a/sdk/synapse/azure-analytics-synapse-managedprivateendpoints/pom.xml +++ b/sdk/synapse/azure-analytics-synapse-managedprivateendpoints/pom.xml @@ -41,25 +41,25 @@ com.azure azure-core - 1.16.0 + 1.17.0 com.azure azure-core-http-netty - 1.9.2 + 1.10.0 com.azure azure-core-test - 1.6.2 + 1.6.3 test com.azure azure-core-http-okhttp - 1.6.2 + 1.7.0 test diff --git a/sdk/synapse/azure-analytics-synapse-monitoring/pom.xml b/sdk/synapse/azure-analytics-synapse-monitoring/pom.xml index ef2df0b84e37..49db98eb61b7 100644 --- a/sdk/synapse/azure-analytics-synapse-monitoring/pom.xml +++ b/sdk/synapse/azure-analytics-synapse-monitoring/pom.xml @@ -41,25 +41,25 @@ com.azure azure-core - 1.16.0 + 1.17.0 com.azure azure-core-http-netty - 1.9.2 + 1.10.0 com.azure azure-core-test - 1.6.2 + 1.6.3 test com.azure azure-core-http-okhttp - 1.6.2 + 1.7.0 test diff --git a/sdk/synapse/azure-analytics-synapse-spark/pom.xml b/sdk/synapse/azure-analytics-synapse-spark/pom.xml index f63010fef60d..e67d032a283d 100644 --- a/sdk/synapse/azure-analytics-synapse-spark/pom.xml +++ b/sdk/synapse/azure-analytics-synapse-spark/pom.xml @@ -41,25 +41,25 @@ com.azure azure-core - 1.16.0 + 1.17.0 com.azure azure-core-http-netty - 1.9.2 + 1.10.0 com.azure azure-core-test - 1.6.2 + 1.6.3 test com.azure azure-core-http-okhttp - 1.6.2 + 1.7.0 test diff --git a/sdk/synapse/azure-resourcemanager-synapse/pom.xml b/sdk/synapse/azure-resourcemanager-synapse/pom.xml index 324557b99edc..310f190eb80b 100644 --- a/sdk/synapse/azure-resourcemanager-synapse/pom.xml +++ b/sdk/synapse/azure-resourcemanager-synapse/pom.xml @@ -44,12 +44,12 @@ com.azure azure-core - 1.16.0 + 1.17.0 com.azure azure-core-management - 1.2.2 + 1.3.0 diff --git a/sdk/tables/azure-data-tables/pom.xml b/sdk/tables/azure-data-tables/pom.xml index 6023a67a4ad6..65382c00c6e8 100644 --- a/sdk/tables/azure-data-tables/pom.xml +++ b/sdk/tables/azure-data-tables/pom.xml @@ -40,12 +40,12 @@ Licensed under the MIT License. com.azure azure-core - 1.16.0 + 1.17.0 com.azure azure-core-http-netty - 1.9.2 + 1.10.0 org.junit.jupiter @@ -74,7 +74,7 @@ Licensed under the MIT License. com.azure azure-core-test - 1.6.2 + 1.6.3 test diff --git a/sdk/template/azure-sdk-template/pom.xml b/sdk/template/azure-sdk-template/pom.xml index 48d28f983a72..ac71c5785acc 100644 --- a/sdk/template/azure-sdk-template/pom.xml +++ b/sdk/template/azure-sdk-template/pom.xml @@ -41,7 +41,7 @@ com.azure azure-core - 1.16.0 + 1.17.0 org.junit.jupiter diff --git a/sdk/textanalytics/azure-ai-textanalytics/pom.xml b/sdk/textanalytics/azure-ai-textanalytics/pom.xml index dbb0ff97e33d..9c37fa5179ed 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/pom.xml +++ b/sdk/textanalytics/azure-ai-textanalytics/pom.xml @@ -36,12 +36,12 @@ com.azure azure-core - 1.16.0 + 1.17.0 com.azure azure-core-http-netty - 1.9.2 + 1.10.0 + 1.6.3 test com.azure azure-core-http-okhttp - 1.6.2 + 1.7.0 test diff --git a/sdk/timeseriesinsights/azure-resourcemanager-timeseriesinsights/pom.xml b/sdk/timeseriesinsights/azure-resourcemanager-timeseriesinsights/pom.xml index ee68a2df6d93..a5279d938609 100644 --- a/sdk/timeseriesinsights/azure-resourcemanager-timeseriesinsights/pom.xml +++ b/sdk/timeseriesinsights/azure-resourcemanager-timeseriesinsights/pom.xml @@ -44,12 +44,12 @@ com.azure azure-core - 1.16.0 + 1.17.0 com.azure azure-core-management - 1.2.2 + 1.3.0 diff --git a/sdk/translation/azure-ai-documenttranslator/pom.xml b/sdk/translation/azure-ai-documenttranslator/pom.xml index f77deaef05c4..6b82ac521e48 100644 --- a/sdk/translation/azure-ai-documenttranslator/pom.xml +++ b/sdk/translation/azure-ai-documenttranslator/pom.xml @@ -38,17 +38,17 @@ com.azure azure-core - 1.16.0 + 1.17.0 com.azure azure-core-experimental - 1.0.0-beta.13 + 1.0.0-beta.14 com.azure azure-core-http-netty - 1.9.2 + 1.10.0 @@ -73,7 +73,7 @@ com.azure azure-core-test - 1.6.2 + 1.6.3 test @@ -97,7 +97,7 @@ com.azure azure-core-serializer-json-jackson - 1.2.3 + 1.2.4 test diff --git a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/pom.xml b/sdk/videoanalyzer/azure-media-videoanalyzer-edge/pom.xml index 261ef0e43988..da3510a2bf35 100644 --- a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/pom.xml +++ b/sdk/videoanalyzer/azure-media-videoanalyzer-edge/pom.xml @@ -35,7 +35,7 @@ com.azure azure-core - 1.16.0 + 1.17.0 org.junit.jupiter @@ -58,7 +58,7 @@ com.azure azure-core-serializer-json-jackson - 1.2.3 + 1.2.4 test diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/pom.xml b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/pom.xml index fb87bea075d1..457202f81828 100644 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/pom.xml +++ b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/pom.xml @@ -44,12 +44,12 @@ com.azure azure-core - 1.16.0 + 1.17.0 com.azure azure-core-management - 1.2.2 + 1.3.0 diff --git a/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/pom.xml b/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/pom.xml index 708dd4a32620..4b44bce70ff4 100644 --- a/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/pom.xml +++ b/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/pom.xml @@ -44,12 +44,12 @@ com.azure azure-core - 1.16.0 + 1.17.0 com.azure azure-core-management - 1.2.2 + 1.3.0 diff --git a/sdk/webpubsub/azure-messaging-webpubsub/pom.xml b/sdk/webpubsub/azure-messaging-webpubsub/pom.xml index a14b5880d16d..4d2e66f402e8 100644 --- a/sdk/webpubsub/azure-messaging-webpubsub/pom.xml +++ b/sdk/webpubsub/azure-messaging-webpubsub/pom.xml @@ -42,12 +42,12 @@ com.azure azure-core - 1.16.0 + 1.17.0 com.azure azure-core-http-netty - 1.9.2 + 1.10.0 com.nimbusds @@ -59,7 +59,7 @@ com.azure azure-core-test - 1.6.2 + 1.6.3 test From 477dd76098b564b89328958e6ec9204631530f17 Mon Sep 17 00:00:00 2001 From: Sameeksha Vaity Date: Tue, 8 Jun 2021 23:23:28 +0530 Subject: [PATCH 15/21] Update datafeed tests to remove error code asserts (#22121) --- .../azure-ai-metricsadvisor/CHANGELOG.md | 10 +++++++--- .../ai/metricsadvisor/DataFeedAsyncClientTest.java | 1 - .../azure/ai/metricsadvisor/DataFeedClientTest.java | 1 - 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/CHANGELOG.md b/sdk/metricsadvisor/azure-ai-metricsadvisor/CHANGELOG.md index 70a0a0e8ab0c..897bc0f4001a 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/CHANGELOG.md +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/CHANGELOG.md @@ -1,20 +1,24 @@ # Release History -## 1.0.0-beta.4 (Unreleased) +## 1.0.0-beta.4 (2021-03-08) ### Features added - Added support for Azure Log Analytics DataFeed source - Added data source credential API support to client - Added authentication type support for data feed - Added property `splitAlertByDimensions` to AnomalyAlertConfiguration model +- Added `clientOptions()` methods to the `MetricsAdvisorClientBuilder` and `MetricsAdvisorAdministrationClientBuilder` ### Breaking changes - Replaced updateSubscriptionKey and updateApiKey into one method updateKey - Deprecated support for HttpRequestDataFeed and ElasticsearchDataFeed source type +- Removed granularity type DataFeedGranularityType.PerSecond as it's not supported by the service anymore - Renamed `value` and `expectedValue` to `valueOfRootNode` and `expectedValueOfRootNode` - Renamed `top` parameter to `maxPageSize` -- Removed granularity type DataFeedGranularityType.PerSecond as it's not supported by the service anymore. - +- Renamed method `listAnomaliesForAlert` and `listAnomaliesForDetectionConfig` to `listAnomalies` +- Renamed method `listIncidentsForAlert` and `listIncidentsForDetectionConfig` to `listIncidents` +- Renamed `ErrorCodeException` and `ErrorCode` to `MetricsAdvisorResponseException` and `MetricsAdvisorError` + ## 1.0.0-beta.3 (2021-02-09) - Support Azure Active Directory (AAD) authentication for Metrics Advisor clients. - Renamed method `listDimensionValuesWithAnomalies` and `ListDimensionValuesWithAnomaliesOptions`. diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/test/java/com/azure/ai/metricsadvisor/DataFeedAsyncClientTest.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/test/java/com/azure/ai/metricsadvisor/DataFeedAsyncClientTest.java index 7e55312e5723..c02a3e9bddd0 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/test/java/com/azure/ai/metricsadvisor/DataFeedAsyncClientTest.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/test/java/com/azure/ai/metricsadvisor/DataFeedAsyncClientTest.java @@ -736,7 +736,6 @@ public void deleteDataFeedIdWithResponse(HttpClient httpClient, MetricsAdvisorSe .verifyErrorSatisfies(throwable -> { assertEquals(MetricsAdvisorResponseException.class, throwable.getClass()); final MetricsAdvisorError errorCode = ((MetricsAdvisorResponseException) throwable).getValue(); - assertEquals(errorCode.getCode(), "ERROR_INVALID_PARAMETER"); assertEquals(errorCode.getMessage(), "datafeedId is invalid."); }); }, SQL_SERVER_DB); diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/test/java/com/azure/ai/metricsadvisor/DataFeedClientTest.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/test/java/com/azure/ai/metricsadvisor/DataFeedClientTest.java index 10ae607db771..0ec2a2b1b553 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/test/java/com/azure/ai/metricsadvisor/DataFeedClientTest.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/test/java/com/azure/ai/metricsadvisor/DataFeedClientTest.java @@ -728,7 +728,6 @@ public void deleteDataFeedIdWithResponse(HttpClient httpClient, MetricsAdvisorSe MetricsAdvisorResponseException exception = assertThrows(MetricsAdvisorResponseException.class, () -> client.getDataFeedWithResponse(createdDataFeed.getId(), Context.NONE)); final MetricsAdvisorError errorCode = exception.getValue(); - assertEquals(errorCode.getCode(), "ERROR_INVALID_PARAMETER"); assertEquals(errorCode.getMessage(), "datafeedId is invalid."); }, SQL_SERVER_DB); } From fa289aed41c01247b3cbc77ecfa13f9932b346c8 Mon Sep 17 00:00:00 2001 From: vcolin7 Date: Tue, 8 Jun 2021 13:09:19 -0500 Subject: [PATCH 16/21] Made Tables service interfaces public (#22130) * Made service interfaces public for Key Vault and Tables impl clients. * Removed kvErrorStrings.properties files from Key Vault SDKs. Made KeyVaultErrorCodeStrings store the constants that were in the files. * Added check for null credentials in Key Vault Administration Builders. * Reverted changes made to KV libraries. --- .../data/tables/implementation/AzureTableImplBuilder.java | 1 - .../java/com/azure/data/tables/implementation/TablesImpl.java | 3 +-- .../data/tables/implementation/TransactionalBatchImpl.java | 2 +- 3 files changed, 2 insertions(+), 4 deletions(-) diff --git a/sdk/tables/azure-data-tables/src/main/java/com/azure/data/tables/implementation/AzureTableImplBuilder.java b/sdk/tables/azure-data-tables/src/main/java/com/azure/data/tables/implementation/AzureTableImplBuilder.java index 89595685997f..95e2d186ba0b 100644 --- a/sdk/tables/azure-data-tables/src/main/java/com/azure/data/tables/implementation/AzureTableImplBuilder.java +++ b/sdk/tables/azure-data-tables/src/main/java/com/azure/data/tables/implementation/AzureTableImplBuilder.java @@ -18,7 +18,6 @@ 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; diff --git a/sdk/tables/azure-data-tables/src/main/java/com/azure/data/tables/implementation/TablesImpl.java b/sdk/tables/azure-data-tables/src/main/java/com/azure/data/tables/implementation/TablesImpl.java index 80823d59ab34..6275166a1a82 100644 --- a/sdk/tables/azure-data-tables/src/main/java/com/azure/data/tables/implementation/TablesImpl.java +++ b/sdk/tables/azure-data-tables/src/main/java/com/azure/data/tables/implementation/TablesImpl.java @@ -39,10 +39,9 @@ import com.azure.data.tables.implementation.models.TablesQueryResponse; import com.azure.data.tables.implementation.models.TablesSetAccessPolicyResponse; import com.azure.data.tables.implementation.models.TablesUpdateEntityResponse; -import reactor.core.publisher.Mono; - 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 Tables. */ public final class TablesImpl { diff --git a/sdk/tables/azure-data-tables/src/main/java/com/azure/data/tables/implementation/TransactionalBatchImpl.java b/sdk/tables/azure-data-tables/src/main/java/com/azure/data/tables/implementation/TransactionalBatchImpl.java index 371ff03403f5..a4d8ee778955 100644 --- a/sdk/tables/azure-data-tables/src/main/java/com/azure/data/tables/implementation/TransactionalBatchImpl.java +++ b/sdk/tables/azure-data-tables/src/main/java/com/azure/data/tables/implementation/TransactionalBatchImpl.java @@ -52,7 +52,7 @@ public TransactionalBatchImpl(AzureTableImpl client, SerializerAdapter transacti */ @Host("{url}") @ServiceInterface(name = "AzureTableServices") - private interface TransactionalBatchService { + public interface TransactionalBatchService { @Post("/$batch") @ExpectedResponses({202}) @UnexpectedResponseExceptionType(TableServiceErrorException.class) From 126cf34dfd24c0195aad7164509e88f968ca4a9c Mon Sep 17 00:00:00 2001 From: Liudmila Molkova Date: Tue, 8 Jun 2021 11:19:32 -0700 Subject: [PATCH 17/21] Adding lmolkova as owner for core, opentelemetry, and azure monitor exporter (#22128) --- .github/CODEOWNERS | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index bdfbe439755f..c8ea488bf12f 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -33,10 +33,10 @@ /sdk/containerregistry/ @pallavit @alzimmermsft @jianghaolu # PRLabel: %Azure.Core -/sdk/core/ @alzimmermsft @jianghaolu @srnagar @hemanttanwar @anuchandy +/sdk/core/ @alzimmermsft @jianghaolu @srnagar @hemanttanwar @anuchandy @lmolkova # PRLabel: %Azure.Core -/sdk/core/azure-core-tracing-opentelemetry/ @samvaity @alzimmermsft @trask +/sdk/core/azure-core-tracing-opentelemetry/ @samvaity @alzimmermsft @trask @lmolkova # PRLabel: %Cosmos /sdk/cosmos/ @moderakh @kushagraThapar @FabianMeiswinkel @kirankumarkolli @mbhaskar @simplynaveen20 @xinlian12 @milismsft @aayush3011 @@ -73,7 +73,7 @@ /sdk/loganalytics/microsoft-azure-loganalytics/ @divya-jay @geneh @alongafni -/sdk/monitor/azure-monitor-opentelemetry-exporter @trask @joshfree @srnagar +/sdk/monitor/azure-monitor-opentelemetry-exporter @trask @joshfree @srnagar @lmolkova # PRLabel: %Mixed Reality Authentication /sdk/mixedreality/azure-mixedreality-authentication @craigktreasure From c44cbf47950fc936e56201329be984702edca718 Mon Sep 17 00:00:00 2001 From: Yijun Xie <48257664+YijunXieMS@users.noreply.github.com> Date: Tue, 8 Jun 2021 11:45:39 -0700 Subject: [PATCH 18/21] Re-generate EventGrid 4.4.0 events without FarmsBeat events (#22148) --- .../messaging/eventgrid/SystemEventNames.java | 102 ----- .../SystemEventMappingNames.java | 101 +---- ...armingApplicationDataChangedEventData.java | 307 --------------- ...riFoodFarmingBoundaryChangedEventData.java | 359 ------------------ .../AgriFoodFarmingCropChangedEventData.java | 255 ------------- ...oodFarmingCropVarietyChangedEventData.java | 281 -------------- .../AgriFoodFarmingFarmChangedEventData.java | 281 -------------- ...ataIngestionJobStatusChangedEventData.java | 289 -------------- ...AgriFoodFarmingFarmerChangedEventData.java | 255 ------------- .../AgriFoodFarmingFieldChangedEventData.java | 307 --------------- ...oodFarmingHarvestDataChangedEventData.java | 307 --------------- .../AgriFoodFarmingJobStatus.java | 43 --- ...odFarmingPlantingDataChangedEventData.java | 307 --------------- .../AgriFoodFarmingResourceActionType.java | 37 -- ...ataIngestionJobStatusChangedEventData.java | 288 -------------- ...AgriFoodFarmingSeasonChangedEventData.java | 255 ------------- ...dFarmingSeasonalFieldChangedEventData.java | 359 ------------------ ...oodFarmingTillageDataChangedEventData.java | 307 --------------- ...ataIngestionJobStatusChangedEventData.java | 287 -------------- .../swagger/README.md | 1 - 20 files changed, 3 insertions(+), 4725 deletions(-) delete mode 100644 sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AgriFoodFarmingApplicationDataChangedEventData.java delete mode 100644 sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AgriFoodFarmingBoundaryChangedEventData.java delete mode 100644 sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AgriFoodFarmingCropChangedEventData.java delete mode 100644 sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AgriFoodFarmingCropVarietyChangedEventData.java delete mode 100644 sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AgriFoodFarmingFarmChangedEventData.java delete mode 100644 sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AgriFoodFarmingFarmOperationDataIngestionJobStatusChangedEventData.java delete mode 100644 sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AgriFoodFarmingFarmerChangedEventData.java delete mode 100644 sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AgriFoodFarmingFieldChangedEventData.java delete mode 100644 sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AgriFoodFarmingHarvestDataChangedEventData.java delete mode 100644 sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AgriFoodFarmingJobStatus.java delete mode 100644 sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AgriFoodFarmingPlantingDataChangedEventData.java delete mode 100644 sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AgriFoodFarmingResourceActionType.java delete mode 100644 sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AgriFoodFarmingSatelliteDataIngestionJobStatusChangedEventData.java delete mode 100644 sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AgriFoodFarmingSeasonChangedEventData.java delete mode 100644 sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AgriFoodFarmingSeasonalFieldChangedEventData.java delete mode 100644 sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AgriFoodFarmingTillageDataChangedEventData.java delete mode 100644 sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AgriFoodFarmingWeatherDataIngestionJobStatusChangedEventData.java diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/SystemEventNames.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/SystemEventNames.java index 257988d5f239..d4f3484fea7b 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/SystemEventNames.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/SystemEventNames.java @@ -24,21 +24,6 @@ import com.azure.messaging.eventgrid.systemevents.AcsRecordingFileStatusUpdatedEventData; import com.azure.messaging.eventgrid.systemevents.AcsSmsDeliveryReportReceivedEventData; import com.azure.messaging.eventgrid.systemevents.AcsSmsReceivedEventData; -import com.azure.messaging.eventgrid.systemevents.AgriFoodFarmingApplicationDataChangedEventData; -import com.azure.messaging.eventgrid.systemevents.AgriFoodFarmingBoundaryChangedEventData; -import com.azure.messaging.eventgrid.systemevents.AgriFoodFarmingCropChangedEventData; -import com.azure.messaging.eventgrid.systemevents.AgriFoodFarmingCropVarietyChangedEventData; -import com.azure.messaging.eventgrid.systemevents.AgriFoodFarmingFarmChangedEventData; -import com.azure.messaging.eventgrid.systemevents.AgriFoodFarmingFarmOperationDataIngestionJobStatusChangedEventData; -import com.azure.messaging.eventgrid.systemevents.AgriFoodFarmingFarmerChangedEventData; -import com.azure.messaging.eventgrid.systemevents.AgriFoodFarmingFieldChangedEventData; -import com.azure.messaging.eventgrid.systemevents.AgriFoodFarmingHarvestDataChangedEventData; -import com.azure.messaging.eventgrid.systemevents.AgriFoodFarmingPlantingDataChangedEventData; -import com.azure.messaging.eventgrid.systemevents.AgriFoodFarmingSatelliteDataIngestionJobStatusChangedEventData; -import com.azure.messaging.eventgrid.systemevents.AgriFoodFarmingSeasonChangedEventData; -import com.azure.messaging.eventgrid.systemevents.AgriFoodFarmingSeasonalFieldChangedEventData; -import com.azure.messaging.eventgrid.systemevents.AgriFoodFarmingTillageDataChangedEventData; -import com.azure.messaging.eventgrid.systemevents.AgriFoodFarmingWeatherDataIngestionJobStatusChangedEventData; import com.azure.messaging.eventgrid.systemevents.AppConfigurationKeyValueDeletedEventData; import com.azure.messaging.eventgrid.systemevents.AppConfigurationKeyValueModifiedEventData; import com.azure.messaging.eventgrid.systemevents.ContainerRegistryChartDeletedEventData; @@ -426,7 +411,6 @@ public final class SystemEventNames { public static final String STORAGE_BLOB_INVENTORY_POLICY_COMPLETED = "Microsoft.Storage.BlobInventoryPolicyCompleted"; - /** * indicates an event of blob renaming. */ @@ -553,67 +537,6 @@ public final class SystemEventNames { public static final String POLICY_INSIGHTS_POLICY_STATE_CHANGED = "Microsoft.PolicyInsights.PolicyStateChanged"; public static final String POLICY_INSIGHTS_POLICY_STATE_DELETED = "Microsoft.PolicyInsights.PolicyStateDeleted"; - // Agriculture Food Farming - /** Schema of the Data property of an EventGridEvent for a Microsoft.AgFoodPlatform.ApplicationDataChanged event. */ - public static final String AGRI_FOOD_FARMING_APPLICATION_DATA_CHANGED = - "Microsoft.AgFoodPlatform.ApplicationDataChanged"; - - /** Schema of the Data property of an EventGridEvent for a Microsoft.AgFoodPlatform.BoundaryChanged event. */ - public static final String AGRI_FOOD_FARMING_BOUNDARY_CHANGED = "Microsoft.AgFoodPlatform.BoundaryChanged"; - - /** Schema of the Data property of an EventGridEvent for a Microsoft.AgFoodPlatform.CropChanged event. */ - public static final String AGRI_FOOD_FARMING_CROP_CHANGED = "Microsoft.AgFoodPlatform.CropChanged"; - - /** Schema of the Data property of an EventGridEvent for a Microsoft.AgFoodPlatform.CropVarietyChanged event. */ - public static final String AGRI_FOOD_FARMING_CROP_VARIETY_CHANGED = "Microsoft.AgFoodPlatform.CropVarietyChanged"; - - /** Schema of the Data property of an EventGridEvent for a Microsoft.AgFoodPlatform.FarmChanged event. */ - public static final String AGRI_FOOD_FARMING_FARM_CHANGED = "Microsoft.AgFoodPlatform.FarmChanged"; - - /** - * Schema of the Data property of an EventGridEvent for a - * Microsoft.AgFoodPlatform.FarmOperationDataIngestionJobStatusChanged event. - */ - public static final String AGRI_FOOD_FARMING_FARM_OPERATION_DATA_INGESTION_JOB_STATUS_CHANGED = - "Microsoft.AgFoodPlatform.FarmOperationDataIngestionJobStatusChanged"; - - /** Schema of the Data property of an EventGridEvent for a Microsoft.AgFoodPlatform.FarmerChanged event. */ - public static final String AGRI_FOOD_FARMING_FARMER_CHANGED = "Microsoft.AgFoodPlatform.FarmerChanged"; - - /** Schema of the Data property of an EventGridEvent for a Microsoft.AgFoodPlatform.FieldChanged event. */ - public static final String AGRI_FOOD_FARMING_FIELD_CHANGED = "Microsoft.AgFoodPlatform.FieldChanged"; - - /** Schema of the Data property of an EventGridEvent for a Microsoft.AgFoodPlatform.HarvestDataChanged event. */ - public static final String AGRI_FOOD_FARMING_HARVEST_DATA_CHANGED = "Microsoft.AgFoodPlatform.HarvestDataChanged"; - - /** Schema of the Data property of an EventGridEvent for a Microsoft.AgFoodPlatform.PlantingDataChanged event. */ - public static final String AGRI_FOOD_FARMING_PLANTING_DATA_CHANGED = "Microsoft.AgFoodPlatform.PlantingDataChanged"; - - /** - * Schema of the Data property of an EventGridEvent for a - * Microsoft.AgFoodPlatform.SatelliteDataIngestionJobStatusChanged event. - */ - public static final String AGRI_FOOD_FARMING_SATELLITE_DATA_INGESTION_JOB_STATUS_CHANGED = - "Microsoft.AgFoodPlatform.SatelliteDataIngestionJobStatusChanged"; - - /** Schema of the Data property of an EventGridEvent for a Microsoft.AgFoodPlatform.SeasonChanged event. */ - public static final String AGRI_FOOD_FARMING_SEASON_CHANGED = "Microsoft.AgFoodPlatform.SeasonChanged"; - - /** Schema of the Data property of an EventGridEvent for a Microsoft.AgFoodPlatform.SeasonalFieldChanged event. */ - public static final String AGRI_FOOD_FARMING_SEASONAL_FIELD_CHANGED = - "Microsoft.AgFoodPlatform.SeasonalFieldChanged"; - - /** Schema of the Data property of an EventGridEvent for a Microsoft.AgFoodPlatform.TillageDataChanged event. */ - public static final String AGRI_FOOD_FARMING_TILLAGE_DATA_CHANGED = "Microsoft.AgFoodPlatform.TillageDataChanged"; - - /** - * Schema of the Data property of an EventGridEvent for a - * Microsoft.AgFoodPlatform.WeatherDataIngestionJobStatusChanged event. - */ - public static final String AGRI_FOOD_FARMING_WEATHER_DATA_INGESTION_JOB_STATUS_CHANGED = - "Microsoft.AgFoodPlatform.WeatherDataIngestionJobStatusChanged"; - - private static final Map> SYSTEM_EVENT_MAPPINGS = new HashMap>() { { // AppConfiguration events. @@ -772,31 +695,6 @@ public final class SystemEventNames { put(POLICY_INSIGHTS_POLICY_STATE_CREATED, PolicyInsightsPolicyStateCreatedEventData.class); put(POLICY_INSIGHTS_POLICY_STATE_CHANGED, PolicyInsightsPolicyStateChangedEventData.class); put(POLICY_INSIGHTS_POLICY_STATE_DELETED, PolicyInsightsPolicyStateDeletedEventData.class); - - // Agriculture Food Farming - put( - AGRI_FOOD_FARMING_APPLICATION_DATA_CHANGED, - AgriFoodFarmingApplicationDataChangedEventData.class); - put(AGRI_FOOD_FARMING_BOUNDARY_CHANGED, AgriFoodFarmingBoundaryChangedEventData.class); - put(AGRI_FOOD_FARMING_CROP_CHANGED, AgriFoodFarmingCropChangedEventData.class); - put(AGRI_FOOD_FARMING_CROP_VARIETY_CHANGED, AgriFoodFarmingCropVarietyChangedEventData.class); - put(AGRI_FOOD_FARMING_FARM_CHANGED, AgriFoodFarmingFarmChangedEventData.class); - put( - AGRI_FOOD_FARMING_FARM_OPERATION_DATA_INGESTION_JOB_STATUS_CHANGED, - AgriFoodFarmingFarmOperationDataIngestionJobStatusChangedEventData.class); - put(AGRI_FOOD_FARMING_FARMER_CHANGED, AgriFoodFarmingFarmerChangedEventData.class); - put(AGRI_FOOD_FARMING_FIELD_CHANGED, AgriFoodFarmingFieldChangedEventData.class); - put(AGRI_FOOD_FARMING_HARVEST_DATA_CHANGED, AgriFoodFarmingHarvestDataChangedEventData.class); - put(AGRI_FOOD_FARMING_PLANTING_DATA_CHANGED, AgriFoodFarmingPlantingDataChangedEventData.class); - put( - AGRI_FOOD_FARMING_SATELLITE_DATA_INGESTION_JOB_STATUS_CHANGED, - AgriFoodFarmingSatelliteDataIngestionJobStatusChangedEventData.class); - put(AGRI_FOOD_FARMING_SEASON_CHANGED, AgriFoodFarmingSeasonChangedEventData.class); - put(AGRI_FOOD_FARMING_SEASONAL_FIELD_CHANGED, AgriFoodFarmingSeasonalFieldChangedEventData.class); - put(AGRI_FOOD_FARMING_TILLAGE_DATA_CHANGED, AgriFoodFarmingTillageDataChangedEventData.class); - put( - AGRI_FOOD_FARMING_WEATHER_DATA_INGESTION_JOB_STATUS_CHANGED, - AgriFoodFarmingWeatherDataIngestionJobStatusChangedEventData.class); } }; diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/implementation/SystemEventMappingNames.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/implementation/SystemEventMappingNames.java index f971bb252e0e..3f00883747e1 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/implementation/SystemEventMappingNames.java +++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/implementation/SystemEventMappingNames.java @@ -24,21 +24,6 @@ import com.azure.messaging.eventgrid.systemevents.AcsRecordingFileStatusUpdatedEventData; import com.azure.messaging.eventgrid.systemevents.AcsSmsDeliveryReportReceivedEventData; import com.azure.messaging.eventgrid.systemevents.AcsSmsReceivedEventData; -import com.azure.messaging.eventgrid.systemevents.AgriFoodFarmingApplicationDataChangedEventData; -import com.azure.messaging.eventgrid.systemevents.AgriFoodFarmingBoundaryChangedEventData; -import com.azure.messaging.eventgrid.systemevents.AgriFoodFarmingCropChangedEventData; -import com.azure.messaging.eventgrid.systemevents.AgriFoodFarmingCropVarietyChangedEventData; -import com.azure.messaging.eventgrid.systemevents.AgriFoodFarmingFarmChangedEventData; -import com.azure.messaging.eventgrid.systemevents.AgriFoodFarmingFarmOperationDataIngestionJobStatusChangedEventData; -import com.azure.messaging.eventgrid.systemevents.AgriFoodFarmingFarmerChangedEventData; -import com.azure.messaging.eventgrid.systemevents.AgriFoodFarmingFieldChangedEventData; -import com.azure.messaging.eventgrid.systemevents.AgriFoodFarmingHarvestDataChangedEventData; -import com.azure.messaging.eventgrid.systemevents.AgriFoodFarmingPlantingDataChangedEventData; -import com.azure.messaging.eventgrid.systemevents.AgriFoodFarmingSatelliteDataIngestionJobStatusChangedEventData; -import com.azure.messaging.eventgrid.systemevents.AgriFoodFarmingSeasonChangedEventData; -import com.azure.messaging.eventgrid.systemevents.AgriFoodFarmingSeasonalFieldChangedEventData; -import com.azure.messaging.eventgrid.systemevents.AgriFoodFarmingTillageDataChangedEventData; -import com.azure.messaging.eventgrid.systemevents.AgriFoodFarmingWeatherDataIngestionJobStatusChangedEventData; import com.azure.messaging.eventgrid.systemevents.AppConfigurationKeyValueDeletedEventData; import com.azure.messaging.eventgrid.systemevents.AppConfigurationKeyValueModifiedEventData; import com.azure.messaging.eventgrid.systemevents.ContainerRegistryChartDeletedEventData; @@ -247,65 +232,6 @@ public final class SystemEventMappingNames { /** Schema of the Data property of an EventGridEvent for a Microsoft.Communication.SMSReceived event. */ public static final String ACS_SMS_RECEIVED = "Microsoft.Communication.SMSReceived"; - /** Schema of the Data property of an EventGridEvent for a Microsoft.AgFoodPlatform.ApplicationDataChanged event. */ - public static final String AGRI_FOOD_FARMING_APPLICATION_DATA_CHANGED = - "Microsoft.AgFoodPlatform.ApplicationDataChanged"; - - /** Schema of the Data property of an EventGridEvent for a Microsoft.AgFoodPlatform.BoundaryChanged event. */ - public static final String AGRI_FOOD_FARMING_BOUNDARY_CHANGED = "Microsoft.AgFoodPlatform.BoundaryChanged"; - - /** Schema of the Data property of an EventGridEvent for a Microsoft.AgFoodPlatform.CropChanged event. */ - public static final String AGRI_FOOD_FARMING_CROP_CHANGED = "Microsoft.AgFoodPlatform.CropChanged"; - - /** Schema of the Data property of an EventGridEvent for a Microsoft.AgFoodPlatform.CropVarietyChanged event. */ - public static final String AGRI_FOOD_FARMING_CROP_VARIETY_CHANGED = "Microsoft.AgFoodPlatform.CropVarietyChanged"; - - /** Schema of the Data property of an EventGridEvent for a Microsoft.AgFoodPlatform.FarmChanged event. */ - public static final String AGRI_FOOD_FARMING_FARM_CHANGED = "Microsoft.AgFoodPlatform.FarmChanged"; - - /** - * Schema of the Data property of an EventGridEvent for a - * Microsoft.AgFoodPlatform.FarmOperationDataIngestionJobStatusChanged event. - */ - public static final String AGRI_FOOD_FARMING_FARM_OPERATION_DATA_INGESTION_JOB_STATUS_CHANGED = - "Microsoft.AgFoodPlatform.FarmOperationDataIngestionJobStatusChanged"; - - /** Schema of the Data property of an EventGridEvent for a Microsoft.AgFoodPlatform.FarmerChanged event. */ - public static final String AGRI_FOOD_FARMING_FARMER_CHANGED = "Microsoft.AgFoodPlatform.FarmerChanged"; - - /** Schema of the Data property of an EventGridEvent for a Microsoft.AgFoodPlatform.FieldChanged event. */ - public static final String AGRI_FOOD_FARMING_FIELD_CHANGED = "Microsoft.AgFoodPlatform.FieldChanged"; - - /** Schema of the Data property of an EventGridEvent for a Microsoft.AgFoodPlatform.HarvestDataChanged event. */ - public static final String AGRI_FOOD_FARMING_HARVEST_DATA_CHANGED = "Microsoft.AgFoodPlatform.HarvestDataChanged"; - - /** Schema of the Data property of an EventGridEvent for a Microsoft.AgFoodPlatform.PlantingDataChanged event. */ - public static final String AGRI_FOOD_FARMING_PLANTING_DATA_CHANGED = "Microsoft.AgFoodPlatform.PlantingDataChanged"; - - /** - * Schema of the Data property of an EventGridEvent for a - * Microsoft.AgFoodPlatform.SatelliteDataIngestionJobStatusChanged event. - */ - public static final String AGRI_FOOD_FARMING_SATELLITE_DATA_INGESTION_JOB_STATUS_CHANGED = - "Microsoft.AgFoodPlatform.SatelliteDataIngestionJobStatusChanged"; - - /** Schema of the Data property of an EventGridEvent for a Microsoft.AgFoodPlatform.SeasonChanged event. */ - public static final String AGRI_FOOD_FARMING_SEASON_CHANGED = "Microsoft.AgFoodPlatform.SeasonChanged"; - - /** Schema of the Data property of an EventGridEvent for a Microsoft.AgFoodPlatform.SeasonalFieldChanged event. */ - public static final String AGRI_FOOD_FARMING_SEASONAL_FIELD_CHANGED = - "Microsoft.AgFoodPlatform.SeasonalFieldChanged"; - - /** Schema of the Data property of an EventGridEvent for a Microsoft.AgFoodPlatform.TillageDataChanged event. */ - public static final String AGRI_FOOD_FARMING_TILLAGE_DATA_CHANGED = "Microsoft.AgFoodPlatform.TillageDataChanged"; - - /** - * Schema of the Data property of an EventGridEvent for a - * Microsoft.AgFoodPlatform.WeatherDataIngestionJobStatusChanged event. - */ - public static final String AGRI_FOOD_FARMING_WEATHER_DATA_INGESTION_JOB_STATUS_CHANGED = - "Microsoft.AgFoodPlatform.WeatherDataIngestionJobStatusChanged"; - /** Schema of the Data property of an EventGridEvent for a Microsoft.AppConfiguration.KeyValueDeleted event. */ public static final String APP_CONFIGURATION_KEY_VALUE_DELETED = "Microsoft.AppConfiguration.KeyValueDeleted"; @@ -772,29 +698,6 @@ public final class SystemEventMappingNames { put(ACS_RECORDING_FILE_STATUS_UPDATED, AcsRecordingFileStatusUpdatedEventData.class); put(ACS_SMS_DELIVERY_REPORT_RECEIVED, AcsSmsDeliveryReportReceivedEventData.class); put(ACS_SMS_RECEIVED, AcsSmsReceivedEventData.class); - put( - AGRI_FOOD_FARMING_APPLICATION_DATA_CHANGED, - AgriFoodFarmingApplicationDataChangedEventData.class); - put(AGRI_FOOD_FARMING_BOUNDARY_CHANGED, AgriFoodFarmingBoundaryChangedEventData.class); - put(AGRI_FOOD_FARMING_CROP_CHANGED, AgriFoodFarmingCropChangedEventData.class); - put(AGRI_FOOD_FARMING_CROP_VARIETY_CHANGED, AgriFoodFarmingCropVarietyChangedEventData.class); - put(AGRI_FOOD_FARMING_FARM_CHANGED, AgriFoodFarmingFarmChangedEventData.class); - put( - AGRI_FOOD_FARMING_FARM_OPERATION_DATA_INGESTION_JOB_STATUS_CHANGED, - AgriFoodFarmingFarmOperationDataIngestionJobStatusChangedEventData.class); - put(AGRI_FOOD_FARMING_FARMER_CHANGED, AgriFoodFarmingFarmerChangedEventData.class); - put(AGRI_FOOD_FARMING_FIELD_CHANGED, AgriFoodFarmingFieldChangedEventData.class); - put(AGRI_FOOD_FARMING_HARVEST_DATA_CHANGED, AgriFoodFarmingHarvestDataChangedEventData.class); - put(AGRI_FOOD_FARMING_PLANTING_DATA_CHANGED, AgriFoodFarmingPlantingDataChangedEventData.class); - put( - AGRI_FOOD_FARMING_SATELLITE_DATA_INGESTION_JOB_STATUS_CHANGED, - AgriFoodFarmingSatelliteDataIngestionJobStatusChangedEventData.class); - put(AGRI_FOOD_FARMING_SEASON_CHANGED, AgriFoodFarmingSeasonChangedEventData.class); - put(AGRI_FOOD_FARMING_SEASONAL_FIELD_CHANGED, AgriFoodFarmingSeasonalFieldChangedEventData.class); - put(AGRI_FOOD_FARMING_TILLAGE_DATA_CHANGED, AgriFoodFarmingTillageDataChangedEventData.class); - put( - AGRI_FOOD_FARMING_WEATHER_DATA_INGESTION_JOB_STATUS_CHANGED, - AgriFoodFarmingWeatherDataIngestionJobStatusChangedEventData.class); put(APP_CONFIGURATION_KEY_VALUE_DELETED, AppConfigurationKeyValueDeletedEventData.class); put(APP_CONFIGURATION_KEY_VALUE_MODIFIED, AppConfigurationKeyValueModifiedEventData.class); put(CONTAINER_REGISTRY_CHART_DELETED, ContainerRegistryChartDeletedEventData.class); @@ -934,5 +837,7 @@ public static Map> getSystemEventMappings() { return Collections.unmodifiableMap(SYSTEM_EVENT_MAPPINGS); } - private SystemEventMappingNames() { } + private SystemEventMappingNames() { + + } } diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AgriFoodFarmingApplicationDataChangedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AgriFoodFarmingApplicationDataChangedEventData.java deleted file mode 100644 index adc5fed3e3b3..000000000000 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AgriFoodFarmingApplicationDataChangedEventData.java +++ /dev/null @@ -1,307 +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.messaging.eventgrid.systemevents; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.time.OffsetDateTime; -import java.util.Map; - -/** Schema of the Data property of an EventGridEvent for a Microsoft.AgFoodPlatform.ApplicationDataChanged event. */ -@Fluent -public final class AgriFoodFarmingApplicationDataChangedEventData { - /* - * Action occurred on a resource. - */ - @JsonProperty(value = "actionType") - private AgriFoodFarmingResourceActionType actionType; - - /* - * Id of the farmer it belongs to. - */ - @JsonProperty(value = "farmerId") - private String farmerId; - - /* - * Status of the resource. - */ - @JsonProperty(value = "status") - private String status; - - /* - * Source of the farm operation data. - */ - @JsonProperty(value = "source") - private String source; - - /* - * Date-time when resource was last modified, sample format: - * yyyy-MM-ddTHH:mm:ssZ. - */ - @JsonProperty(value = "modifiedDateTime") - private OffsetDateTime modifiedDateTime; - - /* - * The ETag value to implement optimistic concurrency. - */ - @JsonProperty(value = "eTag") - private String eTag; - - /* - * Unique id of resource. - */ - @JsonProperty(value = "id") - private String id; - - /* - * Name to identify resource. - */ - @JsonProperty(value = "name") - private String name; - - /* - * Textual description of resource. - */ - @JsonProperty(value = "description") - private String description; - - /* - * Date-time when resource was created, sample format: - * yyyy-MM-ddTHH:mm:ssZ. - */ - @JsonProperty(value = "createdDateTime") - private OffsetDateTime createdDateTime; - - /* - * A list of key value pairs that describe the resource. - * Only string and numeral values are supported. - */ - @JsonProperty(value = "properties") - private Map properties; - - /** - * Get the actionType property: Action occurred on a resource. - * - * @return the actionType value. - */ - public AgriFoodFarmingResourceActionType getActionType() { - return this.actionType; - } - - /** - * Set the actionType property: Action occurred on a resource. - * - * @param actionType the actionType value to set. - * @return the AgriFoodFarmingApplicationDataChangedEventData object itself. - */ - public AgriFoodFarmingApplicationDataChangedEventData setActionType(AgriFoodFarmingResourceActionType actionType) { - this.actionType = actionType; - return this; - } - - /** - * Get the farmerId property: Id of the farmer it belongs to. - * - * @return the farmerId value. - */ - public String getFarmerId() { - return this.farmerId; - } - - /** - * Set the farmerId property: Id of the farmer it belongs to. - * - * @param farmerId the farmerId value to set. - * @return the AgriFoodFarmingApplicationDataChangedEventData object itself. - */ - public AgriFoodFarmingApplicationDataChangedEventData setFarmerId(String farmerId) { - this.farmerId = farmerId; - return this; - } - - /** - * Get the status property: Status of the resource. - * - * @return the status value. - */ - public String getStatus() { - return this.status; - } - - /** - * Set the status property: Status of the resource. - * - * @param status the status value to set. - * @return the AgriFoodFarmingApplicationDataChangedEventData object itself. - */ - public AgriFoodFarmingApplicationDataChangedEventData setStatus(String status) { - this.status = status; - return this; - } - - /** - * Get the source property: Source of the farm operation data. - * - * @return the source value. - */ - public String getSource() { - return this.source; - } - - /** - * Set the source property: Source of the farm operation data. - * - * @param source the source value to set. - * @return the AgriFoodFarmingApplicationDataChangedEventData object itself. - */ - public AgriFoodFarmingApplicationDataChangedEventData setSource(String source) { - this.source = source; - return this; - } - - /** - * Get the modifiedDateTime property: Date-time when resource was last modified, sample format: - * yyyy-MM-ddTHH:mm:ssZ. - * - * @return the modifiedDateTime value. - */ - public OffsetDateTime getModifiedDateTime() { - return this.modifiedDateTime; - } - - /** - * Set the modifiedDateTime property: Date-time when resource was last modified, sample format: - * yyyy-MM-ddTHH:mm:ssZ. - * - * @param modifiedDateTime the modifiedDateTime value to set. - * @return the AgriFoodFarmingApplicationDataChangedEventData object itself. - */ - public AgriFoodFarmingApplicationDataChangedEventData setModifiedDateTime(OffsetDateTime modifiedDateTime) { - this.modifiedDateTime = modifiedDateTime; - return this; - } - - /** - * Get the eTag property: The ETag value to implement optimistic concurrency. - * - * @return the eTag value. - */ - public String getETag() { - return this.eTag; - } - - /** - * Set the eTag property: The ETag value to implement optimistic concurrency. - * - * @param eTag the eTag value to set. - * @return the AgriFoodFarmingApplicationDataChangedEventData object itself. - */ - public AgriFoodFarmingApplicationDataChangedEventData setETag(String eTag) { - this.eTag = eTag; - return this; - } - - /** - * Get the id property: Unique id of resource. - * - * @return the id value. - */ - public String getId() { - return this.id; - } - - /** - * Set the id property: Unique id of resource. - * - * @param id the id value to set. - * @return the AgriFoodFarmingApplicationDataChangedEventData object itself. - */ - public AgriFoodFarmingApplicationDataChangedEventData setId(String id) { - this.id = id; - return this; - } - - /** - * Get the name property: Name to identify resource. - * - * @return the name value. - */ - public String getName() { - return this.name; - } - - /** - * Set the name property: Name to identify resource. - * - * @param name the name value to set. - * @return the AgriFoodFarmingApplicationDataChangedEventData object itself. - */ - public AgriFoodFarmingApplicationDataChangedEventData setName(String name) { - this.name = name; - return this; - } - - /** - * Get the description property: Textual description of resource. - * - * @return the description value. - */ - public String getDescription() { - return this.description; - } - - /** - * Set the description property: Textual description of resource. - * - * @param description the description value to set. - * @return the AgriFoodFarmingApplicationDataChangedEventData object itself. - */ - public AgriFoodFarmingApplicationDataChangedEventData setDescription(String description) { - this.description = description; - return this; - } - - /** - * Get the createdDateTime property: Date-time when resource was created, sample format: yyyy-MM-ddTHH:mm:ssZ. - * - * @return the createdDateTime value. - */ - public OffsetDateTime getCreatedDateTime() { - return this.createdDateTime; - } - - /** - * Set the createdDateTime property: Date-time when resource was created, sample format: yyyy-MM-ddTHH:mm:ssZ. - * - * @param createdDateTime the createdDateTime value to set. - * @return the AgriFoodFarmingApplicationDataChangedEventData object itself. - */ - public AgriFoodFarmingApplicationDataChangedEventData setCreatedDateTime(OffsetDateTime createdDateTime) { - this.createdDateTime = createdDateTime; - return this; - } - - /** - * Get the properties property: A list of key value pairs that describe the resource. Only string and numeral values - * are supported. - * - * @return the properties value. - */ - public Map getProperties() { - return this.properties; - } - - /** - * Set the properties property: A list of key value pairs that describe the resource. Only string and numeral values - * are supported. - * - * @param properties the properties value to set. - * @return the AgriFoodFarmingApplicationDataChangedEventData object itself. - */ - public AgriFoodFarmingApplicationDataChangedEventData setProperties(Map properties) { - this.properties = properties; - return this; - } -} diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AgriFoodFarmingBoundaryChangedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AgriFoodFarmingBoundaryChangedEventData.java deleted file mode 100644 index 328031adb257..000000000000 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AgriFoodFarmingBoundaryChangedEventData.java +++ /dev/null @@ -1,359 +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.messaging.eventgrid.systemevents; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.time.OffsetDateTime; -import java.util.Map; - -/** Schema of the Data property of an EventGridEvent for a Microsoft.AgFoodPlatform.BoundaryChanged event. */ -@Fluent -public final class AgriFoodFarmingBoundaryChangedEventData { - /* - * Id of the farmer it belongs to. - */ - @JsonProperty(value = "farmerId") - private String farmerId; - - /* - * Id of the parent(field or seasonalField) it belongs to. - */ - @JsonProperty(value = "parentId") - private String parentId; - - /* - * Type of the parent it belongs to. - */ - @JsonProperty(value = "parentType") - private String parentType; - - /* - * A boolean flag indicating whether the boundary is primary or not. - */ - @JsonProperty(value = "isPrimary") - private Boolean isPrimary; - - /* - * Action occurred on a resource. - */ - @JsonProperty(value = "actionType") - private AgriFoodFarmingResourceActionType actionType; - - /* - * Status of the resource. - */ - @JsonProperty(value = "status") - private String status; - - /* - * Date-time when resource was last modified, sample format: - * yyyy-MM-ddTHH:mm:ssZ. - */ - @JsonProperty(value = "modifiedDateTime") - private OffsetDateTime modifiedDateTime; - - /* - * The ETag value to implement optimistic concurrency. - */ - @JsonProperty(value = "eTag") - private String eTag; - - /* - * Unique id of resource. - */ - @JsonProperty(value = "id") - private String id; - - /* - * Name to identify resource. - */ - @JsonProperty(value = "name") - private String name; - - /* - * Textual description of resource. - */ - @JsonProperty(value = "description") - private String description; - - /* - * Date-time when resource was created, sample format: - * yyyy-MM-ddTHH:mm:ssZ. - */ - @JsonProperty(value = "createdDateTime") - private OffsetDateTime createdDateTime; - - /* - * A list of key value pairs that describe the resource. - * Only string and numeral values are supported. - */ - @JsonProperty(value = "properties") - private Map properties; - - /** - * Get the farmerId property: Id of the farmer it belongs to. - * - * @return the farmerId value. - */ - public String getFarmerId() { - return this.farmerId; - } - - /** - * Set the farmerId property: Id of the farmer it belongs to. - * - * @param farmerId the farmerId value to set. - * @return the AgriFoodFarmingBoundaryChangedEventData object itself. - */ - public AgriFoodFarmingBoundaryChangedEventData setFarmerId(String farmerId) { - this.farmerId = farmerId; - return this; - } - - /** - * Get the parentId property: Id of the parent(field or seasonalField) it belongs to. - * - * @return the parentId value. - */ - public String getParentId() { - return this.parentId; - } - - /** - * Set the parentId property: Id of the parent(field or seasonalField) it belongs to. - * - * @param parentId the parentId value to set. - * @return the AgriFoodFarmingBoundaryChangedEventData object itself. - */ - public AgriFoodFarmingBoundaryChangedEventData setParentId(String parentId) { - this.parentId = parentId; - return this; - } - - /** - * Get the parentType property: Type of the parent it belongs to. - * - * @return the parentType value. - */ - public String getParentType() { - return this.parentType; - } - - /** - * Set the parentType property: Type of the parent it belongs to. - * - * @param parentType the parentType value to set. - * @return the AgriFoodFarmingBoundaryChangedEventData object itself. - */ - public AgriFoodFarmingBoundaryChangedEventData setParentType(String parentType) { - this.parentType = parentType; - return this; - } - - /** - * Get the isPrimary property: A boolean flag indicating whether the boundary is primary or not. - * - * @return the isPrimary value. - */ - public Boolean isPrimary() { - return this.isPrimary; - } - - /** - * Set the isPrimary property: A boolean flag indicating whether the boundary is primary or not. - * - * @param isPrimary the isPrimary value to set. - * @return the AgriFoodFarmingBoundaryChangedEventData object itself. - */ - public AgriFoodFarmingBoundaryChangedEventData setIsPrimary(Boolean isPrimary) { - this.isPrimary = isPrimary; - return this; - } - - /** - * Get the actionType property: Action occurred on a resource. - * - * @return the actionType value. - */ - public AgriFoodFarmingResourceActionType getActionType() { - return this.actionType; - } - - /** - * Set the actionType property: Action occurred on a resource. - * - * @param actionType the actionType value to set. - * @return the AgriFoodFarmingBoundaryChangedEventData object itself. - */ - public AgriFoodFarmingBoundaryChangedEventData setActionType(AgriFoodFarmingResourceActionType actionType) { - this.actionType = actionType; - return this; - } - - /** - * Get the status property: Status of the resource. - * - * @return the status value. - */ - public String getStatus() { - return this.status; - } - - /** - * Set the status property: Status of the resource. - * - * @param status the status value to set. - * @return the AgriFoodFarmingBoundaryChangedEventData object itself. - */ - public AgriFoodFarmingBoundaryChangedEventData setStatus(String status) { - this.status = status; - return this; - } - - /** - * Get the modifiedDateTime property: Date-time when resource was last modified, sample format: - * yyyy-MM-ddTHH:mm:ssZ. - * - * @return the modifiedDateTime value. - */ - public OffsetDateTime getModifiedDateTime() { - return this.modifiedDateTime; - } - - /** - * Set the modifiedDateTime property: Date-time when resource was last modified, sample format: - * yyyy-MM-ddTHH:mm:ssZ. - * - * @param modifiedDateTime the modifiedDateTime value to set. - * @return the AgriFoodFarmingBoundaryChangedEventData object itself. - */ - public AgriFoodFarmingBoundaryChangedEventData setModifiedDateTime(OffsetDateTime modifiedDateTime) { - this.modifiedDateTime = modifiedDateTime; - return this; - } - - /** - * Get the eTag property: The ETag value to implement optimistic concurrency. - * - * @return the eTag value. - */ - public String getETag() { - return this.eTag; - } - - /** - * Set the eTag property: The ETag value to implement optimistic concurrency. - * - * @param eTag the eTag value to set. - * @return the AgriFoodFarmingBoundaryChangedEventData object itself. - */ - public AgriFoodFarmingBoundaryChangedEventData setETag(String eTag) { - this.eTag = eTag; - return this; - } - - /** - * Get the id property: Unique id of resource. - * - * @return the id value. - */ - public String getId() { - return this.id; - } - - /** - * Set the id property: Unique id of resource. - * - * @param id the id value to set. - * @return the AgriFoodFarmingBoundaryChangedEventData object itself. - */ - public AgriFoodFarmingBoundaryChangedEventData setId(String id) { - this.id = id; - return this; - } - - /** - * Get the name property: Name to identify resource. - * - * @return the name value. - */ - public String getName() { - return this.name; - } - - /** - * Set the name property: Name to identify resource. - * - * @param name the name value to set. - * @return the AgriFoodFarmingBoundaryChangedEventData object itself. - */ - public AgriFoodFarmingBoundaryChangedEventData setName(String name) { - this.name = name; - return this; - } - - /** - * Get the description property: Textual description of resource. - * - * @return the description value. - */ - public String getDescription() { - return this.description; - } - - /** - * Set the description property: Textual description of resource. - * - * @param description the description value to set. - * @return the AgriFoodFarmingBoundaryChangedEventData object itself. - */ - public AgriFoodFarmingBoundaryChangedEventData setDescription(String description) { - this.description = description; - return this; - } - - /** - * Get the createdDateTime property: Date-time when resource was created, sample format: yyyy-MM-ddTHH:mm:ssZ. - * - * @return the createdDateTime value. - */ - public OffsetDateTime getCreatedDateTime() { - return this.createdDateTime; - } - - /** - * Set the createdDateTime property: Date-time when resource was created, sample format: yyyy-MM-ddTHH:mm:ssZ. - * - * @param createdDateTime the createdDateTime value to set. - * @return the AgriFoodFarmingBoundaryChangedEventData object itself. - */ - public AgriFoodFarmingBoundaryChangedEventData setCreatedDateTime(OffsetDateTime createdDateTime) { - this.createdDateTime = createdDateTime; - return this; - } - - /** - * Get the properties property: A list of key value pairs that describe the resource. Only string and numeral values - * are supported. - * - * @return the properties value. - */ - public Map getProperties() { - return this.properties; - } - - /** - * Set the properties property: A list of key value pairs that describe the resource. Only string and numeral values - * are supported. - * - * @param properties the properties value to set. - * @return the AgriFoodFarmingBoundaryChangedEventData object itself. - */ - public AgriFoodFarmingBoundaryChangedEventData setProperties(Map properties) { - this.properties = properties; - return this; - } -} diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AgriFoodFarmingCropChangedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AgriFoodFarmingCropChangedEventData.java deleted file mode 100644 index e3d7613f1421..000000000000 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AgriFoodFarmingCropChangedEventData.java +++ /dev/null @@ -1,255 +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.messaging.eventgrid.systemevents; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.time.OffsetDateTime; -import java.util.Map; - -/** Schema of the Data property of an EventGridEvent for a Microsoft.AgFoodPlatform.CropChanged event. */ -@Fluent -public final class AgriFoodFarmingCropChangedEventData { - /* - * Action occurred on a resource. - */ - @JsonProperty(value = "actionType") - private AgriFoodFarmingResourceActionType actionType; - - /* - * Status of the resource. - */ - @JsonProperty(value = "status") - private String status; - - /* - * Date-time when resource was last modified, sample format: - * yyyy-MM-ddTHH:mm:ssZ. - */ - @JsonProperty(value = "modifiedDateTime") - private OffsetDateTime modifiedDateTime; - - /* - * The ETag value to implement optimistic concurrency. - */ - @JsonProperty(value = "eTag") - private String eTag; - - /* - * Unique id of resource. - */ - @JsonProperty(value = "id") - private String id; - - /* - * Name to identify resource. - */ - @JsonProperty(value = "name") - private String name; - - /* - * Textual description of resource. - */ - @JsonProperty(value = "description") - private String description; - - /* - * Date-time when resource was created, sample format: - * yyyy-MM-ddTHH:mm:ssZ. - */ - @JsonProperty(value = "createdDateTime") - private OffsetDateTime createdDateTime; - - /* - * A list of key value pairs that describe the resource. - * Only string and numeral values are supported. - */ - @JsonProperty(value = "properties") - private Map properties; - - /** - * Get the actionType property: Action occurred on a resource. - * - * @return the actionType value. - */ - public AgriFoodFarmingResourceActionType getActionType() { - return this.actionType; - } - - /** - * Set the actionType property: Action occurred on a resource. - * - * @param actionType the actionType value to set. - * @return the AgriFoodFarmingCropChangedEventData object itself. - */ - public AgriFoodFarmingCropChangedEventData setActionType(AgriFoodFarmingResourceActionType actionType) { - this.actionType = actionType; - return this; - } - - /** - * Get the status property: Status of the resource. - * - * @return the status value. - */ - public String getStatus() { - return this.status; - } - - /** - * Set the status property: Status of the resource. - * - * @param status the status value to set. - * @return the AgriFoodFarmingCropChangedEventData object itself. - */ - public AgriFoodFarmingCropChangedEventData setStatus(String status) { - this.status = status; - return this; - } - - /** - * Get the modifiedDateTime property: Date-time when resource was last modified, sample format: - * yyyy-MM-ddTHH:mm:ssZ. - * - * @return the modifiedDateTime value. - */ - public OffsetDateTime getModifiedDateTime() { - return this.modifiedDateTime; - } - - /** - * Set the modifiedDateTime property: Date-time when resource was last modified, sample format: - * yyyy-MM-ddTHH:mm:ssZ. - * - * @param modifiedDateTime the modifiedDateTime value to set. - * @return the AgriFoodFarmingCropChangedEventData object itself. - */ - public AgriFoodFarmingCropChangedEventData setModifiedDateTime(OffsetDateTime modifiedDateTime) { - this.modifiedDateTime = modifiedDateTime; - return this; - } - - /** - * Get the eTag property: The ETag value to implement optimistic concurrency. - * - * @return the eTag value. - */ - public String getETag() { - return this.eTag; - } - - /** - * Set the eTag property: The ETag value to implement optimistic concurrency. - * - * @param eTag the eTag value to set. - * @return the AgriFoodFarmingCropChangedEventData object itself. - */ - public AgriFoodFarmingCropChangedEventData setETag(String eTag) { - this.eTag = eTag; - return this; - } - - /** - * Get the id property: Unique id of resource. - * - * @return the id value. - */ - public String getId() { - return this.id; - } - - /** - * Set the id property: Unique id of resource. - * - * @param id the id value to set. - * @return the AgriFoodFarmingCropChangedEventData object itself. - */ - public AgriFoodFarmingCropChangedEventData setId(String id) { - this.id = id; - return this; - } - - /** - * Get the name property: Name to identify resource. - * - * @return the name value. - */ - public String getName() { - return this.name; - } - - /** - * Set the name property: Name to identify resource. - * - * @param name the name value to set. - * @return the AgriFoodFarmingCropChangedEventData object itself. - */ - public AgriFoodFarmingCropChangedEventData setName(String name) { - this.name = name; - return this; - } - - /** - * Get the description property: Textual description of resource. - * - * @return the description value. - */ - public String getDescription() { - return this.description; - } - - /** - * Set the description property: Textual description of resource. - * - * @param description the description value to set. - * @return the AgriFoodFarmingCropChangedEventData object itself. - */ - public AgriFoodFarmingCropChangedEventData setDescription(String description) { - this.description = description; - return this; - } - - /** - * Get the createdDateTime property: Date-time when resource was created, sample format: yyyy-MM-ddTHH:mm:ssZ. - * - * @return the createdDateTime value. - */ - public OffsetDateTime getCreatedDateTime() { - return this.createdDateTime; - } - - /** - * Set the createdDateTime property: Date-time when resource was created, sample format: yyyy-MM-ddTHH:mm:ssZ. - * - * @param createdDateTime the createdDateTime value to set. - * @return the AgriFoodFarmingCropChangedEventData object itself. - */ - public AgriFoodFarmingCropChangedEventData setCreatedDateTime(OffsetDateTime createdDateTime) { - this.createdDateTime = createdDateTime; - return this; - } - - /** - * Get the properties property: A list of key value pairs that describe the resource. Only string and numeral values - * are supported. - * - * @return the properties value. - */ - public Map getProperties() { - return this.properties; - } - - /** - * Set the properties property: A list of key value pairs that describe the resource. Only string and numeral values - * are supported. - * - * @param properties the properties value to set. - * @return the AgriFoodFarmingCropChangedEventData object itself. - */ - public AgriFoodFarmingCropChangedEventData setProperties(Map properties) { - this.properties = properties; - return this; - } -} diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AgriFoodFarmingCropVarietyChangedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AgriFoodFarmingCropVarietyChangedEventData.java deleted file mode 100644 index 5cab7b0a6323..000000000000 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AgriFoodFarmingCropVarietyChangedEventData.java +++ /dev/null @@ -1,281 +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.messaging.eventgrid.systemevents; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.time.OffsetDateTime; -import java.util.Map; - -/** Schema of the Data property of an EventGridEvent for a Microsoft.AgFoodPlatform.CropVarietyChanged event. */ -@Fluent -public final class AgriFoodFarmingCropVarietyChangedEventData { - /* - * Id of the crop it belongs to. - */ - @JsonProperty(value = "cropId") - private String cropId; - - /* - * Action occurred on a resource. - */ - @JsonProperty(value = "actionType") - private AgriFoodFarmingResourceActionType actionType; - - /* - * Status of the resource. - */ - @JsonProperty(value = "status") - private String status; - - /* - * Date-time when resource was last modified, sample format: - * yyyy-MM-ddTHH:mm:ssZ. - */ - @JsonProperty(value = "modifiedDateTime") - private OffsetDateTime modifiedDateTime; - - /* - * The ETag value to implement optimistic concurrency. - */ - @JsonProperty(value = "eTag") - private String eTag; - - /* - * Unique id of resource. - */ - @JsonProperty(value = "id") - private String id; - - /* - * Name to identify resource. - */ - @JsonProperty(value = "name") - private String name; - - /* - * Textual description of resource. - */ - @JsonProperty(value = "description") - private String description; - - /* - * Date-time when resource was created, sample format: - * yyyy-MM-ddTHH:mm:ssZ. - */ - @JsonProperty(value = "createdDateTime") - private OffsetDateTime createdDateTime; - - /* - * A list of key value pairs that describe the resource. - * Only string and numeral values are supported. - */ - @JsonProperty(value = "properties") - private Map properties; - - /** - * Get the cropId property: Id of the crop it belongs to. - * - * @return the cropId value. - */ - public String getCropId() { - return this.cropId; - } - - /** - * Set the cropId property: Id of the crop it belongs to. - * - * @param cropId the cropId value to set. - * @return the AgriFoodFarmingCropVarietyChangedEventData object itself. - */ - public AgriFoodFarmingCropVarietyChangedEventData setCropId(String cropId) { - this.cropId = cropId; - return this; - } - - /** - * Get the actionType property: Action occurred on a resource. - * - * @return the actionType value. - */ - public AgriFoodFarmingResourceActionType getActionType() { - return this.actionType; - } - - /** - * Set the actionType property: Action occurred on a resource. - * - * @param actionType the actionType value to set. - * @return the AgriFoodFarmingCropVarietyChangedEventData object itself. - */ - public AgriFoodFarmingCropVarietyChangedEventData setActionType(AgriFoodFarmingResourceActionType actionType) { - this.actionType = actionType; - return this; - } - - /** - * Get the status property: Status of the resource. - * - * @return the status value. - */ - public String getStatus() { - return this.status; - } - - /** - * Set the status property: Status of the resource. - * - * @param status the status value to set. - * @return the AgriFoodFarmingCropVarietyChangedEventData object itself. - */ - public AgriFoodFarmingCropVarietyChangedEventData setStatus(String status) { - this.status = status; - return this; - } - - /** - * Get the modifiedDateTime property: Date-time when resource was last modified, sample format: - * yyyy-MM-ddTHH:mm:ssZ. - * - * @return the modifiedDateTime value. - */ - public OffsetDateTime getModifiedDateTime() { - return this.modifiedDateTime; - } - - /** - * Set the modifiedDateTime property: Date-time when resource was last modified, sample format: - * yyyy-MM-ddTHH:mm:ssZ. - * - * @param modifiedDateTime the modifiedDateTime value to set. - * @return the AgriFoodFarmingCropVarietyChangedEventData object itself. - */ - public AgriFoodFarmingCropVarietyChangedEventData setModifiedDateTime(OffsetDateTime modifiedDateTime) { - this.modifiedDateTime = modifiedDateTime; - return this; - } - - /** - * Get the eTag property: The ETag value to implement optimistic concurrency. - * - * @return the eTag value. - */ - public String getETag() { - return this.eTag; - } - - /** - * Set the eTag property: The ETag value to implement optimistic concurrency. - * - * @param eTag the eTag value to set. - * @return the AgriFoodFarmingCropVarietyChangedEventData object itself. - */ - public AgriFoodFarmingCropVarietyChangedEventData setETag(String eTag) { - this.eTag = eTag; - return this; - } - - /** - * Get the id property: Unique id of resource. - * - * @return the id value. - */ - public String getId() { - return this.id; - } - - /** - * Set the id property: Unique id of resource. - * - * @param id the id value to set. - * @return the AgriFoodFarmingCropVarietyChangedEventData object itself. - */ - public AgriFoodFarmingCropVarietyChangedEventData setId(String id) { - this.id = id; - return this; - } - - /** - * Get the name property: Name to identify resource. - * - * @return the name value. - */ - public String getName() { - return this.name; - } - - /** - * Set the name property: Name to identify resource. - * - * @param name the name value to set. - * @return the AgriFoodFarmingCropVarietyChangedEventData object itself. - */ - public AgriFoodFarmingCropVarietyChangedEventData setName(String name) { - this.name = name; - return this; - } - - /** - * Get the description property: Textual description of resource. - * - * @return the description value. - */ - public String getDescription() { - return this.description; - } - - /** - * Set the description property: Textual description of resource. - * - * @param description the description value to set. - * @return the AgriFoodFarmingCropVarietyChangedEventData object itself. - */ - public AgriFoodFarmingCropVarietyChangedEventData setDescription(String description) { - this.description = description; - return this; - } - - /** - * Get the createdDateTime property: Date-time when resource was created, sample format: yyyy-MM-ddTHH:mm:ssZ. - * - * @return the createdDateTime value. - */ - public OffsetDateTime getCreatedDateTime() { - return this.createdDateTime; - } - - /** - * Set the createdDateTime property: Date-time when resource was created, sample format: yyyy-MM-ddTHH:mm:ssZ. - * - * @param createdDateTime the createdDateTime value to set. - * @return the AgriFoodFarmingCropVarietyChangedEventData object itself. - */ - public AgriFoodFarmingCropVarietyChangedEventData setCreatedDateTime(OffsetDateTime createdDateTime) { - this.createdDateTime = createdDateTime; - return this; - } - - /** - * Get the properties property: A list of key value pairs that describe the resource. Only string and numeral values - * are supported. - * - * @return the properties value. - */ - public Map getProperties() { - return this.properties; - } - - /** - * Set the properties property: A list of key value pairs that describe the resource. Only string and numeral values - * are supported. - * - * @param properties the properties value to set. - * @return the AgriFoodFarmingCropVarietyChangedEventData object itself. - */ - public AgriFoodFarmingCropVarietyChangedEventData setProperties(Map properties) { - this.properties = properties; - return this; - } -} diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AgriFoodFarmingFarmChangedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AgriFoodFarmingFarmChangedEventData.java deleted file mode 100644 index 41f972ad64d8..000000000000 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AgriFoodFarmingFarmChangedEventData.java +++ /dev/null @@ -1,281 +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.messaging.eventgrid.systemevents; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.time.OffsetDateTime; -import java.util.Map; - -/** Schema of the Data property of an EventGridEvent for a Microsoft.AgFoodPlatform.FarmChanged event. */ -@Fluent -public final class AgriFoodFarmingFarmChangedEventData { - /* - * Id of the farmer it belongs to. - */ - @JsonProperty(value = "farmerId") - private String farmerId; - - /* - * Action occurred on a resource. - */ - @JsonProperty(value = "actionType") - private AgriFoodFarmingResourceActionType actionType; - - /* - * Status of the resource. - */ - @JsonProperty(value = "status") - private String status; - - /* - * Date-time when resource was last modified, sample format: - * yyyy-MM-ddTHH:mm:ssZ. - */ - @JsonProperty(value = "modifiedDateTime") - private OffsetDateTime modifiedDateTime; - - /* - * The ETag value to implement optimistic concurrency. - */ - @JsonProperty(value = "eTag") - private String eTag; - - /* - * Unique id of resource. - */ - @JsonProperty(value = "id") - private String id; - - /* - * Name to identify resource. - */ - @JsonProperty(value = "name") - private String name; - - /* - * Textual description of resource. - */ - @JsonProperty(value = "description") - private String description; - - /* - * Date-time when resource was created, sample format: - * yyyy-MM-ddTHH:mm:ssZ. - */ - @JsonProperty(value = "createdDateTime") - private OffsetDateTime createdDateTime; - - /* - * A list of key value pairs that describe the resource. - * Only string and numeral values are supported. - */ - @JsonProperty(value = "properties") - private Map properties; - - /** - * Get the farmerId property: Id of the farmer it belongs to. - * - * @return the farmerId value. - */ - public String getFarmerId() { - return this.farmerId; - } - - /** - * Set the farmerId property: Id of the farmer it belongs to. - * - * @param farmerId the farmerId value to set. - * @return the AgriFoodFarmingFarmChangedEventData object itself. - */ - public AgriFoodFarmingFarmChangedEventData setFarmerId(String farmerId) { - this.farmerId = farmerId; - return this; - } - - /** - * Get the actionType property: Action occurred on a resource. - * - * @return the actionType value. - */ - public AgriFoodFarmingResourceActionType getActionType() { - return this.actionType; - } - - /** - * Set the actionType property: Action occurred on a resource. - * - * @param actionType the actionType value to set. - * @return the AgriFoodFarmingFarmChangedEventData object itself. - */ - public AgriFoodFarmingFarmChangedEventData setActionType(AgriFoodFarmingResourceActionType actionType) { - this.actionType = actionType; - return this; - } - - /** - * Get the status property: Status of the resource. - * - * @return the status value. - */ - public String getStatus() { - return this.status; - } - - /** - * Set the status property: Status of the resource. - * - * @param status the status value to set. - * @return the AgriFoodFarmingFarmChangedEventData object itself. - */ - public AgriFoodFarmingFarmChangedEventData setStatus(String status) { - this.status = status; - return this; - } - - /** - * Get the modifiedDateTime property: Date-time when resource was last modified, sample format: - * yyyy-MM-ddTHH:mm:ssZ. - * - * @return the modifiedDateTime value. - */ - public OffsetDateTime getModifiedDateTime() { - return this.modifiedDateTime; - } - - /** - * Set the modifiedDateTime property: Date-time when resource was last modified, sample format: - * yyyy-MM-ddTHH:mm:ssZ. - * - * @param modifiedDateTime the modifiedDateTime value to set. - * @return the AgriFoodFarmingFarmChangedEventData object itself. - */ - public AgriFoodFarmingFarmChangedEventData setModifiedDateTime(OffsetDateTime modifiedDateTime) { - this.modifiedDateTime = modifiedDateTime; - return this; - } - - /** - * Get the eTag property: The ETag value to implement optimistic concurrency. - * - * @return the eTag value. - */ - public String getETag() { - return this.eTag; - } - - /** - * Set the eTag property: The ETag value to implement optimistic concurrency. - * - * @param eTag the eTag value to set. - * @return the AgriFoodFarmingFarmChangedEventData object itself. - */ - public AgriFoodFarmingFarmChangedEventData setETag(String eTag) { - this.eTag = eTag; - return this; - } - - /** - * Get the id property: Unique id of resource. - * - * @return the id value. - */ - public String getId() { - return this.id; - } - - /** - * Set the id property: Unique id of resource. - * - * @param id the id value to set. - * @return the AgriFoodFarmingFarmChangedEventData object itself. - */ - public AgriFoodFarmingFarmChangedEventData setId(String id) { - this.id = id; - return this; - } - - /** - * Get the name property: Name to identify resource. - * - * @return the name value. - */ - public String getName() { - return this.name; - } - - /** - * Set the name property: Name to identify resource. - * - * @param name the name value to set. - * @return the AgriFoodFarmingFarmChangedEventData object itself. - */ - public AgriFoodFarmingFarmChangedEventData setName(String name) { - this.name = name; - return this; - } - - /** - * Get the description property: Textual description of resource. - * - * @return the description value. - */ - public String getDescription() { - return this.description; - } - - /** - * Set the description property: Textual description of resource. - * - * @param description the description value to set. - * @return the AgriFoodFarmingFarmChangedEventData object itself. - */ - public AgriFoodFarmingFarmChangedEventData setDescription(String description) { - this.description = description; - return this; - } - - /** - * Get the createdDateTime property: Date-time when resource was created, sample format: yyyy-MM-ddTHH:mm:ssZ. - * - * @return the createdDateTime value. - */ - public OffsetDateTime getCreatedDateTime() { - return this.createdDateTime; - } - - /** - * Set the createdDateTime property: Date-time when resource was created, sample format: yyyy-MM-ddTHH:mm:ssZ. - * - * @param createdDateTime the createdDateTime value to set. - * @return the AgriFoodFarmingFarmChangedEventData object itself. - */ - public AgriFoodFarmingFarmChangedEventData setCreatedDateTime(OffsetDateTime createdDateTime) { - this.createdDateTime = createdDateTime; - return this; - } - - /** - * Get the properties property: A list of key value pairs that describe the resource. Only string and numeral values - * are supported. - * - * @return the properties value. - */ - public Map getProperties() { - return this.properties; - } - - /** - * Set the properties property: A list of key value pairs that describe the resource. Only string and numeral values - * are supported. - * - * @param properties the properties value to set. - * @return the AgriFoodFarmingFarmChangedEventData object itself. - */ - public AgriFoodFarmingFarmChangedEventData setProperties(Map properties) { - this.properties = properties; - return this; - } -} diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AgriFoodFarmingFarmOperationDataIngestionJobStatusChangedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AgriFoodFarmingFarmOperationDataIngestionJobStatusChangedEventData.java deleted file mode 100644 index 42b79019e228..000000000000 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AgriFoodFarmingFarmOperationDataIngestionJobStatusChangedEventData.java +++ /dev/null @@ -1,289 +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.messaging.eventgrid.systemevents; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.time.OffsetDateTime; -import java.util.Map; - -/** - * Schema of the Data property of an EventGridEvent for a - * Microsoft.AgFoodPlatform.FarmOperationDataIngestionJobStatusChanged event. - */ -@Fluent -public final class AgriFoodFarmingFarmOperationDataIngestionJobStatusChangedEventData { - /* - * Farmer id for which job was created. - */ - @JsonProperty(value = "farmerId") - private String farmerId; - - /* - * Status message to capture more details of the job. - */ - @JsonProperty(value = "message") - private String message; - - /* - * Various states a job can be in. - */ - @JsonProperty(value = "status") - private AgriFoodFarmingJobStatus status; - - /* - * Date-time when last action was taken on job, sample format: - * yyyy-MM-ddTHH:mm:ssZ. - */ - @JsonProperty(value = "lastActionDateTime") - private OffsetDateTime lastActionDateTime; - - /* - * Flag that gets set when job cancellation is requested. - */ - @JsonProperty(value = "isCancellationRequested") - private Boolean isCancellationRequested; - - /* - * Unique id of resource. - */ - @JsonProperty(value = "id") - private String id; - - /* - * Name to identify resource. - */ - @JsonProperty(value = "name") - private String name; - - /* - * Textual description of resource. - */ - @JsonProperty(value = "description") - private String description; - - /* - * Date-time when resource was created, sample format: - * yyyy-MM-ddTHH:mm:ssZ. - */ - @JsonProperty(value = "createdDateTime") - private OffsetDateTime createdDateTime; - - /* - * A list of key value pairs that describe the resource. - * Only string and numeral values are supported. - */ - @JsonProperty(value = "properties") - private Map properties; - - /** - * Get the farmerId property: Farmer id for which job was created. - * - * @return the farmerId value. - */ - public String getFarmerId() { - return this.farmerId; - } - - /** - * Set the farmerId property: Farmer id for which job was created. - * - * @param farmerId the farmerId value to set. - * @return the AgriFoodFarmingFarmOperationDataIngestionJobStatusChangedEventData object itself. - */ - public AgriFoodFarmingFarmOperationDataIngestionJobStatusChangedEventData setFarmerId(String farmerId) { - this.farmerId = farmerId; - return this; - } - - /** - * Get the message property: Status message to capture more details of the job. - * - * @return the message value. - */ - public String getMessage() { - return this.message; - } - - /** - * Set the message property: Status message to capture more details of the job. - * - * @param message the message value to set. - * @return the AgriFoodFarmingFarmOperationDataIngestionJobStatusChangedEventData object itself. - */ - public AgriFoodFarmingFarmOperationDataIngestionJobStatusChangedEventData setMessage(String message) { - this.message = message; - return this; - } - - /** - * Get the status property: Various states a job can be in. - * - * @return the status value. - */ - public AgriFoodFarmingJobStatus getStatus() { - return this.status; - } - - /** - * Set the status property: Various states a job can be in. - * - * @param status the status value to set. - * @return the AgriFoodFarmingFarmOperationDataIngestionJobStatusChangedEventData object itself. - */ - public AgriFoodFarmingFarmOperationDataIngestionJobStatusChangedEventData setStatus( - AgriFoodFarmingJobStatus status) { - this.status = status; - return this; - } - - /** - * Get the lastActionDateTime property: Date-time when last action was taken on job, sample format: - * yyyy-MM-ddTHH:mm:ssZ. - * - * @return the lastActionDateTime value. - */ - public OffsetDateTime getLastActionDateTime() { - return this.lastActionDateTime; - } - - /** - * Set the lastActionDateTime property: Date-time when last action was taken on job, sample format: - * yyyy-MM-ddTHH:mm:ssZ. - * - * @param lastActionDateTime the lastActionDateTime value to set. - * @return the AgriFoodFarmingFarmOperationDataIngestionJobStatusChangedEventData object itself. - */ - public AgriFoodFarmingFarmOperationDataIngestionJobStatusChangedEventData setLastActionDateTime( - OffsetDateTime lastActionDateTime) { - this.lastActionDateTime = lastActionDateTime; - return this; - } - - /** - * Get the isCancellationRequested property: Flag that gets set when job cancellation is requested. - * - * @return the isCancellationRequested value. - */ - public Boolean isCancellationRequested() { - return this.isCancellationRequested; - } - - /** - * Set the isCancellationRequested property: Flag that gets set when job cancellation is requested. - * - * @param isCancellationRequested the isCancellationRequested value to set. - * @return the AgriFoodFarmingFarmOperationDataIngestionJobStatusChangedEventData object itself. - */ - public AgriFoodFarmingFarmOperationDataIngestionJobStatusChangedEventData setIsCancellationRequested( - Boolean isCancellationRequested) { - this.isCancellationRequested = isCancellationRequested; - return this; - } - - /** - * Get the id property: Unique id of resource. - * - * @return the id value. - */ - public String getId() { - return this.id; - } - - /** - * Set the id property: Unique id of resource. - * - * @param id the id value to set. - * @return the AgriFoodFarmingFarmOperationDataIngestionJobStatusChangedEventData object itself. - */ - public AgriFoodFarmingFarmOperationDataIngestionJobStatusChangedEventData setId(String id) { - this.id = id; - return this; - } - - /** - * Get the name property: Name to identify resource. - * - * @return the name value. - */ - public String getName() { - return this.name; - } - - /** - * Set the name property: Name to identify resource. - * - * @param name the name value to set. - * @return the AgriFoodFarmingFarmOperationDataIngestionJobStatusChangedEventData object itself. - */ - public AgriFoodFarmingFarmOperationDataIngestionJobStatusChangedEventData setName(String name) { - this.name = name; - return this; - } - - /** - * Get the description property: Textual description of resource. - * - * @return the description value. - */ - public String getDescription() { - return this.description; - } - - /** - * Set the description property: Textual description of resource. - * - * @param description the description value to set. - * @return the AgriFoodFarmingFarmOperationDataIngestionJobStatusChangedEventData object itself. - */ - public AgriFoodFarmingFarmOperationDataIngestionJobStatusChangedEventData setDescription(String description) { - this.description = description; - return this; - } - - /** - * Get the createdDateTime property: Date-time when resource was created, sample format: yyyy-MM-ddTHH:mm:ssZ. - * - * @return the createdDateTime value. - */ - public OffsetDateTime getCreatedDateTime() { - return this.createdDateTime; - } - - /** - * Set the createdDateTime property: Date-time when resource was created, sample format: yyyy-MM-ddTHH:mm:ssZ. - * - * @param createdDateTime the createdDateTime value to set. - * @return the AgriFoodFarmingFarmOperationDataIngestionJobStatusChangedEventData object itself. - */ - public AgriFoodFarmingFarmOperationDataIngestionJobStatusChangedEventData setCreatedDateTime( - OffsetDateTime createdDateTime) { - this.createdDateTime = createdDateTime; - return this; - } - - /** - * Get the properties property: A list of key value pairs that describe the resource. Only string and numeral values - * are supported. - * - * @return the properties value. - */ - public Map getProperties() { - return this.properties; - } - - /** - * Set the properties property: A list of key value pairs that describe the resource. Only string and numeral values - * are supported. - * - * @param properties the properties value to set. - * @return the AgriFoodFarmingFarmOperationDataIngestionJobStatusChangedEventData object itself. - */ - public AgriFoodFarmingFarmOperationDataIngestionJobStatusChangedEventData setProperties( - Map properties) { - this.properties = properties; - return this; - } -} diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AgriFoodFarmingFarmerChangedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AgriFoodFarmingFarmerChangedEventData.java deleted file mode 100644 index fd523025e293..000000000000 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AgriFoodFarmingFarmerChangedEventData.java +++ /dev/null @@ -1,255 +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.messaging.eventgrid.systemevents; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.time.OffsetDateTime; -import java.util.Map; - -/** Schema of the Data property of an EventGridEvent for a Microsoft.AgFoodPlatform.FarmerChanged event. */ -@Fluent -public final class AgriFoodFarmingFarmerChangedEventData { - /* - * Action occurred on a resource. - */ - @JsonProperty(value = "actionType") - private AgriFoodFarmingResourceActionType actionType; - - /* - * Status of the resource. - */ - @JsonProperty(value = "status") - private String status; - - /* - * Date-time when resource was last modified, sample format: - * yyyy-MM-ddTHH:mm:ssZ. - */ - @JsonProperty(value = "modifiedDateTime") - private OffsetDateTime modifiedDateTime; - - /* - * The ETag value to implement optimistic concurrency. - */ - @JsonProperty(value = "eTag") - private String eTag; - - /* - * Unique id of resource. - */ - @JsonProperty(value = "id") - private String id; - - /* - * Name to identify resource. - */ - @JsonProperty(value = "name") - private String name; - - /* - * Textual description of resource. - */ - @JsonProperty(value = "description") - private String description; - - /* - * Date-time when resource was created, sample format: - * yyyy-MM-ddTHH:mm:ssZ. - */ - @JsonProperty(value = "createdDateTime") - private OffsetDateTime createdDateTime; - - /* - * A list of key value pairs that describe the resource. - * Only string and numeral values are supported. - */ - @JsonProperty(value = "properties") - private Map properties; - - /** - * Get the actionType property: Action occurred on a resource. - * - * @return the actionType value. - */ - public AgriFoodFarmingResourceActionType getActionType() { - return this.actionType; - } - - /** - * Set the actionType property: Action occurred on a resource. - * - * @param actionType the actionType value to set. - * @return the AgriFoodFarmingFarmerChangedEventData object itself. - */ - public AgriFoodFarmingFarmerChangedEventData setActionType(AgriFoodFarmingResourceActionType actionType) { - this.actionType = actionType; - return this; - } - - /** - * Get the status property: Status of the resource. - * - * @return the status value. - */ - public String getStatus() { - return this.status; - } - - /** - * Set the status property: Status of the resource. - * - * @param status the status value to set. - * @return the AgriFoodFarmingFarmerChangedEventData object itself. - */ - public AgriFoodFarmingFarmerChangedEventData setStatus(String status) { - this.status = status; - return this; - } - - /** - * Get the modifiedDateTime property: Date-time when resource was last modified, sample format: - * yyyy-MM-ddTHH:mm:ssZ. - * - * @return the modifiedDateTime value. - */ - public OffsetDateTime getModifiedDateTime() { - return this.modifiedDateTime; - } - - /** - * Set the modifiedDateTime property: Date-time when resource was last modified, sample format: - * yyyy-MM-ddTHH:mm:ssZ. - * - * @param modifiedDateTime the modifiedDateTime value to set. - * @return the AgriFoodFarmingFarmerChangedEventData object itself. - */ - public AgriFoodFarmingFarmerChangedEventData setModifiedDateTime(OffsetDateTime modifiedDateTime) { - this.modifiedDateTime = modifiedDateTime; - return this; - } - - /** - * Get the eTag property: The ETag value to implement optimistic concurrency. - * - * @return the eTag value. - */ - public String getETag() { - return this.eTag; - } - - /** - * Set the eTag property: The ETag value to implement optimistic concurrency. - * - * @param eTag the eTag value to set. - * @return the AgriFoodFarmingFarmerChangedEventData object itself. - */ - public AgriFoodFarmingFarmerChangedEventData setETag(String eTag) { - this.eTag = eTag; - return this; - } - - /** - * Get the id property: Unique id of resource. - * - * @return the id value. - */ - public String getId() { - return this.id; - } - - /** - * Set the id property: Unique id of resource. - * - * @param id the id value to set. - * @return the AgriFoodFarmingFarmerChangedEventData object itself. - */ - public AgriFoodFarmingFarmerChangedEventData setId(String id) { - this.id = id; - return this; - } - - /** - * Get the name property: Name to identify resource. - * - * @return the name value. - */ - public String getName() { - return this.name; - } - - /** - * Set the name property: Name to identify resource. - * - * @param name the name value to set. - * @return the AgriFoodFarmingFarmerChangedEventData object itself. - */ - public AgriFoodFarmingFarmerChangedEventData setName(String name) { - this.name = name; - return this; - } - - /** - * Get the description property: Textual description of resource. - * - * @return the description value. - */ - public String getDescription() { - return this.description; - } - - /** - * Set the description property: Textual description of resource. - * - * @param description the description value to set. - * @return the AgriFoodFarmingFarmerChangedEventData object itself. - */ - public AgriFoodFarmingFarmerChangedEventData setDescription(String description) { - this.description = description; - return this; - } - - /** - * Get the createdDateTime property: Date-time when resource was created, sample format: yyyy-MM-ddTHH:mm:ssZ. - * - * @return the createdDateTime value. - */ - public OffsetDateTime getCreatedDateTime() { - return this.createdDateTime; - } - - /** - * Set the createdDateTime property: Date-time when resource was created, sample format: yyyy-MM-ddTHH:mm:ssZ. - * - * @param createdDateTime the createdDateTime value to set. - * @return the AgriFoodFarmingFarmerChangedEventData object itself. - */ - public AgriFoodFarmingFarmerChangedEventData setCreatedDateTime(OffsetDateTime createdDateTime) { - this.createdDateTime = createdDateTime; - return this; - } - - /** - * Get the properties property: A list of key value pairs that describe the resource. Only string and numeral values - * are supported. - * - * @return the properties value. - */ - public Map getProperties() { - return this.properties; - } - - /** - * Set the properties property: A list of key value pairs that describe the resource. Only string and numeral values - * are supported. - * - * @param properties the properties value to set. - * @return the AgriFoodFarmingFarmerChangedEventData object itself. - */ - public AgriFoodFarmingFarmerChangedEventData setProperties(Map properties) { - this.properties = properties; - return this; - } -} diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AgriFoodFarmingFieldChangedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AgriFoodFarmingFieldChangedEventData.java deleted file mode 100644 index c5c0acbcfd34..000000000000 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AgriFoodFarmingFieldChangedEventData.java +++ /dev/null @@ -1,307 +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.messaging.eventgrid.systemevents; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.time.OffsetDateTime; -import java.util.Map; - -/** Schema of the Data property of an EventGridEvent for a Microsoft.AgFoodPlatform.FieldChanged event. */ -@Fluent -public final class AgriFoodFarmingFieldChangedEventData { - /* - * Farmer Id. - */ - @JsonProperty(value = "farmerId") - private String farmerId; - - /* - * Id of the associated Farm. - */ - @JsonProperty(value = "farmId") - private String farmId; - - /* - * Action occurred on a resource. - */ - @JsonProperty(value = "actionType") - private AgriFoodFarmingResourceActionType actionType; - - /* - * Status of the resource. - */ - @JsonProperty(value = "status") - private String status; - - /* - * Date-time when resource was last modified, sample format: - * yyyy-MM-ddTHH:mm:ssZ. - */ - @JsonProperty(value = "modifiedDateTime") - private OffsetDateTime modifiedDateTime; - - /* - * The ETag value to implement optimistic concurrency. - */ - @JsonProperty(value = "eTag") - private String eTag; - - /* - * Unique id of resource. - */ - @JsonProperty(value = "id") - private String id; - - /* - * Name to identify resource. - */ - @JsonProperty(value = "name") - private String name; - - /* - * Textual description of resource. - */ - @JsonProperty(value = "description") - private String description; - - /* - * Date-time when resource was created, sample format: - * yyyy-MM-ddTHH:mm:ssZ. - */ - @JsonProperty(value = "createdDateTime") - private OffsetDateTime createdDateTime; - - /* - * A list of key value pairs that describe the resource. - * Only string and numeral values are supported. - */ - @JsonProperty(value = "properties") - private Map properties; - - /** - * Get the farmerId property: Farmer Id. - * - * @return the farmerId value. - */ - public String getFarmerId() { - return this.farmerId; - } - - /** - * Set the farmerId property: Farmer Id. - * - * @param farmerId the farmerId value to set. - * @return the AgriFoodFarmingFieldChangedEventData object itself. - */ - public AgriFoodFarmingFieldChangedEventData setFarmerId(String farmerId) { - this.farmerId = farmerId; - return this; - } - - /** - * Get the farmId property: Id of the associated Farm. - * - * @return the farmId value. - */ - public String getFarmId() { - return this.farmId; - } - - /** - * Set the farmId property: Id of the associated Farm. - * - * @param farmId the farmId value to set. - * @return the AgriFoodFarmingFieldChangedEventData object itself. - */ - public AgriFoodFarmingFieldChangedEventData setFarmId(String farmId) { - this.farmId = farmId; - return this; - } - - /** - * Get the actionType property: Action occurred on a resource. - * - * @return the actionType value. - */ - public AgriFoodFarmingResourceActionType getActionType() { - return this.actionType; - } - - /** - * Set the actionType property: Action occurred on a resource. - * - * @param actionType the actionType value to set. - * @return the AgriFoodFarmingFieldChangedEventData object itself. - */ - public AgriFoodFarmingFieldChangedEventData setActionType(AgriFoodFarmingResourceActionType actionType) { - this.actionType = actionType; - return this; - } - - /** - * Get the status property: Status of the resource. - * - * @return the status value. - */ - public String getStatus() { - return this.status; - } - - /** - * Set the status property: Status of the resource. - * - * @param status the status value to set. - * @return the AgriFoodFarmingFieldChangedEventData object itself. - */ - public AgriFoodFarmingFieldChangedEventData setStatus(String status) { - this.status = status; - return this; - } - - /** - * Get the modifiedDateTime property: Date-time when resource was last modified, sample format: - * yyyy-MM-ddTHH:mm:ssZ. - * - * @return the modifiedDateTime value. - */ - public OffsetDateTime getModifiedDateTime() { - return this.modifiedDateTime; - } - - /** - * Set the modifiedDateTime property: Date-time when resource was last modified, sample format: - * yyyy-MM-ddTHH:mm:ssZ. - * - * @param modifiedDateTime the modifiedDateTime value to set. - * @return the AgriFoodFarmingFieldChangedEventData object itself. - */ - public AgriFoodFarmingFieldChangedEventData setModifiedDateTime(OffsetDateTime modifiedDateTime) { - this.modifiedDateTime = modifiedDateTime; - return this; - } - - /** - * Get the eTag property: The ETag value to implement optimistic concurrency. - * - * @return the eTag value. - */ - public String getETag() { - return this.eTag; - } - - /** - * Set the eTag property: The ETag value to implement optimistic concurrency. - * - * @param eTag the eTag value to set. - * @return the AgriFoodFarmingFieldChangedEventData object itself. - */ - public AgriFoodFarmingFieldChangedEventData setETag(String eTag) { - this.eTag = eTag; - return this; - } - - /** - * Get the id property: Unique id of resource. - * - * @return the id value. - */ - public String getId() { - return this.id; - } - - /** - * Set the id property: Unique id of resource. - * - * @param id the id value to set. - * @return the AgriFoodFarmingFieldChangedEventData object itself. - */ - public AgriFoodFarmingFieldChangedEventData setId(String id) { - this.id = id; - return this; - } - - /** - * Get the name property: Name to identify resource. - * - * @return the name value. - */ - public String getName() { - return this.name; - } - - /** - * Set the name property: Name to identify resource. - * - * @param name the name value to set. - * @return the AgriFoodFarmingFieldChangedEventData object itself. - */ - public AgriFoodFarmingFieldChangedEventData setName(String name) { - this.name = name; - return this; - } - - /** - * Get the description property: Textual description of resource. - * - * @return the description value. - */ - public String getDescription() { - return this.description; - } - - /** - * Set the description property: Textual description of resource. - * - * @param description the description value to set. - * @return the AgriFoodFarmingFieldChangedEventData object itself. - */ - public AgriFoodFarmingFieldChangedEventData setDescription(String description) { - this.description = description; - return this; - } - - /** - * Get the createdDateTime property: Date-time when resource was created, sample format: yyyy-MM-ddTHH:mm:ssZ. - * - * @return the createdDateTime value. - */ - public OffsetDateTime getCreatedDateTime() { - return this.createdDateTime; - } - - /** - * Set the createdDateTime property: Date-time when resource was created, sample format: yyyy-MM-ddTHH:mm:ssZ. - * - * @param createdDateTime the createdDateTime value to set. - * @return the AgriFoodFarmingFieldChangedEventData object itself. - */ - public AgriFoodFarmingFieldChangedEventData setCreatedDateTime(OffsetDateTime createdDateTime) { - this.createdDateTime = createdDateTime; - return this; - } - - /** - * Get the properties property: A list of key value pairs that describe the resource. Only string and numeral values - * are supported. - * - * @return the properties value. - */ - public Map getProperties() { - return this.properties; - } - - /** - * Set the properties property: A list of key value pairs that describe the resource. Only string and numeral values - * are supported. - * - * @param properties the properties value to set. - * @return the AgriFoodFarmingFieldChangedEventData object itself. - */ - public AgriFoodFarmingFieldChangedEventData setProperties(Map properties) { - this.properties = properties; - return this; - } -} diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AgriFoodFarmingHarvestDataChangedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AgriFoodFarmingHarvestDataChangedEventData.java deleted file mode 100644 index ae903a27b10d..000000000000 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AgriFoodFarmingHarvestDataChangedEventData.java +++ /dev/null @@ -1,307 +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.messaging.eventgrid.systemevents; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.time.OffsetDateTime; -import java.util.Map; - -/** Schema of the Data property of an EventGridEvent for a Microsoft.AgFoodPlatform.HarvestDataChanged event. */ -@Fluent -public final class AgriFoodFarmingHarvestDataChangedEventData { - /* - * Action occurred on a resource. - */ - @JsonProperty(value = "actionType") - private AgriFoodFarmingResourceActionType actionType; - - /* - * Id of the farmer it belongs to. - */ - @JsonProperty(value = "farmerId") - private String farmerId; - - /* - * Status of the resource. - */ - @JsonProperty(value = "status") - private String status; - - /* - * Source of the farm operation data. - */ - @JsonProperty(value = "source") - private String source; - - /* - * Date-time when resource was last modified, sample format: - * yyyy-MM-ddTHH:mm:ssZ. - */ - @JsonProperty(value = "modifiedDateTime") - private OffsetDateTime modifiedDateTime; - - /* - * The ETag value to implement optimistic concurrency. - */ - @JsonProperty(value = "eTag") - private String eTag; - - /* - * Unique id of resource. - */ - @JsonProperty(value = "id") - private String id; - - /* - * Name to identify resource. - */ - @JsonProperty(value = "name") - private String name; - - /* - * Textual description of resource. - */ - @JsonProperty(value = "description") - private String description; - - /* - * Date-time when resource was created, sample format: - * yyyy-MM-ddTHH:mm:ssZ. - */ - @JsonProperty(value = "createdDateTime") - private OffsetDateTime createdDateTime; - - /* - * A list of key value pairs that describe the resource. - * Only string and numeral values are supported. - */ - @JsonProperty(value = "properties") - private Map properties; - - /** - * Get the actionType property: Action occurred on a resource. - * - * @return the actionType value. - */ - public AgriFoodFarmingResourceActionType getActionType() { - return this.actionType; - } - - /** - * Set the actionType property: Action occurred on a resource. - * - * @param actionType the actionType value to set. - * @return the AgriFoodFarmingHarvestDataChangedEventData object itself. - */ - public AgriFoodFarmingHarvestDataChangedEventData setActionType(AgriFoodFarmingResourceActionType actionType) { - this.actionType = actionType; - return this; - } - - /** - * Get the farmerId property: Id of the farmer it belongs to. - * - * @return the farmerId value. - */ - public String getFarmerId() { - return this.farmerId; - } - - /** - * Set the farmerId property: Id of the farmer it belongs to. - * - * @param farmerId the farmerId value to set. - * @return the AgriFoodFarmingHarvestDataChangedEventData object itself. - */ - public AgriFoodFarmingHarvestDataChangedEventData setFarmerId(String farmerId) { - this.farmerId = farmerId; - return this; - } - - /** - * Get the status property: Status of the resource. - * - * @return the status value. - */ - public String getStatus() { - return this.status; - } - - /** - * Set the status property: Status of the resource. - * - * @param status the status value to set. - * @return the AgriFoodFarmingHarvestDataChangedEventData object itself. - */ - public AgriFoodFarmingHarvestDataChangedEventData setStatus(String status) { - this.status = status; - return this; - } - - /** - * Get the source property: Source of the farm operation data. - * - * @return the source value. - */ - public String getSource() { - return this.source; - } - - /** - * Set the source property: Source of the farm operation data. - * - * @param source the source value to set. - * @return the AgriFoodFarmingHarvestDataChangedEventData object itself. - */ - public AgriFoodFarmingHarvestDataChangedEventData setSource(String source) { - this.source = source; - return this; - } - - /** - * Get the modifiedDateTime property: Date-time when resource was last modified, sample format: - * yyyy-MM-ddTHH:mm:ssZ. - * - * @return the modifiedDateTime value. - */ - public OffsetDateTime getModifiedDateTime() { - return this.modifiedDateTime; - } - - /** - * Set the modifiedDateTime property: Date-time when resource was last modified, sample format: - * yyyy-MM-ddTHH:mm:ssZ. - * - * @param modifiedDateTime the modifiedDateTime value to set. - * @return the AgriFoodFarmingHarvestDataChangedEventData object itself. - */ - public AgriFoodFarmingHarvestDataChangedEventData setModifiedDateTime(OffsetDateTime modifiedDateTime) { - this.modifiedDateTime = modifiedDateTime; - return this; - } - - /** - * Get the eTag property: The ETag value to implement optimistic concurrency. - * - * @return the eTag value. - */ - public String getETag() { - return this.eTag; - } - - /** - * Set the eTag property: The ETag value to implement optimistic concurrency. - * - * @param eTag the eTag value to set. - * @return the AgriFoodFarmingHarvestDataChangedEventData object itself. - */ - public AgriFoodFarmingHarvestDataChangedEventData setETag(String eTag) { - this.eTag = eTag; - return this; - } - - /** - * Get the id property: Unique id of resource. - * - * @return the id value. - */ - public String getId() { - return this.id; - } - - /** - * Set the id property: Unique id of resource. - * - * @param id the id value to set. - * @return the AgriFoodFarmingHarvestDataChangedEventData object itself. - */ - public AgriFoodFarmingHarvestDataChangedEventData setId(String id) { - this.id = id; - return this; - } - - /** - * Get the name property: Name to identify resource. - * - * @return the name value. - */ - public String getName() { - return this.name; - } - - /** - * Set the name property: Name to identify resource. - * - * @param name the name value to set. - * @return the AgriFoodFarmingHarvestDataChangedEventData object itself. - */ - public AgriFoodFarmingHarvestDataChangedEventData setName(String name) { - this.name = name; - return this; - } - - /** - * Get the description property: Textual description of resource. - * - * @return the description value. - */ - public String getDescription() { - return this.description; - } - - /** - * Set the description property: Textual description of resource. - * - * @param description the description value to set. - * @return the AgriFoodFarmingHarvestDataChangedEventData object itself. - */ - public AgriFoodFarmingHarvestDataChangedEventData setDescription(String description) { - this.description = description; - return this; - } - - /** - * Get the createdDateTime property: Date-time when resource was created, sample format: yyyy-MM-ddTHH:mm:ssZ. - * - * @return the createdDateTime value. - */ - public OffsetDateTime getCreatedDateTime() { - return this.createdDateTime; - } - - /** - * Set the createdDateTime property: Date-time when resource was created, sample format: yyyy-MM-ddTHH:mm:ssZ. - * - * @param createdDateTime the createdDateTime value to set. - * @return the AgriFoodFarmingHarvestDataChangedEventData object itself. - */ - public AgriFoodFarmingHarvestDataChangedEventData setCreatedDateTime(OffsetDateTime createdDateTime) { - this.createdDateTime = createdDateTime; - return this; - } - - /** - * Get the properties property: A list of key value pairs that describe the resource. Only string and numeral values - * are supported. - * - * @return the properties value. - */ - public Map getProperties() { - return this.properties; - } - - /** - * Set the properties property: A list of key value pairs that describe the resource. Only string and numeral values - * are supported. - * - * @param properties the properties value to set. - * @return the AgriFoodFarmingHarvestDataChangedEventData object itself. - */ - public AgriFoodFarmingHarvestDataChangedEventData setProperties(Map properties) { - this.properties = properties; - return this; - } -} diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AgriFoodFarmingJobStatus.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AgriFoodFarmingJobStatus.java deleted file mode 100644 index ffb5f3773059..000000000000 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AgriFoodFarmingJobStatus.java +++ /dev/null @@ -1,43 +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.messaging.eventgrid.systemevents; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for AgriFoodFarmingJobStatus. */ -public final class AgriFoodFarmingJobStatus extends ExpandableStringEnum { - /** Static value Waiting for AgriFoodFarmingJobStatus. */ - public static final AgriFoodFarmingJobStatus WAITING = fromString("Waiting"); - - /** Static value Running for AgriFoodFarmingJobStatus. */ - public static final AgriFoodFarmingJobStatus RUNNING = fromString("Running"); - - /** Static value Succeeded for AgriFoodFarmingJobStatus. */ - public static final AgriFoodFarmingJobStatus SUCCEEDED = fromString("Succeeded"); - - /** Static value Failed for AgriFoodFarmingJobStatus. */ - public static final AgriFoodFarmingJobStatus FAILED = fromString("Failed"); - - /** Static value Cancelled for AgriFoodFarmingJobStatus. */ - public static final AgriFoodFarmingJobStatus CANCELLED = fromString("Cancelled"); - - /** - * Creates or finds a AgriFoodFarmingJobStatus from its string representation. - * - * @param name a name to look for. - * @return the corresponding AgriFoodFarmingJobStatus. - */ - @JsonCreator - public static AgriFoodFarmingJobStatus fromString(String name) { - return fromString(name, AgriFoodFarmingJobStatus.class); - } - - /** @return known AgriFoodFarmingJobStatus values. */ - public static Collection values() { - return values(AgriFoodFarmingJobStatus.class); - } -} diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AgriFoodFarmingPlantingDataChangedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AgriFoodFarmingPlantingDataChangedEventData.java deleted file mode 100644 index 8ecc13b9134d..000000000000 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AgriFoodFarmingPlantingDataChangedEventData.java +++ /dev/null @@ -1,307 +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.messaging.eventgrid.systemevents; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.time.OffsetDateTime; -import java.util.Map; - -/** Schema of the Data property of an EventGridEvent for a Microsoft.AgFoodPlatform.PlantingDataChanged event. */ -@Fluent -public final class AgriFoodFarmingPlantingDataChangedEventData { - /* - * Action occurred on a resource. - */ - @JsonProperty(value = "actionType") - private AgriFoodFarmingResourceActionType actionType; - - /* - * Id of the farmer it belongs to. - */ - @JsonProperty(value = "farmerId") - private String farmerId; - - /* - * Status of the resource. - */ - @JsonProperty(value = "status") - private String status; - - /* - * Source of the farm operation data. - */ - @JsonProperty(value = "source") - private String source; - - /* - * Date-time when resource was last modified, sample format: - * yyyy-MM-ddTHH:mm:ssZ. - */ - @JsonProperty(value = "modifiedDateTime") - private OffsetDateTime modifiedDateTime; - - /* - * The ETag value to implement optimistic concurrency. - */ - @JsonProperty(value = "eTag") - private String eTag; - - /* - * Unique id of resource. - */ - @JsonProperty(value = "id") - private String id; - - /* - * Name to identify resource. - */ - @JsonProperty(value = "name") - private String name; - - /* - * Textual description of resource. - */ - @JsonProperty(value = "description") - private String description; - - /* - * Date-time when resource was created, sample format: - * yyyy-MM-ddTHH:mm:ssZ. - */ - @JsonProperty(value = "createdDateTime") - private OffsetDateTime createdDateTime; - - /* - * A list of key value pairs that describe the resource. - * Only string and numeral values are supported. - */ - @JsonProperty(value = "properties") - private Map properties; - - /** - * Get the actionType property: Action occurred on a resource. - * - * @return the actionType value. - */ - public AgriFoodFarmingResourceActionType getActionType() { - return this.actionType; - } - - /** - * Set the actionType property: Action occurred on a resource. - * - * @param actionType the actionType value to set. - * @return the AgriFoodFarmingPlantingDataChangedEventData object itself. - */ - public AgriFoodFarmingPlantingDataChangedEventData setActionType(AgriFoodFarmingResourceActionType actionType) { - this.actionType = actionType; - return this; - } - - /** - * Get the farmerId property: Id of the farmer it belongs to. - * - * @return the farmerId value. - */ - public String getFarmerId() { - return this.farmerId; - } - - /** - * Set the farmerId property: Id of the farmer it belongs to. - * - * @param farmerId the farmerId value to set. - * @return the AgriFoodFarmingPlantingDataChangedEventData object itself. - */ - public AgriFoodFarmingPlantingDataChangedEventData setFarmerId(String farmerId) { - this.farmerId = farmerId; - return this; - } - - /** - * Get the status property: Status of the resource. - * - * @return the status value. - */ - public String getStatus() { - return this.status; - } - - /** - * Set the status property: Status of the resource. - * - * @param status the status value to set. - * @return the AgriFoodFarmingPlantingDataChangedEventData object itself. - */ - public AgriFoodFarmingPlantingDataChangedEventData setStatus(String status) { - this.status = status; - return this; - } - - /** - * Get the source property: Source of the farm operation data. - * - * @return the source value. - */ - public String getSource() { - return this.source; - } - - /** - * Set the source property: Source of the farm operation data. - * - * @param source the source value to set. - * @return the AgriFoodFarmingPlantingDataChangedEventData object itself. - */ - public AgriFoodFarmingPlantingDataChangedEventData setSource(String source) { - this.source = source; - return this; - } - - /** - * Get the modifiedDateTime property: Date-time when resource was last modified, sample format: - * yyyy-MM-ddTHH:mm:ssZ. - * - * @return the modifiedDateTime value. - */ - public OffsetDateTime getModifiedDateTime() { - return this.modifiedDateTime; - } - - /** - * Set the modifiedDateTime property: Date-time when resource was last modified, sample format: - * yyyy-MM-ddTHH:mm:ssZ. - * - * @param modifiedDateTime the modifiedDateTime value to set. - * @return the AgriFoodFarmingPlantingDataChangedEventData object itself. - */ - public AgriFoodFarmingPlantingDataChangedEventData setModifiedDateTime(OffsetDateTime modifiedDateTime) { - this.modifiedDateTime = modifiedDateTime; - return this; - } - - /** - * Get the eTag property: The ETag value to implement optimistic concurrency. - * - * @return the eTag value. - */ - public String getETag() { - return this.eTag; - } - - /** - * Set the eTag property: The ETag value to implement optimistic concurrency. - * - * @param eTag the eTag value to set. - * @return the AgriFoodFarmingPlantingDataChangedEventData object itself. - */ - public AgriFoodFarmingPlantingDataChangedEventData setETag(String eTag) { - this.eTag = eTag; - return this; - } - - /** - * Get the id property: Unique id of resource. - * - * @return the id value. - */ - public String getId() { - return this.id; - } - - /** - * Set the id property: Unique id of resource. - * - * @param id the id value to set. - * @return the AgriFoodFarmingPlantingDataChangedEventData object itself. - */ - public AgriFoodFarmingPlantingDataChangedEventData setId(String id) { - this.id = id; - return this; - } - - /** - * Get the name property: Name to identify resource. - * - * @return the name value. - */ - public String getName() { - return this.name; - } - - /** - * Set the name property: Name to identify resource. - * - * @param name the name value to set. - * @return the AgriFoodFarmingPlantingDataChangedEventData object itself. - */ - public AgriFoodFarmingPlantingDataChangedEventData setName(String name) { - this.name = name; - return this; - } - - /** - * Get the description property: Textual description of resource. - * - * @return the description value. - */ - public String getDescription() { - return this.description; - } - - /** - * Set the description property: Textual description of resource. - * - * @param description the description value to set. - * @return the AgriFoodFarmingPlantingDataChangedEventData object itself. - */ - public AgriFoodFarmingPlantingDataChangedEventData setDescription(String description) { - this.description = description; - return this; - } - - /** - * Get the createdDateTime property: Date-time when resource was created, sample format: yyyy-MM-ddTHH:mm:ssZ. - * - * @return the createdDateTime value. - */ - public OffsetDateTime getCreatedDateTime() { - return this.createdDateTime; - } - - /** - * Set the createdDateTime property: Date-time when resource was created, sample format: yyyy-MM-ddTHH:mm:ssZ. - * - * @param createdDateTime the createdDateTime value to set. - * @return the AgriFoodFarmingPlantingDataChangedEventData object itself. - */ - public AgriFoodFarmingPlantingDataChangedEventData setCreatedDateTime(OffsetDateTime createdDateTime) { - this.createdDateTime = createdDateTime; - return this; - } - - /** - * Get the properties property: A list of key value pairs that describe the resource. Only string and numeral values - * are supported. - * - * @return the properties value. - */ - public Map getProperties() { - return this.properties; - } - - /** - * Set the properties property: A list of key value pairs that describe the resource. Only string and numeral values - * are supported. - * - * @param properties the properties value to set. - * @return the AgriFoodFarmingPlantingDataChangedEventData object itself. - */ - public AgriFoodFarmingPlantingDataChangedEventData setProperties(Map properties) { - this.properties = properties; - return this; - } -} diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AgriFoodFarmingResourceActionType.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AgriFoodFarmingResourceActionType.java deleted file mode 100644 index 9c32c05ac5a0..000000000000 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AgriFoodFarmingResourceActionType.java +++ /dev/null @@ -1,37 +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.messaging.eventgrid.systemevents; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for AgriFoodFarmingResourceActionType. */ -public final class AgriFoodFarmingResourceActionType extends ExpandableStringEnum { - /** Static value Created for AgriFoodFarmingResourceActionType. */ - public static final AgriFoodFarmingResourceActionType CREATED = fromString("Created"); - - /** Static value Updated for AgriFoodFarmingResourceActionType. */ - public static final AgriFoodFarmingResourceActionType UPDATED = fromString("Updated"); - - /** Static value Deleted for AgriFoodFarmingResourceActionType. */ - public static final AgriFoodFarmingResourceActionType DELETED = fromString("Deleted"); - - /** - * Creates or finds a AgriFoodFarmingResourceActionType from its string representation. - * - * @param name a name to look for. - * @return the corresponding AgriFoodFarmingResourceActionType. - */ - @JsonCreator - public static AgriFoodFarmingResourceActionType fromString(String name) { - return fromString(name, AgriFoodFarmingResourceActionType.class); - } - - /** @return known AgriFoodFarmingResourceActionType values. */ - public static Collection values() { - return values(AgriFoodFarmingResourceActionType.class); - } -} diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AgriFoodFarmingSatelliteDataIngestionJobStatusChangedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AgriFoodFarmingSatelliteDataIngestionJobStatusChangedEventData.java deleted file mode 100644 index b02d5257be1f..000000000000 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AgriFoodFarmingSatelliteDataIngestionJobStatusChangedEventData.java +++ /dev/null @@ -1,288 +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.messaging.eventgrid.systemevents; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.time.OffsetDateTime; -import java.util.Map; - -/** - * Schema of the Data property of an EventGridEvent for a - * Microsoft.AgFoodPlatform.SatelliteDataIngestionJobStatusChanged event. - */ -@Fluent -public final class AgriFoodFarmingSatelliteDataIngestionJobStatusChangedEventData { - /* - * Farmer id for which job was created. - */ - @JsonProperty(value = "farmerId") - private String farmerId; - - /* - * Status message to capture more details of the job. - */ - @JsonProperty(value = "message") - private String message; - - /* - * Various states a job can be in. - */ - @JsonProperty(value = "status") - private AgriFoodFarmingJobStatus status; - - /* - * Date-time when last action was taken on job, sample format: - * yyyy-MM-ddTHH:mm:ssZ. - */ - @JsonProperty(value = "lastActionDateTime") - private OffsetDateTime lastActionDateTime; - - /* - * Flag that gets set when job cancellation is requested. - */ - @JsonProperty(value = "isCancellationRequested") - private Boolean isCancellationRequested; - - /* - * Unique id of resource. - */ - @JsonProperty(value = "id") - private String id; - - /* - * Name to identify resource. - */ - @JsonProperty(value = "name") - private String name; - - /* - * Textual description of resource. - */ - @JsonProperty(value = "description") - private String description; - - /* - * Date-time when resource was created, sample format: - * yyyy-MM-ddTHH:mm:ssZ. - */ - @JsonProperty(value = "createdDateTime") - private OffsetDateTime createdDateTime; - - /* - * A list of key value pairs that describe the resource. - * Only string and numeral values are supported. - */ - @JsonProperty(value = "properties") - private Map properties; - - /** - * Get the farmerId property: Farmer id for which job was created. - * - * @return the farmerId value. - */ - public String getFarmerId() { - return this.farmerId; - } - - /** - * Set the farmerId property: Farmer id for which job was created. - * - * @param farmerId the farmerId value to set. - * @return the AgriFoodFarmingSatelliteDataIngestionJobStatusChangedEventData object itself. - */ - public AgriFoodFarmingSatelliteDataIngestionJobStatusChangedEventData setFarmerId(String farmerId) { - this.farmerId = farmerId; - return this; - } - - /** - * Get the message property: Status message to capture more details of the job. - * - * @return the message value. - */ - public String getMessage() { - return this.message; - } - - /** - * Set the message property: Status message to capture more details of the job. - * - * @param message the message value to set. - * @return the AgriFoodFarmingSatelliteDataIngestionJobStatusChangedEventData object itself. - */ - public AgriFoodFarmingSatelliteDataIngestionJobStatusChangedEventData setMessage(String message) { - this.message = message; - return this; - } - - /** - * Get the status property: Various states a job can be in. - * - * @return the status value. - */ - public AgriFoodFarmingJobStatus getStatus() { - return this.status; - } - - /** - * Set the status property: Various states a job can be in. - * - * @param status the status value to set. - * @return the AgriFoodFarmingSatelliteDataIngestionJobStatusChangedEventData object itself. - */ - public AgriFoodFarmingSatelliteDataIngestionJobStatusChangedEventData setStatus(AgriFoodFarmingJobStatus status) { - this.status = status; - return this; - } - - /** - * Get the lastActionDateTime property: Date-time when last action was taken on job, sample format: - * yyyy-MM-ddTHH:mm:ssZ. - * - * @return the lastActionDateTime value. - */ - public OffsetDateTime getLastActionDateTime() { - return this.lastActionDateTime; - } - - /** - * Set the lastActionDateTime property: Date-time when last action was taken on job, sample format: - * yyyy-MM-ddTHH:mm:ssZ. - * - * @param lastActionDateTime the lastActionDateTime value to set. - * @return the AgriFoodFarmingSatelliteDataIngestionJobStatusChangedEventData object itself. - */ - public AgriFoodFarmingSatelliteDataIngestionJobStatusChangedEventData setLastActionDateTime( - OffsetDateTime lastActionDateTime) { - this.lastActionDateTime = lastActionDateTime; - return this; - } - - /** - * Get the isCancellationRequested property: Flag that gets set when job cancellation is requested. - * - * @return the isCancellationRequested value. - */ - public Boolean isCancellationRequested() { - return this.isCancellationRequested; - } - - /** - * Set the isCancellationRequested property: Flag that gets set when job cancellation is requested. - * - * @param isCancellationRequested the isCancellationRequested value to set. - * @return the AgriFoodFarmingSatelliteDataIngestionJobStatusChangedEventData object itself. - */ - public AgriFoodFarmingSatelliteDataIngestionJobStatusChangedEventData setIsCancellationRequested( - Boolean isCancellationRequested) { - this.isCancellationRequested = isCancellationRequested; - return this; - } - - /** - * Get the id property: Unique id of resource. - * - * @return the id value. - */ - public String getId() { - return this.id; - } - - /** - * Set the id property: Unique id of resource. - * - * @param id the id value to set. - * @return the AgriFoodFarmingSatelliteDataIngestionJobStatusChangedEventData object itself. - */ - public AgriFoodFarmingSatelliteDataIngestionJobStatusChangedEventData setId(String id) { - this.id = id; - return this; - } - - /** - * Get the name property: Name to identify resource. - * - * @return the name value. - */ - public String getName() { - return this.name; - } - - /** - * Set the name property: Name to identify resource. - * - * @param name the name value to set. - * @return the AgriFoodFarmingSatelliteDataIngestionJobStatusChangedEventData object itself. - */ - public AgriFoodFarmingSatelliteDataIngestionJobStatusChangedEventData setName(String name) { - this.name = name; - return this; - } - - /** - * Get the description property: Textual description of resource. - * - * @return the description value. - */ - public String getDescription() { - return this.description; - } - - /** - * Set the description property: Textual description of resource. - * - * @param description the description value to set. - * @return the AgriFoodFarmingSatelliteDataIngestionJobStatusChangedEventData object itself. - */ - public AgriFoodFarmingSatelliteDataIngestionJobStatusChangedEventData setDescription(String description) { - this.description = description; - return this; - } - - /** - * Get the createdDateTime property: Date-time when resource was created, sample format: yyyy-MM-ddTHH:mm:ssZ. - * - * @return the createdDateTime value. - */ - public OffsetDateTime getCreatedDateTime() { - return this.createdDateTime; - } - - /** - * Set the createdDateTime property: Date-time when resource was created, sample format: yyyy-MM-ddTHH:mm:ssZ. - * - * @param createdDateTime the createdDateTime value to set. - * @return the AgriFoodFarmingSatelliteDataIngestionJobStatusChangedEventData object itself. - */ - public AgriFoodFarmingSatelliteDataIngestionJobStatusChangedEventData setCreatedDateTime( - OffsetDateTime createdDateTime) { - this.createdDateTime = createdDateTime; - return this; - } - - /** - * Get the properties property: A list of key value pairs that describe the resource. Only string and numeral values - * are supported. - * - * @return the properties value. - */ - public Map getProperties() { - return this.properties; - } - - /** - * Set the properties property: A list of key value pairs that describe the resource. Only string and numeral values - * are supported. - * - * @param properties the properties value to set. - * @return the AgriFoodFarmingSatelliteDataIngestionJobStatusChangedEventData object itself. - */ - public AgriFoodFarmingSatelliteDataIngestionJobStatusChangedEventData setProperties( - Map properties) { - this.properties = properties; - return this; - } -} diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AgriFoodFarmingSeasonChangedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AgriFoodFarmingSeasonChangedEventData.java deleted file mode 100644 index 3b1f73825718..000000000000 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AgriFoodFarmingSeasonChangedEventData.java +++ /dev/null @@ -1,255 +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.messaging.eventgrid.systemevents; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.time.OffsetDateTime; -import java.util.Map; - -/** Schema of the Data property of an EventGridEvent for a Microsoft.AgFoodPlatform.SeasonChanged event. */ -@Fluent -public final class AgriFoodFarmingSeasonChangedEventData { - /* - * Action occurred on a resource. - */ - @JsonProperty(value = "actionType") - private AgriFoodFarmingResourceActionType actionType; - - /* - * Status of the resource. - */ - @JsonProperty(value = "status") - private String status; - - /* - * Date-time when resource was last modified, sample format: - * yyyy-MM-ddTHH:mm:ssZ. - */ - @JsonProperty(value = "modifiedDateTime") - private OffsetDateTime modifiedDateTime; - - /* - * The ETag value to implement optimistic concurrency. - */ - @JsonProperty(value = "eTag") - private String eTag; - - /* - * Unique id of resource. - */ - @JsonProperty(value = "id") - private String id; - - /* - * Name to identify resource. - */ - @JsonProperty(value = "name") - private String name; - - /* - * Textual description of resource. - */ - @JsonProperty(value = "description") - private String description; - - /* - * Date-time when resource was created, sample format: - * yyyy-MM-ddTHH:mm:ssZ. - */ - @JsonProperty(value = "createdDateTime") - private OffsetDateTime createdDateTime; - - /* - * A list of key value pairs that describe the resource. - * Only string and numeral values are supported. - */ - @JsonProperty(value = "properties") - private Map properties; - - /** - * Get the actionType property: Action occurred on a resource. - * - * @return the actionType value. - */ - public AgriFoodFarmingResourceActionType getActionType() { - return this.actionType; - } - - /** - * Set the actionType property: Action occurred on a resource. - * - * @param actionType the actionType value to set. - * @return the AgriFoodFarmingSeasonChangedEventData object itself. - */ - public AgriFoodFarmingSeasonChangedEventData setActionType(AgriFoodFarmingResourceActionType actionType) { - this.actionType = actionType; - return this; - } - - /** - * Get the status property: Status of the resource. - * - * @return the status value. - */ - public String getStatus() { - return this.status; - } - - /** - * Set the status property: Status of the resource. - * - * @param status the status value to set. - * @return the AgriFoodFarmingSeasonChangedEventData object itself. - */ - public AgriFoodFarmingSeasonChangedEventData setStatus(String status) { - this.status = status; - return this; - } - - /** - * Get the modifiedDateTime property: Date-time when resource was last modified, sample format: - * yyyy-MM-ddTHH:mm:ssZ. - * - * @return the modifiedDateTime value. - */ - public OffsetDateTime getModifiedDateTime() { - return this.modifiedDateTime; - } - - /** - * Set the modifiedDateTime property: Date-time when resource was last modified, sample format: - * yyyy-MM-ddTHH:mm:ssZ. - * - * @param modifiedDateTime the modifiedDateTime value to set. - * @return the AgriFoodFarmingSeasonChangedEventData object itself. - */ - public AgriFoodFarmingSeasonChangedEventData setModifiedDateTime(OffsetDateTime modifiedDateTime) { - this.modifiedDateTime = modifiedDateTime; - return this; - } - - /** - * Get the eTag property: The ETag value to implement optimistic concurrency. - * - * @return the eTag value. - */ - public String getETag() { - return this.eTag; - } - - /** - * Set the eTag property: The ETag value to implement optimistic concurrency. - * - * @param eTag the eTag value to set. - * @return the AgriFoodFarmingSeasonChangedEventData object itself. - */ - public AgriFoodFarmingSeasonChangedEventData setETag(String eTag) { - this.eTag = eTag; - return this; - } - - /** - * Get the id property: Unique id of resource. - * - * @return the id value. - */ - public String getId() { - return this.id; - } - - /** - * Set the id property: Unique id of resource. - * - * @param id the id value to set. - * @return the AgriFoodFarmingSeasonChangedEventData object itself. - */ - public AgriFoodFarmingSeasonChangedEventData setId(String id) { - this.id = id; - return this; - } - - /** - * Get the name property: Name to identify resource. - * - * @return the name value. - */ - public String getName() { - return this.name; - } - - /** - * Set the name property: Name to identify resource. - * - * @param name the name value to set. - * @return the AgriFoodFarmingSeasonChangedEventData object itself. - */ - public AgriFoodFarmingSeasonChangedEventData setName(String name) { - this.name = name; - return this; - } - - /** - * Get the description property: Textual description of resource. - * - * @return the description value. - */ - public String getDescription() { - return this.description; - } - - /** - * Set the description property: Textual description of resource. - * - * @param description the description value to set. - * @return the AgriFoodFarmingSeasonChangedEventData object itself. - */ - public AgriFoodFarmingSeasonChangedEventData setDescription(String description) { - this.description = description; - return this; - } - - /** - * Get the createdDateTime property: Date-time when resource was created, sample format: yyyy-MM-ddTHH:mm:ssZ. - * - * @return the createdDateTime value. - */ - public OffsetDateTime getCreatedDateTime() { - return this.createdDateTime; - } - - /** - * Set the createdDateTime property: Date-time when resource was created, sample format: yyyy-MM-ddTHH:mm:ssZ. - * - * @param createdDateTime the createdDateTime value to set. - * @return the AgriFoodFarmingSeasonChangedEventData object itself. - */ - public AgriFoodFarmingSeasonChangedEventData setCreatedDateTime(OffsetDateTime createdDateTime) { - this.createdDateTime = createdDateTime; - return this; - } - - /** - * Get the properties property: A list of key value pairs that describe the resource. Only string and numeral values - * are supported. - * - * @return the properties value. - */ - public Map getProperties() { - return this.properties; - } - - /** - * Set the properties property: A list of key value pairs that describe the resource. Only string and numeral values - * are supported. - * - * @param properties the properties value to set. - * @return the AgriFoodFarmingSeasonChangedEventData object itself. - */ - public AgriFoodFarmingSeasonChangedEventData setProperties(Map properties) { - this.properties = properties; - return this; - } -} diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AgriFoodFarmingSeasonalFieldChangedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AgriFoodFarmingSeasonalFieldChangedEventData.java deleted file mode 100644 index 653cf1a78a65..000000000000 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AgriFoodFarmingSeasonalFieldChangedEventData.java +++ /dev/null @@ -1,359 +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.messaging.eventgrid.systemevents; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.time.OffsetDateTime; -import java.util.Map; - -/** Schema of the Data property of an EventGridEvent for a Microsoft.AgFoodPlatform.SeasonalFieldChanged event. */ -@Fluent -public final class AgriFoodFarmingSeasonalFieldChangedEventData { - /* - * Id of the farmer it belongs to. - */ - @JsonProperty(value = "farmerId") - private String farmerId; - - /* - * Id of the season it belongs to. - */ - @JsonProperty(value = "seasonId") - private String seasonId; - - /* - * Id of the field it belongs to. - */ - @JsonProperty(value = "fieldId") - private String fieldId; - - /* - * Id of the associated Farm. - */ - @JsonProperty(value = "farmId") - private String farmId; - - /* - * Action occurred on a resource. - */ - @JsonProperty(value = "actionType") - private AgriFoodFarmingResourceActionType actionType; - - /* - * Status of the resource. - */ - @JsonProperty(value = "status") - private String status; - - /* - * Date-time when resource was last modified, sample format: - * yyyy-MM-ddTHH:mm:ssZ. - */ - @JsonProperty(value = "modifiedDateTime") - private OffsetDateTime modifiedDateTime; - - /* - * The ETag value to implement optimistic concurrency. - */ - @JsonProperty(value = "eTag") - private String eTag; - - /* - * Unique id of resource. - */ - @JsonProperty(value = "id") - private String id; - - /* - * Name to identify resource. - */ - @JsonProperty(value = "name") - private String name; - - /* - * Textual description of resource. - */ - @JsonProperty(value = "description") - private String description; - - /* - * Date-time when resource was created, sample format: - * yyyy-MM-ddTHH:mm:ssZ. - */ - @JsonProperty(value = "createdDateTime") - private OffsetDateTime createdDateTime; - - /* - * A list of key value pairs that describe the resource. - * Only string and numeral values are supported. - */ - @JsonProperty(value = "properties") - private Map properties; - - /** - * Get the farmerId property: Id of the farmer it belongs to. - * - * @return the farmerId value. - */ - public String getFarmerId() { - return this.farmerId; - } - - /** - * Set the farmerId property: Id of the farmer it belongs to. - * - * @param farmerId the farmerId value to set. - * @return the AgriFoodFarmingSeasonalFieldChangedEventData object itself. - */ - public AgriFoodFarmingSeasonalFieldChangedEventData setFarmerId(String farmerId) { - this.farmerId = farmerId; - return this; - } - - /** - * Get the seasonId property: Id of the season it belongs to. - * - * @return the seasonId value. - */ - public String getSeasonId() { - return this.seasonId; - } - - /** - * Set the seasonId property: Id of the season it belongs to. - * - * @param seasonId the seasonId value to set. - * @return the AgriFoodFarmingSeasonalFieldChangedEventData object itself. - */ - public AgriFoodFarmingSeasonalFieldChangedEventData setSeasonId(String seasonId) { - this.seasonId = seasonId; - return this; - } - - /** - * Get the fieldId property: Id of the field it belongs to. - * - * @return the fieldId value. - */ - public String getFieldId() { - return this.fieldId; - } - - /** - * Set the fieldId property: Id of the field it belongs to. - * - * @param fieldId the fieldId value to set. - * @return the AgriFoodFarmingSeasonalFieldChangedEventData object itself. - */ - public AgriFoodFarmingSeasonalFieldChangedEventData setFieldId(String fieldId) { - this.fieldId = fieldId; - return this; - } - - /** - * Get the farmId property: Id of the associated Farm. - * - * @return the farmId value. - */ - public String getFarmId() { - return this.farmId; - } - - /** - * Set the farmId property: Id of the associated Farm. - * - * @param farmId the farmId value to set. - * @return the AgriFoodFarmingSeasonalFieldChangedEventData object itself. - */ - public AgriFoodFarmingSeasonalFieldChangedEventData setFarmId(String farmId) { - this.farmId = farmId; - return this; - } - - /** - * Get the actionType property: Action occurred on a resource. - * - * @return the actionType value. - */ - public AgriFoodFarmingResourceActionType getActionType() { - return this.actionType; - } - - /** - * Set the actionType property: Action occurred on a resource. - * - * @param actionType the actionType value to set. - * @return the AgriFoodFarmingSeasonalFieldChangedEventData object itself. - */ - public AgriFoodFarmingSeasonalFieldChangedEventData setActionType(AgriFoodFarmingResourceActionType actionType) { - this.actionType = actionType; - return this; - } - - /** - * Get the status property: Status of the resource. - * - * @return the status value. - */ - public String getStatus() { - return this.status; - } - - /** - * Set the status property: Status of the resource. - * - * @param status the status value to set. - * @return the AgriFoodFarmingSeasonalFieldChangedEventData object itself. - */ - public AgriFoodFarmingSeasonalFieldChangedEventData setStatus(String status) { - this.status = status; - return this; - } - - /** - * Get the modifiedDateTime property: Date-time when resource was last modified, sample format: - * yyyy-MM-ddTHH:mm:ssZ. - * - * @return the modifiedDateTime value. - */ - public OffsetDateTime getModifiedDateTime() { - return this.modifiedDateTime; - } - - /** - * Set the modifiedDateTime property: Date-time when resource was last modified, sample format: - * yyyy-MM-ddTHH:mm:ssZ. - * - * @param modifiedDateTime the modifiedDateTime value to set. - * @return the AgriFoodFarmingSeasonalFieldChangedEventData object itself. - */ - public AgriFoodFarmingSeasonalFieldChangedEventData setModifiedDateTime(OffsetDateTime modifiedDateTime) { - this.modifiedDateTime = modifiedDateTime; - return this; - } - - /** - * Get the eTag property: The ETag value to implement optimistic concurrency. - * - * @return the eTag value. - */ - public String getETag() { - return this.eTag; - } - - /** - * Set the eTag property: The ETag value to implement optimistic concurrency. - * - * @param eTag the eTag value to set. - * @return the AgriFoodFarmingSeasonalFieldChangedEventData object itself. - */ - public AgriFoodFarmingSeasonalFieldChangedEventData setETag(String eTag) { - this.eTag = eTag; - return this; - } - - /** - * Get the id property: Unique id of resource. - * - * @return the id value. - */ - public String getId() { - return this.id; - } - - /** - * Set the id property: Unique id of resource. - * - * @param id the id value to set. - * @return the AgriFoodFarmingSeasonalFieldChangedEventData object itself. - */ - public AgriFoodFarmingSeasonalFieldChangedEventData setId(String id) { - this.id = id; - return this; - } - - /** - * Get the name property: Name to identify resource. - * - * @return the name value. - */ - public String getName() { - return this.name; - } - - /** - * Set the name property: Name to identify resource. - * - * @param name the name value to set. - * @return the AgriFoodFarmingSeasonalFieldChangedEventData object itself. - */ - public AgriFoodFarmingSeasonalFieldChangedEventData setName(String name) { - this.name = name; - return this; - } - - /** - * Get the description property: Textual description of resource. - * - * @return the description value. - */ - public String getDescription() { - return this.description; - } - - /** - * Set the description property: Textual description of resource. - * - * @param description the description value to set. - * @return the AgriFoodFarmingSeasonalFieldChangedEventData object itself. - */ - public AgriFoodFarmingSeasonalFieldChangedEventData setDescription(String description) { - this.description = description; - return this; - } - - /** - * Get the createdDateTime property: Date-time when resource was created, sample format: yyyy-MM-ddTHH:mm:ssZ. - * - * @return the createdDateTime value. - */ - public OffsetDateTime getCreatedDateTime() { - return this.createdDateTime; - } - - /** - * Set the createdDateTime property: Date-time when resource was created, sample format: yyyy-MM-ddTHH:mm:ssZ. - * - * @param createdDateTime the createdDateTime value to set. - * @return the AgriFoodFarmingSeasonalFieldChangedEventData object itself. - */ - public AgriFoodFarmingSeasonalFieldChangedEventData setCreatedDateTime(OffsetDateTime createdDateTime) { - this.createdDateTime = createdDateTime; - return this; - } - - /** - * Get the properties property: A list of key value pairs that describe the resource. Only string and numeral values - * are supported. - * - * @return the properties value. - */ - public Map getProperties() { - return this.properties; - } - - /** - * Set the properties property: A list of key value pairs that describe the resource. Only string and numeral values - * are supported. - * - * @param properties the properties value to set. - * @return the AgriFoodFarmingSeasonalFieldChangedEventData object itself. - */ - public AgriFoodFarmingSeasonalFieldChangedEventData setProperties(Map properties) { - this.properties = properties; - return this; - } -} diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AgriFoodFarmingTillageDataChangedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AgriFoodFarmingTillageDataChangedEventData.java deleted file mode 100644 index f5c7fededa91..000000000000 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AgriFoodFarmingTillageDataChangedEventData.java +++ /dev/null @@ -1,307 +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.messaging.eventgrid.systemevents; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.time.OffsetDateTime; -import java.util.Map; - -/** Schema of the Data property of an EventGridEvent for a Microsoft.AgFoodPlatform.TillageDataChanged event. */ -@Fluent -public final class AgriFoodFarmingTillageDataChangedEventData { - /* - * Action occurred on a resource. - */ - @JsonProperty(value = "actionType") - private AgriFoodFarmingResourceActionType actionType; - - /* - * Id of the farmer it belongs to. - */ - @JsonProperty(value = "farmerId") - private String farmerId; - - /* - * Status of the resource. - */ - @JsonProperty(value = "status") - private String status; - - /* - * Source of the farm operation data. - */ - @JsonProperty(value = "source") - private String source; - - /* - * Date-time when resource was last modified, sample format: - * yyyy-MM-ddTHH:mm:ssZ. - */ - @JsonProperty(value = "modifiedDateTime") - private OffsetDateTime modifiedDateTime; - - /* - * The ETag value to implement optimistic concurrency. - */ - @JsonProperty(value = "eTag") - private String eTag; - - /* - * Unique id of resource. - */ - @JsonProperty(value = "id") - private String id; - - /* - * Name to identify resource. - */ - @JsonProperty(value = "name") - private String name; - - /* - * Textual description of resource. - */ - @JsonProperty(value = "description") - private String description; - - /* - * Date-time when resource was created, sample format: - * yyyy-MM-ddTHH:mm:ssZ. - */ - @JsonProperty(value = "createdDateTime") - private OffsetDateTime createdDateTime; - - /* - * A list of key value pairs that describe the resource. - * Only string and numeral values are supported. - */ - @JsonProperty(value = "properties") - private Map properties; - - /** - * Get the actionType property: Action occurred on a resource. - * - * @return the actionType value. - */ - public AgriFoodFarmingResourceActionType getActionType() { - return this.actionType; - } - - /** - * Set the actionType property: Action occurred on a resource. - * - * @param actionType the actionType value to set. - * @return the AgriFoodFarmingTillageDataChangedEventData object itself. - */ - public AgriFoodFarmingTillageDataChangedEventData setActionType(AgriFoodFarmingResourceActionType actionType) { - this.actionType = actionType; - return this; - } - - /** - * Get the farmerId property: Id of the farmer it belongs to. - * - * @return the farmerId value. - */ - public String getFarmerId() { - return this.farmerId; - } - - /** - * Set the farmerId property: Id of the farmer it belongs to. - * - * @param farmerId the farmerId value to set. - * @return the AgriFoodFarmingTillageDataChangedEventData object itself. - */ - public AgriFoodFarmingTillageDataChangedEventData setFarmerId(String farmerId) { - this.farmerId = farmerId; - return this; - } - - /** - * Get the status property: Status of the resource. - * - * @return the status value. - */ - public String getStatus() { - return this.status; - } - - /** - * Set the status property: Status of the resource. - * - * @param status the status value to set. - * @return the AgriFoodFarmingTillageDataChangedEventData object itself. - */ - public AgriFoodFarmingTillageDataChangedEventData setStatus(String status) { - this.status = status; - return this; - } - - /** - * Get the source property: Source of the farm operation data. - * - * @return the source value. - */ - public String getSource() { - return this.source; - } - - /** - * Set the source property: Source of the farm operation data. - * - * @param source the source value to set. - * @return the AgriFoodFarmingTillageDataChangedEventData object itself. - */ - public AgriFoodFarmingTillageDataChangedEventData setSource(String source) { - this.source = source; - return this; - } - - /** - * Get the modifiedDateTime property: Date-time when resource was last modified, sample format: - * yyyy-MM-ddTHH:mm:ssZ. - * - * @return the modifiedDateTime value. - */ - public OffsetDateTime getModifiedDateTime() { - return this.modifiedDateTime; - } - - /** - * Set the modifiedDateTime property: Date-time when resource was last modified, sample format: - * yyyy-MM-ddTHH:mm:ssZ. - * - * @param modifiedDateTime the modifiedDateTime value to set. - * @return the AgriFoodFarmingTillageDataChangedEventData object itself. - */ - public AgriFoodFarmingTillageDataChangedEventData setModifiedDateTime(OffsetDateTime modifiedDateTime) { - this.modifiedDateTime = modifiedDateTime; - return this; - } - - /** - * Get the eTag property: The ETag value to implement optimistic concurrency. - * - * @return the eTag value. - */ - public String getETag() { - return this.eTag; - } - - /** - * Set the eTag property: The ETag value to implement optimistic concurrency. - * - * @param eTag the eTag value to set. - * @return the AgriFoodFarmingTillageDataChangedEventData object itself. - */ - public AgriFoodFarmingTillageDataChangedEventData setETag(String eTag) { - this.eTag = eTag; - return this; - } - - /** - * Get the id property: Unique id of resource. - * - * @return the id value. - */ - public String getId() { - return this.id; - } - - /** - * Set the id property: Unique id of resource. - * - * @param id the id value to set. - * @return the AgriFoodFarmingTillageDataChangedEventData object itself. - */ - public AgriFoodFarmingTillageDataChangedEventData setId(String id) { - this.id = id; - return this; - } - - /** - * Get the name property: Name to identify resource. - * - * @return the name value. - */ - public String getName() { - return this.name; - } - - /** - * Set the name property: Name to identify resource. - * - * @param name the name value to set. - * @return the AgriFoodFarmingTillageDataChangedEventData object itself. - */ - public AgriFoodFarmingTillageDataChangedEventData setName(String name) { - this.name = name; - return this; - } - - /** - * Get the description property: Textual description of resource. - * - * @return the description value. - */ - public String getDescription() { - return this.description; - } - - /** - * Set the description property: Textual description of resource. - * - * @param description the description value to set. - * @return the AgriFoodFarmingTillageDataChangedEventData object itself. - */ - public AgriFoodFarmingTillageDataChangedEventData setDescription(String description) { - this.description = description; - return this; - } - - /** - * Get the createdDateTime property: Date-time when resource was created, sample format: yyyy-MM-ddTHH:mm:ssZ. - * - * @return the createdDateTime value. - */ - public OffsetDateTime getCreatedDateTime() { - return this.createdDateTime; - } - - /** - * Set the createdDateTime property: Date-time when resource was created, sample format: yyyy-MM-ddTHH:mm:ssZ. - * - * @param createdDateTime the createdDateTime value to set. - * @return the AgriFoodFarmingTillageDataChangedEventData object itself. - */ - public AgriFoodFarmingTillageDataChangedEventData setCreatedDateTime(OffsetDateTime createdDateTime) { - this.createdDateTime = createdDateTime; - return this; - } - - /** - * Get the properties property: A list of key value pairs that describe the resource. Only string and numeral values - * are supported. - * - * @return the properties value. - */ - public Map getProperties() { - return this.properties; - } - - /** - * Set the properties property: A list of key value pairs that describe the resource. Only string and numeral values - * are supported. - * - * @param properties the properties value to set. - * @return the AgriFoodFarmingTillageDataChangedEventData object itself. - */ - public AgriFoodFarmingTillageDataChangedEventData setProperties(Map properties) { - this.properties = properties; - return this; - } -} diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AgriFoodFarmingWeatherDataIngestionJobStatusChangedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AgriFoodFarmingWeatherDataIngestionJobStatusChangedEventData.java deleted file mode 100644 index a343a3189178..000000000000 --- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AgriFoodFarmingWeatherDataIngestionJobStatusChangedEventData.java +++ /dev/null @@ -1,287 +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.messaging.eventgrid.systemevents; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.time.OffsetDateTime; -import java.util.Map; - -/** - * Schema of the Data property of an EventGridEvent for a Microsoft.AgFoodPlatform.WeatherDataIngestionJobStatusChanged - * event. - */ -@Fluent -public final class AgriFoodFarmingWeatherDataIngestionJobStatusChangedEventData { - /* - * Farmer id for which job was created. - */ - @JsonProperty(value = "farmerId") - private String farmerId; - - /* - * Status message to capture more details of the job. - */ - @JsonProperty(value = "message") - private String message; - - /* - * Various states a job can be in. - */ - @JsonProperty(value = "status") - private AgriFoodFarmingJobStatus status; - - /* - * Date-time when last action was taken on job, sample format: - * yyyy-MM-ddTHH:mm:ssZ. - */ - @JsonProperty(value = "lastActionDateTime") - private OffsetDateTime lastActionDateTime; - - /* - * Flag that gets set when job cancellation is requested. - */ - @JsonProperty(value = "isCancellationRequested") - private Boolean isCancellationRequested; - - /* - * Unique id of resource. - */ - @JsonProperty(value = "id") - private String id; - - /* - * Name to identify resource. - */ - @JsonProperty(value = "name") - private String name; - - /* - * Textual description of resource. - */ - @JsonProperty(value = "description") - private String description; - - /* - * Date-time when resource was created, sample format: - * yyyy-MM-ddTHH:mm:ssZ. - */ - @JsonProperty(value = "createdDateTime") - private OffsetDateTime createdDateTime; - - /* - * A list of key value pairs that describe the resource. - * Only string and numeral values are supported. - */ - @JsonProperty(value = "properties") - private Map properties; - - /** - * Get the farmerId property: Farmer id for which job was created. - * - * @return the farmerId value. - */ - public String getFarmerId() { - return this.farmerId; - } - - /** - * Set the farmerId property: Farmer id for which job was created. - * - * @param farmerId the farmerId value to set. - * @return the AgriFoodFarmingWeatherDataIngestionJobStatusChangedEventData object itself. - */ - public AgriFoodFarmingWeatherDataIngestionJobStatusChangedEventData setFarmerId(String farmerId) { - this.farmerId = farmerId; - return this; - } - - /** - * Get the message property: Status message to capture more details of the job. - * - * @return the message value. - */ - public String getMessage() { - return this.message; - } - - /** - * Set the message property: Status message to capture more details of the job. - * - * @param message the message value to set. - * @return the AgriFoodFarmingWeatherDataIngestionJobStatusChangedEventData object itself. - */ - public AgriFoodFarmingWeatherDataIngestionJobStatusChangedEventData setMessage(String message) { - this.message = message; - return this; - } - - /** - * Get the status property: Various states a job can be in. - * - * @return the status value. - */ - public AgriFoodFarmingJobStatus getStatus() { - return this.status; - } - - /** - * Set the status property: Various states a job can be in. - * - * @param status the status value to set. - * @return the AgriFoodFarmingWeatherDataIngestionJobStatusChangedEventData object itself. - */ - public AgriFoodFarmingWeatherDataIngestionJobStatusChangedEventData setStatus(AgriFoodFarmingJobStatus status) { - this.status = status; - return this; - } - - /** - * Get the lastActionDateTime property: Date-time when last action was taken on job, sample format: - * yyyy-MM-ddTHH:mm:ssZ. - * - * @return the lastActionDateTime value. - */ - public OffsetDateTime getLastActionDateTime() { - return this.lastActionDateTime; - } - - /** - * Set the lastActionDateTime property: Date-time when last action was taken on job, sample format: - * yyyy-MM-ddTHH:mm:ssZ. - * - * @param lastActionDateTime the lastActionDateTime value to set. - * @return the AgriFoodFarmingWeatherDataIngestionJobStatusChangedEventData object itself. - */ - public AgriFoodFarmingWeatherDataIngestionJobStatusChangedEventData setLastActionDateTime( - OffsetDateTime lastActionDateTime) { - this.lastActionDateTime = lastActionDateTime; - return this; - } - - /** - * Get the isCancellationRequested property: Flag that gets set when job cancellation is requested. - * - * @return the isCancellationRequested value. - */ - public Boolean isCancellationRequested() { - return this.isCancellationRequested; - } - - /** - * Set the isCancellationRequested property: Flag that gets set when job cancellation is requested. - * - * @param isCancellationRequested the isCancellationRequested value to set. - * @return the AgriFoodFarmingWeatherDataIngestionJobStatusChangedEventData object itself. - */ - public AgriFoodFarmingWeatherDataIngestionJobStatusChangedEventData setIsCancellationRequested( - Boolean isCancellationRequested) { - this.isCancellationRequested = isCancellationRequested; - return this; - } - - /** - * Get the id property: Unique id of resource. - * - * @return the id value. - */ - public String getId() { - return this.id; - } - - /** - * Set the id property: Unique id of resource. - * - * @param id the id value to set. - * @return the AgriFoodFarmingWeatherDataIngestionJobStatusChangedEventData object itself. - */ - public AgriFoodFarmingWeatherDataIngestionJobStatusChangedEventData setId(String id) { - this.id = id; - return this; - } - - /** - * Get the name property: Name to identify resource. - * - * @return the name value. - */ - public String getName() { - return this.name; - } - - /** - * Set the name property: Name to identify resource. - * - * @param name the name value to set. - * @return the AgriFoodFarmingWeatherDataIngestionJobStatusChangedEventData object itself. - */ - public AgriFoodFarmingWeatherDataIngestionJobStatusChangedEventData setName(String name) { - this.name = name; - return this; - } - - /** - * Get the description property: Textual description of resource. - * - * @return the description value. - */ - public String getDescription() { - return this.description; - } - - /** - * Set the description property: Textual description of resource. - * - * @param description the description value to set. - * @return the AgriFoodFarmingWeatherDataIngestionJobStatusChangedEventData object itself. - */ - public AgriFoodFarmingWeatherDataIngestionJobStatusChangedEventData setDescription(String description) { - this.description = description; - return this; - } - - /** - * Get the createdDateTime property: Date-time when resource was created, sample format: yyyy-MM-ddTHH:mm:ssZ. - * - * @return the createdDateTime value. - */ - public OffsetDateTime getCreatedDateTime() { - return this.createdDateTime; - } - - /** - * Set the createdDateTime property: Date-time when resource was created, sample format: yyyy-MM-ddTHH:mm:ssZ. - * - * @param createdDateTime the createdDateTime value to set. - * @return the AgriFoodFarmingWeatherDataIngestionJobStatusChangedEventData object itself. - */ - public AgriFoodFarmingWeatherDataIngestionJobStatusChangedEventData setCreatedDateTime( - OffsetDateTime createdDateTime) { - this.createdDateTime = createdDateTime; - return this; - } - - /** - * Get the properties property: A list of key value pairs that describe the resource. Only string and numeral values - * are supported. - * - * @return the properties value. - */ - public Map getProperties() { - return this.properties; - } - - /** - * Set the properties property: A list of key value pairs that describe the resource. Only string and numeral values - * are supported. - * - * @param properties the properties value to set. - * @return the AgriFoodFarmingWeatherDataIngestionJobStatusChangedEventData object itself. - */ - public AgriFoodFarmingWeatherDataIngestionJobStatusChangedEventData setProperties(Map properties) { - this.properties = properties; - return this; - } -} diff --git a/sdk/eventgrid/azure-messaging-eventgrid/swagger/README.md b/sdk/eventgrid/azure-messaging-eventgrid/swagger/README.md index 38600c35c771..7154dfb07c56 100644 --- a/sdk/eventgrid/azure-messaging-eventgrid/swagger/README.md +++ b/sdk/eventgrid/azure-messaging-eventgrid/swagger/README.md @@ -90,7 +90,6 @@ input-file: - https://raw.githubusercontent.com/Azure/azure-rest-api-specs/master/specification/eventgrid/data-plane/Microsoft.Web/stable/2018-01-01/Web.json - https://raw.githubusercontent.com/Azure/azure-rest-api-specs/master/specification/eventgrid/data-plane/Microsoft.Communication/stable/2018-01-01/AzureCommunicationServices.json - https://raw.githubusercontent.com/Azure/azure-rest-api-specs/master/specification/eventgrid/data-plane/Microsoft.PolicyInsights/stable/2018-01-01/PolicyInsights.json -- https://raw.githubusercontent.com/Azure/azure-rest-api-specs/master/specification/eventgrid/data-plane/Microsoft.AgFoodPlatform/stable/2018-01-01/AzureFarmBeats.json ``` ### Customization From cd2363de3921d8783f6a1662931ad649d54f655d Mon Sep 17 00:00:00 2001 From: Fabian Meiswinkel Date: Tue, 8 Jun 2021 18:49:25 +0000 Subject: [PATCH 19/21] Client throughput control: Deferring store invocation (#22144) * Dummy * Deferring teh request when ClinetThrouhgputControl is enabled * Client throughput control: defer store invocation * Adding additional test-coverage in throughput tests * Reacting to code review feedback. * Adding back createItem_withBulk test --- .../implementation/batch/BulkExecutor.java | 27 +++- .../directconnectivity/TransportClient.java | 4 +- .../com/azure/cosmos/CosmosBulkAsyncTest.java | 139 ++++++++++++++++-- .../ThroughputControlTests.java | 39 ++++- 4 files changed, 191 insertions(+), 18 deletions(-) diff --git a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/batch/BulkExecutor.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/batch/BulkExecutor.java index 4b2545e007e0..2d553dc524c9 100644 --- a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/batch/BulkExecutor.java +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/batch/BulkExecutor.java @@ -234,8 +234,7 @@ private Mono> handleTransactionalBatchOper return ((ItemBulkOperation) itemOperation).getRetryPolicy().shouldRetry(operationResult).flatMap( result -> { if (result.shouldRetry) { - groupSink.next(itemOperation); - return Mono.empty(); + return this.enqueueForRetry(result.backOffTime, groupSink, itemOperation); } else { return Mono.just(BridgeInternal.createCosmosBulkOperationResponse( itemOperation, cosmosBulkItemResponse, this.batchContext)); @@ -281,16 +280,31 @@ private Mono> handleTransactionalBatchExec return Mono.just(BridgeInternal.createCosmosBulkOperationResponse(itemOperation, exception, this.batchContext)); } + private Mono> enqueueForRetry( + Duration backOffTime, + FluxSink groupSink, + CosmosItemOperation itemOperation) { + + if (backOffTime == null || backOffTime.isZero()) { + groupSink.next(itemOperation); + return Mono.empty(); + } else { + return Mono + .delay(backOffTime) + .flatMap((dumm) -> { + groupSink.next(itemOperation); + return Mono.empty(); + }); + } + } + private Mono> retryOtherExceptions( CosmosItemOperation itemOperation, Exception exception, FluxSink groupSink, CosmosException cosmosException, ItemBulkOperation itemBulkOperation) { return itemBulkOperation.getRetryPolicy().shouldRetry(cosmosException).flatMap(result -> { if (result.shouldRetry) { - - groupSink.next(itemOperation); - return Mono.empty(); + return this.enqueueForRetry(result.backOffTime, groupSink, itemBulkOperation); } else { - return Mono.just(BridgeInternal.createCosmosBulkOperationResponse( itemOperation, exception, this.batchContext)); } @@ -298,7 +312,6 @@ private Mono> retryOtherExceptions( } private Mono executeBatchRequest(PartitionKeyRangeServerBatchRequest serverRequest) { - return this.docClientWrapper.executeBatchRequest( BridgeInternal.getLink(this.container), serverRequest, null, false); } diff --git a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/directconnectivity/TransportClient.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/directconnectivity/TransportClient.java index c077b2adc29f..5a5d40998fc8 100644 --- a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/directconnectivity/TransportClient.java +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/directconnectivity/TransportClient.java @@ -27,7 +27,9 @@ public Mono invokeResourceOperationAsync(Uri physicalAddress, RxD request.requestContext.resourcePhysicalAddress = physicalAddress.toString(); } if (this.throughputControlStore != null) { - return this.throughputControlStore.processRequest(request, this.invokeStoreAsync(physicalAddress, request)); + return this.throughputControlStore.processRequest( + request, + Mono.defer(() -> this.invokeStoreAsync(physicalAddress, request))); } return this.invokeStoreAsync(physicalAddress, request); diff --git a/sdk/cosmos/azure-cosmos/src/test/java/com/azure/cosmos/CosmosBulkAsyncTest.java b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/cosmos/CosmosBulkAsyncTest.java index 68f2f404260f..2e4525bc813f 100644 --- a/sdk/cosmos/azure-cosmos/src/test/java/com/azure/cosmos/CosmosBulkAsyncTest.java +++ b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/cosmos/CosmosBulkAsyncTest.java @@ -3,7 +3,9 @@ package com.azure.cosmos; +import com.azure.cosmos.models.CosmosContainerProperties; import com.azure.cosmos.models.PartitionKey; +import com.azure.cosmos.models.PartitionKeyDefinition; import io.netty.handler.codec.http.HttpResponseStatus; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -14,14 +16,12 @@ import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.List; -import java.util.Random; -import java.util.UUID; +import java.time.Duration; +import java.util.*; import java.util.concurrent.atomic.AtomicInteger; import static org.assertj.core.api.Assertions.assertThat; +import static org.assertj.core.api.Assertions.fail; public class CosmosBulkAsyncTest extends BatchTestBase { @@ -38,7 +38,10 @@ public CosmosBulkAsyncTest(CosmosClientBuilder clientBuilder) { @BeforeClass(groups = {"simple"}, timeOut = SETUP_TIMEOUT) public void before_CosmosBulkAsyncTest() { assertThat(this.bulkClient).isNull(); - this.bulkClient = getClientBuilder().buildAsyncClient(); + ThrottlingRetryOptions throttlingOptions = new ThrottlingRetryOptions() + .setMaxRetryAttemptsOnThrottledRequests(1000000) + .setMaxRetryWaitTime(Duration.ofDays(1)); + this.bulkClient = getClientBuilder().throttlingRetryOptions(throttlingOptions).buildAsyncClient(); bulkAsyncContainer = getSharedMultiPartitionCosmosContainer(this.bulkClient); } @@ -47,6 +50,75 @@ public void afterClass() { safeCloseAsync(this.bulkClient); } + @Test(groups = {"simple"}, timeOut = TIMEOUT) + public void createItem_withBulkAndThroughputControl() throws InterruptedException { + int totalRequest = getTotalRequest(180, 200); + + PartitionKeyDefinition pkDefinition = new PartitionKeyDefinition(); + pkDefinition.setPaths(Collections.singletonList("/mypk")); + CosmosAsyncContainer bulkAsyncContainerWithThroughputControl = createCollection( + this.bulkClient, + bulkAsyncContainer.getDatabase().getId(), + new CosmosContainerProperties(UUID.randomUUID().toString(), pkDefinition)); + + ThroughputControlGroupConfig groupConfig = new ThroughputControlGroupConfigBuilder() + .setGroupName("test-group") + .setTargetThroughputThreshold(0.2) + .setDefault(true) + .build(); + bulkAsyncContainerWithThroughputControl.enableLocalThroughputControlGroup(groupConfig); + + Flux cosmosItemOperationFlux = Flux.merge( + Flux.range(0, totalRequest).map(i -> { + String partitionKey = UUID.randomUUID().toString(); + TestDoc testDoc = this.populateTestDoc(partitionKey); + + return BulkOperations.getUpsertItemOperation(testDoc, new PartitionKey(partitionKey)); + }), + Flux.range(0, totalRequest).map(i -> { + String partitionKey = UUID.randomUUID().toString(); + EventDoc eventDoc = new EventDoc(UUID.randomUUID().toString(), 2, 4, "type1", partitionKey); + + return BulkOperations.getUpsertItemOperation(eventDoc, new PartitionKey(partitionKey)); + })); + + BulkProcessingOptions bulkProcessingOptions = new BulkProcessingOptions<>(); + bulkProcessingOptions.setMaxMicroBatchSize(100); + bulkProcessingOptions.setMaxMicroBatchConcurrency(5); + + try { + Flux> responseFlux = bulkAsyncContainerWithThroughputControl + .processBulkOperations(cosmosItemOperationFlux, bulkProcessingOptions); + + Thread.sleep(1000); + + AtomicInteger processedDoc = new AtomicInteger(0); + responseFlux + .flatMap((CosmosBulkOperationResponse cosmosBulkOperationResponse) -> { + + processedDoc.incrementAndGet(); + + CosmosBulkItemResponse cosmosBulkItemResponse = cosmosBulkOperationResponse.getResponse(); + if (cosmosBulkOperationResponse.getException() != null) { + logger.error("Bulk operation failed", cosmosBulkOperationResponse.getException()); + fail(cosmosBulkOperationResponse.getException().toString()); + } + assertThat(cosmosBulkItemResponse.getStatusCode()).isEqualTo(HttpResponseStatus.CREATED.code()); + assertThat(cosmosBulkItemResponse.getRequestCharge()).isGreaterThan(0); + assertThat(cosmosBulkItemResponse.getCosmosDiagnostics().toString()).isNotNull(); + assertThat(cosmosBulkItemResponse.getSessionToken()).isNotNull(); + assertThat(cosmosBulkItemResponse.getActivityId()).isNotNull(); + assertThat(cosmosBulkItemResponse.getRequestCharge()).isNotNull(); + + return Mono.just(cosmosBulkItemResponse); + }).blockLast(); + + assertThat(processedDoc.get()).isEqualTo(totalRequest * 2); + } finally { + bulkAsyncContainerWithThroughputControl.delete().block(); + } + } + @Test(groups = {"simple"}, timeOut = TIMEOUT) public void createItem_withBulk() { int totalRequest = getTotalRequest(); @@ -79,6 +151,11 @@ public void createItem_withBulk() { processedDoc.incrementAndGet(); CosmosBulkItemResponse cosmosBulkItemResponse = cosmosBulkOperationResponse.getResponse(); + if (cosmosBulkOperationResponse.getException() != null) { + logger.error("Bulk operation failed", cosmosBulkOperationResponse.getException()); + fail(cosmosBulkOperationResponse.getException().toString()); + } + assertThat(cosmosBulkItemResponse.getStatusCode()).isEqualTo(HttpResponseStatus.CREATED.code()); assertThat(cosmosBulkItemResponse.getRequestCharge()).isGreaterThan(0); assertThat(cosmosBulkItemResponse.getCosmosDiagnostics().toString()).isNotNull(); @@ -127,6 +204,10 @@ public void createItemMultipleTimesWithOperationOnFly_withBulk() { processedDoc.incrementAndGet(); CosmosBulkItemResponse cosmosBulkItemResponse = cosmosBulkOperationResponse.getResponse(); + if (cosmosBulkOperationResponse.getException() != null) { + logger.error("Bulk operation failed", cosmosBulkOperationResponse.getException()); + fail(cosmosBulkOperationResponse.getException().toString()); + } assertThat(cosmosBulkItemResponse.getStatusCode()).isEqualTo(HttpResponseStatus.CREATED.code()); assertThat(cosmosBulkItemResponse.getRequestCharge()).isGreaterThan(0); assertThat(cosmosBulkItemResponse.getCosmosDiagnostics().toString()).isNotNull(); @@ -150,6 +231,10 @@ public void createItemMultipleTimesWithOperationOnFly_withBulk() { processedDoc.incrementAndGet(); CosmosBulkItemResponse cosmosBulkItemResponse = cosmosBulkOperationResponse.getResponse(); + if (cosmosBulkOperationResponse.getException() != null) { + logger.error("Bulk operation failed", cosmosBulkOperationResponse.getException()); + fail(cosmosBulkOperationResponse.getException().toString()); + } assertThat(cosmosBulkItemResponse.getStatusCode()).isEqualTo(HttpResponseStatus.CREATED.code()); assertThat(cosmosBulkItemResponse.getRequestCharge()).isGreaterThan(0); assertThat(cosmosBulkItemResponse.getCosmosDiagnostics().toString()).isNotNull(); @@ -199,6 +284,10 @@ public void runCreateItemMultipleTimesWithFixedOperations_withBulk() { processedDoc.incrementAndGet(); CosmosBulkItemResponse cosmosBulkItemResponse = cosmosBulkOperationResponse.getResponse(); + if (cosmosBulkOperationResponse.getException() != null) { + logger.error("Bulk operation failed", cosmosBulkOperationResponse.getException()); + fail(cosmosBulkOperationResponse.getException().toString()); + } assertThat(cosmosBulkItemResponse.getStatusCode()).isEqualTo(HttpResponseStatus.CREATED.code()); assertThat(cosmosBulkItemResponse.getRequestCharge()).isGreaterThan(0); assertThat(cosmosBulkItemResponse.getCosmosDiagnostics().toString()).isNotNull(); @@ -224,6 +313,10 @@ public void runCreateItemMultipleTimesWithFixedOperations_withBulk() { processedDoc.incrementAndGet(); CosmosBulkItemResponse cosmosBulkItemResponse = cosmosBulkOperationResponse.getResponse(); + if (cosmosBulkOperationResponse.getException() != null) { + logger.error("Bulk operation failed", cosmosBulkOperationResponse.getException()); + fail(cosmosBulkOperationResponse.getException().toString()); + } assertThat(cosmosBulkItemResponse.getStatusCode()).isEqualTo(HttpResponseStatus.CONFLICT.code()); assertThat(cosmosBulkItemResponse.getRequestCharge()).isGreaterThan(0); assertThat(cosmosBulkItemResponse.getCosmosDiagnostics().toString()).isNotNull(); @@ -323,6 +416,10 @@ public void upsertItem_withbulk() { processedDoc.incrementAndGet(); CosmosBulkItemResponse cosmosBulkItemResponse = cosmosBulkOperationResponse.getResponse(); + if (cosmosBulkOperationResponse.getException() != null) { + logger.error("Bulk operation failed", cosmosBulkOperationResponse.getException()); + fail(cosmosBulkOperationResponse.getException().toString()); + } assertThat(cosmosBulkItemResponse.getStatusCode()).isEqualTo(HttpResponseStatus.CREATED.code()); assertThat(cosmosBulkItemResponse.getRequestCharge()).isGreaterThan(0); assertThat(cosmosBulkItemResponse.getCosmosDiagnostics().toString()).isNotNull(); @@ -344,7 +441,7 @@ public void upsertItem_withbulk() { @Test(groups = {"simple"}, timeOut = TIMEOUT) public void deleteItem_withBulk() { - int totalRequest = getTotalRequest(); + int totalRequest = Math.min(getTotalRequest(), 20); List cosmosItemOperations = new ArrayList<>(); @@ -376,6 +473,10 @@ public void deleteItem_withBulk() { processedDoc.incrementAndGet(); CosmosBulkItemResponse cosmosBulkItemResponse = cosmosBulkOperationResponse.getResponse(); + if (cosmosBulkOperationResponse.getException() != null) { + logger.error("Bulk operation failed", cosmosBulkOperationResponse.getException()); + fail(cosmosBulkOperationResponse.getException().toString()); + } assertThat(cosmosBulkItemResponse.getStatusCode()).isEqualTo(HttpResponseStatus.NO_CONTENT.code()); assertThat(cosmosBulkItemResponse.getRequestCharge()).isGreaterThan(0); assertThat(cosmosBulkItemResponse.getCosmosDiagnostics().toString()).isNotNull(); @@ -424,6 +525,10 @@ public void readItem_withBulk() { processedDoc.incrementAndGet(); CosmosBulkItemResponse cosmosBulkItemResponse = cosmosBulkOperationResponse.getResponse(); + if (cosmosBulkOperationResponse.getException() != null) { + logger.error("Bulk operation failed", cosmosBulkOperationResponse.getException()); + fail(cosmosBulkOperationResponse.getException().toString()); + } assertThat(cosmosBulkItemResponse.getStatusCode()).isEqualTo(HttpResponseStatus.OK.code()); assertThat(cosmosBulkItemResponse.getRequestCharge()).isGreaterThan(0); assertThat(cosmosBulkItemResponse.getCosmosDiagnostics().toString()).isNotNull(); @@ -477,6 +582,10 @@ public void readItemMultipleTimes_withBulk() { processedDoc.incrementAndGet(); CosmosBulkItemResponse cosmosBulkItemResponse = cosmosBulkOperationResponse.getResponse(); + if (cosmosBulkOperationResponse.getException() != null) { + logger.error("Bulk operation failed", cosmosBulkOperationResponse.getException()); + fail(cosmosBulkOperationResponse.getException().toString()); + } assertThat(cosmosBulkItemResponse.getStatusCode()).isEqualTo(HttpResponseStatus.OK.code()); assertThat(cosmosBulkItemResponse.getRequestCharge()).isGreaterThan(0); assertThat(cosmosBulkItemResponse.getCosmosDiagnostics().toString()).isNotNull(); @@ -539,6 +648,10 @@ public void replaceItem_withBulk() { processedDoc.incrementAndGet(); CosmosBulkItemResponse cosmosBulkItemResponse = cosmosBulkOperationResponse.getResponse(); + if (cosmosBulkOperationResponse.getException() != null) { + logger.error("Bulk operation failed", cosmosBulkOperationResponse.getException()); + fail(cosmosBulkOperationResponse.getException().toString()); + } assertThat(cosmosBulkItemResponse.getStatusCode()).isEqualTo(HttpResponseStatus.OK.code()); assertThat(cosmosBulkItemResponse.getRequestCharge()).isGreaterThan(0); assertThat(cosmosBulkItemResponse.getCosmosDiagnostics().toString()).isNotNull(); @@ -572,6 +685,10 @@ private void createItemsAndVerify(List cosmosItemOperations processedDoc.incrementAndGet(); CosmosBulkItemResponse cosmosBulkItemResponse = cosmosBulkOperationResponse.getResponse(); + if (cosmosBulkOperationResponse.getException() != null) { + logger.error("Bulk operation failed", cosmosBulkOperationResponse.getException()); + fail(cosmosBulkOperationResponse.getException().toString()); + } assertThat(cosmosBulkItemResponse.getStatusCode()).isEqualTo(HttpResponseStatus.CREATED.code()); assertThat(cosmosBulkItemResponse.getRequestCharge()).isGreaterThan(0); assertThat(cosmosBulkItemResponse.getCosmosDiagnostics().toString()).isNotNull(); @@ -595,10 +712,14 @@ private void createItemsAndVerify(List cosmosItemOperations assertThat(distinctIndex.size()).isEqualTo(cosmosItemOperations.size()); } - private int getTotalRequest() { - int countRequest = new Random().nextInt(100) + 200; + private int getTotalRequest(int min, int max) { + int countRequest = new Random().nextInt(max - min) + min; logger.info("Total count of request for this test case: " + countRequest); return countRequest; } + + private int getTotalRequest() { + return getTotalRequest(200, 300); + } } diff --git a/sdk/cosmos/azure-cosmos/src/test/java/com/azure/cosmos/implementation/throughputControl/ThroughputControlTests.java b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/cosmos/implementation/throughputControl/ThroughputControlTests.java index 11299512b8e3..679f6f3d021e 100644 --- a/sdk/cosmos/azure-cosmos/src/test/java/com/azure/cosmos/implementation/throughputControl/ThroughputControlTests.java +++ b/sdk/cosmos/azure-cosmos/src/test/java/com/azure/cosmos/implementation/throughputControl/ThroughputControlTests.java @@ -11,9 +11,10 @@ import com.azure.cosmos.CosmosClientBuilder; import com.azure.cosmos.CosmosDiagnostics; import com.azure.cosmos.CosmosException; +import com.azure.cosmos.GlobalThroughputControlConfig; import com.azure.cosmos.ThroughputControlGroupConfig; import com.azure.cosmos.ThroughputControlGroupConfigBuilder; -import com.azure.cosmos.GlobalThroughputControlConfig; +import com.azure.cosmos.implementation.FailureValidator; import com.azure.cosmos.implementation.OperationType; import com.azure.cosmos.implementation.apachecommons.lang.StringUtils; import com.azure.cosmos.models.CosmosChangeFeedRequestOptions; @@ -25,6 +26,7 @@ import com.azure.cosmos.models.FeedRange; import com.azure.cosmos.models.FeedResponse; import com.azure.cosmos.models.PartitionKey; +import com.azure.cosmos.rx.CosmosItemResponseValidator; import com.azure.cosmos.rx.TestSuiteBase; import org.testng.annotations.BeforeClass; import org.testng.annotations.DataProvider; @@ -184,6 +186,41 @@ public void throughputLocalControlForContainerCreateDeleteWithSameName(Operation BridgeInternal.getContextClient(client).getConnectionPolicy().getConnectionMode()); } + @Test(groups = {"emulator"}, timeOut = TIMEOUT) + public void throughputLocalControl_createItem() throws InterruptedException { + // The create document in this test usually takes around 6.29RU, pick a RU here relatively close, so to test throttled scenario + ThroughputControlGroupConfig groupConfig = + new ThroughputControlGroupConfigBuilder() + .setGroupName("group-" + UUID.randomUUID()) + .setTargetThroughput(6) + .build(); + + container.enableLocalThroughputControlGroup(groupConfig); + + CosmosItemRequestOptions requestOptions = new CosmosItemRequestOptions(); + requestOptions.setContentResponseOnWriteEnabled(true); + requestOptions.setThroughputControlGroupName(groupConfig.getGroupName()); + + CosmosItemResponse createItemResponse = container.createItem(getDocumentDefinition(), requestOptions).block(); + this.validateRequestNotThrottled( + createItemResponse.getDiagnostics().toString(), + BridgeInternal.getContextClient(client).getConnectionPolicy().getConnectionMode()); + + // second request to same group. which will get throttled + TestItem itemGetThrottled = getDocumentDefinition(createItemResponse.getItem().getMypk()); + FailureValidator failureValidator = new FailureValidator.Builder().statusCode(429).build(); + validateItemFailure(container.createItem(itemGetThrottled, requestOptions), failureValidator); + + Thread.sleep(500); + + // third request to create same item in step2 + // Make sure the request really get blocked in step2 + CosmosItemResponseValidator successValidator = new CosmosItemResponseValidator.Builder>() + .withId(itemGetThrottled.getId()) + .build(); + validateItemSuccess(container.createItem(itemGetThrottled), successValidator); + } + @BeforeClass(groups = { "emulator" }, timeOut = 4 * SETUP_TIMEOUT) public void before_ThroughputBudgetControllerTest() { client = getClientBuilder().buildAsyncClient(); From 5d276f1bd3d8e09f6aa0f1192433126e659e2a2d Mon Sep 17 00:00:00 2001 From: Azure SDK Bot <53356347+azure-sdk@users.noreply.github.com> Date: Tue, 8 Jun 2021 12:05:14 -0700 Subject: [PATCH 20/21] Sync eng/common directory with azure-sdk-tools for PR 1633 (#22145) * Update format of new Changelog Entry * Add parsing of changelog sections * Update ChangeLog Logic Co-authored-by: Chidozie Ononiwu --- eng/common/scripts/ChangeLog-Operations.ps1 | 29 +++++++++++++++++++-- 1 file changed, 27 insertions(+), 2 deletions(-) diff --git a/eng/common/scripts/ChangeLog-Operations.ps1 b/eng/common/scripts/ChangeLog-Operations.ps1 index 972e91616cd8..98769dcd9eb0 100644 --- a/eng/common/scripts/ChangeLog-Operations.ps1 +++ b/eng/common/scripts/ChangeLog-Operations.ps1 @@ -40,7 +40,6 @@ function Get-ChangeLogEntriesFromContent { $changeLogEntries = [Ordered]@{} try { # walk the document, finding where the version specifiers are and creating lists - $changeLogEntry = $null foreach ($line in $changeLogContent) { if ($line -match $RELEASE_TITLE_REGEX) { $changeLogEntry = [pscustomobject]@{ @@ -48,11 +47,25 @@ function Get-ChangeLogEntriesFromContent { ReleaseStatus = $matches["releaseStatus"] ReleaseTitle = "## {0} {1}" -f $matches["version"], $matches["releaseStatus"] ReleaseContent = @() + Sections = @{} } $changeLogEntries[$changeLogEntry.ReleaseVersion] = $changeLogEntry } else { if ($changeLogEntry) { + if ($line.Trim() -match "^###\s(?.*)") + { + $sectionName = $matches["sectionName"].Trim() + $changeLogEntry.Sections[$sectionName] = @() + $changeLogEntry.ReleaseContent += $line + continue + } + + if ($sectionName) + { + $changeLogEntry.Sections[$sectionName] += $line + } + $changeLogEntry.ReleaseContent += $line } } @@ -195,7 +208,19 @@ function New-ChangeLogEntry { return $null } - if (!$Content) { $Content = @() } + if (!$Content) { + $Content = @() + $Content += "" + $Content += "### Features Added" + $Content += "" + $Content += "### Breaking Changes" + $Content += "" + $Content += "### Key Bugs Fixed" + $Content += "" + $Content += "### Fixed" + $Content += "" + $Content += "" + } $newChangeLogEntry = [pscustomobject]@{ ReleaseVersion = $Version From b54359bed56f1b80d90f233ba4853e048b9b2f80 Mon Sep 17 00:00:00 2001 From: Christian Whitehead Date: Tue, 8 Jun 2021 12:34:19 -0700 Subject: [PATCH 21/21] fix(*): update server calling pom --- sdk/communication/azure-communication-callingserver/pom.xml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sdk/communication/azure-communication-callingserver/pom.xml b/sdk/communication/azure-communication-callingserver/pom.xml index 6fc26747aeba..ae7e00f21e67 100644 --- a/sdk/communication/azure-communication-callingserver/pom.xml +++ b/sdk/communication/azure-communication-callingserver/pom.xml @@ -49,7 +49,7 @@ com.azure azure-core - 1.16.0 + 1.17.0 com.azure @@ -59,7 +59,7 @@ com.azure azure-core-test - 1.6.2 + 1.6.3 test @@ -95,7 +95,7 @@ com.azure azure-core-http-okhttp - 1.6.2 + 1.7.0 test